A bit more about nRF24L01, IP over nRF24L01

The RF24 has an 'Enhanced Shockburst' mode (honestly who thinks up these names). It's asymmetric:  one end is the PTX (primarily transmitting) and the other the PRX (primarily receiving). The PTX sends a packet and awaits an acknowledgement, and the PRX waits for packets and sends acknowledgements, however the acknowledgements have an optional payload. The result is a full duplex link, with an 'upstream' data rate limited by the downstream data rate.

The RF24 does all this automatically: getting from and writing to it's transmit and receive buffers.

A fully general serial driver could negotiate switches between modes automatically, but there's a reason not to bother to do this: PTX can only be to a single device, while PRX mode supports up to 6 remote devices - i.e. a hub would use PRX mode exclusively.

I'm wondering what 'IP over RF24' would look like. 32 bytes is too small to be the MTU. Perhaps something like this would work: leaves would send a heartbeat packet periodically, to discover if the hub had a packet for them. The first bit of an available packet would be in the ack to the heartbeat. We might as well be protocol aware to work out how long the packet is. We will then send sufficient heartbeat packets to receive the whole packet.

Of course when a leaf is transmitting, any acknowledgements might contain the start of an IP packet.

There's an extent to which the hub could schedule things: When it's finished sending a packet to a node, it can send a control message telling the PTX when to next send a heartbeat, having looked in the outgoing packet buffer to predict when it will be ready.


Popular posts from this blog

3D Printer ramblings

Balance Bot V2

Robot arm