Fighting with computers

Computers are not always friendly.

Tuesday, January 17, 2006

Virtual Linux PC

I've learned about an interesting site on the net:
What is it about? In a nutshell Cosmopod offers you a free remote KDE desktop, either using a Java-based client software or the (also free) nxclient software. I do not know how reliable the service will be in the long run, but my initial tests are very good. Although services like writely seem promising, I'm really impressed with Cosmopod. They also offer a 1GB email account with your desktop. You may like it, I do.

Sunday, January 08, 2006

Running rabbits

One of my current projects requires to provide IP connectivity for an electronic system. Some power can be borrowed from the base system it will be plugged into. A small, low-power system will do it. So after considering several options (like Lantronix Xport) and provided I needed at least two serial ports, I settled with a Rabbit Semiconductor core module.
They offer different prebuilt cards you can plug into your design. Rabbit core modules can be programmed using Dynamic C. They include a TCP/IP library so you can program them using an ad-hoc sockets interface. Sample source code is provided and it generally is quite straight forward. I did have a problem when using a non specified (zero) source port for several destination ports different than 80 or 23, I do not know why.
Rabbit 2000 and 3000 processors are both successors of the ancient Z80, an eight-bit microprocessor developed by Zilog (a company founded by some former Intel engineers that decided to do a better 8080). Z80 was found on both ZX81 and ZX Spectrum computers made by Sinclair.
Dynamic C is not just a compiler but a programming environment (IDE) that includes a boot loader so generated code is loaded into the Rabbit core module through a serial port and a special programming cable (which is a signal level adapter). They use a special feature of the processor that allows it to be commanded by one of the serial ports on boot, so boot loader code is loaded each time to load the user code afterwards. Basic loader is loaded at 2400 bps and later on, a faster speed is used to speed up the rest of the load process. Then your program runs while a debug window on the PC is used as the console for those printf and scanf commands. This all means an emulator or a hardware programmer are not required to develop with Rabbits. And a basic development system is quite cheap.
As usual, some extra problems use to appear: Dynamic C is a Windows program and there is not a Linux version. Though it can happily run under Wine. However, serial communication fails under Wine, so the thing is pretty useless as code download to the target system is done by means of a serial connection and a special programming cable. Alternatively, you can run it over a Windows guest on VMware. It also works ok, but, again, serial communication fails (maybe due to a critical timing, I do not know).
Almost giving up, I decided to try one more thing: The use of a USB-serial adapter with VMware. My cable is based on pl2303 chip, which used to be supported under Windows but not under Windows XP. The problem is that it works under Linux, so as soon as you plug it in, the Linux driver will be loaded. In order to make it work under the Windows guest hosted in VMware you need to unload the linux driver rmmod pl2302 will do it. Next you have to attach this USB device to your Windows virtual machine. A new device will be detected but, because XP does no have the driver you still will need to search for it on the net. Once the driver is installed, you have a new serial port. This new serial port will work well with Dynamic C (just do not check the "use a USB-serial adapter" on Dynamic C configuration).
I guess the download times are slightly longer than those of using just Windows XP and a regular serial port, but if you do not have a "real" Windows setup and you have a VMware one, then it's a simple approach.
Ok, you do not have a USB-serial cable. Then, you should go to eBay and get one as they are really cheap, usually under $1 (but shipping will cost you $6 to $10 more).

Tuesday, January 03, 2006

The laptop that could

I've never heard about a "flash sale" before, but recently I saw an ad on a local retailer's website offering a cute Toshiba laptop (M50-137) for a really low price only if you buy it on December 23rd. They take 200 Euro off the list price of 1200 Euro. I thought it was making it sweet. The system was a 1.7 Ghz Pentium M, with a WXGA Ultrabrite 14" display, 1GB RAM, 80GB HD, Wifi+Bluetooth, built-in SD-card reader, and a multistandard optical unit (DVD+-RW/DVD-RAM) weighting 2.4Kg.

I took the deal and I picked it up at the local store. It took them longer than the advertised delivery time but eventually I got it home. First impression was good, system was fast and quiet. Sorry, you cannot get along without accepting the Windows blue thing: You have to provide some user and location data so Windows gets happily installed. Till you do this, SuSE Linux repartitioning failed to work. After that, I successfully installed SuSE Linux 10.0 and it almost worked fully. I decided to disable Bluetooth and my Wifi LAN was working ok (the unit had a ipw2200/centrino chipset). What was not working ok was the video as it was using fdev and it refused to accept 1280x768 WXGA resolution. So the unit was running at 1024x768 and all the display was stretched to fit the panoramic display. It did not look pretty.

When running Windows and using Mplayer to watch a movie, I needed to use -aspect 1.5 to get the right display aspect. I never need to do this with other systems (maybe it's because I use 4:3 displays).

I noticed that battery time was under 3 hours of casual use. I did not like to see that it will only allow you 16 hours in "Hibernate" or 22 days in "Suspend". The system got warmer than I would like when using it off the batteries and the panoramic screen did not please me a lot. Ultrabrite technology creates good colors but uses a highly reflective coating on the display so a headlight will create some reflection. The viewing angle is also a bit critical with this display. So, after pondering all the cons and pros I decided to return the unit.

Maybe I'll be getting another 12" iBook soon. It is not lightning fast but it gives you solid 5 hours of use and it does not get that hot. It feels way more comfortable on your lap, maybe due to not having protruding parts. It all depends on what you value more.