[MDA III, XDA III, PDA2k, 9090 General] rw712:
Connecting to the PDA with usbnet - tricky

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.

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-11x0 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:

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!

Rick

This information soon to appear on my blog: http://www.rickwargo.com.