‘While we were talking, the electric lights in the room suddenly went on. The girl looked up at them with the awed expression of one receiving a revelation.
A few minutes later Coker strolled in.
“That was you, I suppose?” I said, nodding at the lights.
“Yes, he admitted. “They’ve got their own plant here. We might as well use up the gas as let it evaporate.”
“Do you mean to say we could have had lights all the time we’ve been here?” asked the girl.
“If you had just taken the trouble to start the engine,” Coker said, looking at her. “If you wanted light, why didn’t you try to start it?”
“I didn’t know it was there; besides, I don’t know anything about engines or electricity.”
Coker continued to look at her, thoughtfully.
“So you just went on sitting in the dark,” he remarked.
She was stung by his tone.
“It’s not my fault if I’m not good at things like that.”
“I’ll differ there,” Coker told her. “It’s not only your fault - it’s a self-created fault. Moreover, it’s an affectation to consider yourself too spiritual to understand anything mechanical. It is a petty and a very silly form of vanity. Everyone starts by knowing nothing about anything, but God gives him - and even her - brains to find out with. Failure to use them is not a virtue to be praised”
The girl regarded Coker critically for a few moments. “If the ways of decent, respectable people are not good enough for you, I should think you’d better go somewhere else.” And with a sound very like a sniff, she walked away.
Coker watched her leave. When the door closed he expressed his feelings with a fish porter’s fluency. I laughed.
“What did you expect?” I said. “You prance in and address the girl as if she were a reactionary debating society - and responsible for the whole western social system as well. And then you’re surprised when she’s huffed.”
“You’d think she’d be reasonable,” he muttered.
“Most people aren’t, even though they’d protest that they are. They prefer to be coaxed or wheedled, or even driven. That way they never make a mistake: if there is one, it’s due to something or somebody else.” I paused. Then I added:
“That girl was right about one thing, you know. Her reaction is a sample of what you’d get all round if you were to try to handle this lot your way. You can’t drive a flock of sheep to market in a dead straight line, but there are ways of getting ‘em there.”
“You’re being unusually cynical, as well as very metaphorical, this evening,” Coker observed.
I objected to that.
“It isn’t cynical to have noticed how a shepherd handles his sheep.”
“To regard human beings as sheep might be thought so by some.”
“But less cynical and much more rewarding than regarding them as a lot of chassis fitted for remote-thought control.”
“H’m,” said Coker, “I’ll have to consider the implications of that.”‘
John Wyndham on tech support methodologies
As seen on Ebay
Looking for lens possibilities to build a fisheye webcam on ebay, and discovered one with the following choice description:

Google: We’re not evil? (Oops. Actually, we are. And so is everybody else)
While searching Google today, I noticed something peculiar about the search results I was getting. Seems that Google’s safe search facility went on the blink. Unfortunately, it would also appear that while the safe search facility is unresponsive, the net result is that every single search result that Google provides is (tada) marked as ‘this site may harm your computer’.
Extremely useful heuristic there, Google peoples. Sure, we all get days when we figure that everybody’s out to get us… but according to what happens when I search for ‘Google’ it appears that you’re out to get us, too. And you’re even willing to admit it ![]()

Usability? Why?
Jarre Concert in Birmingham
I know I am hijacking Em’s Blog but we were there together and it was with her phone that I took these shots. Not any good by any stretch of the imagination, but great memories anyway.
Gaiman on Windows Vista
From Neil Gaiman’s blog:
Sitting in an airport, getting really sick of Windows Vista on a laptop. It doesn’t work — I’m tired of waiting seconds for things to appear on the screen, of taking half a minute or more for something that ought to happen instantly to occur. The poor computer obviously can’t run Vista, and shouldn’t have been Vista certified, and the author isn’t impressed with the way that a number of things that were easy in XP have got harder, nor with the fact it took most of a day for Vista to run a search on the hard disk to find a mislaid introduction I was working on, nor with its refusal to read or copy a bunch of files on a DVD Dave McKean burned for me (I wound up dragging them from the DVD to one of Dave’s macbooks, from there to my iPod and from my iPod to the computer).
Have any of your readers suggested cures or workarounds for the Vista problem you describe in the 3-27 blog (sluggish text)? If so, please share — many of us have the same problem.
A few people have written in to suggest I get extra memory, and I might, but I’m more likely to either a) say sod it and get an Airbook. It’s heavier than the Panasonic W7 and doesn’t have a disk drive, but it has a nice operating system that works or b) keep the computer and wander over to Linux Ubuntu.
My other solution is to warn the many people who read this blog that they may want to avoid Windows Vista.
Seeing this made me smile, because my lovely new Lenovo tablet came with Windows Vista and, whilst I like the handwriting recognition, there turned out to be really nothing else to recommend the experience. True, I was planning on putting Linux on the thing eventually anyway, but the handwriting recognition was good enough that all other things being equal, I might have at least decided to keep the system dual-bootable. But there were all those other issues, such as DRM that stands on your toes when you least expect it, usually when you’re doing something that is both legal and techie, and yes, the extreme slowness of Windows Vista. Put it on high-performance mode and your battery life drops to nil. Put it on low power consumption and Vista will lose all hint of responsiveness. If you click on something you may as well pop off for a nice cup of tea because you will have the time to boil the kettle before anything happens. And it constantly churns the hard disk. All this on a tablet that is of course not the fastest device currently available, but is Vista certified. I’ve tried various suggestions and had modest success in removing some of the slowness at boot, but it still ties itself in knots regularly enough to be a problem.
I won’t be buying an Air unless I receive valid documented evidence that hell has frozen over. That’s for various reasons to do with battery life (oh, come on, non-user-replaceable battery?), lightness, ruggedness - if that is a word, and I’ m not convinced it is - the absolute necessity of lots of different ports and whatnots in doing all things electronic, and the feel of Lenovo/IBM keyboards. But it does feel better to know that unbiased individuals have given up on Vista too.
Note to self: Transferring files to gumstix via serial/rz/kermit
This is really simple, but it took a bit of fiddling to work it out. Obviously the bootloader lets one copy files across (that being one means of copying across filesystems and so forth) but I didn’t know how to do this once linux was booted. It turns out to be this simple:
When connected to the serial console/ffuart via ckermit, go to the directory where you want the file. Type:
rz
You will see some bizarre characters appear. Ignore it. Type ctrl-shift-\, or is it ctrl-shift-|, and then ‘?’. Type U to disconnect. Then type:
set protocol zmodem
Then:
send whatever-the-filename-is.ext
Type ‘c’ to reconnect. Hopefully when you then type ‘ls’ you will see the file you just uploaded sitting in the working directory.
The full session will look something like this:
root@gumstix-custom-connex:~$ pwd
/home/root
root@gumstix-custom-connex:~$ rz
rz waiting to receive.**▒B0100000023be50
----------------------------------------------------
Press:
C to return to localhost
? or H for this message
0 (zero) to send the NUL (0) character
B to send a BREAK signal (0.275sec)
L to send a Long BREAK (1.5sec)
U to hangup and close the connection
Q to hangup and quit Kermit
S for status
! to push to local shell
Z to suspend
\ backslash code:
\nnn decimal character code
\Onnn octal character code
\Xhh hexadecimal character code;
terminate with Carriage Return.
Type the escape character again to send the escape character itself,
or press the space-bar to resume the CONNECT session.
Press a key>U
----------------------------------------------------
Hanging up (Back at localhost)
----------------------------------------------------
(/home/em/ckermit/) C-Kermit>set protocol zmodem
(/home/em/ckermit/) C-Kermit>send filename.ext
Sending: filename.ext
Bytes Sent: 7296 BPS:2554
Sending:
Ymodem sectors/kbytes sent: 0/ 0k
Transfer complete
(/home/em/ckermit/) C-Kermit>c
Connecting to /dev/ttyUSB0, speed 115200
Escape character: Ctrl-\ (ASCII 28, FS): enabled
Type the escape character followed by C to get back,
or followed by ? to see other options.
----------------------------------------------------
root@gumstix-custom-connex:~$ ls
filename.ext
Audiostix2, brec and arecord
Brec seems to have gone out of fashion since the good old days of buildroot, so I’m assuming it’s all about arecord now.
Users of openembedded can get hold of the package containing arecord by looking through the Packages.gz file (http://www.gumstix.net/feeds/current/glibc/ipk/armv5te/Packages.gz) and pulling out the filename link:
ackage: alsa-utils-aplay
Version: 1.0.14-r1
Depends: libasound2 (>= 1.0.14), libc6 (>= 2.5), libgcc1 (>= 4.1.2)
Section: console/utils
Architecture: armv5te
Maintainer: Angstrom Developers
MD5Sum: c99cfb0f230ce0a963740bb099d32e89
Filename: alsa-utils-aplay_1.0.14-r1_armv5te.ipk
Source: ftp://ftp.alsa-project.org/pub/utils/alsa-utils-1.0.14.tar.bz2 file://alsa-utils-automake.p
atch;patch=1
Description: play (and record) sound files via ALSA
Get the alsa-utils-aplay_1.0.14-etc.ipk, or use bitbake to build it, copy it to your Gumstix, and ipkg install it. Those who have actually set up their Gumstix to access the net directly can of course use ipkg as it is designed to be used, instead of cheating
Once installed, type arecord to record. If one also installs lame, it is possible to do something like this:
arecord -d 5 | lame - test.mp3
to record direct to MP3. Not sure how effective any of this is, as I have not yet found a microphone…! Edit: just remembered that earphones make lousy but effective enough microphones. It works, except that the default record mode for arecord causes nasty, choppy sound. This is better:
arecord -d 5 -f cd test.wav
However this produces too much data to sanely encode it realtime into mp3. Something like: arecord -c 1 -d 5 -f S16_LE -r 22050 test.wav produces a slightly more managable filesize, but even so you’re probably better off producing the wav and then mp3ing it at some quiet moment.
I2C on the Gumstix/Robostix
…really is as simple as they say it is. I know, it shouldn’t come as much of a shock but I guess all that buildroot fun in ages past has caused me to expect complexity where there is none.
I started with the Dallas 1307 RTC from Sparkfun — but as an aside, you can get them from Tinker.it in the UK now, which I hilariously noticed almost five minutes after opening a letter from customs reclaiming a load of tax that FedEx kindly paid at the border. As a further aside, UPS ought to take lessons from the way FedEx handle import charges. When I order Gumstix, the UPS guys just turn up at the door demanding cash on delivery, which is just plain uncouth since it means I can’t get them to deliver at the university front desk unless they’ve already failed delivery once, at which point they generally leave something saying what I owe them so that I can phone them up and pay it by credit card, the fiends. And they charge a higher fee. The fiends. Anyway, as Wooster would say, back to the res.
The classic example I2C device given on the wiki is in fact this very same device, so there is no reason to have expected any complications.
And there weren’t any. Connect the robostix to the RTC module as follows:
Robostix UARTS:
pin 16 (I2C SCL) -> SCL
pin 15 (GND) -> GND
pin 14 (+5V) -> 5V
pin 12 (I2C SDA) -> SDA
Let’s try it:
root@gumstix-custom-basix:~$ i2c –count=8 0×68 readbyte 0
0×0955000325030800
What this means:
Receive 8 bytes from the I2C bus at address 0×68
Read in this order: Second, minute, hour, weekday, day, month, year, control byte. Hence, I tested this on the 25-03-08 (a Tuesday) at 00:55:09 in the morning. Now, the problem that one is probably trying to solve by connecting an RTC at all is setting the system date, which you do manually like this:
root@gumstix-custom-basix:~$ date -s 032501092008
Tue Mar 25 01:09:00 UTC 2008
The order: Month, day, hour, minute, century and year.
The following script is a fugly five-minute hack, and if you have any time to spare you will do it properly and get a kernel that is able to read this clock directly. If you are instead in need of a fugly five-minute hack:
#!/bin/sh
#get value from RTC
datetime=`i2c –count=8 0×68 readbyte 0`
second=`echo $datetime| awk ‘{split ($0, a, “”); print a[3] a[4]}’`
minute=`echo $datetime| awk ‘{split ($0, a, “”); print a[5] a[6]}’`
hour=`echo $datetime| awk ‘{split ($0, a, “”); print a[7] a[8]}’`
day=`echo $datetime| awk ‘{split ($0, a, “”); print a[11] a[12] }’`
month=`echo $datetime| awk ‘{split ($0, a, “”); print a[13] a[14] }’`
shortyear=`echo $datetime| awk ‘{split ($0, a, “”); print a[15] a[16] }’`
year=”20$shortyear”
echo “RTC: $hour:$minute:$second $day-$month-$year”
# example of date format: date -s 032501092008
# Set date:
datearg=$month$day$hour$minute$year;
date -s $datearg
Robostix and OpenEmbedded: talking to the Gumstix
If you are using OpenEmbedded instead of buildroot to build your gumstix’s software, then some of the documentation will look a touch outdated. The following is not necessarily guaranteed to be globally true, but works for me. The robostix modules and whatnot are in
Your Home Dir /gumstix/gumstix-oe/tmp/work/gumstix-custom-connex- angstrom-linux-gnueabi/robostix-module-1.0[whatever]/install/robostix- module/
Place them on your Gumstix in the indicated subdirectory. Don’t forget to edit /lib/modules/2.6.21/modules.dep and add the robostix.ko filename and path to it, since otherwise modprobe will not see it.
modprobe robostix to load it.
You will also be wanting the robostix command line program, that appears in your buildroot under
Home Dir/gumstix/gumstix-oe/tmp/work/armv5te-angstrom- linux-gnueabi/robostix-cmdline-1.0-r1/install/robostix- cmdline/usr/bin/robostix
The robostix is initially held in ‘reset’ mode by the gumstix. This is not a problem that needs to be fixed in hardware - it’s one of those things that you can fix by manipulating ‘GPIOs’, which incidentally are general-purpose input-output lines, which is to say, i/o wires. To turn it on, once you have installed these programs onto your gumstix, type:
robostix reset off
and Bob is your metaphorical uncle.
Alternatively take a look at the settings in the robostix /etc/init.d/robostix file:
echo “Starting robostix…”
# Make sure ttyS2 is setup
echo “AF2 in” > /proc/gpio/GPIO46
echo “AF1 out” > /proc/gpio/GPIO47
# Turn on the robostix ‘245
echo “GPIO out clear” > /proc/gpio/GPIO72
# Turn on the robostix Power
echo “GPIO out set” > /proc/gpio/GPIO70
# load driver
/sbin/modprobe robostix
# Take the robostix out of reset
echo “GPIO out set” > /proc/gpio/GPIO73
That is, basically, tell the gumstix to stop resetting the robostix and let it do its own thing.
Whatever program was installed on your robostix (say, LED flashing) should suddenly start functioning at this point. To stop it again, robostix reset on (it’s even intuitive).
To get all this to autostart symlink /etc/init.d/robostix to something like /etc/rcS.d/S97robostix
Or better still, read http://docwiki.gumstix.org/Robostix_gumstix_ISP#Installing_Driver_and_Command_Line_Tool_Permanently on the gumstix wiki
If some or all of these files don’t seem to be present in your OpenEmbedded folder that is probably because your configuration doesn’t include them. Check out .gumstix/gumstix-oe/com.gumstix.collection/conf/machine/gumstix-custom-connex.conf
assuming that is you have a connex.
The operative part is:
# if you enable robostix you will need to disable both “lcd” and “touchscreen” features
MACHINE_FEATURES += “robostix”
#MACHINE_FEATURES += “lcd”
#MACHINE_FEATURES += “touchscreen”
(If you’re using a standard openembedded binary you will have to remove these modules - anything that looks like it’s about touch screen and lcd).
Now assuming that part of the point of all of this was to have the robostix speak to the gumstix, you’ll need a few things. First, you’ll need the right jumpers, as shown here: http://docwiki.gumstix.org/Robostix_gumstix_ISP. That is, Atmel 0 Tx to PXA ST Rx and Atmel 0 Rx to PXA ST Tx. Which is to say, connecting the business ends of the AVR’s UART (ttl-level serial) to the business end of the gumstix’s UART.
Second, you’ll need to install a test such as the flash_led program, flash-led.c that writes to the UART on the robostix. Do this by flashing the AVR via the ten-pin ISP socket. REMEMBER TO REMOVE THE GUMSTIX FIRST. Then, do this:
#!/bin/sh
echo “AF2 in” > /proc/gpio/GPIO46
echo “AF1 out” > /proc/gpio/GPIO47
Set the speed to 38400, because otherwise you get the textual equivalent of technicolour gibberish:
stty 38400 < /dev/ttyS2
and
cat /dev/ttyS2
You should see:
Read: ‘ ‘
*** Press a key to continue
*** Continuing…
etc.
Or try: echo “zzzzzzzzzzzzzz”> /dev/ttyS2; more /dev/ttyS2
…which returns
‘Read: ‘z’
Read: ‘z’
Read: ‘z’
…’
Congratulations. You are now talking to your AVR. The dialogue may not be much, but hey


