Wednesday, 27 August 2008

Symbian FTP Server

Sending and receiving files from Nokia devices is a major pain in the ass. Basically you're in a lose-lose situation.

Option one: send files using USB cable and mass storage mode. It's fairly fast, but your PC only has access to the memory card and you're locked out from using anything that's not installed in the phone memory. And that's an optimistic scenario. In case of some devices, like N73 for example, you can't use the phone at all!

Option two: send files using USB cable and Nokia PC Suite. It has the speed advantage of previous option and doesn't prevent you from using your phone, but the PC Suite is so crappy I won't even talk about it.

Option three: send files using bluetooth obex file transfer (or whatever it's called). The major advantage here is the lack of that damn cable which restricts mobility when you want to use your mobile (nyah, nyah) device. And you won't be hiding under your table wanting to select some options, just because the USB cable is so short. OK, now the bad side. Firstly, your transfer rate is limited to, like, 120KB/s. In areas with lots of EM pollution you may not be able to go over 40KB/s. And that whole client problem. You have some proprietary clients under windows, some are crappy, some are rather good in some places, but still cumbersome in others. On linux it's tragic. You have some command line mumbo-jumbo requiring lenghty man-page reading, editing /etc/fstab, using commands like dfutool, rfcomm, pand (WTF?). There are some GUI clients, but, as usual, they suck badly. kdebluetooth for example. Oh, I won't work because you have wrong version of this, oh, I won't work because you want me to do that, oh, KDE4 is there for half a year, but obex file transfer is not yet supported. And even if it does work, it's a major pain in the ass to use, as it tries to establish new bluetooth connections every other second. Move file from disk folder to bluetooth folder, wait for the actions popup to appear, oh, it didn't, try again, now it did, but after selecting the copy operation the connection just timed out. So try again, go to to the sending the file part successfully only to fail yet again because for some obscure reason the file just wasn't sent. So try again, and yes, success! All this shit only because I wanted to transfer my fucking holiday photos to PC! Why can't it be simple and just work?
In case someone wonders, it's all based on my experience.

To get back on the topic: there's also possiblity of html download, sending files using Skype client, but all this requires too much constant setup effort to be actually usable.

So, enter the Dumb FTP Server, or dftpd. The first FTP server for S60v3 devices. It's in alpha state, it can crash a lot, it doesn't support that many FTP commands, some may be misimplemented and cause problems with one or two FTP clients, but here's the catch: it does work (and doesn't corrupt the files you transfer).
To be able to use it you'll need wifi capable device and (for now) a memory card. To be able to log-in after starting the server and selecting the access point you will need to either disable authentication (any user and password will do, very insecure) or generate an one-time token that is presumably only known to you and which will be invalidated after successfully using it as a password (any username is accepted).
Attainable transfer rates are:
  • 700-800 KB/s for upload
  • ~350 KB/s for download
I don't think that upload will get any better, but there sure is some space for download optimizations.

How to get it:
  1. Download Open C library and install it, in case you don't have it already.
  2. Do the same for Open C++ component.
  3. Download the server and install it.
You might be also interested in source code. The license is GPLv2. Oh, and that icon is stolen from Tango Desktop Project.