|
Reporting Success: Synchronizing with Funambol over Bluetooth PAN: msg#00156java.sync4j.user
Hello Funambol users! A few weeks ago someone asked, if he could synchronize a mobile phone with Funambol over Bluetooth. However, Funambol currently does not implement the SyncML OBEX Binding for Bluetooth. Instead I suggested to use Bluetooth PAN to attach the mobile phone to a TCP/IP network, and then access the Funambol DS Server normally over HTTP. Meanwhile I actually managed to synchronize my Sony Ericsson W850i phone with a Funambol DS Server running under Linux (Debian Etch), and I'd like to share my experiences here. The key to success is the Bluetooth Personal Area Networking profile (PAN), which defines different roles like PAN User (PANU), PAN Group Network (GN) and PAN Network Access Point (NAP). For me it worked best when using my Linux PC as NAP and the phone as PANU. Other role assignments might work, too, or even other profiles, like LAP (LAN Access Profile) or DUN (DialUp Networking). The problem is that mobile phones usually don't support all these profiles and/or are poorly documented. On the PC: I used the BlueZ protocol stack and the corresponding tools, and I followed two detailed guides: http://bluez.sourceforge.net/contrib/HOWTO-PAN http://fedoranews.org/contributors/muhammad_al_ismail/bluetooth/ These assume that all participants in the PAN run Linux, and that you can freely configure them. However, that was not the case for my phone, where I could not assign an IP address manually. Instead the phone tried to obtain an IP address via DHCP, so I needed to set up a DHCP server, too. Set up a bridge (e.g. pan0) for the PAN, and assign a private IP address (e.g. 192.168.42.1) to it: $ brctl addbr pan0 $ brctl setfd pan0 0 $ brctl stp pan0 disable $ ifconfig pan0 192.168.42.1 Start the PAN daemon to listen for Bluetooth PAN connections: $ pand -s -M -r NAP Edit configuration script /etc/bluetooth/pan/dev-up to contain the following, and make it executable: #!/bin/sh # called by pand each time a Bluetooth PAN connection is made # argument $1 is the name of a newly created interface representing the connection brctl addif pan0 $1 ifconfig $1 0.0.0.0 Start a DHCP server on pan0. (I used the dhcp3-server package from Debian Etch, and configured it with a GUI frontend.) For the private IP network used above, these informal suggestions might help: Client IP Range: 192.168.42.2 - 192.168.42.127 Gateway: 192.168.42.1 DNS Server: <The same one used by your PC.> Enable IP forwarding to your network and/or the Internet, e.g. using interface eth0: $ echo "1" > /proc/sys/net/ipv4/ip_forward $ iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE You can now start Funambol DS Server, if not already running. This could be on the PC, which is now serving as a Bluetooth NAP, or on any other machine in your network and/or the Internet. On the phone (Sony Ericsson W850i): Go to "Menu / Settings / Connectivity / Bluetooth / My Devices". Select "New device", and pair the phone with your PC, if not already done. Then the Bluetooth name of your PC should appear in the list under "My Devices". Select your PC from the list and press "Connect"! After a short time (max. a few seconds) your phone should be connected to your PC and your network. You can test this by opening you phone's Browser and accessing a web server on your PC or the network or the Internet. (Make sure that the phone does not use a different connection, e.g. GPRS!) Now you can configure a new SyncML server (e.g. Funambol) under "Menu / Organizer / Synchronization / New account". For the setting "Connection" you can use the Bluetooth name of your PC, since a corresponding data account was automatically created when you first connected over PAN. The other settings are pretty straight forward, and could look like this: "Server address": http://192.168.42.1:8080/funambol/ds "App. settings / Contacts / Database name": card "App. settings / Calendar / Database name": cal "Applications": Contacts, Calendar "Username": ... "Password": ... After saving the new SyncML server configuration, you can select it from the list under "Synchronization". Then select start and watch SyncML working! The above setup seems to work pretty well for me, though I did not try any fancy SyncML stuff yet. The important thing is, that Bluetooth is for free, while other network connections like e.g. GPRS may be quite expensive for some users. Using SyncML and Funambol should work equally well over Bluetooth PAN, at least in most cases. While the generic instructions given above seem rather complicated, I was able to tweak my Debian installation, so it all comes up automatically at startup. Under Windows, its probably even more easy to set up Bluetooth PAN. Just search the web for it! As far as the W850i is concerned, the crux was to make sure it can reach a DHCP server, when trying to connect. It does not seem to be possible to set an IP address manually. Other phones may have different peculiarities. Anyway, I don't know how many mobile phones or PDAs support Bluetooth PAN today. But I think, it can make the development of mobile applications easier. You can first test your stuff under laboratory conditions before going out to the real world! Kind regards, Michael Riedel ------------------------------------------------------------------------------------------------------ Student - Mobile Solutions - Lab-Based Services IBM Deutschland Entwicklung GmbH, Altrottstrasse 31, D-69190 Walldorf cellphone: +49-179-5724121 e-mail: michael.riedel@xxxxxxxxxx --------------------------------------------------------------------------------------------------- IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Johann Weihen Geschäftsführung: Herbert Kircher Sitz der Gesellschaft: Böblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Help with icalendar connector, Nextasy |
|---|---|
| Next by Date: | Re: Reporting Success: Synchronizing with Funambol over Bluetooth PAN, Stefano Fornari |
| Previous by Thread: | Help with icalendar connector, Nextasy |
| Next by Thread: | Re: Reporting Success: Synchronizing with Funambol over Bluetooth PAN, Stefano Fornari |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |