As I’ve been adding more and more TinyTX wireless sensors one thing that was bothering me was the lack of ACK support in the system meant that if the base station was busy receiving a packet from one node then anything sent from another node at the same time would be lost. By adding a method for the base station to send an acknowledgement (or ACK) that the data has been received it would allow the transmitter to wait a while and try again if the ACK isn’t received.
Turns out this is pretty easy with the Jeelib RF12 library and I’ve added code to the all the TX examples and the emoncms base station examples. By default after transmitting the data packet the TinyTX waits 10ms for an acknowledgement of receipt from the base station, if one isn’t received in that time it waits 5 seconds (with the processor and radio in sleep mode) and then tries again up to a maximum of 5 times. All the timings are configurable in the #define statements near the beginning of the code.
The image is showing node 17 getting sent an ACK on receipt of the data, the other nodes aren’t running the updated code yet, I need to go round and update them all.
I’ve also converted the Nanode RF base station code for relaying multiple transmitters to emoncms to work on the ATmega1284P and WIZ820io (on Github here) and added code to get the time from an NTP server and transmit it for use with my graphical LCD displays. I’m running this on the prototype MAX1284 PCB I was sent and it is working very well and shows some great potential for expansion in the future.