Tag Archives: GNU/Linux

iMon LCD in 3R Systems case

A while ago I bought a PC case made by 3R Systems. It came with a built-in iMon LCD that had been custom-made by Soundgraph for 3R Systems. The case is good, but I discovered that this LCD panel has no Free Software drivers, and Soundgraph do not support Linux or any Free OS. In fact, Soundgraph refuse to even try to understand simple questions if you mention Linux anywhere in the message. That sort of behaviour used to be common, but the growing popularity of Free Software / Open Source, and the Linux kernel in particular, has made many companies change their attitude: some release technical details of their products so we can write our own software; some write and release their own Free Software (or Open Source); and some others release non-Free software for Free OSes. But Soundgraph does nothing except ignore it.

So, I started to reverse engineer the device. I’m not the only one doing this, and I got some hints from ralph.y, Codeka, and someone called “tsuppiduppi” on the iMon user forum. To make it easy to experiment I wrote a quick’n'dirty C program using libusb to allow me to send commands to the device. Now I can do:

  • imon-poke 0x02 0x1c 0x02 to initialise the LCD screen
  • imon-poke 0x0d 0x0f 0x48 0x45 0x4c 0x4c 0x4f 0x00 0x20 0x57 0x4f 0x52 0x4c 0x44 0x20 to display “HELLO WORLD”

Below is a brief summary (well, random notes) of what I have found so far. The first two bytes select the main command. Subsequent bytes may be used as parameters. The 8th byte should always be zero, and the 16h should always be 2.

          0x02, 0x00: eq graph: 1 byte 1=off 2=on
          0x02, 0x01: eq graph bars (no pattern yet)
          0x09, 0x01: eq graph bars: 16 nybbles, value 0 to 6
          0x0d, 0x01: eq graph bars, seems to match previous 0x09, 0x01
          0x02, 0x09: fan icon bits lsb: F1 F2 F3 LMH
          0x02, 0x0a: fan guage 2 bits lsb: F1 F2 F3
          0x02, 0x0b: 1 byte temp degree c icons
          0x02, 0x0c: 1 byte temp value
          0x02, 0x0d: cpu icons 1 byte on=2 off=1 (or not 2)
          0x02, 0x0e: cpu guage 1 byte value
          0x02, 0x1b: the colon 1=off 2=on
          0x02, 0x1c: whole display: 0=off 1=auto clock 2=on
          0x02, 0x1d: strange xx/yy zzzz; xx = l nibble;
          0x02, 0x26: fan speed
          0x0d, 0x0f: ASCII text

Debian GNU/Linux on my Panasonic R6 ジェットブラック

I had been thinking about getting a new laptop for a while. My old Thinkpad is still mostly working, but I wanted something that is lighter. I have a desktop for heavy work, so small size and light weight of the new laptop were the most important factors. So when I realised that there was only one sensible choice for me: the tiny 960 gram Panasonic R6 ジェットブラック.

The Jet Black model was not available in any shops (that I could find) so I ordered it online. The extra benefit of buying online was the option to get my name (or other nonsense) engraved on a small metal plaque on the bottom of the laptop, so I did:

マーティー・ポーリー 火星の狸

(No, I’m not going to explain the second line.)

I tried to order it without Windoze infection, but Panasonic ignored my emails. After a week I decided it would be easier to buy a standard machine, then wipe the disk and remove the sticker; so I did.

Installing Debian was easy, once I had decided how I wanted to start. I choose to use a bootable USB hard disk with the Debian network installer, and a local Debian mirror. It all mostly just worked; but I haven’t tried everything yet and I suspect there will be a few tricky parts. But for now, I’m happy.

Geek fun in the sun

Karen and I joined some of the Tokyo Linux users, ignored the suggestion from Linus, and went to the beach (well, it wasn’t quite a beach; but it was beside the water) for a barbeque instead of downloading the latest kernel (although we did have a wireless network connection).

I am sure “the goodlooking people” watching us did laugh. Most of us were not “pasty white”, but we were easily identified as “nerds” by our choice of sports: hard disk shot putting and keyboard disassembly races. I almost won the hard disk shot put: I made the furthest shot, but it was off target, went out of bounds, and almost decapitated another geek. After a brief argument about the rules (no extra points for maiming does not seem fair) I was given another try, but my second shot was pathetic in comparison. In the next game I discovered that my head is not a good tool for disassembling a keyboard.

TCP window size scaling problem

I encountered a strange problem earlier when I tried to visit a website: the TCP connection would just hang. I ran Wireshark to see what was happening and noticed a pair of strange acks that made no sense to me.

I tried to access the same website from two other machines, and ran tcpdump to capture the traffic. Both the other machines were able to complete the request.

I loaded the tcpdump output into Wireshark to compare with the failing connection. The only significant difference was the TCP window size. The failing connection had a window size of 5888, while both working connections had window sizes of 5840. But it wasn’t quite that simple. The failing connectian and one of the working connections were using window scaling, so I had the following three situations:

working? TCP win scale window size
no 0x002e 7 5888
yes 0x05b4 2 5840
yes 0x16d0 0 5840
I switched window scaling off using sysctl net/ipv4/tcpwindowscaling=0 and I could access the website!

Now that I know what the problem is I am happy to switch window scaling back on and not visit that website until they fix their buggy router or firewall.

Smartcard reader on Debian GNU/Linux

In April 2005 I joined the Free Software Foundation Europe and received my membership smartcard. The card looked impressive but wasn’t very interesting without a smartcard reader. So (at last) I have bought a reader (SCM Microsystems SCR335) so I can use the card with GnuPG.

To get the reader working I started to follow the mail GnuPG smartcard howto, but I soon noticed that the udev rules provided in that document were ugly: the rules called a script that changed group ownership and permissions on the device file; udev can do that without a script. So I made up my own rule that looked like this:

BUS=="usb", SYSFS{product}=="SCR33x USB Smart Card Reader", GROUP="staff"
That changes the group ownership of the device to “staff”, which is one of the groups I’m in. After stopping and starting udev I was able to use gpg to check the card status.

Dell 1750 and Xeon Hyper-Threading

Today I started to play with my new Dell servers. They are /so/ cool, although they are a bit noisy with all the fans blowing.

I’ve never had a Xeon machine before, and until today I thought hyper-threading was just some new Intel buzzword. Then 4 penguins appeared! A quick [!cat /proc/cpuinfo] revealed 4 CPUs, despite a previous visual inspection of the machine (and the invoice) detecting only 2.

So, it seems Intel have been quite smart. Instead of (or as well as) trying to make their instruction pipelines move faster, they are feeding two at a time into the Xeon. This wasn’t a new idea, but parallelism like this often required programs to know about it before they could use it. With /hyper-threading/ a single Xeon pretends that it is 2 different processors, and Linux already knows how to use extra processors.

When configuring and compiling Linux I discovered that I should enable ACPI to enumerate the processors correctly. I was going to enable it anyway, but I thought I should mention it in case you weren’t.