GNU/Linux iPhone Sync – Wireless! Funambol error -1, yay!

I recently got me a iPhone for tinkering, development (i’ve got a few nice ideas) and general nerdism. I’ve run into a few problems syncing my PIM (stuff like Contacts, Tasks, etc.) – especially since i use GNU/Linux which is no platform to run iTunes. Pictures and Music is no Problem as gtkpod and the like support the iPhone. Just the important stuff does not work out nicely.

So, after a *ton* of googeling and looking around i found out theres a app for jailbroken iPhones which reads the .sqlitedb files of Contacts, Calendar and Notes and sends it to a specialized synchronization server for PIM. Luckily theres a bunch of clients for other platforms – including S60, evolution, ldap, etc. – we’re interested in the Evolution one.

So, i installed Funambol (the syncserver) on my server and started it up. First to notice is that the startup often does not work at first try – i had to start/stop the server a few times before it would serve me on http://hostname:8080/funambol/. Also there seems to be a fucked-up state where the http-server is running but the admin-interface won’t let you log in. At that point i also had to restart the server a few times *sigh*.
Then i installed iPhoneSync, the iPhone funambol client on my handset, started it up, entered my servers data and synced. Woosh, failed. The Log said “server returned error -1” … wowziez, cool – whats that? No table of error codes, no description, no server debug log entries, nothing – not even a bugreport in some mailinglist. Basically its a funambol bug concerning contact-Thumbnails with more than 8k size *Sigh*. At least its fixed in svn trunk…

Now comes the fun part – compiling Funambol. As Funambol needs tomcat, netbeans, maven2 and a whole other bunch of dependencies its *really* fun. With some tinkering i made it to a installer package – that now even works with the iPhone.
So, for all of you out there running into the same bug as me – heres a Funambol binary of svn trunk with this bug fixed:

http://tmp.kanojo.de/funambol-8.2.2-SNAPSHOT.bin

So – here’s what you basically need to do:

  1. scp the above binary on your server, ssh there and execute “sh funambol-8.2.2-SNAPSHOT.bin
  2. install the server as guided by the installation program, i installed it to /opt. Also note it *really* only installs stuff there, so no worries about trash not managed by the package management on your system :).
  3. when asked whether you want to start the server say no
  4. cd to /<wherever>/Funambol/, execute “./bin/funambol-server start”, wait a few minutes (you can also check top whether java has stopped eating up your whole cpu-power)
  5. start up the admin interface, either on the server by using remote X (ssh -X) “./admin/bin/funamboladmin” or in a installation of funambol on your current desktop box.
  6. there, log in using “admin” as user and “sa” as password, go to user management, change the admin pw (important! :P) and log in again.
  7. once again in user management create a new user for you.
  8. on your jailbroken iPhone with cydia, install “iphonesync” via cydia, start it up, enter your servers data (http://yourhostname:8080/funambol/ds) – and sync!
  9. on your desktop box, install syncevolution, to configure do the following:
  10. execute “syncevolution –configure –sync-property “username=123456” –sync-property “password=!@#ABcd1234″ funambol”. then open up ~/.config/syncevolution/funambol/config.ini and change the URI to the same as you used on your iPhone
  11. sync using syncevolution -s <mode> funambol (<mode> can be one of the items seen in “syncevolution -s ?”)

Happy Syncing!

Leave a Comment