Hootoo + OpenWrt + Velleman K8055N

One of the things that I had kicking around at home was a Velleman K8055N (actually mine was the pre-made version, the the VM110N) - but I think they are essentialy the same thing. I decided that it would be really cool to try it out on OpenWrt ... so that eventually I could try interfacing a tiny embedded Linux machine with the outside world.

Some quick googling led me to this driver which I tried on a Debian Virtual Machine first, and then decided to run it on my Hootoo HT-TM02. I used a docker container to build the kernel module according to the instructions, and then copied it over onto the device for installation.

The first attempt at installing the module gave the following error:

Collected errors:
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for
 * 	kernel (= 3.18.23-1-e2416fa0abee73ea34d947db4520f4e9) *

Which I assumed was just OpenWrt being a bit over cautious, because I was actually running kernel v3.18.23. So I took the risk and overrode the error, with this command:

opkg install /tmp/kmod-k8055d_0.2.1_3.18.23-ramips-1_ramips_24kec.ipk --nodeps

Perfect, it worked! So the K8055N is now accessible in the file system under /proc. To celebrate, I hooked up the digital-to-analoge converter to an old voltmeter, so I could watch the needle bounce around in response to what I'm typing on the command line:

I think that's pretty awesome, although I don't know what I'll use it for. Perhaps I'll build some kind of Web API and allow inputs and outputs to be controlled from a browser. Or ... come to think of it, I could build a really cool CPU meter with the output showing via the needle of the voltmeter.

Retro clock LED driver plugin

I thought that I'd lost this code, but now I've found it in a dusty corner of my hard disk. It works with the USB LED Driver that I wrote some time ago. It's a different clock plugin, where each digit scrolls into view as if the clock had four rotating wheels for displaying the numbers.

If you're using my driver, then you might like to give this a try, I certainly like it.

All you need to do is extract the .cs file from the zip here and put it in the folder where the driver is installed (usually C:\Program Files\Hobbsindustries\LED USB Matrix Driver). The next time you start the driver you should see the extra option as an available plugin. Enjoy.

Updated LED Message Board Driver

In the past few months several people have contacted me to ask if I could update my LED USB Message Board driver so that it works on 64 bit machines, especially Windows 7. So I have finally gotten round to that.

It actually took me longer to find the source code than to fix it for 64 bit machines :-) It was one of those seemingly counter-intuitive problems. I had to tell Visual Studio to target x86 machines when compiling to make it work on 64 bit computers. This is because the USB code that I'm using is 32 bit only, so changing the compiliation to target x86 means that a 64 bit machine will know to run the code in 32-bit mode. Easy when you know how.

It might mean this driver has a limited shelf life, I'm probably not going to re-write a specific 64 bit version. So if Microsoft stop allowing 64 bit machines to run 32 bit code then the driver will stop working. But for now it works. It even means that I can use my own LED display again, since I've been running Windows 7 64 bit for ages...

My LED driver page is here.

A Floppy Driver is born

So when I discussed checking out Bran's Kernel Development Tutorial apparently I wasn't kidding.  I have now compiled my own kernel in C (and it actually works).  As kernels go I suspect that it is unique, because I implemented a floppy disk driver before a keyboard driver :-)  But hey, this is my OS so I can do whatever I like...  Here it is in action:

My OS kernel with floppy driver

So far, all it does is boot up, then find the first floppy disk and do a hex dump of the disk contents to the screen.  But there is a *lot* of coding needed to make that work!  At kernel level you have responsibility for stuff like turning the disk motor on and off and moving the drive heads to the right track.  Plus the command set for accessing a floppy drive is pretty *nasty*.  Also, I have had to remind myself all about tracks, heads and sectors.

The information and examples shown on the OSDEV tutorials have been essential reading.  Without all their examples I would not have gotten this to work.  I have tried not to just copy & paste somebody else's code, I have tried to write this in my own style - but credit has to go to all those people involved in the OSDEV tutorials.

My code is only designed to work with 3.5" drives (although it has not been near a real disk yet) I have only used it in VirtualBox.  It does not seem to work in Bochs for some reason (I don't know why yet).

So anyway... this has been a challenge, and I'm very pleased that I've gotten something that actually works.  I guess the next step is to begin writing FAT12 support, so I can get some proper file access.