/home/shakir

While reading the logs of people coming to my website, I found out that some came from Google, searching for how to add RSS feed icon to their blogspot blog. This is probably due to my previous post.

Though I’ve not been using blogspot as my blogging platform for quite a long time already, I’ll just create a short howto here on to do just that.

From your blog’s admin panel, go to Settings -> Template. From there click on the "Add a Page Element" link, and select  "Text" from the selections.

On the editor that pops out, fill up the title, and for the content, click "Edit HTML" and add this lines to the text area:


    Any text

You can change http://yourblog.blogspot.com/rss.xml to http://yourblog.blogspot.com/atom.xml, whichever that you prefer, and http://www.any-website.com/rss-icon.jpg is a URL to any RSS icon in the net that you prefer (or upload your own)

I hope this helps

Tags:

12 Dec, 2007

Shift Happens

Posted by: shakir In: Nerd Public Journal?

Was browsing some development blogs, and came to this slide;

A scary thought; at least to me..

Basicly this is how my home network looks like;

As I’m upgrading the Linux I have in my Access Point, a.k.a. my home server, a.k.a. an SBC, I’ll just share it here in my blog.

Here’s what I need:

- SBC (Single Board Computer), wrap2c in my case
- Storage - I’m using 2GB CF card here
- Mini PCI wireless adapter - mine is CM9 (Atheros based)
- RS232 adapter
- USB - RS232 converter (optional, as my laptop doesnt have serial port)
- CF card reader
- and a camera to snap the photos in this post..

Instead of installing Debian or or Gentoo as what I described in my previous post, I’m gonna just install Voyage, a minimal Debian based distro customised for SBCs.

After downloading the tarball, extract it with sudo;

shakir@herugrim ~ $ sudo tar xvjf voyage-version.tar.bz2

Time to plug in the CF card, and let’s see where it is attached to:

shakir@herugrim ~ $ cat /proc/partitions
major minor  #blocks  name
   8     0  156290904 sda
   8     1   21494938 sda1
   8     2    8795587 sda2
   8     3    2939895 sda3
   8     4          1 sda4
   8     5    9775521 sda5
   8     6  113282316 sda6
   8    16    2014992 sdb
   8    17    2014721 sdb1

Here I can see my 2Gb CF is identified as /dev/sdb, and with this I run;

shakir@herugrim ~ $ cd voyage-version
shakir@herugrim ~/voyage-version $ less README

and follow the installation guide, which is in section 2 of the README :)

To see if things really work, I’m gonna need to make sure I can use my USB RS232 converter. Let’s plug it in and see what the kernel says;

usb 5-1: new full speed USB device using uhci_hcd and address 2
usb 5-1: configuration #1 chosen from 1 choice
usbcore: registered new interface driver usbserial
/build/buildd/linux-source-2.6.22-2.6.22/drivers/usb/serial/usb-serial.c: USB Serial support registered for generic
usbcore: registered new interface driver usbserial_generic
/build/buildd/linux-source-2.6.22-2.6.22/drivers/usb/serial/usb-serial.c: USB Serial Driver core
/build/buildd/linux-source-2.6.22-2.6.22/drivers/usb/serial/usb-serial.c: USB Serial support registered for pl2303
pl2303 5-1:1.0: pl2303 converter detected
usb 5-1: pl2303 converter now attached to ttyUSB0
usbcore: registered new interface driver pl2303
/build/buildd/linux-source-2.6.22-2.6.22/drivers/usb/serial/pl2303.c: Prolific PL2303 USB to serial adaptor driver

What’s important from the long message is that the kernel has recognized the converter, and attach it to /dev/ttyUSB0. If your kernel doesn’t recognize the converter, fom the log you can see that it requires pl2303 module, so go re-compile your kernel to have it supported..

After everything is connected, lets run minicom;

shakir@herugrim ~ $ sudo minicom -s

Select the Serial port setup option and change it to this;

exit;

power on the board, and hope for the best :)

We’ve got the login prompt, mission accomplished :D

10 Dec, 2007

Fishy Story

Posted by: shakir In: Nerd Public Journal?

Get to see this from my office’s window today;

and on 12x zoom of my camera;

Reminds me when net casting was among my hobby :D

 

Smiletag Shoutbox is the shoutbox that I have on my website’s sidebar. I’ve been using it since I was using Joomla for my website, and now that I moved to Wordpress, Smiletag is still my shoutbox of choice.

Installing it in Joomla is very straightforward, while it’s not really the case with Wordpress, as it requires a little bit of coding.

The application can be downloaded from Hivemind’s website (requires free registration)  and it can then be installed as any other Wordpress plugin. The shoutbox however doesn’t immediately show up in the page, and there’s no option in the admin console for that.

To add it to the page we must add some codes, and in our case, to the sidebar’s code. Edit it from the admin panel;

Presentation -> Theme Editor -> sidebar.php

or can be edited with any editor;

/path/to/current/template/sidebar.php

This is an example of a very simple Wordpress template with widget support;


The sidebar uses <ul> for its items, and so we need to add <li> element to add our shoutbox (and probably any other static stuff) to it. We also need to add a header (<h2> probably) for the item’s title, and add the shoutbox’s code to it. The final sidebar should look something like this;


This might not exactly be the case with every template, but the idea is about the same. Happy blogging!

06 Dec, 2007

(more) Books…

Posted by: shakir In: Nerd Public Journal?

I made another visit to MPH, but this time to its Mid valley branch, and managed to grab these;

Hope they don’t just collect dust..

I received a package earlier today, and was very happy to find out that it’s the Huawei E220 that I ordered few days ago. This Huawei E220 is a 3G card that supports speed of up to 3.6 Mbps, using HSDPA technology, and it makes me can’t wait to have it work with Gutsy Gibbon. After struggling for quite some time, I found out that the answer to my problem was just these two lines of command:

sudo modprobe -r uhci_hcd
sudo modprobe uhci_hcd

If that short version of my solution doesn’t help, please read ahead…

I’ve been trying to get this modem to work with Gutsy Gibbon, but the online howtos that I found on the net doesnt reliably work for me.

Weird enough for me initially as sometime I can just use wvdial (more on this afterward) and get connected, while most of the time I got various errors about the modem. With these non-reproducible errors and successes, I do some trial and error while looking at the kernel logs, and came up with this one final observation;

shakir@herugrim ~ $ uname -r  # just to show the kernel I'm using, as your mileage may vary
2.6.22-14-generic

At one shell I run this to see kernel messages;

sudo tail -f  /var/log/messages

and got this messages upon plugging in my Huawei E220 to the USB port;

usb 3-1: new full speed USB device using uhci_hcd and address 5
usb 3-1: configuration #1 chosen from 1 choice
usbcore: registered new interface driver libusual
usbcore: registered new interface driver usbserial
/build/buildd/linux-source-2.6.22-2.6.22/drivers/usb/serial/usb-serial.c: USB Serial support registered for generic
usbcore: registered new interface driver usbserial_generic
/build/buildd/linux-source-2.6.22-2.6.22/drivers/usb/serial/usb-serial.c: USB Serial Driver core
/build/buildd/linux-source-2.6.22-2.6.22/drivers/usb/serial/usb-serial.c: USB Serial support registered for GSM modem (1-port)
option 3-1:1.0: GSM modem (1-port) converter detected
usb 3-1: GSM modem (1-port) converter now attached to ttyUSB0

Nice, it has detected my Huawei E220 as GSM modem, and attach it to /dev/ttyUSB0. Let’s create a wvdial configuration to connect to the telco (Celcom in my case). My /etc/wvdial.conf looks like this;

[Dialer Celcom3G]
Phone = *99***1#
Modem = /dev/ttyUSB0
Username = user
Password = pass
ISDN = 0
New PPPD = yes
Baud = 1843200
Init2 = ATZ
Init3 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = Analog Modem

So let’s just connect;

shakir@herugrim ~ $ sudo wvdial Celcom3G
WvDial<*1>: WvDial: Internet dialer version 1.56
WvModem<*1>: Cannot get information for serial port.
WvDial<*1>: Initializing modem.
WvDial<*1>: Sending: ATZ
WvDial<*1>: Sending: ATQ0
WvDial<*1>: Re-Sending: ATZ
WvDial: Modem not responding.

Ouch, an error. The modem has been detected, what could go wrong? After some time, and no success with the available tutorials, I finally got this working, as the problem was related to the USB drivers. What I did was to reload the uhci_hcd module

shakir@herugrim ~ $ sudo modprobe -r uhci_hcd

Lets take a look at what the kernel says about this;

[..snipped..]
Dec  4 22:45:24 herugrim kernel: [ 1343.504000] usb 3-1: USB disconnect, address 6
Dec  4 22:45:24 herugrim kernel: [ 1343.504000] option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
Dec  4 22:45:24 herugrim kernel: [ 1343.504000] option 3-1:1.0: device disconnected
[..snipped..]

and then lets load the module back again

shakir@herugrim ~ $ sudo modprobe uhci_hcd

and see what happens;

USB Universal Host Controller Interface driver v3.0
ACPI: PCI Interrupt 0000:00:1a.0[A
uhci_hcd 0000:00:1a.0: UHCI Host Controller
[..snipped..]
usb 3-1: new full speed USB device using uhci_hcd and address 2
usb 3-1: configuration #1 chosen from 1 choice
option 3-1:1.0: GSM modem (1-port) converter detected
usb 3-1: GSM modem (1-port) converter now attached to ttyUSB0
option 3-1:1.1: GSM modem (1-port) converter detected
usb 3-1: GSM modem (1-port) converter now attached to ttyUSB1
option 3-1:1.2: GSM modem (1-port) converter detected
usb 3-1: GSM modem (1-port) converter now attached to ttyUSB2
[..snipped..]

Last time the GSM modem was attached to just /dev/ttyUSB0, but now it’s also attached to /dev/ttyUSB1 and /dev/ttyUSB2. And I guess it’s time to connect using wvdial;

WvDial<*1>: WvDial: Internet dialer version 1.56
WvModem<*1>: Cannot get information for serial port.
WvDial<*1>: Initializing modem.
WvDial<*1>: Sending: ATZ
WvDial Modem<*1>: ATZ
WvDial Modem<*1>: OK
WvDial<*1>: Sending: ATZ
WvDial Modem<*1>: ATZ
WvDial Modem<*1>: OK
WvDial<*1>: Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
WvDial Modem<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
WvDial Modem<*1>: OK
WvDial<*1>: Modem initialized.
WvDial<*1>: Sending: ATDT*99***1#
WvDial<*1>: Waiting for carrier.
WvDial Modem<*1>: ATDT*99***1#
WvDial Modem<*1>: CONNECT
WvDial<*1>: Carrier detected.  Waiting for prompt.
WvDial: Don't know what to do!  Starting pppd and hoping for the best.
WvDial: Starting pppd at Tue Dec  4 22:49:25 2007
WvDial: Pid of pppd: 6433
WvDial<*1>: Using interface ppp0
WvDial<*1>: local  IP address 10.188.15.175
WvDial<*1>: remote IP address 10.64.64.64
WvDial<*1>: primary   DNS address 202.188.0.133
WvDial<*1>: secondary DNS address 202.188.1.5

It works, yeay :D As usual, lets create a script for this;

#!/bin/bash

sudo modprobe -r uhci_hcd
sudo modprobe uhci_hcd

echo "Waiting kernel to detect modem device"

# Wait till the kernel recognizes our E220
while true; do

        # Read log
        tail -n 20 /var/log/messages  > access.history
        sleep 1
        tail -n 20 /var/log/messages  > access.current

        LOG=`diff access.history access.current | grep ">" | tr -d ">"`

        # Check if it is detected
        if [[ "$LOG" =~ "converter now attached to ttyUSB1" ]]; then
                echo "Modem device detected, dialing..."
                # If it is, get out of the loop immedietly
                break
        fi
done

rm access.history access.current

# Start dialing
sudo wvdial Celcom3G

p/s: The script is now maintained here. Please go there to see the latest updates and discussions

26 Nov, 2007

Books…

Posted by: shakir In: Information Insemination| Nerd Public Journal?

I went to One Utama MPH to get myself the last available copy of the LPI Linux Certification In A Nutshell book, to not fail my LPI 20x exam, again :( Though I prefer Exam Cram series more for the purpose, this book seems to be the only option that I have, as other books doesn’t cover LPIC 2 exams. I’ve also bought the CSS book just to add to my Pocket Reference series of collection.

Though I’m not into it,  LPIC 1 Exam Cram 2 was also not available. I blame Ditesh for the shortage :)

I was also looking for Python Cookbook, and Django or Pylons books, but they were all not on the shelves. With this I pledge anyone who has these books to come forward and help me with that, haha.

# The LPI manual provided by the savannah project doesn’t really cover LPI syllabus, and so if you’re planning to pass your LPI exams, don’t just rely on them. Experience speaks :D

# There was only 7 Python books at One Uutama MPH by the time I was there. How sad.

Tags: , ,

22 Nov, 2007

Huawei E600 For Sale

Posted by: shakir In: Nerd Public Journal?

I’ve been a happy user of this Huawei E600;

till I got a brand new Dell XPS M1330, which doesn’t have PCMCIA slot for me to plug this data-card.

I need to get myself USB based 3G card, and so if anyone have cheap Huawei E220 for sale, or wants to get my Huawei E600, please contact me.

# The E600 unit is a replacement unit  that I’ve just recently got from the warranty, so it’s basicly brand new, but without warranty :)

20 Nov, 2007

RSS feed for blogger.com

Posted by: shakir In: Information Insemination

Just found out that blogger.com provides RSS feeds for blogs they host. Just add someblog.blogspot.com/rss.xml to your favorite RSS reader.

They also provide ATOM feed, which is available at someblog.blogspot.com/atom.xml

Now my @$$ is saved for not missing to read my friend’s latest blog, anymore :D

p/s:If you’re looking for a simple way to add RSS feed icon for your blogspot blog, I’ve made a short howto here for that.


  • tebu: nak tanya sikit, untuk maxis punya kenapa dia ada keluar error +CME ERROR: SIM PIN required. user: maxis pass: wap betui ka..sim pin tu nak ke
  • shakir: Ditesh: I'm still able to download the game here from my end, but anyway, I've emailed you the game. p/s: The new Golden Axe game is in the making
  • Ditesh Gathani: Hi, I've been trying to download the said software but the site keeps timing out. Would it be possible for you to share the software through email?
  • apis: he he T Bag....
  • apis: cayalah
  • achoi: Salam, Buku tentang network security xde ke bang. Klu ada nk tempah awl² skit.hee :D
  • shakir: I blog about this actually because I was frustrated when I got no reply from the hosting company after reporting to them about this, though there was
  • Danesh: Talk to the hosting company and get to sponsor you a co-hosted package for your discovery... :D
  • shakir: Thanks for the invite bang. But then, I'm just a (PHP) script kiddie, tak layak nak masuk competition ni.. :)
  • shakir: I've already updated the firmware, and I don't keep copy of it. Sorry.

About


Twitter

Disclaimer

The information in this weblog is provided "AS IS" with no warranties, and confers no rights. This weblog does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my own personal opinion. Inappropriate comments will be deleted at the authors discretion. All code samples (if any, ever) are provided "AS IS" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.