The first hacker garden Stuttgart took place on the 23rd of July 2015. One of the hacks was a DIY encrypted lightweight radio transmitters ping-pong.
The idea originates from a home automation project from one of the hackers. Apparently there is a lack of encrypted radio transmission protocols, respectively the hardware and software components on the market. If you want something done right, you usually have to DIY.
So the task for this hacker garden was to initiate a connection between a gateway and a node. And establish an encrypted ping-pong communication.
Here is a list of the Hardware we used:
- 1x Seeeduino v3.0
- 1x SainSmart UNO R3
- 2x RFM69HW: -120dBm 433/868/915Mhz RF Transceiver Module
- Small stuff like cables, soldering tin, …
Tip: Mind that the RFM69HW is a 3.3V device, so your Arduino has to bring a 3.3v output, or you add an additional 3.3V power adaptor.
- RFM69 library for RFM69W and RFM69HW
- Arduino library for read/write access to SPI flash memory chips
Tip: The Seeeduiono uses a FTDI USB chip so you should look at this how-to, in order to have the sufficient USB drivers.
Since you can only show one Serial Monitor with the Arduino Software you should have another serial port monitor (e.g. CoolTerm), another computer, or just switch from one Arduino to the other.
Tip: We had two Macs so it was easy to hack in parallel.
Tip: The connecting cables and antenna for the RFM69HW were already soldered on (you probably don't need the antenna for a setup in the same room). So we only had to connect the cables of the RFM69HW to the Arduino.
Install the Arduino Software as described at this Getting Started Guide.
Copy the library directories (RFM69 and SPIFlash) into the Arduino libraries directory. (Standard for the lib dir is $home/Arduino/libraries (analogly with Windows))
The RFM69 library comes with some examples (in the Examples directory).
The Gateway and Node example are ready to go. Try to compile the examples:
Open the example files in Arduino Software and use the Verify function (the button with the tick mark by menu Sketch->Verify/Compile).
#define FREQUENCY RF69_433MHZ //#define FREQUENCY RF69_868MHZ //#define FREQUENCY RF69_915MHZ
//#define FREQUENCY RF69_433MHZ #define FREQUENCY RF69_868MHZ //#define FREQUENCY RF69_915MHZ
Upload one example on each Arduino and check if it is working by opening the Serial Monitor (menu Tools->Serial Monitor).
You should see some text outputs.
Note: Set the baud of the Serial Monitor to 115200 or change it in the examples code. We uploaded the Gateway example on the SainSmart UNO and the Node example on the Seeeduino. The upload on the Seeeduino is a little tricky. You have to hold the reset button, then upload and just when finished uploading release the button. If you release the button too early/late the upload will fail and you'll have to start over. If both Arduino setups are on power, you should see that the Gateway receives data from the node.
With some hurdles, we managed to establish a connection between Gateway and Node. The Node output showed that it was sending. And the Gateway output showed that it was receiving.
So we managed to get a ping.
Nonetheless we didn’t manage to get the Node to receive an acknowledge request of the Gateway. Hence the pong for the task failed.
The first task for the next hacker garden will be to get the pong working.
But we design-thought (I heard that design thinking is the new brainstorming) for another major task, one could say a purpose for this radio transmitter setup. Since our task at this hacker garden originates from a home automation project, it would seem natural to actually procure a hacker garden with an automatic irrigation system – of course communicating via an encrypted radio transmission.
We created a github-repo for our hacker garden project:
There is a followup project:
Driving a Servo on Arduino from a remote Arduino over secured radio