PdaXrom: Networking with Linux
From OESF
Line 1: |
Line 1: | ||
| + | This guide discusses how to establish an internet connection over a USB cable (TCP/IP over USB) with a linux PC. | ||
| + | |||
| + | |||
| + | == Before You Begin == | ||
| + | You will need | ||
| + | * A PC running linux with a recent kernel | ||
| + | * A Zaurus | ||
| + | * A cable/stand to connect the two | ||
| + | |||
| + | These instructions have been tested with: | ||
| + | * Kubuntu 5.10 with a 2.6.12-10 kernel, and a Sharp Zaurus SL-C1000 with pdaXrom 1.1.0beta1. | ||
| + | * ''If it worked on your machine, add an entry here'' | ||
| + | |||
| + | == Does Your Computer Detect the Zaurus == | ||
| + | |||
| + | On your Z, run "USB" (which is found with the "System Tools" applications. Choose the Network radio button, and make sure that the values are the default: | ||
| + | |||
| + | <pre> | ||
| + | IP: 192.168.129.201 | ||
| + | Netmask: 255.255.255.0 | ||
| + | Gateway: [empty] | ||
| + | DNS: [empty] | ||
| + | </pre> | ||
| + | |||
| + | Press OK. | ||
| + | |||
| + | Now, plug your Zaurus into the appropriate cable and into the PC. For a C1000, the cable is a mini USB cable. [I believe that for older models, your put the Z into its cradle and connect that to the PC.] | ||
| + | |||
| + | On your PC, in a terminal, run <tt>tail /var/log/messages</tt> . You should see something like one of the following: | ||
| + | |||
| + | Output on Kubuntu 5.10 with 2.6.12-10 kernel. | ||
| + | <pre> | ||
| + | user@desktop:~$ tail /var/log/messages | ||
| + | Mar 22 05:43:13 localhost kernel: [4378213.648000] usbcore: registered new driver usbnet | ||
| + | Mar 22 05:43:13 localhost usb.agent[12069]: usbnet: loaded successfully | ||
| + | </pre> | ||
| + | |||
| + | Output on Debian unstable with 2.6.14-2 kernel. | ||
| + | <pre> | ||
| + | user@desktop:~# tail /var/log/messages | ||
| + | Dec 17 17:35:58 localhost kernel: usb 2-2: new full speed USB device using uhci_hcd and address 10 | ||
| + | Dec 17 17:35:58 localhost kernel: usb0: register 'zaurus' at usb-0000:00:10.0-2, pseudo-MDLM (BLAN) device, 52:8c:8b:4f:e4:90 | ||
| + | </pre> | ||
| + | |||
| + | |||
| + | |||
| + | The Debian guide says to Find that the module was loaded: | ||
| + | <pre> | ||
| + | user@desktop:~# lsmod | grep zaurus | ||
| + | usbnet 17064 2 zaurus,cdc_ether | ||
| + | </pre> | ||
| + | |||
| + | I got no results doing this. However, doing a | ||
| + | <pre> | ||
| + | blackmore@death:~$ lsmod | grep usbnet | ||
| + | usbnet 34824 0 | ||
| + | usbcore 118396 6 usbnet,usb_storage,usbhid,ehci_hcd,uhci_hcd | ||
| + | mii 5760 3 usbnet,8139too,8139cp | ||
| + | </pre> | ||
| + | |||
| + | Next, run <tt>ifconfig -a</tt>. [Note that the "if" in commands like this that start with it, stands for network InterFace.] You should see an unconfigured usb0 module. | ||
| + | |||
| + | <pre> | ||
| + | user@desktop:~$ ifconfig -a | ||
| + | ... lines removed ... | ||
| + | usb0 Link encap:Ethernet HWaddr 1E:57:BF:FA:33:4D | ||
| + | BROADCAST MULTICAST MTU:1500 Metric:1 | ||
| + | RX packets:0 errors:0 dropped:0 overruns:0 frame:0 | ||
| + | TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 | ||
| + | collisions:0 txqueuelen:1000 | ||
| + | RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) | ||
| + | </pre> | ||
| + | |||
| + | If this is the case, you can now establish a connect. On your Linux PC, issue this command: <tt>sudo ifconfig usb0 192.168.129.200 netmask 255.255.255.0 up</tt>. Note that this IP ends in 200, while the IP we set on the Zaurus ends in 201. | ||
| + | |||
| + | Now you can run <tt>netstat -r</tt> to see a routing table. | ||
| + | |||
| + | <pre> | ||
| + | user@desktop:~$ netstat -r | ||
| + | Kernel IP routing table | ||
| + | Destination Gateway Genmask Flags MSS Window irtt Iface | ||
| + | 192.168.129.0 * 255.255.255.0 U 0 0 0 usb0 | ||
| + | XX.XX.XXX.0 * 255.255.255.0 U 0 0 0 eth0 | ||
| + | default XX.XX.XXX.1 0.0.0.0 UG 0 0 0 eth0 | ||
| + | </pre> | ||
| + | |||
| + | The first line shows the usb0 device. This is a good thing. | ||
| + | |||
| + | If you issue the same command on your Zaurus, you'll get: | ||
| + | |||
| + | <pre> | ||
| + | # netstat -r | ||
| + | Kernel IP routing table | ||
| + | Destination Gateway Genmask Flags MSS Window irtt Iface | ||
| + | 192.168.129.0 * 255.255.255.0 U 40 0 0 usb0 | ||
| + | </pre> | ||
| + | |||
| + | Now we can try pinging the Zaurus from the PC: | ||
| + | |||
| + | <pre> | ||
| + | user@desktop:~$ ping 192.168.129.201 | ||
| + | PING 192.168.129.201 (192.168.129.201) 56(84) bytes of data. | ||
| + | 64 bytes from 192.168.129.201: icmp_seq=1 ttl=64 time=3.05 ms | ||
| + | 64 bytes from 192.168.129.201: icmp_seq=2 ttl=64 time=1.13 ms | ||
| + | 64 bytes from 192.168.129.201: icmp_seq=3 ttl=64 time=1.67 ms | ||
| + | 64 bytes from 192.168.129.201: icmp_seq=4 ttl=64 time=2.10 ms | ||
| + | 64 bytes from 192.168.129.201: icmp_seq=5 ttl=64 time=1.26 ms | ||
| + | 64 bytes from 192.168.129.201: icmp_seq=6 ttl=64 time=1.04 ms | ||
| + | |||
| + | --- 192.168.129.201 ping statistics --- | ||
| + | 6 packets transmitted, 6 received, 0% packet loss, time 5025ms | ||
| + | rtt min/avg/max/mdev = 1.041/1.710/3.054/0.702 ms | ||
| + | </pre> | ||
| + | |||
| + | You should get similar results by running <tt>ping 192.168.129.201</tt> on your Zaurus. | ||
| + | |||
| + | The next steps discuss how to make this connection permanent. Until this page is finished, please see the link below. | ||
== See Also == | == See Also == | ||
Revision as of 14:10, 22 March 2006
This guide discusses how to establish an internet connection over a USB cable (TCP/IP over USB) with a linux PC.
Before You Begin
You will need
- A PC running linux with a recent kernel
- A Zaurus
- A cable/stand to connect the two
These instructions have been tested with:
- Kubuntu 5.10 with a 2.6.12-10 kernel, and a Sharp Zaurus SL-C1000 with pdaXrom 1.1.0beta1.
- If it worked on your machine, add an entry here
Does Your Computer Detect the Zaurus
On your Z, run "USB" (which is found with the "System Tools" applications. Choose the Network radio button, and make sure that the values are the default:
IP: 192.168.129.201 Netmask: 255.255.255.0 Gateway: [empty] DNS: [empty]
Press OK.
Now, plug your Zaurus into the appropriate cable and into the PC. For a C1000, the cable is a mini USB cable. [I believe that for older models, your put the Z into its cradle and connect that to the PC.]
On your PC, in a terminal, run tail /var/log/messages . You should see something like one of the following:
Output on Kubuntu 5.10 with 2.6.12-10 kernel.
user@desktop:~$ tail /var/log/messages Mar 22 05:43:13 localhost kernel: [4378213.648000] usbcore: registered new driver usbnet Mar 22 05:43:13 localhost usb.agent[12069]: usbnet: loaded successfully
Output on Debian unstable with 2.6.14-2 kernel.
user@desktop:~# tail /var/log/messages Dec 17 17:35:58 localhost kernel: usb 2-2: new full speed USB device using uhci_hcd and address 10 Dec 17 17:35:58 localhost kernel: usb0: register 'zaurus' at usb-0000:00:10.0-2, pseudo-MDLM (BLAN) device, 52:8c:8b:4f:e4:90
The Debian guide says to Find that the module was loaded:
user@desktop:~# lsmod | grep zaurus usbnet 17064 2 zaurus,cdc_ether
I got no results doing this. However, doing a
blackmore@death:~$ lsmod | grep usbnet usbnet 34824 0 usbcore 118396 6 usbnet,usb_storage,usbhid,ehci_hcd,uhci_hcd mii 5760 3 usbnet,8139too,8139cp
Next, run ifconfig -a. [Note that the "if" in commands like this that start with it, stands for network InterFace.] You should see an unconfigured usb0 module.
user@desktop:~$ ifconfig -a
... lines removed ...
usb0 Link encap:Ethernet HWaddr 1E:57:BF:FA:33:4D
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
If this is the case, you can now establish a connect. On your Linux PC, issue this command: sudo ifconfig usb0 192.168.129.200 netmask 255.255.255.0 up. Note that this IP ends in 200, while the IP we set on the Zaurus ends in 201.
Now you can run netstat -r to see a routing table.
user@desktop:~$ netstat -r Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 192.168.129.0 * 255.255.255.0 U 0 0 0 usb0 XX.XX.XXX.0 * 255.255.255.0 U 0 0 0 eth0 default XX.XX.XXX.1 0.0.0.0 UG 0 0 0 eth0
The first line shows the usb0 device. This is a good thing.
If you issue the same command on your Zaurus, you'll get:
# netstat -r Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 192.168.129.0 * 255.255.255.0 U 40 0 0 usb0
Now we can try pinging the Zaurus from the PC:
user@desktop:~$ ping 192.168.129.201 PING 192.168.129.201 (192.168.129.201) 56(84) bytes of data. 64 bytes from 192.168.129.201: icmp_seq=1 ttl=64 time=3.05 ms 64 bytes from 192.168.129.201: icmp_seq=2 ttl=64 time=1.13 ms 64 bytes from 192.168.129.201: icmp_seq=3 ttl=64 time=1.67 ms 64 bytes from 192.168.129.201: icmp_seq=4 ttl=64 time=2.10 ms 64 bytes from 192.168.129.201: icmp_seq=5 ttl=64 time=1.26 ms 64 bytes from 192.168.129.201: icmp_seq=6 ttl=64 time=1.04 ms --- 192.168.129.201 ping statistics --- 6 packets transmitted, 6 received, 0% packet loss, time 5025ms rtt min/avg/max/mdev = 1.041/1.710/3.054/0.702 ms
You should get similar results by running ping 192.168.129.201 on your Zaurus.
The next steps discuss how to make this connection permanent. Until this page is finished, please see the link below.
See Also
Debian unstable Zaurus USB-network how-to
Up to pdaXrom main page.

