Almost three years ago, I bought a Samsung D600 mobile phone.
I gave it a mixed review, but I reserved my hostility for the Samsung PC Studio 3 software that (allegedly) synchronised with the phone. (Those pages became some of the most popular of this blog – mainly from the long tail from search engines.)
Samsung have released several patches to PC Studio 3, which means some of the bugs may well have been fixed – I don’t dare test some of the more horrific issues – but even the basic stuff is still broken.
I tried replacing it with Mobile Master. That software was fairly feature-rich – some of the things it could do were really nice! – but the English translation from the German was woefully bad. I couldn’t recommend it to others for that reason. I wrote to the author, and volunteered to help out a little with the polish of the English translations – I provided him with some where the real meaning was clear, but there were many more I couldn’t understand enough to help with (and I speak virtually no German, so I couldn’t translate.) Then events overtook me, and by the time I came back to it, he had released a new version (with a new fee), I had version control issues with my changes, and I wasn’t willing to fork out the money. None of these are insurmountable hurdles, but I let it slide.
There seem to be many other half-arsed solutions out there.
I played around with BitPim (open-source, so no price rise issues) for a while, seeing how hard it would be to add D600 support. I found out three things: (a) having generalised support for old Samsung models doesn’t mean it is even close to supporting “modern” Samsungs, (b) it isn’t evident how bad the UI is for BitPIM until you have a phone that works with it, and (c) it doesn’t look like it is going to get better, with no contributions to the code-base for a few years.
OpenSync sounds promising except that it relies on a Bluetooth and Linux. Also, reports about the level of D600 compatibility are contradictory. It is going through an architectural revamp, so now is not the time to contribute new plugins.
I have been making do with Samsung PC Studio, a second Outlook contact folder, and some ad hoc Python scripts. I read all the contacts from the phone into a separate Outlook contact folder. I run scripts to compare the differences to the master copy, and manually mark up the master copy. Then I delete all the contacts in the second Outlook folder, and replace them with a copy of the master folder. Then I delete all the contacts on the phone, and do a one-way sync to the phone. The goal here is to prevent Samsung PC Studio from ever touching my master copy of the contacts, so it can’t ruin them.
My phone’s appointment book has been empty and stale for a long time, making a key feature of the phone worthless. My phone’s contact book is generally stale because of the effort required to update it – generally I was only updating it once ever 3 months.
This month, after another frustrating synching experience with Samsung PC Studio, I decided to write my own D600 phone interfacing software.
This Is Not The D600 Support You Are Looking For.
Let me explain why my code is not what you are looking for, and is instead just another piece of half-arsed piece of almost useful code.
- It doesn’t work on any other model of phone except the Samsung SGH D600. It is filled to the brim with hard-coding of parameters and protocols for it to work on any other phone (even similar Samsung models). It turns out that the phone protocols do have some ways of interrogating for which features are present and the possible ranges for some types. However, (a) the protocols don’t seem to be quite standardised enough, so you need to already know the phones capabilities to interrogate it (in which case, why not hard-code that info?), (b) the protocols don’t give enough information (i.e. is the range for this record 0-based, or 1-based?) and (c) that would mean you couldn’t get started with your synching operations until the phone is connected.
- It doesn’t support two-directional synching. At this stage, it supports changing the phone to make it match Outlook, but never vice versa. I expect I will eventually write a comparison tool to tell me to manually update Outlook when there is a change recognised on the phone, but in my world the phone is not the master copy. Yes, this is limiting, but it comes from a deep mistrust of synching software that I have gained from PC Studio (oh, and trying to synch ACT with a PalmPilot many years ago).
- It has limited SMS message support. I haven’t bothered. I have no interest in writing SMS messages on my phone and uploading them (or triggering their transmission, for that matter) even though I believe I have the knowledge of how to do it. There are traces of support at the lower layers, but I haven’t carried them to the top.
- It can read directories, it can’t read files. I haven’t bothered: I don’t have much use for it, and I haven’t understood the protocol; it looks relatively complex. (Is it based on OBEX?) Maybe I’ll add this one day; it would be nice for backup purposes.
- No Bluetooth support. I don’t have a Bluetooth dongle on my PC. One has been ordered and will be delivered in a few weeks, so I can see then how hard it would be. (I am hoping it is just a substition at the serial port layer.)
- Too many mystery fields. When I read in some records, there are many fields that I simply do not understand. I have (generally) learnt what defaults will get the phone to work, but there could well be a feature I haven’t tested that will trigger a failure.
- It doesn’t have a GUI. It’s just a Python script.
- It doesn’t check for the existence of a PIN number. I haven’t bothered: my phone is not PIN-protected.
- It probably doesn’t work for all the languages the D600 supports. I do try to handle UTF-8, but I am not sure how much of the character set that the D600 supports. It works for the occasional umlaut in my friend’s names, but I haven’t pushed it. My D600 only supports English and a number of Asian languages (Indonesian, Thai, etc.) so I suspect it is the Asia-Pacific model, and is limited to some parts of the character set. I have no other models to test it on.
- It doesn’t synch To Do lists. In fact, it deletes any To Do items it finds on the phone. This isn’t a bug, or a missing feature; I dislike the way that To Do lists on the D600 are given priority over daily appointments in the UI. They get in the way too much.
- It doesn’t synch email or bookmarks. I haven’t bothered. I don’t use WAP/Internet on my phone; I find I am either within eye-sight of a real computer, or I am away from my computer, and don’t need the Internet. I don’t have a philosophical aversion, I just don’t feel the need, especially given the price.
- It doesn’t synch email addresses or Event/Contact notes. This is a trade-off. I would now-and-then find it useful to share someone’s email address, and maybe the first 100 characters of the notes (all the D600 supports) would be occasionally useful, so i would like to synch this information with the phone. However, Outlook has a security feature which requires the user to confirm that the synch software has temporary permission to access the Outlook object model; until permission is granted, the synch freezes up. It is only triggered on some sensitive fields (like email address), so avoiding these fields means that the synch can run without disturbing me.
- It doesn’t check the phone plugged in is a Samsung D600. I know how, I haven’t bothered, because I never plug in any other device into that COM port.
- It doesn’t handle multiple phones/SIMs. I know how to detect the IMEI number, but I haven’t bothered, because I never plug in any other D600.
- It doesn’t handle multiple Outlook profiles. It is hardcoded to my profile name.
- It doesn’t synch SIM contacts. SIM contacts are barely functional (name and phone number). I don’t need them. Some people swap SIMs around on their phone, and find it useful to store numbers on the SIM but I don’t.
- It synchs contacts my way! If I don’t know your phone number, I don’t want your name cluttering up my phone’s directory. Duh, PC Studio, duh!
- It synchs birthdays my way! It doesn’t synch birthdays found in the Calendar. Instead it synchs birthdays found in the contact details. Furthermore, it puts the person’s age in the subject text of the event (where it is known). Sometimes I only know the day and month, and not the year. Historically, in that situation, I have always set the year to be the current year. Thus, if the year is less than about 1998, that is their DOB. If it is greater than 1998, then either I don’t know the person’s age or they are a small kid. I’ve hardcoded that distinction in the (top layer of the) synching software. If you don’t follow this tradition, or have been doing for a different length of time to me, too bad!
- It doesn’t handle time-zones. There are three parts to this. (a) I assume that the phone’s clock and the computer’s clock are in the same timezone. If they aren’t, there will be confusion trouble. (b) Although I know the codes to set the phone’s timezone when I synch the clock, it appears to make absolutely no difference (e.g. to the timezone reported by the phone’s UI). When I first played with it, it seemed to think I was in GMT-7.25, rather than GMT+11 (which is how it was set in the GUI), so the wrong timezone doesn’t seem to phase it. (c) I haven’t bothered coding it neatly, due to (b).
- Doesn’t handle intermittent connection issues. Every now and again, the phone or the COM port seem to get stroppy, only to work again a few seconds later without change. I haven’t automated retries for this situation.
This Is The D600 Support I Am Looking For.
This long list of missing features may make this software sound half-arsed and barely functional.
That’s all true, but it just the half-arsed, barely functional code I wanted.
My contacts are synched. (I have many hundreds of contacts; this is a big thing.) Yay! I won’t call you on your old number after that you emailed me a new one.
My events are synched (for the next two year’s worth). Even the weirdly recurring ones. Also, if I ever knew how old you were, I can now remember on your birthday.
Of course, the irony is, I needed to leave my work to have the time to make my phone remind me of my work meetings. I don’t divide my days into one-hour slots any more. But it still makes me geek-happy that if I do have a meeting, I will be reminded!
Talking of geek-happy, I am also happy that the clock on my phone is now synched to the clock on my PC (which itself is eventually synched to some atomic clock somewhere). I know this is anal and geeky, but I am still pleased to be carrying an accurate watch again.
Of course, the other irony is that, while I have no desire to replace my phone, this software clearly doesn’t have an extended lifetime. When this phone dies, I will not be buying another D-600 to replace it. If I had written it 3 years ago, it may even have been worthwhile.
Still, it was fun to get my hand in with device driver code again (nothing in at the kernel layer, I hasten to add). Maybe I will extend it further (how about integration to Facebook, so when someone rings me their latest profile picture appears as their avatar on the screen?)
I originally planned in this post to describe the architecture and development, but it became quite long enough as it is. If there is interest, I can delve deeper.
At least you have one inkling of why the Online Photodatabase Project has stalled.
Comment by configurator on January 13, 2009
I’d love to see some source to learn a bit about how you did it. Souns fun 🙂
Comment by Alastair on January 13, 2009
I’m sure you can imagine the kind of iPhone comparison I am thinking of right now, so I won’t bore you by actually writing it.
By the way, where actually is the code?
Comment by Julian on January 13, 2009
Alastair,
You don’t even need to wait until 2008 and Apple to see it done right. About 8-10 years ago, I bought a Windows CE PDA. I chose Windows CE over Palm (which was the more popular choice at the time) because the synching with Outlook was so seamless.
(To be fair, the software on the device was branded as Outlook. It may not have synched well with other PIMs.)
The code’s coming.
Comment by Alastair on January 13, 2009
Julian, that’s a good point about using WinCE to Synchronise Outlook data. I’m sure there must be lots of cheap WinCE (or Windows Mobile or whatever it’s called) phones on the market at the moment, why not switch to one of those?
And I have a theory about why Microsoft’s Outlook Syncing works so much better than anyone else’s. Namely: the OLE interface is broken. I’m not just talking about the relatively obscure problem that I encountered.
I’m of the opinion that without sequence numbers (or similar) for individual changes, synchronising multiple data items such as contacts, is ultimately going to fail. And the last time I looked, Outlook’s OLE interface did not support such a concept.
Yes synchronisation is hard, but it’s solvable. It’s a version control problem, for which good solutions exist.
Comment by Julian on January 13, 2009
Alastair,
Working backwards through your comment:
Yes, it is very much a solved version control system – but not on the systems where it is required!
For most, but not all, of the records on the D600, there is a unique id. It is unique across the table (phone?) and is incremented when a record is edited. (I assume it rolls around to 0, but I haven’t seen it happen.) I believe this is an attempt to offer a sequence number. To make it challenging, there doesn’t seem to be a id that stays stable, so you can’t tell that this is a new version of an old record, with many field changes. Has John Doe been renamed Alan Smithee, or has John Doe been deleted and Alan Smithee created?
I haven’t looked at the more recent Outlook models, nor some of the other concepts Microsoft have introduced for synching, so I don’t know if has been getting better.
Thanks for reminding me about the timezone problem you encountered. I vaguely recalled there being a trap around there, but I bypassed it by assuming that I wasn’t dealing with teleconference calls and multiple timezones any more (and you can imagine how happy that sentence makes me feel!)
I was trying to work out how Microsoft’s synching could avoid this issue. Are you suggesting it uses a proprietary interface, rather than OLE? (I have no evidence either way; it may well suffer from this problem!)
The reason I haven’t switched phones is because I can’t justify it – I have no real need for meeting reminders at the moment, and because I have massively overblown my gadget budget on a new camera and a new PC. The reason I can justify writing synch software is because, while I am writing that, I am not spending money on other gadgets! (Okay, apart from the $5 Bluetooth dongle that I ordered!)
Comment by Alastair on January 14, 2009
Yes, I was suggesting that the developers for these sync systems should be thinking in terms of branch-and-merge, and agree that they mostly haven’t, in the past anyway.
Unique ID: That doesn’t sound like much use for anything. Another lesson from source control is that you have separate identifiers for the items under control (eg files) and their versions.
Teleconference: Yes I can totally imagine how happy that must make you. My current schedule is one teleconference every two weeks, and even *that* makes me happy…
Gadgets: Looking forward to the hopefully forthcoming camera review! (In all likelihood you’ll get yours done before mine, and I’ve had it over 9 months now…)