Dur­ing one of my trips to China I found some Mini Led Panel in a shop.

They are mini led dis­plays that are able to scroll up to 5 five 250 char­ac­ters mes­sages. They come with a USB cable and some Win­dows soft­ware that allows you to pro­gram them. I actu­ally bought two of them for some­thing like 15 USD.

I was quite intrigued by the con­cept of using them to dis­play alerts on my per­sonal com­puter or show direct mes­sages com­ing from Twitter.

Unfor­tu­nately the appli­ca­tion that comes with the device will only run on Win­dows and it actu­ally does not allow me to use them as i would like.

In the first place I tried to under­stand how these devices were built.

I found that they are based on the Pro­lific PL2303 USB to Ser­ial Bridge con­troller. This is quite famous for these kind of device. You can find the datasheet here. Luck­ily enough there is a Mac OS X device dri­ver than you can use to drive this device.

The next step was to reverse engi­neer the pro­to­col used to pro­gram the device. Actu­ally there is no doc­u­men­ta­tion at all com­ing with the prod­uct. Since it is basi­cally a ser­ial device it had not to be that hard to under­stand the pro­to­col doing some traces. Unfor­tu­nately on a Mac there are no free appli­ca­tion to trace com­mu­ni­ca­tion over ser­ial interface/​Actu­ally the Mac does not have any ser­ial inter­face at all. More­over the appli­ca­tion to pro­gram the device only works in Windows.

I have a Win­dows XP vir­tual machine run­ning on Par­al­lels on my Mac so I decided to trace the pro­to­col in that envi­ron­ment. From the long past I remem­ber that I used a great util­ity from Sys­in­ter­nals, now Microsoft, called portmon.exe. This is a fan­tas­tic small util­ity that you can use to trace and debug ser­ial com­mu­ni­ca­tions on a Win­dows box. That was just what I needed.

After a cou­ple of hours of debug­ging and a few traces I came out with a good under­stand­ing of the pro­to­col. There are still some unknowns that I was not yet able to decode from the pro­to­col (e.g. how to send bitmap images) but that was not crit­i­cal for the real­iza­tion of my idea.

The next step was to write a Max OS X appli­ca­tion to pro­gram the device. I just wanted to write a very sim­ple com­mand line util­ity that I could user from any shell script on the sys­tem. So I did. I started from the Ser­ial Port exam­ple in the Apple SDK and wrote some very basic util­ity imple­ment­ing the protocol.

Finally I decided to use the mini led panel to dis­play men­tions com­ing from Twit­ter. I just mod­i­fied a bash shell script to do just that at 15 min­utes inter­vals. I remem­ber I had seen a very sim­ple shell script on Linux Jour­nal so I used that as a start­ing point.

So, after four hours of work I had my hard­ware and appli­ca­tion up and running.

I have noticed that a lot of sim­i­lar devices share the very same pro­to­col so you may use the same code to drive them.

If you wish here is a link to the com­plete Xcode project where you will find the source code of the com­mand line util­ity and a copy of the shell script. I am putting these files in the pub­lic domain so do what­ever you want with them. Down­load mlpup­date Xcode project here.

Finally, here is a photo of the device working:

mlpupdate

Related posts:

  1. Android, Still A Missed Opportunity
  2. Solar Pow­er­ing Your Gadgets
  3. Con­trol your home from your mobile phone
  4. The Evo­lu­tion Of GPS Nav­i­ga­tion Devices
  5. The Mobile Phone Itself Is Irrelevant…