Hello
Has anyone tried to make the communication between for example a pulse counting emontx and a Raspberry Pi two way, so that the Raspberry acknowledges that it received the transmission?
Considering the general flakiness of wireless transmissions, wouldn't this be a good idea? Would complicate things a bit of course, but should be possible.
Re: Transmission acknowledgement
The JeeLib library fully supports ACK'ed transmission. Take a look at the RF12 Demo sketch, the 's' command is for normal send and the 'a' command is for a send and ACK.
P.
Re: Transmission acknowledgement
Thanks, found some info and will give it a try.
http://jeelabs.org/2010/12/11/rf12-acknowledgements/
Re: Transmission acknowledgement
I believe it has never been done because the emonTx is designed to be able to run on batteries. If it had to stay awake to receive an acknowledgement, then battery life would suffer. Clearly that is not an issue with mains power.
Re: Transmission acknowledgement
Good point, although why can't it go to sleep after receiving ack? There should be a fairly minimal delay, no?
Re: Transmission acknowledgement
Hi @ll.
@Rob I'm running my one (EmonTX) with ACKs since the beginning of Dec, and so far so good - 2965mV
@o_cee : That's pretty straightforward. Add this at the beginning of the EmonTX sketch:
Replace void send_rf_data() in emontx_lib with:
.. and it should fly away. Word of warning, tho. You have to have the most recent Martin's RMF2Pi sketch, the only change that's required is from ' mySerial.print((int) rf12_hdr); ' to ' mySerial.print((int) rf12_hdr & 0x1F); ' to clear the ACK bit and avoid adding 32 to the node ID for nodes requiring ACK.
There are some (minor) stability issues at the moment with ACKs on the PI, but Martin is working hard to iron the bugs out ;)
https://github.com/mharizanov/RFM2Pi/tree/master/firmware would be your destination of choice..
All the best.
TBP
Re: Transmission acknowledgement
Thanks, I'll give that a shot!