Author Topic: Network Sync (AGAIN)  (Read 5688 times)

clofland

  • Full Member
  • ***
  • Posts: 247
    • View Profile
    • http://www.lofland.net/
Network Sync (AGAIN)
« on: September 17, 2004, 12:37:47 pm »
I know this is like dead horse to beat, but here goes anyway.

The documents about syncing over ethernet say this:

C) setup the pc wireless card to use the same ip address with .1 as the final octet
ie 192.168.81.1
(caveat - if your Z address was eg 192.168.81.1 then the PC address would have to be 192.168.81.2)

QUESTION: IS it possible to do this without setting the host PC to .1?

I'm on a company LAN with DHCP enabled, and I can't just arbitrarily make my machine .1

However, it seems, that no matter what you tell the Zaurus, that is what it does, is try to talk to .1

Am I missing something? Is there a place to change this? Is there any easy way to redirect it without recompiling my kernel?

Thanks for any ideas.
C-760 Last Running pdaXrom 1.1.0beta3
- Sandisk UltraII 1GB SD card - Socket LP CF LAN card - Socket LP CF WLAN card - Socket CF Bluetooth Card Rev H -

V-Man

  • Full Member
  • ***
  • Posts: 138
    • View Profile
    • http://
Network Sync (AGAIN)
« Reply #1 on: September 17, 2004, 09:18:48 pm »
It seems to be hard coded into the Z's software.  There is a work-around in WinXP where you can assign two ip addresses to the same network card.  This is what I had to do at work.  We don't use DHCP though, so I am not sure how this will work with that setup.  No one that I know of has ever found a work-around.  If Sharp would release the source code (fat chance), I am sure that someone with better programming skills than me would change this instantly.

Sorry I couldn't be of much help.

V-Man
SL5500 w/Sharp ROM 3.10
Netgear MA701 WiFi
Sharp  CE-AG06 Camera Card
Various memory cards
Various homemade power/battery packs
HP 2215 iPAQ

cvmiller

  • Full Member
  • ***
  • Posts: 242
    • View Profile
    • http://
Network Sync (AGAIN)
« Reply #2 on: September 20, 2004, 01:42:25 pm »
It would appear that there are 2 limitations making this difficult for you.
1) The Zaurus only wants to talk to .1
2) Windows while using DHCP will not allow a second IP address on the interface

You _could_ look at how long your DHCP lease is, and then remove DHCP, put on 2 static IP addresses on your windows box (one of them ending in .1). If you have a long lease, this might get you by for a while.

The other solution, is to have the Zaurus run NAT for you, and run all your traffic through it (with 2 IP addresses on the Z). But I suspect that many Windows-type applications (like filesharing, and perhaps Outlook) won't take to kindly to being NATed.

Just make sure what ever Zaurus network you use (ie. 192.168.81.1) is not actually used by your work place. It is _bad_ to have duplicate networks.

I hope this helps,

Craig...
SL-6000
ROM v1.12 (Sharp)
Belkin F8U1500 IR Keyboard
1 GB SD Card by SanDisk (ext2)

clofland

  • Full Member
  • ***
  • Posts: 247
    • View Profile
    • http://www.lofland.net/
Network Sync (AGAIN)
« Reply #3 on: September 20, 2004, 02:10:27 pm »
That is precisely the problem. The .1 address is in use on the network already.

I keep thinking of wild and zany ways to work around it, but it mostly just irritates me that such a silly hindrance exists in the software to begin with.  I wonder whose idea it was, and why it has yet to be fixed. Does even the 6000 do this?

Could I use some program on the Z to capture all calls to a certain IP (.1) and redirect them to another IP before they go out? (Now I am willing to compile kernel if I have to.)
C-760 Last Running pdaXrom 1.1.0beta3
- Sandisk UltraII 1GB SD card - Socket LP CF LAN card - Socket LP CF WLAN card - Socket CF Bluetooth Card Rev H -

V-Man

  • Full Member
  • ***
  • Posts: 138
    • View Profile
    • http://
Network Sync (AGAIN)
« Reply #4 on: September 20, 2004, 10:22:23 pm »
A bit off topic, but:

My network at work has changed.  The .1 address is now used by me (on my workstation WinXP) and something else on the network (I don't know what).  The only problem I have noticed is an annoying popup error message from windows that tells me that the .1 address is conflicting with something else.  All functions on my computer seem to be working OK, and the Z still syncs across the network.

My question is:  What problems might I be causing to anyone else?  and  Could this screw up the network somehow?  What is really scary about this situation is that I know almost as much about networking as our dedicated IT guy.

Thanks for any info.

V-Man
SL5500 w/Sharp ROM 3.10
Netgear MA701 WiFi
Sharp  CE-AG06 Camera Card
Various memory cards
Various homemade power/battery packs
HP 2215 iPAQ

sheel

  • Newbie
  • *
  • Posts: 14
    • View Profile
Network Sync (AGAIN)
« Reply #5 on: November 09, 2004, 01:37:16 pm »
With this method (by having network and usb at the same ip address) has anybody been able to initiate synching from Z? In my case it works as long as it is in the USB cradle although the traffic is still going on wi-fi, I guess. But  after I take it out of USB I can NOT connect to PC for synchronization, if I initiate it from Z. It says "conection aborted".

I think qtsamba (PCLink) has been hardcoded to use usb interface. Is there a way to fool qtsamba so that it thinks usb interface is up but actually it is not?

Thanks a lot for any help.
sheel
« Last Edit: November 09, 2004, 02:01:18 pm by sheel »

skoorb

  • Jr. Member
  • **
  • Posts: 87
    • View Profile
    • http://
Network Sync (AGAIN)
« Reply #6 on: November 09, 2004, 01:57:55 pm »
.1 is likely the router on that network.   better find out or change it.

sheel

  • Newbie
  • *
  • Posts: 14
    • View Profile
Network Sync (AGAIN)
« Reply #7 on: November 09, 2004, 02:04:30 pm »
skoorb,

Are you answering my question? I forgot to mention that it works when I initiate the synchronization from PC.

cvmiller

  • Full Member
  • ***
  • Posts: 242
    • View Profile
    • http://
Network Sync (AGAIN)
« Reply #8 on: November 09, 2004, 02:25:13 pm »
Quote
With this method (by having network and usb at the same ip address) has anybody been able to initiate synching from Z? In my case it works as long as it is in the USB cradle although the traffic is still going on wi-fi, I guess. But  after I take it out of USB I can NOT connect to PC for synchronization, if I initiate it from Z. It says "conection aborted".

I think qtsamba (PCLink) has been hardcoded to use usb interface. Is there a way to fool qtsamba so that it thinks usb interface is up but actually it is not?

Thanks a lot for any help.
sheel
OK, let me start by saying I don't use Sync (not having a windows machine). But I do know IP networking, and it is:
  1) Bad to use the same IP address on muliple interfaces (like USB and eth0)
  2) Really Bad to use the same IP address as someone else on the network, your machine will try and grab their packets, and you'll just mess them up. If that "other" machine happens to be the router for your network (which the .1 address common is), you will prevent anyone else from getting out of the network. Don't do this.

But I have figured out how to get Samba running on an interface other than USB. I set it up to run on my eth0, and I can query it with smbclient (under linux), so I suspect it would work for the Windows folks. This doesn't solve the Sync problem, but it should let you "share" files from your Zaurus to your Windows (or Linux) machine.

Here's how to configure Samba on an interface other than USB. I used the terminal to do all these changes:
  1) Edit the file: /home/root/usr/lib/samba/smb.conf
    1a) change the line: "interfaces = usbd0" to "interfaces = eth0"
    1b) save the changes
  2) start Samba by issuing the command: /etc/rc.d/init.d/samba start

Now you should be able to browse your Zaurus via Windows. Just map the folder \\<zaurus ip>\home to a drive.

To stop Samba on the Zaurus use the command: /etc/rc.d/init.d/samba stop

I just gave it a quick test, and was able to see everything on my SD card, as well as "Main_Memory"

It still doesn't sync, but I hope it helps,

Craig...
SL-6000
ROM v1.12 (Sharp)
Belkin F8U1500 IR Keyboard
1 GB SD Card by SanDisk (ext2)

sheel

  • Newbie
  • *
  • Posts: 14
    • View Profile
Network Sync (AGAIN)
« Reply #9 on: November 09, 2004, 02:44:12 pm »
cvmiller,

Thanks for your reply. I already have samba working the way you describe. My problem is specific to synchronization.

And I am running my wireless card in ad-hoc mode so no worries about using the ip address .1 and preventing somebdy else to get into the network.

sheel

cvmiller

  • Full Member
  • ***
  • Posts: 242
    • View Profile
    • http://
Network Sync (AGAIN)
« Reply #10 on: November 10, 2004, 08:30:36 am »
Quote
cvmiller,

Thanks for your reply. I already have samba working the way you describe. My problem is specific to synchronization.

sheel
Sheel,

OK, I think I have hacked qtsamba to work, but since I don't sync (no windows machine) I can't fully test it.

I have changed the interface that qtsamba is hardwared to use from usbd0 to wlan0. When I clicked on sync, I see that (by looking at netstat -an) the zaurus is trying to contact the PC at .1

I have placed the modified version of qtsamba at:
http://www.igs.net/~cvmiller/Zaurus/qtsamba

For a quick test, just place qtsamba anywhere on your zaurus, and then start it up via the terminal by typeing /<path to the modified qtsamba>/qtsamba. For example mine is located in /mnt/card/tmp/, so I type /mnt/card/tmp/qtsamba

If this works for you, let me know, and I'll write a more indepth installation procedure.

I hope this helps,

Craig...
SL-6000
ROM v1.12 (Sharp)
Belkin F8U1500 IR Keyboard
1 GB SD Card by SanDisk (ext2)

sheel

  • Newbie
  • *
  • Posts: 14
    • View Profile
Network Sync (AGAIN)
« Reply #11 on: November 10, 2004, 10:52:28 am »
cvmiller,

I could not download your modified qtsamba. It says "you do not have permission to access qtsamba".

Could you please change the permisions so that I can download it?

Thanks for making the effort. Where can I get free source code for qtsmaba?

sheel

cvmiller

  • Full Member
  • ***
  • Posts: 242
    • View Profile
    • http://
Network Sync (AGAIN)
« Reply #12 on: November 10, 2004, 11:35:39 am »
Quote
cvmiller,

I could not download your modified qtsamba. It says "you do not have permission to access qtsamba".

Could you please change the permisions so that I can download it?

Thanks for making the effort. Where can I get free source code for qtsmaba?

sheel
Sheel,

My Bad. The permissions are changed.

I don't know where you can get the source code. I changed the binary itself with a vi-like editor called bvi.

Craig...
SL-6000
ROM v1.12 (Sharp)
Belkin F8U1500 IR Keyboard
1 GB SD Card by SanDisk (ext2)

sheel

  • Newbie
  • *
  • Posts: 14
    • View Profile
Network Sync (AGAIN)
« Reply #13 on: November 10, 2004, 11:52:24 am »
Craig,

Thanks a lot for chaning the permission but it is having problem in referencing a function - qws_server_display_spec. Which version of Qtopia did you change? I just downloaded Qtopia 3.3 from trolltech.com. Although I am currently running version 1.5.4.

I will try myself to see whether I can change just qtsamba and still make it work with 1.5.4.

Meanwhile, It will be great if you can point me to how to resolve the symbol and change the interface to "eth0" instead of "wlan0" because when I do ifconfig the interface is showing as eth0.

Thanks a lot for your help.
sheel

cvmiller

  • Full Member
  • ***
  • Posts: 242
    • View Profile
    • http://
Network Sync (AGAIN)
« Reply #14 on: November 10, 2004, 01:39:09 pm »
Quote
Craig,

Thanks a lot for chaning the permission but it is having problem in referencing a function - qws_server_display_spec. Which version of Qtopia did you change? I just downloaded Qtopia 3.3 from trolltech.com. Although I am currently running version 1.5.4.

I will try myself to see whether I can change just qtsamba and still make it work with 1.5.4.

Meanwhile, It will be great if you can point me to how to resolve the symbol and change the interface to "eth0" instead of "wlan0" because when I do ifconfig the interface is showing as eth0.

Thanks a lot for your help.
sheel
Sheel,

Hmm, you know I did all this on a SL-6000 with the Stock Sharp ROM (v1.12). This is using Qtopia 1.5.4. I started qtsamba inside a terminal running on the Zaurus (not remotely logged in). I have only seen that error with the qws_server_display when trying to run Qtopia apps from a remote (such as telnet or ssh) terminal.

I suspect you are using a different Zaurus model, since your wireless is eth0, not wlan0. Perhaps you can yank out the qtsamba, and I can try to modify it for you. Or...

As to changing the code, I used BVI on a desktop linux machine. Since it works just like vi, you load in qtsamba do a search for usbd0. I only found 2 references to usbd0 in qtsamba (that weren't part of text), and I replaced each charactor individually (with the vi command r) to wlan0. I didn't want to change the length of the file, since the pointers would no longer line up. Now changing it to eth0, is going to be a little trickier, since it is only 4 chars instead of 5. You might get away with putting a space at the end, or perhaps a null. Not sure.

Let me know what else we can try to get it running.

Craig...
SL-6000
ROM v1.12 (Sharp)
Belkin F8U1500 IR Keyboard
1 GB SD Card by SanDisk (ext2)