Palm sync over bluetooth?
Eric Anderson
anderson at centtech.com
Mon Aug 1 19:48:16 GMT 2005
Maksim Yevmenkin wrote:
> Eric,
>
>>>>>>>>> Does anyone have a cookbook, or howto on this? I think I'm
>>>>>>>>> missing a piece somewhere..
>>>>>>>>
>>>>>>>>
>>>>>>>> depends on what do you mean by "sync" :) intelligent sync, i.e
>>>>>>>> something like syncml etc. is not supported at the moment. its
>>>>>>>> not really a bluetooth fault, its just no one wrote a tool (or
>>>>>>>> at least i do not know of any) that properly does syncml over
>>>>>>>> obex over bluetooth (or whatever palm supports). i'd like to add
>>>>>>>> syncml support to obexapp(1), but not have much free time at the
>>>>>>>> moment.
>>>>>>>>
>>>>>>>> it should be possible to transfer files/etc. from/to palm using
>>>>>>>> obex with obexapp(1) from ports (comms/obexapp).
>>>>>>>
>>>>>>>
>>>>>>> :) ok, I'll try to state more clearly..
>>>>>>>
>>>>>>> I'd like to get my palm t5 to sync (using the 'hotsync' in the
>>>>>>> palm) over bluetooth, instead of serial cable, or even usb, using
>>>>>>> jpilot (or pilot-xfer which jpilot uses I believe). pilot-xfer
>>>>>>> can use a serial port (/dev/something) or network (net:any for ip).
>>>>>>>
>>>>>>> I was thinking that since my palm supports syncing over bluetooth
>>>>>>> (uses it like a serial port), I should be able to make my FreeBSD
>>>>>>> box connect the bluetooth to a pseudo tty device, which I could
>>>>>>> then have pilot-xfer use. Does this seem reasonable?
>>>>>>
>>>>>>
>>>>>> man rfcomm_sppd(1)
>>>>>
>>>>>
>>>>> From the man page, I was under the impression that would allow me
>>>>> to do the opposite. For instance, connect to another computer's
>>>>> serial device over bluetooth, instead of the palm connecting to the
>>>>> computer.
>>>>
>>>>
>>>> That's exactly how it is with serial and USB - computer connects to
>>>> Palm, then you start Hotsync application on Palm.
>
>
> does rfcomm_sppd(1) work for you?
Well, not really. rfcomm_sppd requires that the palm be the server of
the serial port service (if I understand correctly, and I may not!),
which means I would have to hit the sync button, then quickly start
rfcomm_sppd with the correct channel number (which I don't know), and
then start my sync right after that. I have not been able to get this
trickery to work. Even so, if I did get it working, I'm not sure this
is the best solution.
>>> I do mine slightly roundabout way -- using network sync. Setup is as
>>> follows:
>>>
>>> -- working bluetooth hardware ;) in my case D-Link DBT-120
>>> -- load USB stack + ng_ubt
>>> -- optionally (?) configure /etc/bluetooth/hosts
>>> -- rc.bluetooth start ubt0
>>> -- configure /etc/bluetooth/hcsecd.conf with proper PIN and start hcsecd
>>> -- start sdpd
>>> -- start rfcomm_pppd -d -s -C 1 -l bluetooth
>>> -- in /etc/ppp/pppd.conf
>>> bluetooth:
>>> set dial "\"\" READY GO"
>
>
> i'm not sure why do you need "set dial". btw chat scripts are _not_
> executed in "direct" mode unless you say "enable force-scripts"
>
>>> set ifaddr 192.168.1.1 192.168.1.2
>>> disable chap
>>> disable deflate
>>> disable mppe
>>> disable pred1
>>> disable shortseq
>>> disable vjcomp
>>> disable ipv6cp
>>> set timeout 0
>>> set lqrperiod 10
>>> enable lqr
>>> accept lqr
>>> # Do not use PPP authentication. Assume that
>>> # Bluetooth connection was authenticated already
>>> disable pap
>>> deny pap
>>> disable chap
>>> deny chap
>>>
>>> -- start pi-csd for network sync nohup /usr/local/bin/pi-csd -q -H
>>> <your host here> -a 192.168.1.1 -n
>>> 255.255.255.0 &
>>>
>>> Only quirky thing there is "dial" line in ppp configuration -- I use it
>>> on USB since it seems that some characters are being dropped between
>>> ucom being created and devd starting necessary application, so I kept
>>> it here for consistency as well.
>>>
>>> You will have to configure your Palm for network sync (provided that it
>>> knows how ;) and set your target computer (not necessarily one you have
>>> bluetooth on). This is pretty straightforward on my Clie T615C.
>>>
>>> PILOTPORT has to be set to "net:any", same setting could be used in
>>> jPilot. I have not had much luck with Evolution, but that might have
>>> been due to the lack of motivation.
>>>
>>> If you need more detail, just ask. Any suggestions on improving this
>>> setup is more then welcome.
>>
>>
>> Thanks! I've done the above steps, and here's what I see:
>>
>> After starting the rfcomm_pppd program, I see a tun0 interface via
>> ifconfig:
>>
>> tun0: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
>>
>> Running the pi-csd tool (which I'm not sure what that is supposed to
>> do, really) seems to run, but I don't see any output or anything, so
>> I'm not certain if it is doing the 'right thing'.
>>
>> Now, I set up my palm like so:
>> Created new Connection, setting "Connect to" to "Local Network", and
>> "Via" set to "Bluetooth" with <my-bluetooth-hostname> in the "Device"
>> box. I have my Palm set for "Local" sync (not "Modem").
>>
>> When I hit the sync button, I don't see the tun0 device get an IP
>> (from ppp), nor do I see a pid associated with the tun0 device. On my
>> palm, nearly immediately I get this message:
>> "Unable to initiate HotSync operation because the port is in use by
>> another application."
>> Now, if I kill rfcomm_pppd, and restart with the addition of the -S
>> command line option, and attempt the same sync, I get a pid attached
>> to tun0, and tun0 is now 'UP':
>>
>> tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1500
>> Opened by PID 11613
>>
>> but it never gets the IP address (set in the ppp conf), and the palm
>> sits for some time (a minute or two) before finally giving up with:
>> "The connection between your device and the desktop could not be
>> established. Please check your setup and try again." at which point
>> my tun0 goes back to it's normal state and the ppp process disappears.
>>
>> Any ideas what I may be missing?
>
>
> 1) check 'default' section in your /etc/ppp/ppp.conf and make sure it
> only contains commands that applied to _all_ other sections in your
> ppp.conf file. i always have 'default' section empty and move all the
> commands to the appropriate section.
I've removed everything in the default section, with no changes (I
barely had anything in it).
> 2) add 'set log all' to the 'bluetooth' section. then try again. now
> /var/log/ppp.log should have tons of information that will tell you what
> is going all.
Done - now I have lots more logged info I don't understand. :)
> 3) since you are _not_ using ppp authentication make sure your palm does
> not require one
Pretty sure it doesn't - no place to put in the info, and I connect up
to my cellphone over bluetooth for surfing, etc using a similar method.
Any more ideas? What should I be looking for in the ppp logs? I did
see this though:
Aug 1 14:38:02 neutrino ppp[17496]: tun0: Phase: deflink: closed -> opening
Aug 1 14:38:02 neutrino ppp[17496]: tun0: Debug: deflink: Link is
SOCK_STREAM, but not inet
Aug 1 14:38:02 neutrino ppp[17496]: tun0: Debug: deflink: stdin is
unidentified
Eric
--
------------------------------------------------------------------------
Eric Anderson Sr. Systems Administrator Centaur Technology
Anything that works is better than anything that doesn't.
------------------------------------------------------------------------
More information about the freebsd-bluetooth
mailing list