Thursday, September 30, 2010

Fun with serial ports and a lesson learnt

A friend wrote me, and it was so amusing I'm posting it here. To all of us with Serial Ports skills, read on:

Some months ago I upgraded my home PC from XP to Windows 7 x64 which was surprisingly uneventful. Everything “just worked” and I quickly overcame my initial apprehension - all the concerns about apps failing to work (or having to run in XP mode) never materialised. However, one piece of hardware did not work under Windows 7 (it barely ran under XP because it was so old) and this was an old Quatech 8-port USB-to-Serial converter which I used to connect to the console ports of my Cisco lab equipment. (Quatech are still going, since 1983, but just not providing new drivers for obsolete equipment…) I really wanted an Ethernet-to-Serial converter (what used to be called a “terminal server” in the old days) but the price was prohibitive, with even old units on eBay retailing for £500 upwards. Today, it’s still the same, these old crappy terminal servers still retail for stupid prices. But I needed one and there was simply no way to get the old Quatech unit working – the new requirement was to run in Windows 7 x64 and they stopped making drivers for it years ago.

While browsing eBay recently I came across exactly what I wanted for only £50, so I promptly used “buy it now” and, via the wife’s parents, got it shipped over to Switzerland.

What I should have done, of course, is checked the availability of Windows 7 x64 drivers before purchase (among other things, more later) but I was excited to finally get my hands on a proper terminal server and anyway, how hard could it be? Back when I was a VAX/VMS programmer I don’t recall having to install drivers to get a terminal server working, that’s why we had LAT! (I know, there’s a wee bit of difference between a VT220 and a PC ;-)

So, unwrapping the shiny new (well, dull and old, to be honest) terminal server from Equinox (who?) a first glance confirms that it looks like just what I need. One 10/100 Ethernet port and 8 RJ45 serial ports. Perfect. OK, power it on. OMG! Where’s my ear defenders? How can this little box make this much racket? Never mind, some green LED’s light up and start flickering which looks like a good sign. I connect it to the network and go looking for a Cisco rollover cable. An hour later I stop looking for a rollover cable. I actually have dozens of these, not only the eight from the Quatech box, but they are all RJ45-to-DB9 terminated, whereas I need a RJ45-to-RJ45 rollover.

Anyway, that’s for later, first I need to connect to the box. Before I do that I span the Equinox switch port to a laptop running Wireshark – I just know I’ll be needing that at some point. So, what’s the default IP for the box? Hmm. Now I’ll need the manual. So, it turns out that Avocent bought Equinox way back in 2001 but they’ve done an excellent job of keeping the old docs available, and not only that – drivers!

Apparently the default IP is (no subnet mask given) so I renumber another laptop’s IP to and try pinging Nothing. I try /8 and /16 subnet masks just in case (you never know, and it was quicker that enabling proxy-arp on the router), then try pinging the subnet broadcast, and anything else I can think of. Still nothing. I make a static arp entry for and try again. Wireshark shows packets in, but nothing coming out. I go back to the manual and look for the flash reset, just in case it’s still got an old IP. Yes, I should have done this first... Anyway the reset works, but still nothing. On a hunch, I reset while connected to the LAN and voila! A DHCP request! A bit more testing shows that this only happens on a hard flash reset. My DHCP is more secure that it probably needs to be (I only allocate enough IP’s for the devices I have and no more, among other brain-dead ideas) so a quick reconfiguration and the Equinox has an IP. I can ping it, but a quick check to see if it’s got a web interface (it doesn’t) confirms I need to get some drivers.

The latest drivers include Vista x64 – these are the only ones which have a chance of working. Several hours later I give up, the bastard drivers won’t install no matter what I do. However, there’s an “administration utility” called ESP-Install which is available for every OS up to and including Windows 7 x64. I try this. It’s command line only, and requires a configuration file hosting the parameters you want. Every time I run it, it throws an error message, but the errors are fixable and after half a dozen or so failures it suddenly says EXIT SUCCESS. WTF? I check and sure enough I now have eight shiny new COM ports on my PC. Woot!

Now I need that bloody cable. I have literally hundreds of cables, serial cables, USB cables, Ethernet cables (all kinds, cross-over, straight, custom..), scsi cables, fibre cables, two whole boxes of video cables – so anyway it takes me another couple of hours to realise that I don’t have any RJ45-RJ45 rollover cables. Another hour messing about with DB9 and DB25 adapters. No joy. However, I won’t let something like that stop me so I’ll just make one!

So, I have the crimp tool but I’m out of plugs. As I’m now getting desperate, as well as more and more inebriated, having finished the beer and started on red wine, I cut an Ethernet cable in two, strip it down to the bare wires and make a rollover. The flashing lights on the cheap cable tester I have confuse me, so I manually check the pinouts with multimeter probes. Not such a wise move given my current state as the probes have very pointy ends. I clean up and apply a bandage.

Everything is now done. The box is up and running, COM ports are installed (with nice configuration panel for each port) and I’m fully cabled. I configure port 1 for 9600, 8N1 no flow control and fire up putty. Putty also needs serial port parameters, so I input those, select COM11 (which I’m assured is port 1 on the Equinox) and press . Nothing.

Still nothing.


Deep breath. Sip of wine. Relax.

Keyboard says no.

Start again. Check Wireshark – I have a nice trace file, but no decode. Slightly unusual not to have a Wireshark decode, but maybe the protocol is proprietary. However, I don’t think that’s the issue – whenever there are problems with serial connections it’s always a safe bet that it’s the cabling. (I try all the other RJ45 terminated cables I own, mostly Ethernet, just in case some random wiring shows me some luck but none of them work.)

The Avocent site shows an app called “Connections Manager” alongside the drivers (or “administration utilities” – what’s wrong with calling it a bloody driver?)

The connections manager program won’t install on Windows 7 so I try XP on a laptop. It needs the driver administration utility installed first. However, I eventually get it installed. This turns out to be an amazing program! Complete monitoring of serial traffic in and out, including pin utilisation, and a full datascope. I check local loop first. Works fine, so nothing wrong with the box. External loop doesn’t work. Well, duh! Obviously it doesn’t or I wouldn’t be here. is being sent on TxD wire. Nothing is coming back. So, cabling is wrong.

Back to the manual – what’s the pinout for the serial ports? O my f** god! It has 10 pins!!! How can a f**** RJ45 plug have 10 pins!! I calm down and count the number of pins in port 2. It has 8. OK, why does the manual say 10? The picture is the same, the model number is the same – wait, it isn’t - this manual is for an ESP-8 MI and I have vanilla ESP-8. OK, I dig around and find the correct manual. At first glance it looks identical, but the pinouts have 8 pins not 10. Whew.

I examine the pins, and find that they are not the same as the Cisco pinouts. Apparently, there is no standard for RJ45 serial port pinouts. So, what do we need? A rollover is no good. We don’t need DTR/DSR or RTS/CTS as Cisco console ports don’t support hardware flow control. Ditch DCD also. What’s left? RxD and TxD pins and ground. Should be enough, so I perform some more bare wire surgery and tape up the patient.

Keyboard say no.

What IS the problem? Datascope shows TxD active for every but absolute silence on the RxD pin. I’m reduced to reading the help page in the Connection Manager app. Wait a minute... this help page has the pins backwards from the diagram in the manual...

More cable surgery...


Yaaaaaayyyyy!!!!! At last!!!


I really shouldn’t have put those probes down there. And that’s the lesson. Be careful where you put your probes.

Wednesday, September 29, 2010

Sharkoon Quickport PRO LAN fails to impress

The Sharkoon Quickport PRO LAN dock should have been the next step in drop in SATA disk docking stations. As you can see from the picture above not only there is a slot for a SATA hard disk but also dual USB slots and a SD card reader.

At the back things start to look unbelievably impressive. The ports are all of eSATA, LAN and USB. Unfortunately my real world testing so far has found this device to be unbelievably UN-impressive.

Through a series of patient tests I've used this as a simple eSata connected external disk, or a USB connected external disk or USB key reader, or a LAN connected version of the same. The results are that only the eSATA connection works reliably. The USB and LAN connections either dont work at all or fail almost immediately.

Theoretically you can give this device an IP address then any PC on the Ethernet network can make use of the USB sockets or SATA disk. I peformed testing on source Windows 7, Windows 2008 R2 and Windows XP platforms:
  • The eSATA to eSata connection seemed to work fine. I can get a sustained 80GB/s write speed from laptop SSD to target 2TB disk via this eSata connection.
  • The device could not be recognised via USB under Windows (any version) and I had installed all drivers

  • Over the LAN the USB and disk device showed up, but after the connection any attempt to read to USB storage devices resulted in a device disconnection. In other words it did not work at all over the LAN!
If anybody has better luck (oh yes, of course I read the manual and yes, I upgraded the firmware) then do let me know how.

Tuesday, September 28, 2010

Chili Bonbons

First and foremost I am referring to the 4 degrees Centigrade temperature that I cycled to work in this morning. I naturally checked the weather forecast and morning temperature prior to leaving Lausanne. Fine weather and about 8 degrees C in Lausanne this 5 am. So I wrapped up warm.

Thermal cycling trousers, balaclava, winter gloves and cycling overshoes.

This meant my 4 degree cycle was not as painful as I had imagined. Towards the end of the 25Km pootle I was even just a little warm. It just goes to show that whilst the human body really can only comforatably tolerate a very narrow temperature band, modern clothing technology can really come to our rescue. Even whilst sprinting at over 40Km/h down some windy sections my core body temperature remained OK.

Meanwhile my expression "It's Chili Bonbons", my way of saying really cold, drew blank looks from everybody at work. I googled it and was tres suprised to find that it is nowhere a universal expression to describe "really cold". So my parting question, which one of my close friends or relations has implanted this term into my brain. Call me :-)

Monday, September 27, 2010

The Inbetweeners

The Inbetweeners is a British situation comedy that portrays the tennage angst and sexual frustration of some A-level students at school.

Series 3 just started and episode 1 was so funny that I was literally in tears of laughter.

Even if you are outside the UK you can watch these video clips. Once you have agreed about the brilliance of the series you can get the first 2 series on DVD and the third live streamed in the UK or from the usual sources.


Sunday, September 26, 2010

Reluctant Raid

The weekend has been busy as usual but not in the expected way. As I write this it is about 05.30 on Sunday September 26th. I am still recovering from a rather annoying rolling webserver disk failure that began late last Frdiay lunchtime.

In the recent rebuild of the Webserver I created a virtual environment based on VMware inside was at least a Windows Home Server (WHS) and an Apache 64 Webserver.

What complicated the build slightly was the requirement to also run some SAP systems. SAP is a sophisticated Enterprise Resource Planning environment and makes good use of its underlying database in this case MS/SQL or Oracle. And to extract maximum performance, the VMware .vmdk disk image files were scattered accross multiple drives. So when disaster struck on a single Hitachi 2TB drive which started to fail intermittently multiple VM's were affected. I've found out that in VMware if you lose the .vmdk even if it supports a non OS system disk, that OS will crash.

So with a heavy heart I have decided to perform a RAID-1 mirror on the crucial data components of this machine. But the point of the post is not sympathy, it is to stress just one thing.


I mean constructing a RAID-1 array should be easy, but it is essential to test the loss of one of the array disks before a disaster and document how to fix the problem so that if it ever occurs you will really know how to recover.

First we did the cabling

In the BIOS defined an array i.e. 2x2TB disks. You will notice I chose two identical Manufacturers disks.

The OS also knows each drive i.e. Windows 2008 R2 Enterprise can see thru the motherboards bonding of the two drives into one.

The Management Snap in shows this a SCSI Disk Device

In Windows 1 disk is seen and it is given a very modern GUID. We make a volume out of this pair of RAID-1 bonded drives.

Don't forget the Control-G prompt and RAID BIOS is absent unless you select that RAID mode of operation for the Gigabyte Disk controller which is set to AHCI mode by default.

Then formatted NTFS to be a VIRTDATA volume and suitable files copied onto it.

Now shutdown and disconnect one of the cables and reboot

The BIOS shows the array as Degraded i.e. this is because one of the 2 disks that form the array has disappeared.

The OS level Gigabyte utility also notices a missing disk

We copy more files onto the now broken mirror

The shutdown and reconnect the disk

Reboot and BIOS notices that Mirror is inconsistent and needs rebuilding

OS also offer a rebuild. We say NO!

And copy more files to the broken mirror (though both drives are now accessible). It is conjectured that since the mirror is done on the controller surely it's not actually writing to the restored disk. Or is it?

We'll know when we rebuild, and in this case let's do it from the BIOS i.e. before the OS is loaded.

Shutdown and rebooted, in BIOS pressed Control-G and selected Mirror Rebuild. Nothing happens i.e. no disk seeking is heard for several minutes. The it starts in a most unintelligent fashion. We know which disk is more current so the recovery methodology is to copy the entire good 2TB disk over the failed 2TB disk This is a safe but pessimistically slow process.

So there we have it, the vital Wiki Data, Webserver Data, and SAP Enterprise Management Systems data is now protected using a simple RAID-1 mirror. And it's tested. Marvellous!

Friday, September 24, 2010

The future [may be] Android

I am not normally given to advertising or promoting products that I've not personally had good experiences with but I was most impressed by the matter or fact and restrained advertising video for the HTC Desire HD.

With our iPhones now reaching almost antique status and the bro-ha-ha regarding Apples PhoneGate, No-Flash Gate and closed (even for Apple) developers terms and conditions we think it might be time to test out the power of the Android phone space.

Thursday, September 23, 2010

Another great week in Warsaw

With all that has been going on it is not until now that I can say a hearty thanks to all who made our brief visit home to Warsaw so pleasant. Some photos to help us remember those good times

Ok, my respect for the bravery of Window cleaners has just gone up a notch

Warsaw has realised how trendy grafitti can be

Meanwhile, some village people [i.e. not rich city folk] seek an economical way to get back home from their day out in the big city.

Inside the stores are bulging with goods, you would not have seen this 10 years ago!

We make our usual homage visit to Marks and Spencer which [of course] is not available in deprived shopping countries like Switzerland.

I was kindly left a flyer on our car about the plight of some local Polish girls. I don't read Polish but perhaps it is saying that they have so little money that they cannot afford any clothing and it is asking me for help

The Palace of culture still dominates the city skyline

Alone in a field this and other Fiats of it's time which once were the bedrock of Polish car transport are now cast aside in the face of an infinity of other European choices from Alfa Romeo to Porsche to Volvo.

Two sophisticated Warsaw girls

At long last the lounge is back together at Mothers house. And it looks great!

An old style tram

A Polish sporting event! Well it is walking and we do the same distance (and more ) this day but on our own route.

Small Agata, tall men.

We search out the Nespresso shop to buy capsules for Mums coffee machine.

A fancy wedding, Large America classic car included.

Lenin display

Yes it is that large a display

The Presidential butterfly. For a more regretable set of images click here

Oh please, my pants are falling down comes to Warsaw now too.

Nike run a sports shoe testing display on Nowy Swiat.


New style Tram

Nike Shoes I tested

And some really stuipid shoes I had no desire to test

Tap water is still not 100% drinkable so we dutifully stock up water at mums for future consumption.

Outside is a dumped car with a suspicious body shaped and wrapped package. I hope it is not there on our next visit.

A visit to the Cemetary

All these photographs are uploaded in higher resolution here in Picasa

Wednesday, September 22, 2010

Burn In

Never argue from an analogy they say, so I will not discuss the principle of whether the fact that most modern Car engines don't require an initial oil change and running in to the analogy of what to do with my new Server computer. With 8 fans and a few entirely necessary lights :-) the first thing that is needed is:

A burn in memory test of course. I usually use memtest86+ these days, though of course a similar tests lives on every Microsoft 2008 server DVD

Meanwhile, in what I maintain is an uncharacteristic indulgence I have purchased a small travel computer. It is seen here nestling under my iPad. Although the iPad was a birthday present from Agata to me, she seems in the process of her own daily burn in testing of it. I never get my hands on it. So I've bought my own secret substitute, a report to follow.


Tuesday, September 21, 2010

Cross with the Cross

As I understand it "those troublesome kids" in this case some Polish Boy Scouts and Girl Guides errected a cross outside the Presedential Palace in Warsaw to honour the death of Lech Kaczynski.

This then provided a symbol for a protest group who claimed that the plaque that the government had placed on the Presedential Palace in central Warsaw was not enough. In fact many Polish thought that Mr Kaczynski had already been given too great an honour by being buried at Wavel castle Krakow. In contrast the protest group wanted a momument built outside the Warsaw palace and most people (I've spoken too) said this was not warranted.

The Actual cross is now cordoned off and under 24 hour Police protection. So we head to another monument and manned protest over the road which benefits from at least 2 other smaller crosses and an array of dedications

Approaching the scene

A sign, but I am convinced not from God

Marcus discusses and imitates Genuflection to the Blessed Sacrement