Pirate radio

A while back I started thinking it would be really good to have a way to make an 'internet of props' for games. Some way that things could communicate so for example a motion sensor could trigger and tell players or GMs it had happened. The radio kit would need to be small, power efficient and affordable.
As mentioned in my looking at the solar lights I think the SRF radios by Ciseco fit the bill and I finally got to have a play with them this weekend.

The first photo is of the RFu-328, which is the tiny board occupying the socket on the top left of the prototyping board. This is an Arduino Uno compatible device with built in radio and you can program it over the radio too (OTAMP), which is frankly wonderful.

Although I can see it being a worry once you've built a load, you're going to have to make sure that you only have the one you want to program powered up when you do. There are clever things can be done with using a different channel for programming but I think that could be a pain to administer as you'd need to keep reconfiguring the radios.

You get these for about the price of a decent Uno clone, although it's designed for embedded use so you need to add a 3.3v PSU and it's in an odd Xbee compatible form factor. I can see me soldering wires straight to them.

The second phot shows their 'Slice of radio', which is a plug and play SRF radio for the Raspberry Pi. It just plugs into the GPIO connector and works, although you need to disable the serial console on the Pi so it can be used effectively for anything else.

I also bought their USB radio, which doubles as an FTDI serial device for programming things with. No photo as it's an anonymous black box.

When I first started I got very frustrated at my inability to program the RFu over the air. By default the USB device is not configured to send the 'remote reset' needed for this to work. Sadly the Ciseco documentation is at the same time both great on detail but unhelpful and a bit disorganised so it took me a while to realise this.

If you download their configuration manager it helps with the AT commands necessary and gives you an easy way to change them. Nothing you couldn't change with AT commands manually but when you start out there's the usual problem of not knowing what you don't know.

With that minor niggle sorted, programming the RFu-328 was a doddle. I put the standard blink sketch on, just printing On/Off to the serial port and it immediately worked. The only thing to bear in mind is that 'pin 8', which doesn't appear on the RFu for normal use, enables and disables the radio so the sketch needs to bring it high during the setup function and the serial port has to run at 115,200 baud.

Now, however I have made the RFu-328 unusable for OTAMP as in a moment of idiocy I uploaded a sketch which blasts characters out of the serial port as fast it can manage. Which ties up the radio and stops over the air programming from working. So I'm going to have to pull it from the development board and use FTDI to program it directly.

I also had a play with the Slice of Pi, running one of my existing Python sketches that does serial output and simply pointing it at the radio instead. It is, as they advertise, just as simple as that.

Once I've rescued the RFu I need to play with Ciseco's protocol for the 'internet of things', LLAP. Reading around the topic it sounds like it's a bit unfinished but then it is at least a start and means whatever I do will have a passing chance at fitting in with other uses of the radios. LLAP has very simple human readable 12 character packets designed for tiny low power, low CPU devices like these. Were I to write something myself that would be what I'd be aiming for anyway.

No comments: