OESF Portables Forum

Everything Else => Zaurus Distro Support and Discussion => Distros, Development, and Model Specific Forums => Archived Forums => Angstrom & OpenZaurus => Topic started by: Windrose on November 09, 2004, 12:15:15 pm

Title: USB connect to Windows (redux)
Post by: Windrose on November 09, 2004, 12:15:15 pm
I know this is a Frequently Asked Question, but for me it's a Constantly Doesn't Work. I would really appreciate any pointers or explanation of what's going on.
Basically, I have an SL5600 running the OZ 3.5.1 ROM and I want to use the usb cradle to connect to a Windows computer using TCP/IP. Two different Windows boxes, a desktop running Win2000 and a notebook running XPPro.
I'm using the basic Sharp "Zaurus Manager" desktop drivers that come with the 5600. I'm not greedy, I just want to be able to ftp to the Z to synch daybook files and such. And if I could telnet to it, that would be nice too.
I have tried to follow various step-by-step screeds, setting the ip on the Zaurus to 192.168.129.201, subnet mask to 255.255.255.0 Or I've tried 192.168.129.1 I can get close. The usb ethernet connection appears in the Z as "active", and on the windows end the ftp and telnet attempts do not necessarily claim that the Z doesn't exist, but the best I've been able to achieve is a "connection timed out" response, as if the Z refused to play. I've set network security to "accept connections from all", but to no avail.
Does anyone recognize where I'm going wrong here?
TIA
Windrose
Title: USB connect to Windows (redux)
Post by: corky on November 09, 2004, 12:34:49 pm
You were close but on the wrong box. the zaurus ip  should be 192.168.129.201 the windows box has to have the ip set to 192.168.129.1.

corky
Title: USB connect to Windows (redux)
Post by: lardman on November 09, 2004, 12:45:54 pm
Quote
The usb ethernet connection appears in the Z as "active", and on the windows end the ftp and telnet attempts do not necessarily claim that the Z doesn't exist, but the best I've been able to achieve is a "connection timed out" response, as if the Z refused to play. I've set network security to "accept connections from all", but to no avail.

Telnet's not enabled by default afaik, ftp must be to port 4242, and the standard Windows (XP at least) ftp client doesn't allow both a port and a username to be specified.

Try ping'ing both ways; then try ssh.


Si
Title: USB connect to Windows (redux)
Post by: zenyatta on November 09, 2004, 04:05:52 pm
I don't know what software you used on the Win side for connecting via FTP but an easy way to try it is to type the following URL into your favourite Web browser:

ftp://root@192.168.129.201:4242/ (http://ftp://root@192.168.129.201:4242/)

This should ask you for a password and then list the contents of the / directory.

Another good way is to go Start > Run... > telnet 192.168.129.201 4242
You should get a welcome message from Qtopia FTP server or something like that.

Once you've established that the FTP server is OK you just need to find a decent FTP client so that you can move files both ways. Also, for syncing via FTP you need to make a change in OZ: Settings > Security > Sync > Sync Software: IntelliSync

z.
Title: USB connect to Windows (redux)
Post by: Windrose on November 09, 2004, 05:25:15 pm
Hmmmph. Okay, from the above I collect that I really don't know what I'm doing more than usual. As for example I'm not quite clear about
Quote
You were close but on the wrong box. the zaurus ip should be 192.168.129.201 the windows box has to have the ip set to 192.168.129.1.
The Zaurus Manager application on the W2K desktop allows me to set a hostname (currently set to "poodle") and a host ip, currently set to 192.168.129.201. There's a little note that says the "Communications Setting must match the zaurus PC link settings".

On the Zaurus, there's a Security tab that has
- an authentication screen, I didn't change anything there
- a plug-ins screen, it's empty
- a login screen, it's set to to login automatically root
- and a sync screen, it's set to accept synch from network any, synch software Opie 1.0

Then there is a Network tab that shows two "up" connections. One is the local loopback, the other is
Ethernet (usbd0) 192.168.129.201
The configuration page for the usbd0 connection shows that it is set to "automatically bring up" and a static configuration with IP address 192.168.129.201 and subnet mask 255.255.255.0

And actually, that's pretty much all the relevant settings I can find without poking about in /etc files.

As I said, trying to reach the Z from my desktop basically times out, e.g.
Code: [Select]
[c:\]ping 192.168.129.201

Pinging 192.168.129.201 with 32 bytes of data:

Request timed out.
Request timed out.
Request timed out.
Reply from 157.130.31.217: Destination host unreachable.

Ping statistics for 192.168.129.201:
 Â   Packets: Sent = 4, Received = 1, Lost = 3 (75% loss),
Approximate round trip times in milli-seconds:
 Â   Minimum = 0ms, Maximum =  0ms, Average =  0ms

[c:\]ping 192.168.129.201

Pinging 192.168.129.201 with 32 bytes of data:

Request timed out.
Request timed out.
Reply from 157.130.31.217: Destination host unreachable.
Request timed out.

Ping statistics for 192.168.129.201:
 Â   Packets: Sent = 4, Received = 1, Lost = 3 (75% loss),
Approximate round trip times in milli-seconds:
 Â   Minimum = 0ms, Maximum =  0ms, Average =  0ms

[c:\]telnet 192.168.129.201 4242
Connecting To 192.168.129.201...Could not open a connection to host on port 4242
 : Connect failed

You'll note that in the last example I tried zenyatta's idea of a raw telnet to port 4242. I've also tried putty ssh connections, ftp to port 4242, and sundry pings. They time out.

Ideas?

Windrose
Title: USB connect to Windows (redux)
Post by: zenyatta on November 10, 2004, 01:00:46 am
My suggestions do assume that "ping 192.168.129.201" works which clearly isn't your case. Your configuration on the Zaurus side seems to be fine. I'm not familiar with your Zaurus Manager software but the IP address on your end of the USB link must be 192.168.129.* and it usually is 192.168.129.1. To verify this, you can try the following command:

netstat -rn

which will display your computer's routing table (i.e. which IP address ranges go through which network interface). The output should contain one line with "192.168.129". I predict that it does not contain such a line in your case because otherwise pinging would definitely work (or at least I can't think of a reason why it shouldn't - barring some crazy firewall settings).

Another command you can try is

ifconfig

although I'm not sure whether it's present on Windows computers (the previous one definitely is). ifconfig lists the status and parameters of all of your computer's network interfaces.

I'm afraid I'm not familiar enough with setting up the USB link in a Windows environment. I guess I would go into Control Panel > Network and if there is some sort of "USB Network Adapter" I would click Properties > Bindings and make sure it was bound to TCP/IP. Then there should be a "TCP/IP > USB Network Adapter" line in the network control panel and I would set its properties to 192.168.129.1 etc.
Title: USB connect to Windows (redux)
Post by: lumi on November 10, 2004, 02:16:08 am
Windrose,

From your previous posting Nov 9 2004, 02:25 PM it looks like your details on the Zaurus are fine.  But you didn't post anything about your PC besides the ping.

I think your PC isn't bringing up its side of the interface.  The 'ipconfig /all' will give the specifics.  Also post the output of 'route -n'.

If I remember correctly, the SharpROM runs a DHCP server on the USB link and the PC gets its IP from the Zaurus.  OZ doesn't run the DHCP server.  What this means is that the Win PC needs to have a static IP setup:

On the Windows PC:
   IP Address:    192.168.129.1
   Netmask:      255.255.255.0
   Gateway:      192.168.129.201

You should be able to ping now.  (I hope.)

You can't use the Zaurus Manager with OZ.  It only applies to the SharpROM.  OZ provides _different_ services.  There is no built-in telnet server.  Use ssh.  You can use PuTTY on Win to do the equivalent.  Just PuTTY to root@192.168.129.201.  I think there is _no_ default password.  Just press Enter.

I haven't tried the built-in, very basic ftp server on port 4242 on OZ 3.5.1.  I'd suggest you do file transfer over ssh with something like WinSCP.

Dave
Title: USB connect to Windows (redux)
Post by: zenyatta on November 10, 2004, 03:21:26 am
lumi:

The FTP server works OK; moreover, OZ 3.5.1 comes without sftp-server so you can only connect via SSH and not SFTP. I know files can be transferred over pure SSH but I never needed to try that with the Z.
Title: USB connect to Windows (redux)
Post by: lardman on November 10, 2004, 05:03:29 am
scp works by default for file transfer over the ssh connection.


Si
Title: USB connect to Windows (redux)
Post by: zenyatta on November 10, 2004, 07:23:47 am
True, but scp is not really useful for browsing around the remote filesystem (or is it?).
Title: USB connect to Windows (redux)
Post by: lardman on November 10, 2004, 07:36:21 am
No, that's what ssh is for (ls -rtl, etc.) ;-)

I agree, it's a pain; I removed dropbear and installed openssh (you can just install the sftp portion of openssh and it works with dropbear - this is in the upgrades feed).


Si
Title: USB connect to Windows (redux)
Post by: bzack on November 10, 2004, 04:47:20 pm
I think that the newer (SL5600) usb drivers for the Zaurus on Windows work differently. This is what causes the incompatibility with the newer version of Qtopia Desktop 1.7. I believe the new drivers sync with out using tcp/ip. I currently have the Sharp Rom installed and the Sharp version of the desktop (win) which sync fine. I see no usb network devices and I am also unable to ping my Zaurus. Perhaps using an older Zaurus network driver would work. OZ syncs nicely with the Qtopia Desktop 1.7 on linux, but I don’t know how to connect it to the network via a windows box. Do you have a dedicated Linux box you could use as a router to your Zaurus? You might also try Qtopia 1.7 (win) and setting your IR as a network device (I have no idea if this will work).

btw, filezilla is an excellent ftp/sftp client
http://sourceforge.net/projects/filezilla/ (http://sourceforge.net/projects/filezilla/)
Title: USB connect to Windows (redux)
Post by: acpkendo on November 10, 2004, 05:16:51 pm
Actually, the very first thing you should do is make sure the Windoze box recognizes the USB device at all.  Have you set up these computers to connect/sync using a Sharp ROM?  If so, then those drivers should be loaded, and something else is wrong.  Here's how to check:

1) Insert Z into cradle and power on.

2) Right click on "My Computer," and select Properties.

3) Go to the Hardware tab, and select the "Device Manager Button"

4) Under the "Universal Serial Bus Controllers," you should see an entry for "SL Series (WDM)"; if you don't, then your drivers aren't loaded (and there will probably be an entry titled "Unrecognized device" with one of those exclamation point thingies)

If you don't have this driver set up, when you insert Z regardless of what you configure in the Zaurus Manager Windows will not bring up another Ethernet connection.

If the "SL Series (WDM)" does show up for you, then there is another problem.  As mentioned, you can use 192.168.129.201 for the Zaurus, and 192.168.129.1 for the Windows side.  This last one should be in the Zaurus Manager configuration--if you put the SAME number in both, then the Zaurus and the Windows box will have the same IP address, and that is when Bad Things Happen ™.
Title: USB connect to Windows (redux)
Post by: lumi on November 10, 2004, 05:57:08 pm
acpkendo,

The bits you posted about the USB device is appropriate and good reference. However, since the topic is OpenZaurus, the Zaurus Manager IP address setup does not apply.

You (or Windrose) need to set the Win PC USB IP address to static under Windows' own (not the Zaurus Manager's  setup).  In Win2K, Start... Settings... Network and Dial-up Connections and find the likely "Local Area Network Connection x" for the Zaurus.  Right-click and Properties.  In the Properties select Internet Protocol (IP) and click the Properties button.  Click on "Use the following address" and set to 192.168.129.1, netmask 255.255.255.0, and gateway 192.168.129.201.

Once you've done that you should be able to run either ROM as you wish.

Dave
Title: USB connect to Windows (redux)
Post by: acpkendo on November 10, 2004, 06:44:47 pm
@ lumi

Actually, you're right re: the Zaurus Manager--I didn't even have the correct number in there anyway (it SHOULD match the IP you have set in the Zaurus, if it were a Sharp ROM).

@ Windrose

Once you get the "SL Series (WDM)" device driver working, you should be able to follow lumi's instruction to get a working connection.  BTW, once I've configured everything, I've always had to power down, remove the Z for a couple seconds, return it, and power back up again.

Addition:

You should also have a device labeled "SL Series (NDIS 5)" under "Network Adapters" in the Device Manager.
Title: USB connect to Windows (redux)
Post by: caunt on November 14, 2004, 08:07:29 pm
Ok, let me see if I got this straight:

 1)  install drivers to XP
 (correct installation is indicated by the following in windows device manager:
      - an entry for "SL Series (WDM) Under the "Universal Serial Bus Controllers"
      - a device labeled "SL Series (NDIS 5)" under "Network Adapters" in the Device Manager. )

 2)  Set the tcp/ip settings for the SL series network adapter in XP  to:
      - IP Address:    192.168.129.1
      - Netmask:       255.255.255.0
      - Gateway:       192.168.129.201

  3) Still in XP, still in the settings box for the SL series network adapter,
      - disable the "IEEE 802.1x authentication" on the authentication tab
      - For internet access: set allow internet connection sharing on the advanced tab (if you're NOT on a network with a DHCP server elsewhere).   If you ARE on a local network, try bridging connections.

  4) Make sure your firewall will allow communication!

I'm still rather fuzzy on what needs to be done on the Z side as it depends evidently on what you want to do, and what ROM you are using.
  For the Cacko ROM (on a 5000d), to enable syncing with, (for example) Ko/Pi:
   - the network dialog on the settings tab has no interaction
   - set the PC link option to the default IO.  

  - I don't know when the tcp/ip setting under PC link is useful.  Though I read in other places it MUST be used, that didn't seem the case for me.
 
   - the network settings IS of course where you set up wireless and it has the standard wireless setup options.  Wireless was completely painless on the Z with this ROM.  Pop in the card and you're good to go on an unencripted line.
 
     - I don't know when the network setting for LAN are useful yet.  They just say unavailable if I set them to:
       Create a service with the following settings
          IP Address:     192.168.129.201
          Netmask:         255.255.255.0
          Gateway:       192.168.129.1   (EDIT:  If I understand Dave correctly, this should be the address of the PC)



EDIT:
[Sigh]  I still am not sure what's best.  I can start up things like the vnc server or the kde pim for sync, and get communication both ways. (even controlling the Z from the desktop for awhile), then suddenly the Z freezes and the only way out is a soft reset.
Title: USB connect to Windows (redux)
Post by: lumi on November 14, 2004, 09:23:37 pm
Quote
4) on the Z, under network in "settings",
 - Create a service with the following settings
 IP Address: 192.168.129.201
 Netmask: 255.255.255.0
 Gateway: 192.168.129.200 ???

On the Z, the gateway needs to be 192.168.129.1 (the IP address of the PC).  I would suspect that is why you couldn't connect.

Quote
3) Still in XP, still in the settings box for the SL series network adapter,
 - disable the "IEEE 802.1x authentication" on the authentication tab
 - allow internet connection sharing on the advanced tab

I'm not a XP user so I am not positive about 3b (connection sharing).  It _may_ be that you need to allow connection sharing on your Ethernet network interface rather than the Zaurus network interface.

Also, you need to make sure there is no firewall turned on on the Zaurus network.

If you have problems where the Zaurus is hanging you'll need give details.  Also, if you still can't get connection you should give us diagnostic info.  For Windows open a command prompt and run:

- ipconfig /all
- route -n
- ping 192.168.129.201

Edited: 11/15/2004 to correct the explanation of the gateway address on the Z.

Dave
Title: USB connect to Windows (redux)
Post by: caunt on November 15, 2004, 10:20:09 am
Thanks Dave,

--------
On the Z, the gateway needs to be 192.168.129.1 (the IP address of the Z). I would suspect that is why you couldn't connect.
--------

I didn't follow that... I understood the IP address of the Z was supposed to be
198.168.129.201.   Maybe you meant that the gateway address on the Z need to match the IPaddress of the PC ? (which kind of makes sense - the gateway of the PC is the Z and the gateway of the Z is the PC).  Is this the case?

Thanks very much for you offer to help!!!  I'm beginning to wonder though, if I crashed and soft-booted enough to mess up my file system.   I know every time I do this, linux runs through a huge list of  errors and fixes them, but since the partition is an unjournaled ext2, is it possible I just need to wipe everything out and start over?  (after I figure out the usb stuff of course, so I won't need to do it again!)
Title: USB connect to Windows (redux)
Post by: lumi on November 15, 2004, 12:55:07 pm
Caunt,

I corrected my previous posting.  It sounds like you are getting the concepts.  Please tell us if you do get connected.

Re: Re-installation

You haven't told us anything about the versions you are running and whether this Zaurus is a "production" device or not for you.

Usually, after one or two proper reboots I stop getting any corruption caused by earlier forced reboots.

Dave
Title: USB connect to Windows (redux)
Post by: caunt on November 15, 2004, 07:23:45 pm
Drat,
i keep hoping I found the problem and won't have to bother you folks.

Oh well, I just hung it again, so here are the details: (although my connection status info on the PC tells me packets are still going back and forth occasionally)

5000d (got from ebay  been waiting since they came out till I could afford one !)
Various CF cards stolen temporarily from camera use for flashing and file transfer
1GB sd card from PNY formatted to ext2 kept permanently in the Z as HD
(http://www.jr.com/JRProductPage.process?Product=3997196 has a great deal going currently, $50 taxed and shipped to CA)
Cacko 5000 - Advanced Flash ROM update 3.10 (kernel 2.4.18) 30-0

Cacko rom comes with 2 connection apps that I find:
PC link and Network.
Setting the gateway on the Z to the address of the PC still didn't remove the "connection unavailable" message in network.

PC Link allows me to choose "default IO" or "advanced TCP/IP", however it appears to be for syncing specific software only and since it keeps popping up every time I plug in the usb cable, it seems to be getting in the way and confusing things.

At any rate, trying to run anything over the connection hangs the Z..whether it be the VNC server, or the Ko/Pim sync or even (on a whim) the "sync"button on that mysterious PC Link page.

Actually, it doesn't seem limited to connection apps.  If I plug in the usb whatever app I am using seems capable of hanging the Z
Title: USB connect to Windows (redux)
Post by: lumi on November 15, 2004, 07:49:32 pm
Caunt,

I am not telling you that our previous discussion was useless but if you are using the Cacko ROM then you should be posting to the "Sharp ROMs" forum.  This is the OpenZaurus ROM forum (and Cacko isn't an OZ-style ROM).  OpenZaurus doesn't have a "PC Link" application -- OZ's function is like the "Advanced TCP/IP Networking" and it is built into "Network" on the usbd0 interface.

Dave
Title: USB connect to Windows (redux)
Post by: caunt on November 16, 2004, 12:23:01 pm
Thanks Dave,

I understood this is the SharpRom forum.  My first post you noticed, was trying to get the basics down...which IP addresses where.  I understand if that's as much help as you can give me. (though I understood cacko was based on the SharpROM)
This thread just was discussing exactly the info I was struggling with at the time. (IP addresses) and I thank you very much for clearing that up for me.
Title: USB connect to Windows (redux)
Post by: Windrose on November 17, 2004, 04:35:40 pm
Since I initiated this thread, it seemed a good time to jump back in with an update.

Thanks to all the advice and clarifications posted here, I've managed to ssh into my Zaurus from both my Win2K workstation and my XP laptop. And sftp files. Thanks to all. The key issues, natch were:
1. install and run the ssh utils
2. understand which computer gets which IP address and
3. where to set them.

I think I've got that now. In a fit of pique I disinstalled dropbear when I installed the ssh suite. Will I regret that?

The bad news is this generally works as long as I don't want to do too much of it. I've noticed that can't-reestablish-a-connection-after-suspend syndrome, which I know I've seen discussed hereabouts. Somewhere there's a work-around which IIRC involves dropping and re-adding the usb modules?

Rather more interesting is that communicating with the Z plays hell with the W2K system. Everything works ducky until I close the connection and suspend the Z. Of course I can't reconnect to it, but even more of a pain is that this truly messes over the W2K system, but in a subtle way. The usb manager goes wonky and refuses to play. The system device manager retires to private life and takes up chicken farming. Communication with other usb devices, such as a memory stick, gets dicey.

And the system will not shut down cleanly. Various apparently random processes (they're not always the same ones) go zombie and refuse to exit for shutdown. The whole system hangs forever in the final stages of power-down. I have been reduced to Pulling The Plug out of the wall to reboot.

Now you may say what you like about the stability of Windows systems (and many do), but fact of the matter, it takes some hard work to do that to W2K.

Any ideas what's going on and how I can communicate with the Z and still unmount it cleanly?

I haven't experimented as much with the XP system, so I'm not sure how much of this happens there.

But there is one interesting pathology. On the laptop I use a USB powered cable to connect to the Z in lieu of the Sharp cradle. In theory, it runs the Z off the laptop's power while it's connected and up. When I first plug it in this is true, but the Z does not seem to recognize this as the moral equivalent of AC power. So it suspends in a couple of minutes and things get zarked. In particular, it stops getting power.

Is there a fix for this? I suppose I can go to the power setting and app and change the behavior under "battery" to "suspend-never" and then change it back when I'm finished, but it's kind of a nuisance. A short script would be nice. There must be a fer-chris'-sake-don't-suspend setting somewhere?

Mystified as usual,
Windrose
Title: USB connect to Windows (redux)
Post by: zenyatta on November 18, 2004, 02:47:47 am
Quote
...that can't-reestablish-a-connection-after-suspend syndrome, which I know I've seen discussed hereabouts. Somewhere there's a work-around which IIRC involves dropping and re-adding the usb modules?
It involves installing the hotplug package from the old OZ 3.2 feed. It worked in 3.3.6 but, unfortunately, when I tried it in 3.5.1 nothing changed. 3.5.2 should be coming out soon, I hope someone's had a close look at that problem.
Quote
There must be a fer-chris'-sake-don't-suspend setting somewhere?
Haven't found one yet but it would be a great feature of the battery status applet. And I guess a script should be possible using the "qcop" command which can send all kinds of useful messages to Opie.