From owner-freebsd-bluetooth@FreeBSD.ORG Mon Aug 1 19:48:16 2005 Return-Path: X-Original-To: freebsd-bluetooth@FreeBSD.org Delivered-To: freebsd-bluetooth@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2DBFB16A41F; Mon, 1 Aug 2005 19:48:16 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from mh2.centtech.com (moat3.centtech.com [207.200.51.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6368A43D45; Mon, 1 Aug 2005 19:48:15 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from [10.177.171.220] (neutrino.centtech.com [10.177.171.220]) by mh2.centtech.com (8.13.1/8.13.1) with ESMTP id j71JmEKF072405; Mon, 1 Aug 2005 14:48:14 -0500 (CDT) (envelope-from anderson@centtech.com) Message-ID: <42EE7C76.2090904@centtech.com> Date: Mon, 01 Aug 2005 14:48:06 -0500 From: Eric Anderson User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.8) Gecko/20050603 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Maksim Yevmenkin References: <42D558B3.1060603@centtech.com> <42D55B3D.50605@savvis.net> <42D55D5D.8030604@centtech.com> <42D57496.2050102@savvis.net> <42D57C67.7020500@centtech.com> <1121287483.60360.21.camel@hood.oook.cz> <1122863179.663.22.camel@RabbitsDen> <42EE4F64.7040002@centtech.com> <42EE6438.9080209@savvis.net> In-Reply-To: <42EE6438.9080209@savvis.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-bluetooth@FreeBSD.org, pav@FreeBSD.org Subject: Re: Palm sync over bluetooth? X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2005 19:48:16 -0000 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 >>> -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 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 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 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. ------------------------------------------------------------------------