Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to acknowledge packet sent but still received #54

Closed
chabe-bit opened this issue Oct 21, 2022 · 1 comment
Closed

Failed to acknowledge packet sent but still received #54

chabe-bit opened this issue Oct 21, 2022 · 1 comment

Comments

@chabe-bit
Copy link

Describe the bug
The node is failing to send a packet, but the hub is stating the packet's been received and prints out the packet.

Hardware in Use
Dendrometer's Node = Feather M0 LoRa + Antenna
Dendrometer's Hub = Feather M0 LoRa + Antenna

To Reproduce
Steps to reproduce the behavior:

  1. Open two Arduino IDEs for Node and Hub
  2. Find Dendrometer.ino in examples/Lab Examples/Dendrometer and push into Hub
  3. Find Transmit.ino in examples/Radios/LoRa/Transmit and push into Node
  4. Open serial monitor for both devices
  5. Most packets will be sent and received successfully, but some will say fail and still send.

Expected behavior
If a packet fails to send, it should not be received and appear on the other end.

Code

      if(!manager.sendtoWait((uint8_t*)buffer, measureMsgPack(manInst->getDocument()), destinationAddress)){
          printModuleName(); Serial.println("Failed to send packet to specified address! The message may have gotten their but not received and acknowledgement response");
      }else{
          printModuleName(); Serial.println("Successfully transmitted packet!");
      }

Output
------------------- Hub ------------------
17:21:15.649 -> [Manager] Data Json:
17:21:15.649 -> "contents": [
17:21:15.649 -> {
17:21:15.649 -> "module": "Packet",
17:21:15.649 -> "data": {
17:21:15.649 -> "Number": 12
17:21:15.649 -> }
17:21:15.649 -> },
17:21:23.226 -> [LoRa] Failed to send packet to specified address! The message may have gotten their but not received and acknowledgement response

---------------- Node ------------------
17:21:13.030 -> [LoRa] Waiting for packet...
17:21:17.568 -> [LoRa] Packet Received!
17:21:17.568 -> [LoRa]
17:21:17.568 -> Message Received:
17:21:17.568 -> "contents": [
17:21:17.568 -> {
17:21:17.568 -> "module": "Packet",
17:21:17.568 -> "data": {
17:21:17.568 -> "Number": 12
17:21:17.568 -> }
17:21:17.568 -> },

Additional context
Plausible faults could be the sleep cycle or recvFromAckTimeout is throwing false because we're receiving duplicated correct packets.
https://www.airspayce.com/mikem/arduino/RadioHead/classRHReliableDatagram.html#ac72c7495936b6f655a5765faac609342

@WL-Richards
Copy link
Member

WL-Richards commented Feb 13, 2023

Radio's have been misconfigured for all versions of loom when properly configured it appears that all packets are transmit successfully

Bw125Cr45Sf128 = 0,	   ///< Bw = 125 kHz, Cr = 4/5, Sf = 128chips/symbol, CRC on. Default medium range

https://hackaday.io/project/27791-esp32-lora-oled-module/log/69630-radiohead-rf95-driver-low-data-rate-optimization

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants