How to improve round trip times for small packets / fast updates

Started by dpjpandone, February 06, 2014, 01:49:40 PM

dpjpandone

Hello,

  I am interested in exploring the continuous operation of the RFM69 or learning how to tweak the current library for best performance in a situation where latency is a problem. I would like to use the moteino for a remote control applications where I need to contantly update a 3 byte position value in each direction at the fastest rate possible. I won't be using ACK's. Is there anything else i can do to reduce the size of the packet, and overall latency? Can I use smaller encryption? it seems strange to send a 16byte password to transmit a 3byte value?

Felix

You're not sending the password along with the message, otherwise anyone could use it to decrypt right?
It's just saved at both ends as a secret key to encrypt/decrypt messages when they are sent/received.
The other few bytes in the header of the packet are there for the packet engine, and I added 1-2 bytes for other useful purposes. So it's already pretty slim.
Without ACKs the amount of time it takes to transmit is limited by the carrier frequency. So if you want faster transfers you might consider 915Mhz as opposed to 433, it's more than double higher bitrate. That will yield most gain in my opinion compared to trying to squeeze another byte out of the packet itself.

dpjpandone

I feel silly now, for some reason I thought the encryption key was sent with each packet... I now remember reading your post on the header bytes, I must review that article, since it applies. Thanks!

damonb

Quote from: Felix on February 06, 2014, 02:14:02 PM
...the amount of time it takes to transmit is limited by the carrier frequency. So if you want faster transfers you might consider 915Mhz as opposed to 433, it's more than double.
Surely the time it takes to transmit is determined by the baud rate, not the carrier frequency.

Felix

You are absolutely right. Not sure how I missed the fact that these are frequency modulated when I wrote that. You want the baud rate increased not the frequency.

dpjpandone

Do you think that the RFM73 would be a better choice? In this application, low latency is a priority. The remote control has encoders and potentiometers to control stepper motors, and the controls must feel very responsive.

I don't necessarily need the longer range of the RFM69,
I'm not doing, just transmitting two values between 0-1023

would the higher bandwidth of the rfm73 improve the refresh rate?

Felix

If range is not a huge issue then you can increase the bitrate up to 250kbaud according to the datasheet, at the expense of range. Some other params might have to be tweaked, see datasheet for the formulas and dependencies.