Author Topic: Increasing "retryWaitTime" in the sendWithRetry [SOLVED] my ACK issues  (Read 3111 times)

Sergegsx

  • Jr. Member
  • **
  • Posts: 87
  • Country: es
Hello,

First of all I must say the following has been tested with "moteino clones" as I have not been able to buy original Moteinos due to personal shipping limitations right now. So if it is not appropriate please delete this message. However, I think others might get something useful by sharing this.

I was having big problems with not getting ACK received by the Nodes (3 nodes 1 gateway), I thought it might be my wiring or my code slowing down the receive.
I finally decided to add some timing calculations to the library but excelent work of Felix I found inside the library that it is already possible to activate a debug print of how many milliseconds it took to receive ACK.

The default retryWaitTime is set to 40ms, so as you can see in the attachment it makes sense that I was loosing so many ACK.

By Increasing the retryWaitTime I was able to start getting ACK 100% of the times. ;)
I dont think that by changing it from 40ms to 80ms will cause any problems somewhere else, but please let me know your opinions.

My findings:
Size 49 = 62ms
Size 39 = 51ms
Size 15 = 26ms

Hope to order a full kit of Moteinos soon!  ;)

Thanks for your hard work Felix!  :)
« Last Edit: December 22, 2015, 06:52:40 AM by Sergegsx »

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Increasing "retryWaitTime" in the sendWithRetry [SOLVED] my ACK issues
« Reply #1 on: December 22, 2015, 09:02:44 AM »
Hi Sergegsx,
Moteino clones are cool, I like to see photos of what people made ;)
I find it a little strange that you had to increase your ACK wait time. I usually use around 30ms since that's about plenty for most cases.
The most revealing way to tell what's going on in the transceiver and when it's done transmitting/receiving is with a logic analyzer where you can watch the SPI data and the DIO0 interrupt depending on the state of the radio (used for both receive and transmit done). That's how I arrived at the ~30ms number.
But I don't think waiting longer is a problem, especially if you don't block other important code.

oric_dan

  • Jr. Member
  • **
  • Posts: 64
Re: Increasing "retryWaitTime" in the sendWithRetry [SOLVED] my ACK issues
« Reply #2 on: December 23, 2015, 03:18:51 PM »
Serge, I would suggest displaying the received RSSI values during all testing phases.

This way you will have a good idea if everything is setup properly. I just solved a problem here where I mistakenly thought the setHighPower() function was referring to the "transmit power level", whereas in fact it selects which radio you are using, HW or W. So, my bad.

I had it set wrong because I am using the RFM69 radio with an Arduino ProMini board, and the voltage regulator is only good for about 125mA, so I was wanting to throttle back the transmit power level, which is actually set using setPowerLevel(). So in fact, my RFM69 radio was not working properly, and the RSSI values were correspondingly very poor, and which indicated something was wrong in my setup.
-------------

Felix, since you mention wanting to see clone boards, attached is a picture of my current radio lashup before being finalized. ProMini controlling RFM69 radio. Your library example software works fine.

Also, for reference, I've been using 2 of your Moteino-Mega boards to implement an SUV alarm. 433-MHz, 55000 bps, and 100mW xmit power. Recently I did some range testing, and had good RSSI of about -85 with the one node inside the SUV, and the other node 500' away inside a metal frame commercial building. Very happy with that. I had previously tried RFM12 going just 60' from condo to inside the SUV, and reception was unreliable.
« Last Edit: December 23, 2015, 11:11:35 PM by oric_dan »

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Increasing "retryWaitTime" in the sendWithRetry [SOLVED] my ACK issues
« Reply #3 on: December 23, 2015, 06:53:28 PM »
Felix, since you mention wanting to see clone boards, attached is a picture of my current radio lashup before being finalized. ProMini controlling RFM69 radio. Your library example software works fine.

Also, for reference, I've been using 2 of your Moteino-Mega boards to implement an SUV alarm. 433-MHz, 55000 bps, and 100mW xmit power. Recently I did some range testing, and had good RSSI of about -85 with the one node inside the SUV, and the other node 500' away inside a metal frame commercial building. Very happy with that. I had previously tried RFM12 going just 60' from condo to inside the SUV, and reception was unreliable.
oric_dan, thanks for the photo, nice "clone" :) I think prominis+rfm69 are not such a rare sight but people have to understand the limitations of what you mentioned and how to get around them, thanks for rehashing that as well.

Nice to hear about your MEGA alarm range as well. What a difference between RFM69 and RFM12B huh ... plus you get all the nice to have features and goodies of RFM69. Are you using the same helical antenna on the MEGA alarm project as seen in the promini photo?
Any chance we could see more details about that alarm in the projects forum? :D

oric_dan

  • Jr. Member
  • **
  • Posts: 64
Re: Increasing "retryWaitTime" in the sendWithRetry [SOLVED] my ACK issues
« Reply #4 on: December 23, 2015, 09:56:58 PM »
Felix, I started a little thread in reply, over in the Projects section.

I should mention that I certainly could have used one of your Moteinos instead of the ProMini, but I had the ProMini in the box, and of course I wanted a node immediately in hand the same day, :-).
« Last Edit: December 23, 2015, 10:57:57 PM by oric_dan »