Author Topic: TCP over USB fails after suspend  (Read 3182 times)

zepheir

  • Newbie
  • *
  • Posts: 15
    • View Profile
TCP over USB fails after suspend
« on: October 19, 2004, 11:51:04 pm »
I finally got TCP over USB working last night. The gateway computer is an XP box and I was able to surf the net and use qpe-gaim to send instant messages. However, after I suspend the Zaurus and then try to connect to the computer I it doesn't seem to want to work.

I open NetFront and a terminal window and type 'qcop QPE/Network "up()"' but when I try to use NetFront I get a TCP connect error. At first I thought it had something to do with an error I was getting after the qcop command --> "SlSharedManager: cannot find proc entry" however that doesn't seem to be related and appears seemingly randomly.

I did notice, however, that when I su-ed to root and typed "route add default gw 192.168.0.1" it didn't complain of a duplicate entry. After that when I would try to browse with NetFront I wouldn't immediately get a TCP error. It would look as though it was trying to find the site. At the same time I tried to browse the web from the gateway computer and noticed that both seemed to time out. After unplugging the Zaurus, the gateway computer would be fine though.

Anyone have any clues as to why this might happen? I know that if I reboot the Zaurus it seems to fix the problem (still have to run "route add default gw 192.168.0.1" though. Is there anyway I can automate that?).

barnarda

  • Newbie
  • *
  • Posts: 14
    • View Profile
    • http://
TCP over USB fails after suspend
« Reply #1 on: October 20, 2004, 12:34:30 am »
Open up terminal, su root
cd /etc/hotplug
vi routeadd.sh

#!/bin/sh
route add default gw 192.168.0.1

Save the file.

vi routedel.sh

#!/bin/sh
route del default

Save the file.

Open up /etc/hotplug/usbd.func

At the end of the first function add the line
/etc/hotplug/routeadd.sh

At the end of the second function add the line
/etc/hotplug/routedel.sh

Make sure the routeadd.sh and routedel.sh are executable.
SL-5600 (PXA-250) SL-5600 (PXA-250)
SL-6000L (Seeking replacement and expansion jacket)
1GB Sandisk CF, Goldx 5-in-1 USB quick connect kit
1 GB Sandisk SD, Linksys WCF12
2x 32MB Lexar CF, 1 GB Lexar Jumpdrive Secure
256MB Sandisk CF, Ambicom BT2000-CF
Ambicom WL1100C, Ambicom CF GPS Pro
Pocketop Keyboard, Sharp CF camera

zepheir

  • Newbie
  • *
  • Posts: 15
    • View Profile
TCP over USB fails after suspend
« Reply #2 on: October 20, 2004, 12:54:06 am »
Thank you very much Barnarda. That resolves my automating the route adding. Now I just need to figure out why I get TCP connect errors after I suspend the Zaurus. The strange thing is that the XP box that is the gateway isn't able to surf the net when the Zaurus is plugged in. Forgot to mention that I can ping both computers from the other.

barnarda

  • Newbie
  • *
  • Posts: 14
    • View Profile
    • http://
TCP over USB fails after suspend
« Reply #3 on: October 20, 2004, 01:22:09 am »
My solution was to "Bridge" the connections in Windows XP.
(Zaurus Interface and Network Interface)

Otherwise, Windows uses the "most recent" network connection and the Zaurus connect is pre-empting your gateway connection.

Open up Network Properties, Click on your Ethernet Interface, CTRL-Click on the Zaurus interface while it's connected (In other words, Highlight both interfaces)and then Right Click. Select Bridge connections.

This should take care of your networking problem while the Zaurus is connected.
SL-5600 (PXA-250) SL-5600 (PXA-250)
SL-6000L (Seeking replacement and expansion jacket)
1GB Sandisk CF, Goldx 5-in-1 USB quick connect kit
1 GB Sandisk SD, Linksys WCF12
2x 32MB Lexar CF, 1 GB Lexar Jumpdrive Secure
256MB Sandisk CF, Ambicom BT2000-CF
Ambicom WL1100C, Ambicom CF GPS Pro
Pocketop Keyboard, Sharp CF camera

zepheir

  • Newbie
  • *
  • Posts: 15
    • View Profile
TCP over USB fails after suspend
« Reply #4 on: October 27, 2004, 04:27:29 am »
Thanks for your help barnarda. I wasn't actually able to get it connected like you said. When I bridged the connections, I was able to ping back and forth between the XP box (gateway) and the Zaurus, and from the Zaurus to the router, but I wasn't able to get it connected.

I decided to try ICS again, and for some reason this time it works. Haven't had any problems with suspends or reboots. I'm not sure what was different from what I had before though .