Author Topic: ACKs not received on node & gateway example sketches [bad soldering!!!!!]  (Read 1552 times)

ssl

  • NewMember
  • *
  • Posts: 3
I'm new to the RFM69 library and it seems to do everything I want - and the examples are great. However, I've been having trouble getting the ACK packets sent between the node and gateway devices to be acknowledged. I've loaded the node and gateway example sketches on my custom PCBs (not Moteino - my own design originally based on OpenEnergyMonitor hardware, also with Atmega328P and RFM69CW). The devices can send data between each other, but don't seem to receive each other's ACK packets.

The only changes I've made to the sketches are to set the FREQUENCY define to RF69_433MHZ, comment out IS_RFM69HW_HCW (since I use the lower power version) and add a #define SS_FLASHMEM 1 to make up for my board's lack of flash. Everything else is left as-is, because I use the same pins for CS etc.

On the gateway, I see the following:


#[871][2] 1] 123    [RX_RSSI:-29] - ACK sent. Pinging node 2 - ACK...nothing
#[872][2] 1] 123 A   [RX_RSSI:-28] - ACK sent.
#[873][2] 1] 123 A   [RX_RSSI:-28] - ACK sent.
#[874][2] 1] 123 A   [RX_RSSI:-28] - ACK sent. Pinging node 2 - ACK...nothing
#[875][2] 1] 123 AB   [RX_RSSI:-28] - ACK sent.
#[876][2] 1] 123 AB   [RX_RSSI:-25] - ACK sent.
#[877][2] 1] 123 ABC   [RX_RSSI:-28] - ACK sent. Pinging node 2 - ACK...nothing
#[878][2] 1] 123 ABC   [RX_RSSI:-29] - ACK sent.
#[879][2] 1] 123 ABCD   [RX_RSSI:-28] - ACK sent.


and on the node I see:


Sending[9]: 123 ABCDE nothing...
Sending[10]: 123 ABCDEF nothing...
Sending[11]: 123 ABCDEFG nothing...
Sending[12]: 123 ABCDEFGH nothing...
Sending[13]: 123 ABCDEFGHI nothing...


The messages are being received, and ACK packets being sent, but it seems that the sent ACK packets aren't being received properly on the other side. I am not sure why not. Am I missing something here? Do I need to do something to enable proper handling of these packets? Any help or ideas what to look into would be appreciated!
« Last Edit: October 14, 2021, 09:52:08 AM by Felix »

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: ACKs not being received between node and gateway with example sketches
« Reply #1 on: October 11, 2021, 09:38:57 AM »
Other than the essential settings, the example sketches are unmodified correct?
It seems like your gateway node is getting great receive signal but not able to transmit properly. Or the receiver is not listening when those ACKs are coming from the gateway.

ssl

  • NewMember
  • *
  • Posts: 3
Re: ACKs not being received between node and gateway with example sketches
« Reply #2 on: October 11, 2021, 02:45:38 PM »
Yes, apart from setting the frequency to 433 MHz, switching off HCW support and setting the flash pin to 1 (I don't have a flash chip so just set it to an unused pin), they are unmodified. Here are the exact diffs:

Gateway.ino:


$ diff Gateway.ino.original Gateway.ino
< //#define FREQUENCY     RF69_433MHZ
---
> #define FREQUENCY     RF69_433MHZ
49c49
< #define FREQUENCY     RF69_915MHZ
---
> //#define FREQUENCY     RF69_915MHZ
51c51
< #define IS_RFM69HW_HCW  //uncomment only for RFM69HW/HCW! Leave out if you have RFM69W/CW!
---
> //#define IS_RFM69HW_HCW  //uncomment only for RFM69HW/HCW! Leave out if you have RFM69W/CW!
60a61,62
>
> #define SS_FLASHMEM 1


Node.ino:


$ diff Node.ino.original Node.ino
50c50
< //#define FREQUENCY   RF69_433MHZ
---
> #define FREQUENCY   RF69_433MHZ
52c52
< #define FREQUENCY     RF69_915MHZ
---
> //#define FREQUENCY     RF69_915MHZ
55c55
< #define IS_RFM69HW_HCW  //uncomment only for RFM69HW/HCW! Leave out if you have RFM69W/CW!
---
> //#define IS_RFM69HW_HCW  //uncomment only for RFM69HW/HCW! Leave out if you have RFM69W/CW!
65a66,67
>
> #define SS_FLASHMEM 1


I've tried switching the node and gateway but that didn't help.

My board uses a 16 MHz external crystal but I think the Moteino boards use that too right? Adding an explicit F_CPU define didn't help.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: ACKs not being received between node and gateway with example sketches
« Reply #3 on: October 12, 2021, 10:31:18 AM »
My gut feeling here is something in the hardware could be the problem so looking at diffs and guessing what's the problem could be like shooting in the dark. Hardware layout is actually pretty important so code can be perfect if the PCB is not implemented carefully.
In the interest of saving your time, hairs and neurons, my best advice I can give I would start with known working boards and work your way from there.

ssl

  • NewMember
  • *
  • Posts: 3
Re: ACKs not being received between node and gateway with example sketches
« Reply #4 on: October 13, 2021, 03:23:22 PM »
I figured it out - a bad solder connection on the RFM69CW. Attached is a photo of the bad joints. If I put pressure there, the ACKs work.
I'm not sure why this caused a problem for the ACKs and not the normal sending and receiving - do ACKs use a different interrupt mechanism perhaps? In any case, it works now!

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Thanks for the closure.