Monday, 31 December 2012

New Year's Eve frolics

Up early today - we're going down to London to  see the fireworks from the vantage point of daughter.2's flat.

First, some fun with computers.

I tried to access the URL I always go to, to do some admin. It wouldn't load, and some investigation showed that it thought that the security certificate had expired. A) it hadn't and B) it took me a few minutes to realise that this wouldn't affect customers, as they don't have access to that anyway, so I could stop panicing.

I don't know what the problem really was, or how to fix it, but the problem seems to have disappeared for now. Computers.

Then down to the dentist. A couple of weeks ago a big lump fell out of one of my back teeth; it turned out to be an old filling, from back in the days when they'd drill out most of your tooth before ramming in the Polyfiller. Mr Dentist had a look, and said he could fix it, so I leaned back while he poked around inside. And then I leaped out of the chair when he found something *really* sensitive inside the tooth. After coming down from the ceiling and receiving an apology, I settle back while he used half a bucket of filling to fill the hole, and it feels great now.

Next, I found a program (fim) that lets me, from a remote login, throw up a graphic to the display. I'm planning to use that in the forthcoming "Son of geocaching robotic arm". The idea is that, when you do the necessary thing, the Pi displays on a little 3-inch screen and gives you some information that lets you proceed. But you can't see the screen until you use the interface to pan (and/or tilt) the webcam. I need it to be a graphic, because the webcam isn't high resolution, and a 3 inch PAL-based screen is very low resolution. But if I put a large letter up on that screen, it should be readable.

The other thing I wanted to do, is detect when a button has been pressed. I can do that using the GPIO ports on the Pi, so I've ordered SP Yang's kit for making the Pi do neat things in hardware. I'm primarily a software hacker; messing around with hardware is a bit adventurous for me. But if I can get that working, and using fim, I think I can make a pretty nifty "Son of geocaching robotic arm".

So then down to London on the Railway; cars will be impossible today. First stop (not counting Marylebone) was Selfridges, and specifically the Brass Rail, which does excellent salt beef sandwiches. Then on to daughter.1 so ladysolly can do cookery-stuff before we go on to daughter.2.

Using daughter.1's broadband, courtesy of BT. I find they have a really unpleasant feature - occasionally, when I try to go to, for example, Google, I get diverted to BT Yahoo. Yes, I know that's a rebranded google, but I strongly resent my accesses being redirected. It even decided, for a while, that this blog didn't exist and that what I really wanted to go to was ... BT Yahoo.

Saturday, 29 December 2012

To Imber

Up early today, round to SimplyPaul for a trip to Imber. That's a village that was requisitioned in 1943 for the Army to use in training, and never handed back. But a couple of times per year, there's an open day.

So we collected Paul's brother, and drove through the rain for a couple of hours. We found the venue easily, and were able to drive right up to the village. And in the church, there were over 100 geocachers! I had a mince pie and coffee, and talked with loads of people I knew, and some I didn't. Even the dogs were friendly, although one of them made an appalling smell and had to be taken out of the church.

We then went on to do a dozen or so caches; it was still raining at first, but then it cleared up. But I was still wet by the time I got home.

Daughter.2 is back from Australia, and we'll all be getting together for the New Year's fireworks in London.

Friday, 28 December 2012

Down to London ... or rather, not.

Ladysolly and I set off yesterday to visit daughter.1 in London. We came the usual way; along the M40, along the A40 ... and then into a horrendous traffic jam.

So we were inching forward with the rest of the traffic, and phoning ahead to say we'd be late, and then I noticed that the engine temperature was climbing. My Freelander 2 (and maybe others like it?) does that; in hot weather I get very nervous in traffic jams, but I thought it would be OK in winter. It wasn't. So the temperature was climbing, and I decided to stop the engine while the traffic jam was stopped, and start it again each time we needed to move a few feet.

You can probably guess what happened next.

Flat battery.

I've been hearing symptoms of weak battery for a while now - in the morning, it seems to have difficulty turnng the engine enough to start it - but I thought it would be OK for a bit.

So there I was, in a traffic jam on the A40, in the middle lane, unable to start the car. It is of such stuff as nightmares are made.

Ladysolly got out and held up the traffic in the inside lane, so I could pull over - except that a Freelander is too heavy to push. So a guy got out of his car and helped me; that got it over to the side of the road, but we were still blocking one of the three lanes. Not that it mattered; there was a much worse blockage up ahead ... somewhere.

And then I had an idea. I have a Halfords battery with jump leads; I got it after I got stuck in the Volvo in the middle of absolutely nowhere, and I've been carrying it in the Freelander ever since, because what's the point of having one of these if you don't carry it? I opened the bonnet, connected it to the Freelander battery, waited a minute, then got in ... and the Freelander started! So I was able to get it off the A40 onto a side road.

Then we drove around for a while, looking to see if there was any other way into London that wasn't totally clogged up, and of course there wasn't. So eventually, we found Harrow-on-the-Hill tube station, I dropped ladysolly off there so she could continue on to London by rail.

And I drove home.

Also, I couldn't open the rear tailgate.

So, today, looking at the car, I found that I could open the tailgate with the fob, just not with the manual method on the back. It looks like the little switch in the back isn't working. So I ordered on on Ebay, £27.
And I now have a new Varta battery, £90.

And the car is telling me that the terrain features aren't working, but I'm going to hope that that just goes away before I start messing with it; that's got to be connected with the battery replacement, it would be too much of a coincidence for it to be a real problem.

An engagement

I've known for a few days, but I my lips were sealed. However, since she's put it on her Facebook page, I can reveal that daughter.2 is now engaged. She'll be back from Australia soon, and we'll have a big celebration.

Wednesday, 26 December 2012

Christmas presents ...

An iPad 1 (hand-me-down from ladysolly). I've already installed an ssh program on it.
Four pair of XL trousers (my previous size was XXL) for caching in.
A bathroom scale; I won't have to keep using ladysolly's.
Three rather interesting-looking books.


A USB robotic arm, this is the Maplin's version. I'm not sure yet what I'll do with it, but I'm sure I'll think of something.

Tuesday, 25 December 2012

Christmas at the Grove

Chistmas dinner with ladysolly and daughter.1 at The Grove, where they had a full-size gingerbread house, two Christmas Elves, and Santa with his four lady assistants.

And a huge, non-dietary dinner it was too.

Monday, 24 December 2012

A tiny monitor for a tiny computer

I have a three inch PAL monitor, left over from another project. So I just connected it to the Pi, made a little change in /boot/config.txt and started it up. When the Pi booting, I could see the boot messages, and when it had finished booting, I ran startx to start up xwindows. And I got the xwindows gui on the three inch monitor. I can even navigate it using the mouse. But I have to admit, it's not easy to read what's there!

Running a Pi on VGA

I tried this before, and the HDMI-VGA cable, being unpowered, was taking too much from the Pi, so it didn't work, it kept crashing.

I woke up this morning with an idea. Suppose I gave the Pi six volts instead of the nominal five? Maybe it would have enough to power the converter cable.

And it did. I'm writing this blog entry on a Raspberry Pi, with an awful keyboard, but running xWindows, using the HDMI-VGA converter, which now seems to be totally stable. My multimeter reports that the Pi is getting 5.7 volts. This means that with a £10 cable, you can run a Pi on a VGA monitor.

I called RS today to find out what's happening to the two Pies they owe me as replacements for faulty Pies. The lady there reminded me that this is a short-staffed day, but went on to tell me that it's been dispatched. Delighted, I asked when was it sent? "January 12", she said; this is obviously the RS-imperfect tense where "has been dispatched" translates to "will be dispatched if we get some on the date suggested".  I didn't even ask about the additional six I ordered. One of them will be going to Ann, who is proudly clueless about computers, isn't really aware that I changed her from Windows 98 to Linux, and won't know, unless I tell her, that she'll be swapping to a Pi.

The good news from RS, though, is that the lady told me that they wouldn't be wanting the faulty Pi back; I guess it would cost them more to process the return than the £20 value of it. So if they stick to that, I'll have a go at repairing it myself; I'm not a perfect solderer, but I can bodge things together sometimes.

Sunday, 23 December 2012

A year of blogging

I started this blog exactly a year ago. Much has happened since then.

The big news is that I've gone from 18 stone 5 (257 pounds) on May 2nd to 15 stone 6 (216 pounds). I've lost 41 pounds. 41 pounds is about the weight of an electric bike plus a couple of batteries, and I wouldn't like to lug one of those around with me everywhere. The weight loss will also be good for the hip tendonitis problem I had this time last year, and the foot problem, plantar fascitis, which I've had now and then. I can go upstairs two at a time, and not feel that it's difficult.

Some people have asked me how I did the weight loss. It's simple. I eat less, but still go geocaching, which is lots of exercise. And posting my weight on this blog each week helps me, because it's a public committment.

On the tooth issue; the pin-attached fake front tooth that the dentist made for me after one of my beloved front teeth broke off, came loose three times. After the third time, he said "It's time for plan B". Plan B was, extract the stump of the old tooth (which I was dreading, but turned out to be not too bad) and make a bridge. That has worked very well, and I now have a complete-looking set of front teeth again.  Not such good news on the back teeth, though; small bits break off every now and then. My dentist blames the dentists of my early youth whose answer to any dental problem was drill deep, which badly weakened the teeth..

Overall, healthwise, I'm good. Probably the weight loss helped there.

I've done a lot of geocaching, although I've lost the commanding lead I had at the start of the year over other cachers in the UK, because there was a period of a few months when I did almost nothing, because of the hip problem.

I've discovered the Raspberry Pi, and I've been doing a lot of stuff with that, including getting the Geocaching Robotic Arm working again.

Grandson.1, now aged 1 1/2, is now calling me "Grandpa", or at least that's what daughter.1 and ladysolly tell me. To me, it sounds a bit garbled, but my hearing isn't as good as theirs.

I acquired ladysolly's old iPhone, and I have to agree with everyone who says how great it is, although this particular model (I think it's a 3) is not much use for geocaching. And I've been promised her old iPad; I suspect that's my Christmas present.

I've been doing a lot of biking on the electric bike I acquired last year from Ebay; so much so that I've bought three new batteries, new brake cables, new gear shifters, new brake pads and a new helmet.

So, it's been another good year.

Merry Christmas to both of my readers!

Power for the Pies

My Raspberry Pi power plans have proceeded plumptiously.

Here's what I made. I started off with a standard PC power supply. I have a few of these in my junk pile; some are stone dead, but some are marked as "weak", meaning that they do seem to work but they don't have enough oomph to power a full-sized PC and a handful of hard drives. Sometimes that's because the 12 volt voltage comes out well under 12, sometimes I just don't know why. So I'm using a "weak" power supply - you'll see why that won't matter in a minute. Here's what I started off with.

The first thing to do is to persuade it to run even though there isn't a PC motherboard attached. To do this, I short circuited two of the pins, green and black. There's several how-tos on the internet that explain it in detail, but it's very easy, takes about ten seconds.

Next, I took the UBEC, Universal Battery Eliminator Circuit. My favourite of the two I tried is the Hobbywing, because you can jumper it to 5 or 6 volts (Pies seem to prefer 6) plus it has a LED to tell you it's awake. They come with a pair of wires at each end. I attached the input wires to a Molex connector, the sort of connector that PCs use. That means I can just plug it in to a PC power supply.

If you're familiar with PC power supplies, you'll have noticed that the UBEC is connected to the 12 volt (yellow) line, not the 5 volt (red). That's because the whole point of a UBEC is to take a voltage that's greater than I want, and convert it to the 5 volts (or 6, in my case) that I do want. And that's why it won't matter if the PC power supply that's supposed to put out 12 volts actually puts out 11, or 10, or even less.

This is a close-up of a UBEC. This isn't the one I prefer; the Hobbywing is better for Raspberry Pies.

The output end of the UBEC terminates in the sort of connector that's used in model aircraft. I took that off, and connected a wire that led to the sort of round connector with a tip, that almost everything else uses. I connected two wires, with two different sizes of connector, that's so I can plug it in to either of the powered hubs that I use.

After I soldered the connections, I checked with a multimeter, to make sure that A) the connections worked, and B) I haven't accidentally short-circuited the UBEC output. I think the UBEC will shut down gracefully if that happens, but I'd rather not put it to the test.

So now I can plug the output of the UBEC (6 volts) into a powered USB hub.

And now we're ready to power up the Pies.

I could connect five Pies to this arrangement. The PC power supply gives as much power as the UBEC can take, the UBEC can handle a maximum of 3 amps, that's 3000 milliamps, and a Raspberry Pi wants 500 milliamps. So, powering five Pies works. I'm actually powering four pies from this, and I have the USB-driven hard drive plugged in also. One of the Pies is powered from the connector that the USB hub thinks is its input.

Previously, to power the four Pies and the hard drive, I was using two power bricks and a PC power supply (for the hard drive power). The power bricks felt quite hot when running, which means that they're wasting quite a lot of power in doing the conversion (the wasted power is what makes the heat).

Now, I'm using on PC power supply to power the lot, and it feels cool to the touch. The UBEC feel very warm, but not worryingly hot.

I managed to give myself a 240 volt shock at one point while I was messing around with this; I thnk the power supply I was using at that moment was faulty.

I've ordered three more Hobbywing UBECs, they cost about $7 each.

Here's what it all looks like.

The PC power supply is the big grey box on the left; I can't remember what sort of computer it came out of, but it's a totally non-standard size, and so pretty useless. Except here.

The hard drive is a 400 gb Sata; 400 gb drives are too small in capacity to be usable these days; I'm buying 3000 gb drives as standard. But I have a whole bunch of 400s in a box, and as storage for the Pies, they're fine.

The thing in the front glowing redly is the Hobbywing UBEC. That's the LED glowing, it isn't red-hot!

The blue glow near the middle, is the powered USB hub, getting power from the UBEC. The four Pies can be seen in the boxes that RS ship them in - they make good Pi boxes, after I used a hacksaw to cut holes for the ethernet and power cables.

The black blob between the hard drive and the power supply is the USB-Sata interface thingy.

This little arrangement is replacing four full-sized computers which would have been drawing about a kilowatt between them. I haven't measured, but from previous experiments, I'd say that this is using about a tenth of that power. But I'm not only saving that electricity; it also means that, come summer, I'll have that much less cooling by the aircon, so the saving is probably twice as much.

Saturday, 22 December 2012

Pies and hard drives

I did some messing about with a Pi and some hard drives, and it was all good.

First, I attached a dual-Sata HDD docking station to the Pi (via a powered hub). Immediately, I was able to see the two drives on the Pi as sda and sdb.

So then I tried adding a second docking station - this one allows one Pata IDE drive and two Sata drives. That showed up as sdc (for the device itself, which also lets you read all sorts of memory cards, so I'm guessing that sdc was the card. Also, the Pata IDE showed up as sdd, and the two Sata drives were sde and sdf. Notice, I didn't install any software, I just plugged them in and it "just worked". The two-drive device used 17 watts, the three-drive used 28 watts.

A couple of deliveries today - I'd ordered a bunch of USB-hard drive interface cables, which come in at just under £3. There's no power supply, no Sata cable and no Sata power cable, but I knew that. So I fired up an old PC power supply, to give me the power for the hard drives. I wanted to see if I could use both the Pata and the Sata port at once, giving me two drives. Yes - it worked. And the two drives (plus the overhead for the power supply) was 29 watts.

So then I wanted to see if I could add another drive using another interface cable. You guessed it - it "just worked", three drives on the two cables, pulling 36 watts.

Huh. So I added two more interface cables, each with a Sata drive. And they just worked. Five drives pulls 50 watts. It's 7 watts per drive, plus 15 watts overhead for the power supply. That particular power supply is a measly 200 watts, so I could put a couple of dozen drives on it, and I rather think that the Pi will happily handle that.

I also had a look at one of the seven-port USB hubs I got for the Pi Project; I'd plugged it in and it didn't work, so I put it aside for now. On closer inspection, I noticed that the soldered joint to the power wasn't working, so I soldered that, and now the hub works fine. And another of the seven-port hubs had exactly the same problem. I thnik the problem is, that part of it is hald-soldered, and anything done by hand has a higher failure rate than anything machine-made. It's the same problem, I think, as the large smoothing capacitor on the pi.

I've ordered a couple of 10-port powered USB hubs, about £4 each; if I'm going to add a lot of hard drives to a Pi, I'll need those.

Friday, 21 December 2012

Leighton Buzzard

Caching today. It's been a bit rainy in the last couple of days, but today was fine, although somewhat soggy underfoot. So I left the bike in the car.

I did two rings, and when I got back to the car after the second one, I decided it was time for home. I was very glad I'd left the bike - I went over some very cloggy ground, which is hell on bikes because the mud jams the wheels.

I crossed one field that had an over-friendly horse; he kept coming up behind me and nudging me with his nose. I had to speak quite sharply to him.

The day out gave me a chance to contemplate a problem I had on a server, and I noted down a few things to try when I got back. I find that a while spent thinking about a problem is usually much better than jumping straight in with the sledgehammer.

I left a 120 ml container totally submerged in water for 24 hours, and it's still completely dry inside, so that went well. I've also just taken delivery of 100 25 ml containers. They're slightly larger than a 35 mm film can, and look nicely watertight. They'd have to be - they're designed for medical use, for specimens. These are unused, though, so no lingering odour!

And the Geocaching Robot Arm is now live.

A new category of spam

I sort my spam carefully into various categories. For example, email that wasn't sent to my email address, gets short shrift.

I've just added a new category - nonroman. This is to collect all the spam that's in Japanese, Chinese or any other character-set that I don't have a hope in hell of reading, so I can just delete it all at once.

I've added this category because of the increasing about of spam I'm getting in Japanese and Chinese.

Much spam

I was doing something fairly routine with one of my servers, and I found that I couldn't do it. A short investigation revealed why - the root volume was full. How come? I looked around, and I soon found a HUGE amount of email in one of my users accounts. But that was a user who lapsed long ago; what's all this email? So I had a look - it was all bounces from Google, Hotmail and so on. So I looked into what was going on.

I'll spare you the detective work, but the sequence of events I've found was this.

Someone got that user's password. Probably, they just gave it away; people are pretty casual about passwords. And about a dozen people (or at least, the logins were coming from a doxen different servers) were logging in to that account using ssh, and running a program that was sending out huge amounts of spam, and it was the sort of spam that sends out a jpg, so it was a couple of hundred kb each time. The receiving servers had noticed that this user was spamming, and was bouncing the messages back.

So, here's what I did about it.

1. Cancelled the password of that user. I don't think it's been used legitimately for many moons.

2. Change my firewall so that the only IP addresses that can log into my colocated servers, are mine. That means I won't be able to log in to them while I'm visiting my daughter (for example), or while on holiday, but I can work out a workaround for that.

3. Delete the retry queue, so that stuff that hasn't been delivered, won't be retried.

And I'll keep a particular eye on this server for a while, to check that this has had the desired effect.

Thursday, 20 December 2012

More Piery

More fun with Pies today. I've got 8 doing real work, two that I'm waiting for RS to replace, and six more on order. I've held one back to play with. By "play", I mean, experiment to see what else I can make it do.

Last night, I had a bit of an inspiration, and I've ordered something that I think will let me use three of the GPIO pins on the Pi, as a serial (RS232) port. I'm hoping that this will allow the Robotic Arm Pi to control the power to both the lights and the arm. I tried to use the Pi to do that (a USB port connects to a USB-RS232 converter, which talks to the relay box that switches things on and off). But when it does that, the Pi crashes. I tried with several configurations, no luck. So right now I'm using a different computer to do the switching, which works, but isn't elegant. Here's how I plan to do it.

Another thing arrived today - a UBEC, Universal Battery Elimination Circuit. It is a tiny thing, about one inch by half an inch. You give it any old DC voltage, maybe 5 to 30 volts, and it converts it to a steady, smooth five volts. Five volts is, of course, exactly what the Pi wants. From what I can see, UBECs are mostly used by model airplane fliers.

The UBEC is very efficient, you only lose maybe 10% of power in the conversion. And I'm thinking that I can use it to step down the 9 volts from a cheap-and-cheerful power supply (or 12 volts, or whatever they put out) down to the five volts that we want. They cost about £3 each, and will give you 5 amps at 5 volts, which means that one of them could power several Pies, if it is fed by a sufficiently beefy power supply. I have a *lot* of unused power supplies.

Yesterday, I got a 400 gb SATA hard drive connected to that Pi. And it was jolly easy to do. I just connected the data cable via the gizmo to a USB port, connected the power, and the drive was ready for use. Today, I loaded it with data, and put it in a working environment. I'm using an old PC power supply to power the drive, and there's plenty of oomph left in that to power several more drives.

Next, I tried out a couple of wifi USB dongles. They were really cheap, about £4. Both of the ones I just bought showed up as Ralink, the necessary driver was already on the Pi, and getting it working took just a few minutes. So it had two ethernet connections, one to my main network, and another to my Wifi hotspot, and I was able to log into it via Wifi, so I was happy that was working.

But then, I wanted to make the Pi into a Wifi hotspot. And that turned out to be a bit complex, but very easy. I just followed the recipe here and it worked forst time. I have a little Zyxel hotspot finder, and it found my usual hotspot, then it found the Pi. So that's working.

And then I wondered if that Zyxel (which is also a USB wifi dongle) could also work as a wifi dongle to the pi. And it does, using "apt-get install zd1211-firmware" to get the driver. Although I'm not going to use it for that purpose, it's just too useful as a hotspot finder.

The next thing I want to do with this Pi/dongle combination, is to work out how to use it to give static IP addresses instead of the dynamic (meaning, you never know what device is going to have what address). 

While I was doing all this with the Wifi, I found that I don't actually have to give the Pi any power! I have the Wifi dongle plugged into a powered USB hub, and the Pi also, because if I plug the dongle straight into the Pi, it takes so much power that the Pi crashes. And I discovered that if I unplug the power lead to the Pi, it doesn't seem to care. It's taking power from the powered hub, via the USB port that it's plugged in to. And that's very nice, because it means that whenever I use a Pi with a powered USB hub, I dno't also need to have a power supply and cable for the Pi.

Another thing that arrived today, was a box full of 120 ml plastic screw-top containers. That cost me £28 for 100 on Ebay (search for plastic specimen sample jar). That works out at 28p each, which is a very good price for a small waterproof cache container, several times bigger than a 35mm. I've got one totally submerged in water right now; I'll leave it for a while and see if any water gets in. The people I got them from sell smaller sizes also.

And then I decided that the Geocaching Robot Arm is ready to go public, so I'm in the process of getting that approved. When it's approved, it will be GC41V9Q.

Another way to log caches

Last time I went out, I found a voice recorder, lying on the ground. It had been out in the cold and wet for about a month. I emailed the people who had lost it to ask how to send it to them, but they'd bought a new one, and said I could keep the old one.

So I left it a couple of days to dry out, and when it looked OK, I switched it on, and I was suprised to see that it worked! I can't see how to insert a sound file into this blog. It lets me upload pictures and video, and an MP3 is neither of those.

But there's more than one way to skin a cat, and here's a way that might leave me with usable fur.

  A test file

Let me know if you can play that.

Wednesday, 19 December 2012

Yet more fun with software

I have a couple of cameras that sit in the top of the house and watch the road and field opposite. I replaced the server that runs them, with a Raspberry Pi, and that was all working OK. But in the course of replacing the Sonicwall with the Pix, I must have done something silly, and the cam system wasn't working any more. I could use it from inside the house, but not log into it from outside. And the reason it failed, was that I'd done something excessively complicated to reduce the need for external IP addresses; I'd made it so that you accessed it via port 81 on another IP address, then the Pix was supposed to redirect from there, to port 80 (the port used for web service) on the cam.

I struggled mightily to get it working again, to no avail. And then I stopped digging the hole deeper, stepped back and thought about it. I can get the same effect, by keeping the Pi upstairs for controlling the cams, using Samba to allow other computers to share the pictures they take, and having the web server on the other address I'd been using. So I did that.

But that meant sharing across the new firewall. And the Pix has a big flaw. If it blocks an access, it tells you which rule was broken, which computer was the source of the request, and the destination. But it doesn't tell you which port, and I don't see how to make it tell. So I installed tcpdump, which shows you every packet coming into or out of the computer you run it on. To get sense out of it, you have to tell tcpdump not to display all the stuff you already know about, so it's a command like this ...

tcpdump not src computer1 and not dst computer1 and not src computer2 and not dst computer2

... where computer1 and computer2 are computers that are having so much traffic with the computer you're trying to watch that you can't see the info you need.

That told me which port Samba was using, it's port 445. So I told the firewall to allow that. But it still didn't work. I changed the Samba configuration so that it spewed out lots of information into a log file, and looked at that - it said that there was no such user. So I changed the way it recognises users, and then it said there was no such password. So I tried to run smbpasswd, which is how you tell Samba what password to accept, but smbpasswd wasn't on the computer, so I had to get it.

apt-get install samba-common-bin

And after I'd got that, and made a password, I was able to share the files on the Pi that takes the pictures, with the computer that was going to be the web server.

But then Apache wouldn't let anyone see the pictures, and after a bit more research, I discovered that to get Apache to serve up files that are being shared by another computer, you need this:

<Directory "/path-to-nfs-files">
EnableMMAP Off
EnableSendfile Off

So I did that, and it all worked!

And you know what?

They actually pay people to do this sort of thing. Please don't tell them that we'd do it just for fun.

More fun with pies, and other hardware

Mr Postman brought a load of goodies for me today.

The first thing was a replacement ROM for the Hagstrom board. This is a board that is supposed to let you use a vintage IBM PC keyboard  (mine was made on September 30, 1983, so its 29 years old) to a modern computer. I won't go into why you can't just plug it in - it's got a completely different protocol. But when I saw the Hagstrom unit, I was keen to get it.


Because IBM made the best keyboards ever for their PC. I have a few of their IBM AT-style keyboards, and those are nice, but nothing is as perfect as the IBM PC keyboard. It's the feel of it, the solidity of it, and the clickyness of the keys. I just love it.

So when the Hagstrom arrived, and didn't do what it was supposed to, I was very disappointed, especially as it cost me for the unit, then more to get it out of UK Customs, and an extra cost for the delivery. And I contacted Hagstrom, who had actually said that it would work with an IBM PC, and told them. They asked me to test the keyboard, to make sure that worked, which is a reasonable request, so I dug out Dobbin, an ancient 8088 computer that I still have, and which still works, and was able to see that the IBM PC keyboard worked perfectly on that. And so, by the way, did a Hardcard, which is a 10 mb (yes, ten megabytes) hard drive on a card. So I told Hagstrom, and told them the exact details of the IBM PC keyboard (model number etc), and they said they'd look into it. I was sceptical, and I had already written the cost off as a loss.

Today, a replacement ROM arrived from Hagstrom, with a chip puller. I pulled the old chip out (it's a very long time since I've done that sort of thing), put the new one in, and ... it worked! Perfectly. I'm typing this very blog on a 29 year old IBM PC keyboard that is a dream to type on.

The next thing that arrived, was a USB-ethernet adaptor. I haven't tried that yet - now that I've got the Pix 515 operational, the need for a firewall has diminished. I've also bid on Ebay for a pair of Pix 515s, which must have cost a couple of thousand when new, but I've bid a maximum of £5 and have every hope of getting them, because no corporate would buy a second hand Pix (with the password missing, but I know how to deal with that) and home users don't use Pixes. I've also bid for a Pix 501, the bottom end Pix, and also ridiculously cheap now. Cisco don't sell the Pix any more, so it's an obsolete box, another reason why no corporate would want one. But I've loved using them, and they work, they just work.

Another arrival was a HDMI-VGA converter. Only one of my monitors had HDMI (DVI actually, but that's almost the same thing) and I want to be able to plug the Pies into a monitor without having to take it upstairs to where that monitor is. But, it didn't work. Well, it did work, sort of, but I think the problem is, the converter takes too much power from the Pi, which has hardly any to spare. I should have thought of that. So I've ordered a powered converter instead.

And the fourth arrival, was a cable that interfaces SATA or PATA IDE to USB. Modern hard drives are pretty much all SATA, although I (of course) have a pile of PATA hard drives that were retired while still working because they're so small in capacity compared to modern SATA drives; 300 gb compared to 3000 gb. I thought that making that work would be a big job, but no. I connect the hard drive to power, a Sata cable from the hard drive to the gizmo, and the USB cable from the gizmo to the Pi. That was easy. But what about installing software, and drivers, and configuring, and things like that?

No need. As soon as it was plugged in, it was drive sda, and I just formatted it with the usual commands, and it's now sitting connected to the Pi with 400 gb of empty space waiting to be filled. So I've ordered a dozen more of them. At £3 each.

Update ... I'm getting 4mb/second copying files off one hard drive, across the network, and onto this USB drive. I'm very happy with that speed.

Weight report 31

15 stone 7 pounds

Monday, 17 December 2012

Configuring the Pix, part 2

My theory was right, and I've got the Pix operational now. I'll try to explain the issue. Hold tight.

A network is a bunch of computers, all sharing a cable. And they need to talk to each other. To do that, each one needs to know where the others are. This is done using ARP, Address Resolution Protocol.

They need to work out which IP address (like corresponds to which hardware address (like B8:27:EB:C3:2A:13). So they're forever exchanging this information, so that everyone knows where everyone else is.

Then I put a bunch of computers behind a firewall. The computers not behind the firewall, are still sending out ARP packets, but what they get back from the computers behind the firewall, is the ip address that the firewall presents to the outside world, and the hardware address of the firewall.

So, what I did, was I took out the Sonicwall, and inserted the Pix. That worked fine for the computers in my network, but ...

I have a second firewall, it stands right in front of my internet connection, filtering everything. And it had the hardware address of the Sonicwall in its ARP memory. When I switched to the Pix, it was still sending packets to the Sonicwall, which was no longer there. So that meant that everyone outside my network wasn't able to contact the computers behind the Pix that replaced the Sonicwall.

You'd think that the second firewall would have asked for new ARP information. But it doesn't, not immediately. Not for four hours, actually - the ARP cache is 14400 seconds on the Pix.

So, how to deal with this? It's very easy. I could have switched the second Pix off and on again, but I don't have to be so drastic. CLEAR ARP does the trick.

Macmillan and Midshires

Out caching today, up North again, to the Macmillan and Midshires way.

40-odd caches done today, all on foot. I left the bike in the car because the ground was so squishy; by the time I got back to the car I was glad I had, the terrain ranged from poor to awful, plus there would have been some terrible stiles to lift over.

Just before I got back to the car, I saw this:

It's a church tower without the church.

I had a *lot* of DNFs today, but in a few of them, the cache had clearly gone, by the number of previous DNFs and the specificity of the hint. So I replaced them. I'm running out of 35mm canisters, so I ordered 100 urine specimen containers from ebay (unused), and 100 120ml containers. They were all very cheap.

It was only seven miles, but it took me 5 hours, and my back hurts from all the walking.

Saturday, 15 December 2012

Configuring the pix

I wanted to replace the Sonicwall firewall with a pix.

I actually use three firewalls here; the main one, and two Sonicwalls to give extra walling to particular segments. One problem with the Sonicwalls I use, is that they only allow 20-odd rules, which really isn't much, unless you're a home user. And I have a couple of Pixes that haven't been used for a couple of years, so I thought I'd get those into action.

The Cisco Pix is a Real Firewall, not a puny one like the Sonicwalls I've been using. They're amazingly cheap if you buy them second hand on Ebay, because home users wouldn't want one, and corporates wouldn't buy second hand.

So I started to configure it to do the job I want. it turned out to be far more difficult than I'd thought, involving the use of access-lists. And I didn't press the button on the ethernet switch that crossed the cable, because it's an old switch, modern ones auto-detect, and I'd forgotten about needing to do it.

And after about two solid days of struggle, I've still only got it partially working, but I'm so close now, so close ... just a couple more issues to deal with ...

I've fallen back on the old Sonicwall for now, but I think its days are numbered.

I've also bought a USB ethernet device, so I can have two ethernet ports on a Raspberry Pi. If I have two ethernet ports, then I'm pretty sure I can turn it into a firewall, which (I think) will be a lot easier to configure than a Pix. I've done this before, using three ethernet cards in one computer to make a three-segment firewall (Lan, Wan and DMZ). 

So now it's a race. Will I get the Pix configutred before I make a homebrew firewall?

Thursday, 13 December 2012

More on the Robot Arm

After a chat at the recent 12/12/12 event, I became aware that the robot arm wasn't working with iPads. Why? Because iPads don't do java. Who'd have thought it. I wouldn't have. You can, if you're willing to go to some trouble, get java for your iPad, but I'm thinking that most people won't.

So I've had to do two versions of the robot arm.

The page you go to, looks at your computer and decides what it is; iPad (or Mac), or proper computer. If it's a proper computer, then you get automatically sent to the java version, with the smooth camera refresh. But if you've only got an iPad or Mac, then you get sent to the version that refreshes the picture every two seconds by relaoding the jpgs. It's not so nice, but at least the poor iPad users get to play with the robot arm. And if the automatic thing makes the wrong decision, there's a link you can click on to try it the other way.

I tried it out with ladysolly's iPad, and it seems to work.

Email me if you have any problems with it - I want to get the tested before I publish the cache. I know it's not fashionable to actually test software before you send it out, but I'm old-fashioned.

Two more Pies, and six more

Two more Pies have been installed as combination mail/web/name servers, plus they'll proably be doing other stuff; these are for my domain. And that means that I have eight Pies operational, one about to be sent back to RS (faulty), one waiting for an RMA from RS (even more faulty) and one more that I've been holding back to use for experimentation. For example, can I put a wifi USB on it? If so, can I make that into a hotspot? Can I put a wired USB-ethernet on it, and if so, can I make that into a firewall? Can I interface a SATA drive to it via a USB? And other interesting stuff.

So I went onto RS's web site, and ordered six more. It says that they have them in stock, so they should arrive in a couple of days.

Monday, 10 December 2012

To Deenethorpe

I went to Deenethorpe today. I parked, got out of the car, and saw that the first cache would be across the sort of clingy mud that makes even pushing a bike almost impossible. So I decided to go on foot today.

I think that actually, I could have gone around the mud, but the whole area was so soggy that I didn't much regret going on foot. Plus I would have had to lift over a number of quite difficult stiles.

After completing the round, when I got back to the road, I looked back and saw this.

Given the history I have with dogs, it would have been nice to have been told this before I entered their area, not just as I was leaving.

I got back to the car just as the sun was setting, ate lunch, then did a few more by night. A good day out, forty+ caches.

RS Components failure

Oh joy, the missing Pi has arrived - RS had delivered 9 instead of the 10 that they should have, and today the additional one arrived.


I opened the box, and without opening the sealed transparent envelope containing the Pi, I could see there was a problem. The large capacitor (the same one that is loose on the faulty Pi that they said they'll replace) was rolling around inside, completely unattached. So I'll have to send this one back also.

Meanwhile, I've got the two Pies that will be acting as twin mailservers ready. You ought to have two mailservers, so that if one of them fails, the other one is still accepting email. I'll be putting them in place tomorrow, replacing the two full-sized computers (one of which had a flaky hard drive).

And next, I'll bring up two more mail servers, plus I'm going to see if I can use a Cisco Pix for the DMZ firewall (I'm currently using a Sonicwall, and the dratted thing only allows 20 firewall rules, which is rather a limitation). I have two Pixes which are currently doing nothing, and anyway I can get a Pix on Ebay for a mere £50 (they're worth £500). The reason they're so cheap on Ebay, is that corporates won't buy second-hand kit, and home users don't use Pixes.

It occurs to me that I could use a Pi as a firewall; all it would need is a second ethernet port (running off a USB port) and some software that I've already written (I was running a homebrew firewall for quite a while).

I've found that an unregulated power supply that will output 1500 ma at 6v, is fine for powering three Pies. I'll try it with four, but I'm planning to use each one to power only two. I found that, with no load,the power supply consumes 5 watts, and each Pi adds another 5 watts to the load. That means, 2.5 watts for the Pi, and 2.5 watts in efficiency losses. but that such a low level of current draw, efficiency losses aren't a big deal.

Saturday, 8 December 2012

Compressing raspberries

If you use make an image backup of an 8gb SD card, you get an 8gb file. Which is biggish, especially if you have several of them, on for each Pi.

So I used zip. I don't think the version of zip that I have, likes files over 2gb. Ditto rar. Gunzip worked, but it only reduced the size from 8gb to 5gb. So I tried bzip2, and that worked great - the 8gb files became 0.5 gb, which is more what I'd expect, since most of the SD card is empty, so should compress down a *lot*.

Powering the Pies

I was starting to think that powering the Pies was a very trial-and-error affair, but I just realised something important. They want regulated power supplies, because they like their voltage within narrow limits.

Unregulated power suppies tend to be cheaper, and what they do is chuck out what they hope is five volts (or whatever) and hope for the best. A regulated power supply is constantly measuring its output to ensure that its output is steady.

You can usually see whether a power supply is regulated or not, by reading what's on it carefully. If it doesn't say, then it may well be unregulated.

Friday, 7 December 2012

Backing up the Pies

 One of the Pies has failed. It failed when I was trying to load it up, and when I looked at it, I noticed that a capacitor, which I think is C3, it's the big one next to the power socket, is loose. It isn't soldered in. I could probably fix that myself, but I think I'll send it back to RS for a replacement. The Pi foundation will probably want to know about such problems; they seem to be very keen on quality.

If something goes wrong with a Pi, all I have to do is take the SD card out of the Pi, and put it in another Pi. But what if the SD card goes bad? I've had that happen with a couple of SD cards. I'll be backing up the data, of course, but I'd still have to reload and reconfigure the replacement card, which can take hours, and involves remembering what I have to do.

So I'm doing a backup of each pi. I'm doing an image backup of the 8gb card, referred to as /dev/mmcblk0, to a file on another server. So first, I share a directory on that server which I'm calling "pibackups", then I mount it on the Pi at /root/backup. Then I do

dd if=/dev/mmcblk0 of=/root/backup/robotarm.img

That should make me an 8gb image of the SD card, onto the other server, ready for imaging back if necessary.

To Brigstock

Up north again. I like this area, there's very few stiles.

When I set off, there was a snowstorm going on, but I had faith, and by the time I got on target, the weather had cleared up, so no rain or snow. But it was very cold, so cold that for part of the route, I was worried about skidding on the icy track.

I warmed up after an hour or so, and was fairly warm as I rode along, but round about 4pm, the sun had gone down and it turned really cold.

I started this series in the middle, because that was in the town, which gave me a good place to park and a good base for after the series. The series went well; at one site I found two caches, and at the next I found none. I thought at first that maybe someone had carried the cache to the one with two, but then I spotted the cache, it had fallen to the ground.

I also tried to do a series with a bonus, but the way the cache setter had done this, you had to get all the individual caches or you stood no chance at the bonus. And one of the cache, I just couldn't find. Maybe it's missing?

This was an interesting sight.

One river, running red water, joins another river, running clear, and the result is a river that's stripey.

Reverse DNS

Computers identify themselves with numbers called IP addresses. so, for example, an IP address would look like this:

Actually, you won't see an IP address that starts with 10, because all the 10 addresses are reserved. Anyone can use them for their network, but you can't use them externally. I make considerable use of 10 addresses, and my firewall translates them to the addresses that you access.

But you don't type in numbers to access a computer, you use names, because people find it easier to remember names. Like So something has to translate the names to the numbers, and that's called DNS, Domain Name Services.

But for some purposes you need to be able to translate the other way round. Given an IP addreess, you want to know what name corresponds to that, and that's called Reverse Domain Name Services, rDNS.

If you want to send email to someone signed up with AOL's email service, you have to get rDNS working; ditto Comcast, and there might be others. If you don't have rDNS, then AOL won't deliver the email, on account of it's probably spam. But getting it working isn't easy.

First, I had to get my ISP to delegate the rDNS to me; their default is that they do it, but they don't do it quite right, they translate every IP address to something a bit silly. That's OK for AOL - AOL don't care what it translates to, as long as it's something.

Then I had to tell my name servers to do the rDNS. For that, I had to set up data files with the reverse translation. To do that, you have to give each IP address a name, so would be Notice that the numbers are backwards, and you have to add the magic incantation "", and then you put in the file the name that this corresponds to.

Already you can see it's a nightmare.

Here's some help.

Those will tell you when you have it wrong. But they can't tell you how to put it right. And it's worse - when you make a change, it takes a while, maybe an hour or more, for it to get noticed around the internet, so if you make a change, you can't really test it immediately.


I had it *almost* right, and I've had it *almost* right for some years. But the AOL tester was only working about half the time. Half the time it told me my rDNS was working, half the time it told me it wasn't. Not too big a deal, because my email to AOL were getting through. But it bothered me.

I finally worked out what was wrong. To use rDNS, you have to have name servers, of course. And to use DNS you have to use name servers. But how do you know where my name server is? How do you know the IP address of my name server, because if you don't, you can't ask my name server any questions.

The answer is, root name servers. Your computer asks the root name servers, which I imagine are big boxes in stainless steel cases, with armed guards all round. The root name servers don't know the answer, but they know which server you can ask. Except that server don't know the answer, but it knows a server that does. And the question gets delegated down until eventually, an answer is supplied, now you know the IP address of my name server, and now you can ask it for the IP address of any of my servers.

So, the IP address of my name servers wasn't in my data file. No point. You already know the IP address of my name server if you're asking it questions.

But it turns out that for rDNS, you *do* have to have the IP address of your name server, and if I'd thought about it, I'd have realised why.

When you try to resolve to a name, you don't know where my name server is, and you can't ask the root name servers to find out for you. So my file that contains the IP addresses of all my servers, also has to have the IP address of my name servers.

I added that, and bingo! My rDNS now works perfectly.

And I now understand the internet a little bit more. Maybe.

Thursday, 6 December 2012

Another pi goes into action

This one is to replace the server that gathers my email from the umpteen addresses I've accumulated over the last 25 years, despams it and arranges it nicely for me to read ... or delete.

I used one of the 8gb Sandisk cards, and after several different atttempts at powering it, I eventually found something that works. Yes, the Pi is a bit fussy about its power. I give it 5 volts, and 4.25 appears on the voltage measuring points. Right now, I'm giving it 6 volts, and it says it's getting 5.5, wihch it seems happy with.

In the course of setting this up, I discovered that one of my mail servers has an umpty drive, which has been giving problems over the last three weeks, without me noticing. As a result, there was a huge buildup on email on one of my other servers (they send each other email all the time, don't ask).

So I rebooted the server with the disk problem the disk problem went away, and a flood of pent-up email descended (mostly, trying to tell me about various problems that I'd dealt with already in the last three weeks). Eventually, I cleared it all, and now the email-gatherer seems to be working fine. I had lots of fun trying to ensure that reverse DNS works - wiothout that, AOL and Comcast won't accept email from me. I have it partially working, I'm not sure what the remaining problem is, but AOL seems happy.

More hardware arrived today; a USB device that you can put a couple of hard drives in.m Now I need to work out who to use it. Also, some more powered USB hubs arrived; these come with a power supply. They'll be useful for powering Pies and for those Pies that beed to connect to a lot of USB things.

I think the next server for replacement will be the one with the umpty drive. You know it makes sense.

Wednesday, 5 December 2012


The big news today, is that ladysolly's iPad mini arrived. She hasn't looked at it yet.

And in the morning, bits for Pies arrived; the 8gb SD cards, and the USB-to-microUSB cables, which I need to power the pies. The unpowered powered hubs already arrived (they're powered hubs, but don't come with a power supply). So I converted a couple of power supplies I had that were doing nothing; 5.15 volts and 2 amps, ideal for Pies. And when I plug them into the powered hub, a little blue light comes on, and there's a little switch for each port that has a blue light when you power it on. Very pretty. I should be able to power up to four pies from each one.

I took the photo above with my iPhone. And then to get it onto the computer is a whole performance; I have to connect it to the USB, tell iTunes to go away, tell it "Yes I know I don't have audio on this computer", find the picture and copy it. So I had an idea, and I emailed it to myself instead. Much quicker, and it doesn't actually go across the internet and back, because my mail server is right here.

After power-washing the bike yesterday, I went to oil the chain, because powewr-washing seems to drive all the oil off and it starts going rusty. As I was doing it, I found that the freewheel was a bit too free. The pawl wasn't engaging on the ratchet at all, wihch meant I could pedal till my legs turned blue, but no power would be transmitted to the wheels. I took the rear wheel off, and had a look. I oiled it, in case that helped, which it did, but only slightly. I was still only getting the pawl engaging intermittently.

When you're in the middle of a muddy field, six miles from the car, you don't want that sort of failure. So I decided that this wasn't anything I could fix, and took it down to the bike shop. The man there saw the problem at once. "New gears", he said; the freewheel and gears are all part of a single unit. £25 and ten seconds later, he'd fitted the replacement, and it was looking good. But he also told me that the bearings were going on the wheel, and that would need replacing in the not too distant future. But OK for now.

And while I was replacing the wheel, I noticed that the back brakes were very worn. Probably good for a little bit longer, but since I had everything in bits, I decided to replace those too.

Weight report 29

15 stone 8 pounds

The stork cometh

I have strict instructions from ladysolly to be alert all day tomorrow - she's expecting her mini iPad. I must admit, it looks like it will be a very nice thing to use.

Oundle and back

The forecast for today was cold but dry, so I went out to do 50-plus caches near Oundle. They got the cold bit right, but it wasn't quite dry.

I arrived at the parking place to find it occupied by several horses. Also horse boxes, and people dressed in a rather odd way. Later on, I heard the horns; I guess it was the unspeakable in pursuit of the inedible. Well, none of my business; I mounted my own trusty steed and pedalled away.

After a couple of miles, I encountered a guy who might have been my own age; he wanted to know if the track we were on led to Oundle, so I got my mapping out and had a look, and was able to tell him that it didn't. Unfortunately, that encounter confused me sufficiently that I missed the next cache, and, worse, used the hint for that cache on the one after it. As a result, I spent a long time looking for the wrong sort of cache in the wrong sort of place. It was only after I eventually gave up, that I realised that the next cache along wasn't actually the next one. I went back to where that cache actually was, and found it immediately, so the end result was that I still found the caches, but wasted about 20 minutes, and that was 20 minutes I could have made good use of at the end of the day; I would have finished while it was still light. Oh well.

I started at about 10:45, and it was just as well I took a head torch, because it was about 5pm by the time I got back to the car. Most of the trail was good, or at least good enough, but early on I had to push the bike across a field that was the claggy mud that stops a bike completely. After I winkled most of the mud out ... several times ... I made it across the field. Later on there was another field that looked ten times worse; I wimped out of that and walked the 200 yards to the cache, then went around via a byway to the other end of that section, and again walked 200 yards to get another cache.

Soon after that, I was on tarmac - blessed tarmac. And that took me back to the car, and by that time, the horses had all gone home, so I could find cache number 1 in peace.

While I was out, stuff for the Raspberry Pies started arriving. I now have five 4-way USB hubs, each port has an on-off switch. And there's a hole in one end where you can put in power. But it didn't come with power lumps. Never mind, I have several 5 volt power lumps, and I'll adapt those for the purpose on some of them; on others, I'll use a PC power supply and get the 5 volts off that (the red and black wires).

I also found out how to mount a samba share without putting the username and password on the command line, which is slightly insecure. You use a "credentials" file.

So far, I've got three pies up and working for their living, and the fourth is currently being set up.

Monday, 3 December 2012

Pies in action

I've got three Raspberry Pies running now, doing useful work.

The first is running the Geocaching Robot Arm. The second one is watching my front garden; that replaces a full-size server that ran with an annoying high-pitched whistle, which mattered less because it was a long way away from where we usually are. But by replacing it, I reduce the noise and the power consumption.

While I was getting that up and running, I accidentally discovered gphoto. That lets you control a camera via the USB port. I have a Canon Powershot A620 that I used before mobile phone cameras got so good, and it's just been sitting around doing nothing. So I connected it up, and fumbled around for ages before I finally worked out that to put it in "PTP mode" (Picture Transfer Protocol) you press the button with the printer icon (I'd been guessing that it would be somewhere on the menus, and the manual is upstairs with my collection of manuals). Then it was easy - I can tell it to take a picture and download it to the computer, and the pictures are absolutely beautiful, massively better than the webcams I'm using for the Robot Arm. Which isn't a surprise. So all I need to do now, is dream up some use for this.

I'll think of something.

The third one, just installed, is very minimalist.

It's getting power from the USB port of another server, over a cable that came with my Nokia mobile phone, now no longer in use since I inherited ladysolly's iPhone. The SD card is just 2 gb, wihch is less than the recommended 4gb because A) I wanted to see if I could, and B) there's still 1/2 gb of spare space, and C) I had a couple of 2gb cards lying around doing nothing, and D) all the files it uses are stored on another server, which is a big brute with lots of disk space and E) all the stuff that I ordered to support the pies (USB hubs, cables, power supplies, SD cards) is somewhere between here and China, because I didn't think I'd be wanting them until the end of December. But RS components delivered early, which is nice.

I phoned them up about the missing Pi; I thouht I'd have quite a struggle with them, because how can I prove that it wasn't there? But they were nice as pie about it (couldn't resist that) and they'll be sending one along as soon as they have stock. So I'm happy about that.

I also discovered that the packaging that RS put round the pies, works well as a case; I used a hacksaw to make a small hole for the power lead and another hole for the ethernet cable, an elastic band to secure it colsed and a label on the outside to say which computer it is, and that's it; I don't need to use the USB ports, the video or the audio, for most of what I have in mind.

I plan to go out caching tomorrow; I haven't decided where yet, but the weather looks to be good.

Sunday, 2 December 2012

More work on the robot arm

Today, I implemented arm locking. It's like file locking, but for arms. I'll explain.

Obviously I can't have two people trying to use the robot arm at once. One will move it up while the other moves it sideways, and so on, it'll be a mess, and no-one will get anywhere.

So I've made it so that only one person at a time can use it. Each time you make a move, a file stores
the time, and your computer's IP address. And each time you make a move, it checks to see; if it's been five minutes since the last move, then anyone can use it. But if it's less than five minutes, only the person who last moved it, can make a move.

I also changed the view-from-above. Previously, I taped the cam upside down on the shelf above the arm, and used software to invert the picture, which would have been upside-down. I've changed it; the cam is now suspended the right way up, so I don't need to invert the picture.

I've also created a kibitzer's page, so that people can look but not control the arm.

And the web server logs grow *very* fast. There's limited space on the SD card that the Pi uses, so I've used space on a disk on another computer for the logs. That is a slightly flaky thing to so, because if the other computer is down, even temporarily, the files aren't accessible. But for web logs, which i won't usually read, but will just delete, it's fine.

I think I'm nearly ready for it to go public.