Linux on XV6600 – Connecting over usbnet – tricky

Rick Wargo

After booting, everything seems to be working well…well almost.

On my Verizon XV6600, the image is offset to the right (and maybe top) about 8 pixels, leaving a thick white line own the left hand side. I have yet to overcome that (help anyone?)

The other difficulty is in connecting via ssh using usbnet. The biggest tricks are to set a route to the device and, if using a firewall, make certain the appropriate rules are there to that the firewall does not get in the way. The other trick is getting the PDA to see the usb0 network.

Before connecting the device, do a tail -f /var/log/messages on the linux box to see if the PDA connects. When plugging in the USB cable to the linux box from the PDA, you should see something similar to the following in the messages log:

usb 2-2.1: new full speed USB device using uhci_hcd and address 40

(I actually see a few of these with error messages in between (device descriptor read/64, error -71).

If you don’t see anything when connecting, try one of the following:

    - Restart the boot procedure with the USB cable plugged in.
    - Unload the drivers, plug in the cable and then reload the drivers.

The following will unload the drivers; you must be in a root shell on the PDA.

root@blueangel:-~# rmmod g_ether
root@blueangel:-~# rmmod pxa2xx_udcthen plug in the usb cable

root@blueangel:-~# modprobe g_ether


When I do the rmmod/modprobe, I see the following in my messages log:

Feb 23 20:38:07 chocolate kernel: usb0: unregister ‘cdc_subset’ usb-0000:00:1f.4-2.1, Linux Device
Feb 23 20:38:55 chocolate kernel: usb 2-2.1: new full speed USB device using uhci_hcd and address 56
Feb 23 20:38:55 chocolate kernel: usb0: register ‘cdc_subset’ at usb-0000:00:1f.4-2.1, Linux Device, a6:7e:1b:da:a3:ae


Also, lsusb on my linux box yields:

Bus 002 Device 056: ID 049f:505a Compaq Computer Corp. SA-11×0 based Linux Device, or Itsy (experimental)


If the usb0 device disappears from the PDA, restart the network with the following command:


root@blueangel:-~# /etc/init.d/networking restart


Now that the usbnet connection is there, I need to set up the network.
Again, the transcript I used to connect with ssh:


[root@chocolate ~]# ifconfig usb0 192.168.0.205 broadcast 192.168.0.205 netmask 255.255.255.255
[root@chocolate ~]# ifconfig usb0
usb0 Link encap:Ethernet HWaddr A6:7E:1B:DA:A3:AE
inet addr:192.168.0.205 Bcast:192.168.0.205 Mask:255.255.255.255
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:42 (42.0 b)
[root@chocolate ~]# route add 192.168.0.206 gw 192.168.0.205
[root@chocolate ~]# netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.0.206 192.168.0.205 255.255.255.255 UGH 0 0 0 usb0
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
[root@chocolate ~]# ssh -X 192.168.0.206
The authenticity of host ’192.168.0.206 (192.168.0.206)’ can’t be established.
RSA key fingerprint is ??:??:??:??:??:??:??:??:??:??:??:??:??:??:??:??.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ’192.168.0.206′ (RSA) to the list of known hosts.
root@192.168.0.206‘s password: rootme this is not displayed
xauth: creating new authority file /home/root/.Xauthority
root@blueangel:~#

Unfortunately, this doesn’t always work the first time through. You may have to disconnect the USB cable and reconnect. Afterwards, you’ll need to do the ‘netstat -r’ command again. Then you may actually be able to do the ssh!

Finally, if you have a firewall installed, before you can ssh (or anything else), you’ll have to insert some rules. The ones I used are:

[root@chocolate ~]# iptables -I INPUT 1 -s 192.168.0.206/32 -d 192.168.0.205/16 -j ACCEPT
[root@chocolate ~]# iptables -I OUTPUT 1 -s 192.168.0.205/16 -d 192.168.0.206/32 -j ACCEPT
# the following two allow the Blueangel to connect to the outside world (assuming the box is set up as a NAT router)
[root@chocolate ~]# iptables -I FORWARD 1 -d 192.168.0.206/32 -s 0/0 -j ACCEPT
[root@chocolate ~]# iptables -I FORWARD 1 -s 192.168.0.206/32 -d 0/0 -j ACCEPT


Not only does all this assume the IP address 192.168.0.205 on the Linux box and 192.168.0.206 on the PDA, it requires it. The distribution on the PDA downloaded from the link earlier (contained in gpe-ba.tar.bz) sets up the PDA with the 192.168.0.205 address.

Try the following from the ssh connection (assuming you used the -X flag):
root@blueangel:~# gpe-info

You’ll see the following…

Good luck and enjoy!

One Response to “Linux on XV6600 – Connecting over usbnet – tricky”

  1. Anonymous Says:

    VERY late comment, but just wanted to say thanks for suggesting restarting the device to get the usbnet connection going. It seems to have worked for stupid me.

Leave a Reply

stop spam with honeypot!