FEATHER RFMX LOW DATA TRANSFER

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
williamlynn
 
Posts: 74
Joined: Fri Dec 17, 2010 5:51 pm

FEATHER RFMX LOW DATA TRANSFER

Post by williamlynn »

I HAVE TWO FEATHER RFMx RADIOS TRANSMITTING BUTTON PRESSES AND THE DATA TRANSFER RATE IS SLOW COMPARED TO OTHER RADIOS ON THE MARKET. I AM ESTIMATING THAT I HAVE A DELAY OF UP TO 1/2 SEC(500MS) BETWEEN BUTTON PRESS ON THE TRANSMITTER AND RESPONSE ON THE RECEIVER. I AM USING THE "RADIOHEAD" EXAMPLES "RadioHead69_RawDemo_TX and RX"
WHAT IS THE EXPECTED RESPONSE TIME FOR THESE RADIOS; 25-50ms IS what I have now with LINX radios.

Attached are the code files.

Help appreciated

Bill
Attachments

[The extension ino has been deactivated and can no longer be displayed.]

[The extension ino has been deactivated and can no longer be displayed.]


User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: FEATHER RFMX LOW DATA TRANSFER

Post by mikeysklar »

Hi Bill,

It sounds like your running at full speed.

There is a one second delay hardcoded into the TX loop and a few 40ms delays between LED blinks.

Code: Select all

  delay(1000);  // Wait 1 second between transmits, could also 'sleep' here!
You will find some hints at performance data in the code comments.

Code: Select all

/// In general packet transmission rate will be limited by the modulation scheme.
/// Also, if your code does any slow operations like Serial printing it will also limit performance. 
/// We disabled any printing in the tests below.
/// We tested with RH_RF69::GFSK_Rb250Fd250, which is probably the fastest scheme available.
/// We tested with a 13 octet message length, over a very short distance of 10cm.
///
/// Transmission (no reply) tests with modulation RH_RF69::GFSK_Rb250Fd250 and a 
/// 13 octet message show about 152 messages per second transmitted and received.
///
/// Transmit-and-wait-for-a-reply tests with modulation RH_RF69::GFSK_Rb250Fd250 and a 
/// 13 octet message (send and receive) show about 68 round trips per second.
///
https://github.com/dragino/RadioHead/bl ... /RH_RF69.h

User avatar
williamlynn
 
Posts: 74
Joined: Fri Dec 17, 2010 5:51 pm

Re: FEATHER RFMX LOW DATA TRANSFER

Post by williamlynn »

There is also a 500ms delay in the "waiting for reply" code. I cannot find a explanation for the "waitAvailableTimeout"; do you know where this is explained.
quote
if (rf69.waitAvailableTimeout(500)) {
// Should be a reply message for us now
if (rf69.recv(buf, &len)) {
Serial.print("Got a reply: ");
Serial.println((char*)buf);
Blink(LED, 50, 3); //blink LED 3 times, 50ms between blinks
} else {
Serial.println("Receive failed");
}
} else {
Serial.println("No reply, is another RFM69 listening?");
}
unquote

after moving this, everything ran fine.

Attached is the final code for a three button press program. It looks like I'm getting around 100ms delays between sending a packet and receiving a reply , Removing the Serial.print's etc. might give better results.

Thanks for you help.

Bill
Attachments

[The extension ino has been deactivated and can no longer be displayed.]


User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: FEATHER RFMX LOW DATA TRANSFER

Post by mikeysklar »

It looks like the rf69.waitAvailableTimeout() "starts the receiver and blocks until a received message is available or a timeout".

http://www.airspayce.com/mikem/arduino/ ... 60bbc0fbae

Glad your are down to 100ms.

Trying taking out the Serial.prints just for fun to see how much of a difference they make.

User avatar
User_UMjT7KxnxP8YN8
 
Posts: 323
Joined: Tue Jul 17, 2018 1:28 pm

Re: FEATHER RFMX LOW DATA TRANSFER

Post by User_UMjT7KxnxP8YN8 »

Not sure where Blink() comes from, but if it waits until the blinking is done to return, you're eating 100ms right here:

Code: Select all

Blink(LED, 50, 3); //blink LED 3 times, 50ms between blinks

User avatar
williamlynn
 
Posts: 74
Joined: Fri Dec 17, 2010 5:51 pm

Re: FEATHER RFMX LOW DATA TRANSFER

Post by williamlynn »

I have the two FEATHER RADIOS working fine.
I am now trying to get the coding to work but I cannot get the demo programs to work ("RadioHead69_AddrDemo_TX" and"RadioHead69_AddrDemo_RX" .

The receiver is getting the "HELLO WORLD" message but the transmitter is not getting a response; the serial monitor is showing "No reply, is anyone listening?" and ""Sending failed (no ack)".

There seems to be an error int e demo program.
Any help in finding the problem would be appreciated.
Thanks
Bill

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: FEATHER RFMX LOW DATA TRANSFER

Post by mikeysklar »

Bill go and start a new thread and paste in your last post. The initial topic is resolved so start a new since this question is not related to the first.

Locked
Please be positive and constructive with your questions and comments.

Return to “Feather - Adafruit's lightweight platform”