Saturday, October 18, 2008
Wednesday, October 15, 2008
Create USB networking with n810 from Ubuntu hardy
It seems that everything with maemo is pain to do at first. And its true. I just tried to set up usb networking and it took me around 3 hours to do it. I think its only because of the lack of community documentation. If you search for maemo resources in net, you will be amazed how reluctant a community can be in documenting. Anyway, lets start. I did this with Ubuntu hardy.
For the device:
Note: you need to do most of the things in root mode. TO be root you need to install "becomeroot" and the issue the command "sudo gainroot" in xterm. How to install become root can be found by searching the Internet.
You first need to install the g_ether module in the kernel of the device so that the usb networking is virtually working as ethernet connection. For that first connect the device with your computer and if the memory card is mounted in linux, unmount it, otherwise your usb interface would be busy and you will get something like device is busy. To unmount right click on the volume that is mounted on your desktop and unmount.
Then issue the following command in the device:
where you can see the g_ether module. Now your usb networking mode is enabled. You should issue the command
Host machine:
Ubuntu normally is not equipped with usb networking mode. We need to enable it first. for doing this, edit the /etc/network/interfaces file and append the following lines to it:
For the device:
Note: you need to do most of the things in root mode. TO be root you need to install "becomeroot" and the issue the command "sudo gainroot" in xterm. How to install become root can be found by searching the Internet.
You first need to install the g_ether module in the kernel of the device so that the usb networking is virtually working as ethernet connection. For that first connect the device with your computer and if the memory card is mounted in linux, unmount it, otherwise your usb interface would be busy and you will get something like device is busy. To unmount right click on the volume that is mounted on your desktop and unmount.
Then issue the following command in the device:
insmod /mnt/initfs/lib/modules/2.6.21-omapl/g_ether.koand that will load the g_ether module into your kernel. and if you issue the command lsmod, you should see something like this:
Module Size Used by
g_ether 26416 0 - Live 0xbf058000
g_file_storage 27560 0 - Live 0xbf050000
cx3110x 56200 0 - Live 0xbf041000
umac 258788 1 cx3110x, Live 0xbf000000 (P)
where you can see the g_ether module. Now your usb networking mode is enabled. You should issue the command
ifup usb0to make your usb interface up. The usb interface is named usb0 and gets teh ip address 192.168.2.15 autometically. Now you need to configure your host.
Host machine:
Ubuntu normally is not equipped with usb networking mode. We need to enable it first. for doing this, edit the /etc/network/interfaces file and append the following lines to it:
auto usb0and then restart your networking service using the command:
iface usb0 inet static
address 192.168.2.14
netmask 255.255.255.0
network 192.168.2.0
broadcast 192.168.2.255
/etc/init.d/networkign restartif you find some problem such as:
SIOCSIFADDR: No such devicethen you know that your usb interface is busy so the networking daemon cannot capture it. Just unplug the usb cable from the socket and then try the restarting again. It will happen. Now you have a usb0 interface in you ifconfig. And should be able to ping the device after you attack the usb cable again.
usb0: ERROR while getting interface flags: No such device
Labels:
device not found,
maemo,
n810,
ubuntu,
usb networking,
usb0
Subscribe to:
Posts (Atom)