Mobile phone to computer under linux

Much of yesterday was spent trying to get my phone (Nokia 6020) talking to my computer via the CA-42 cable. In case this saves someone else some time, here is a summary of what I did.

First I investigated gnokii and got that almost working. I could get a listing of the filesystem but uploading or downloading proved elusive.

Further searching turned up a better program called gammu. It even had my specific phone tested and supported see this report. So I set to work, replacing “com8:” in the sample gammurc file with “/dev/ttyACM0” which had been tested and working under gnokii, but gammu kept saying the device didn’t exist. Frustrating! Then realised I had:


port = /dev/ttyACM0:
connection = dlr3

That little colon was the trouble maker! Once that was deleted it worked!

Then I tried working out the commands to access the filesystem on the mobile. The documentation is a little terse. This manpage was the best I could find. Working out exactly what the fileID was proved difficult. To cut a long story short:


gammu --getfilesystem -flatall
gave a listing something like a comma separated spreadsheet. The first item of each line was the fileID. Where I was expecting something short, in fact the fileID was quite long.

The next step was

gammu --getfiles "d:/predefgallery/predefphotos/Image000.jpg"
to download a photo taken with the camera.

The next job was to upload a few midi files to the phone

gammu --addfile "d:/predefgallery/predeftones/" Byrd.mid

which was gleaned from the wonderful MidiWorld along with some Bach, Tallis and anonymous Medieval things.

So now I am able to transfer phone photos to a computer and also change ringtones to anything in Midi format and all is happy and well.