PDA

View Full Version : [Palm OS] Sync on Linux with Jpilot?


raphinou
2008-03-13, 07:59
Hi,

I'm having trouble setting up sync between jpilot and gvm.

I've found various ways of doing it (setting the serial port to use to ".":http://www.faqs.org/docs/Linux-HOWTO/Wireless-Sync-HOWTO.html#SOFTWARE or using pppd http://howto.pilot-link.org/ppp/cd.html ), but none worked.

Could someone confirm the procedure to follow? I'm running Jpilot 0.99.9.10 on Ubuntu 7/10.


Thanks in advance!

Raph

m_stolle
2008-03-13, 13:29
try "net:" as the port to use. That worked for me, at least in gnome-pilot, and has worked in the past for network sync in jpilot.

raphinou
2008-03-13, 20:18
That's working! Thanks a lot!!

Raph

wv9k
2008-03-13, 23:10
jpilot for the n800?!? Wow, gotta find that, all of a sudden I could quit dragging the z31 around for the PIM functions :-) :-) :-)!!!

Going to check this out now, THANKS!

rhkuo
2008-06-12, 04:30
Can someone help me debug this? I'm trying to do a network sync with jpilot. I used net: as the port in jpilot. I press the sync button in Jpilot and nothing appears to happen (howver I'm not sure what I should see when it does work). Then I press "Start Hotsync" on my n800. After a few seconds the N800 displays "Failed (Can't connect)".

Did some googling and tried the following linux command from desktop: pilot-xfer -p net:any -l
which is supposed to test the connection, bypassing jpilot. I get:
Listening for incoming connection on net:any...

and it just sits there forever, after I press "start hotsync" on the n800.

Any ideas would be truly appreciated.

lma
2008-06-12, 06:37
Did you enter the PC's correct hostname or IP address in the GVM hotsync dialog? Note that if you use the hostname it must (https://bugs.maemo.org/show_bug.cgi?id=995) be fully qualified.

rhkuo
2008-06-12, 15:26
yes, I set my router up for static IP and have put the host IP in the GVM dialog. I forgot to mention that hotsync works fine with the Palm Desktop when I boot into Windows, but I use Linux 99% of the time, so am trying to get Jpilot to work.

Is there a daemon that needs to run in the background to allow jpilot to intercept the network connections?

Thanks.

lma
2008-06-13, 00:00
No, jpilot (or pilot-xfer) is the network-listening daemon.

Just to eliminate any unrelated network issues, can you ping the Linux box from the tablet and/or vice versa?

Do you have firewalling enabled on the Linux side by any chance (see output of "sudo iptables -L -n")? GVM needs to be able to connect to your PC's TCP port 14238 for hotsync to work.

rhkuo
2008-06-13, 04:48
Hi Ima,
Am I correct in assuming then that jpilot calls pilot-xfer? Does pilot-xfer need to be running in the background?

Pinging works both ways from the desktop to/from the n800.

As far as I know, I'm not running a software firewall, though I could be wrong if it's enabled by default (using SUSE 10.2). Here is the output of iptables; I'm not sure how to interpret it. Thanks for your help.

# iptables -L -n
Chain INPUT (policy DROP)
target prot opt source destination
ACCEPT 0 -- 0.0.0.0/0 0.0.0.0/0
ACCEPT 0 -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTAB
LISHED
input_ext 0 -- 0.0.0.0/0 0.0.0.0/0
input_ext 0 -- 0.0.0.0/0 0.0.0.0/0
LOG 0 -- 0.0.0.0/0 0.0.0.0/0 limit: avg 3/min bu
rst 5 LOG flags 6 level 4 prefix `SFW2-IN-ILL-TARGET '
DROP 0 -- 0.0.0.0/0 0.0.0.0/0

Chain FORWARD (policy DROP)
target prot opt source destination
LOG 0 -- 0.0.0.0/0 0.0.0.0/0 limit: avg 3/min bu
rst 5 LOG flags 6 level 4 prefix `SFW2-FWD-ILL-ROUTING '

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
ACCEPT 0 -- 0.0.0.0/0 0.0.0.0/0
ACCEPT 0 -- 0.0.0.0/0 0.0.0.0/0 state NEW,RELATED,E
STABLISHED
LOG 0 -- 0.0.0.0/0 0.0.0.0/0 limit: avg 3/min bu
rst 5 LOG flags 6 level 4 prefix `SFW2-OUT-ERROR '

Chain forward_ext (0 references)
target prot opt source destination

Chain input_ext (2 references)
target prot opt source destination
DROP 0 -- 0.0.0.0/0 0.0.0.0/0 PKTTYPE = broadcast

ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 icmp type 4
ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 icmp type 8
ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTAB
LISHED icmp type 0
ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTAB
LISHED icmp type 3
ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTAB
LISHED icmp type 11
ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTAB
LISHED icmp type 12
ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTAB
LISHED icmp type 14
ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTAB
LISHED icmp type 18
ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTAB
LISHED icmp type 3 code 2
ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTAB
LISHED icmp type 5
reject_func tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:113 state
NEW
LOG 0 -- 0.0.0.0/0 0.0.0.0/0 limit: avg 3/min bu
rst 5 PKTTYPE = multicast LOG flags 6 level 4 prefix `SFW2-INext-DROP-DEFLT '
DROP 0 -- 0.0.0.0/0 0.0.0.0/0 PKTTYPE = multicast

LOG tcp -- 0.0.0.0/0 0.0.0.0/0 limit: avg 3/min bu
rst 5 tcp flags:0x17/0x02 LOG flags 6 level 4 prefix `SFW2-INext-DROP-DEFLT '
LOG icmp -- 0.0.0.0/0 0.0.0.0/0 limit: avg 3/min bu rst 5 LOG flags 6 level 4 prefix `SFW2-INext-DROP-DEFLT '
LOG udp -- 0.0.0.0/0 0.0.0.0/0 limit: avg 3/min bu rst 5 LOG flags 6 level 4 prefix `SFW2-INext-DROP-DEFLT '
LOG 0 -- 0.0.0.0/0 0.0.0.0/0 limit: avg 3/min bu rst 5 state INVALID LOG flags 6 level 4 prefix `SFW2-INext-DROP-DEFLT-INV '
DROP 0 -- 0.0.0.0/0 0.0.0.0/0

Chain reject_func (1 references)
target prot opt source destination
REJECT tcp -- 0.0.0.0/0 0.0.0.0/0 reject-with tcp-res et
REJECT udp -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-po rt-unreachable
REJECT 0 -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-pr oto-unreachable

lma
2008-06-13, 06:55
As far as I know, I'm not running a software firewall, though I could be wrong if it's enabled by default (using SUSE 10.2).


Looks like it is.


Here is the output of iptables; I'm not sure how to interpret it.


There's a bit of info like network interfaces missing (my mistake, I probably should have said "iptables -L -n -v -x") but I think I can guess what that is.

It looks like you need an ACCEPT rule for tcp dpt:14238 in the input_ext chain for network hotsync to get through. I'm afraid I'm not very familiar with SuSE, but have a look at this (http://en.opensuse.org/SuSEfirewall2) and this (http://en.opensuse.org/YaST_Firewall).

rhkuo
2008-06-14, 05:06
Thanks for the hint. I figured out how to enable port 14238 in the firewall but no luck. I then disabled the firewall but that didn't help either. Still get "Failed (Can't connect) on the N800.

I'm just grasping at straws here, but does /dev/jpilot need to exist for network sync?

lma
2008-06-14, 10:24
Am I correct in assuming then that jpilot calls pilot-xfer? Does pilot-xfer need to be running in the background?


No, they're independent programs that use the same library (libpisock) for communication to a PalmOS device.

You can check if jpilot is listening for incoming connections with "netstat -tln". If it is you will see something like this in the output:

tcp 0 0 0.0.0.0:14238 0.0.0.0:* LISTEN

Thanks for the hint. I figured out how to enable port 14238 in the firewall but no luck. I then disabled the firewall but that didn't help either. Still get "Failed (Can't connect) on the N800.

I'm just grasping at straws here, but does /dev/jpilot need to exist for network sync?

No, I don't have one here.

If the firewall isn't blocking it anymore it should work. Can you try running "tcpdump -n -i eth0 tcp port 14238" on the PC (as root, and assuming eth0 is your active network interface), then start a hotsync attempt and post the tcpdump output here?

albright
2008-06-14, 18:38
I'm stuck on this too. But in my case, my old palm TX
does a network hotsync to my computer without any
problem so there cannot be a firewall problem.

pilot-xfer -p net:any -l

works perfectly.

But the nokia network hotsync times out and fails:confused:

Edit: there is ZERO output from the tcpdump command when I
try to use the nokia; all sorts of good output with the TX.

rhkuo
2008-06-14, 22:04
Hi Ima, I really appreciate your time spent helping me. I did the netstat command and it does show that jpilot is listening on the correct port.
However when I did the tcpdump command it just gives this message :

tcpdump: listening on eth1, link-type EN10MB (Ethernet), capture size 96 bytes

but no other output after I initiate the hotsync attempt. My network interface is eth1 so I did change it in the tcpdump parameters (I'm assuming that using eth1 shouldn't matter otherwise?).

???

rhkuo
2008-06-14, 22:10
I also tried this just now: pilot-xfer -p net: -l

and got this:
Unable to bind to port: net:
Please use --help for more information

I'm not sure what to make of this; I don't remember getting this error when I first started troubleshooting. I wonder if jpilot doesn't like "net:" but isn't reporting it.

lma
2008-06-15, 00:06
However when I did the tcpdump command it just gives this message :

tcpdump: listening on eth1, link-type EN10MB (Ethernet), capture size 96 bytes

but no other output after I initiate the hotsync attempt.


At least that tells us that firewall or not the GVM is not reaching your PC. Can you also try tcpdump on the tablet side to see if traffic is getting out? You'll probably have to install it from the command line, but it's in the chinook free repository.

Can you also check your access point's firewall rules? Is there anything else between the tablet and the PC?

I also tried this just now: pilot-xfer -p net: -l

and got this:
Unable to bind to port: net:
Please use --help for more information


That probably just means that some other process (jpilot or another instance of pilot-xfer) is already listening on the hotsync port.

albright
2008-06-15, 18:10
Can you also try tcpdump on the tablet side to see if traffic is getting out?

on mine, running tcpdump on the tablet then hotsync, generates
zero output on the tablet ... so it looks like my tablet is not
even trying to send any data out port 14238. Could it be trying
on another port?

lma
2008-06-16, 07:47
rhkuo: since you said it works with Windows, does the PC have the same IP address when running Linux?

albright: Try tcpdump without any filter expression to capture all traffic. You should at least see some DNS or ARP queries on the "wire". Are you giving GVM a hostname or IP address for your PC? Check for any accidental typos (like a "," entered instead of a ".") just in case.

rhkuo
2008-06-16, 14:58
I am running a different IP address under Linux but I had changed it in the Garnet VM dialog. Haven't had a chance to try your suggestions yet (access point firewall access rules and tcpdump on n800) but the fact that hotsync works with windows makes me think that the problem has to exist on my Linux desktop.

sgosnell
2008-06-16, 18:49
What works for me, almost, is net:any. It requires the 'any'. My problem is that it continually loses the connection. It syncs one file, loses the connection, I have to kill that thread on my PC, restart the sync, and repeat for every single file. It's such a PITA that syncing is not worth the effort. My real Palm syncs effortlessly via the network, but the GVM is still not ready for prime time. It's marginally better than the first beta, giving full-screen capability, but other than that it's still a very bad kludge. I've been unable to sync my address and calendar data, and that's a deal-breaker. Everything else syncs, but no PIM, no good.