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

Communication error after changing RadioHead address to NodeID on LoRa #180

Open
SmithJar-rov opened this issue Mar 3, 2022 · 0 comments

Comments

@SmithJar-rov
Copy link

#+TITLE: Issue
The constructor in the LoRa module is changed so that, instead of initializing the address variable from config.h, it's instead initialized with device_manager->get_instance_num() to get the device ID. This way, the device ID and RadioHead ID match. After making these code changes, there is no packet received on the hub side and no acknowledgement received on the node side. Calls to the transmission function on the hub side seem to take much longer than they had previously. Communication works fine with the code reverted to the current state of the deployV3, or the commit prior to the most recent commit on FWV3.

Hardware: two M0 LoRa feathers
To reproduce:

  1. Include Manager.h in LoRa.cpp
  2. Change the LoRa constructor so that it takes device_manager->get_instance_num() instead of address. (line 30 in LoRa.cpp)
  3. Remove address from the parameters of the constructor (line 21 in LoRa.cpp)
  4. Change the overloaded constructor to take EXPAND_ARRAY(p, 5) instead of EXPAND_ARRAY(p, 6) (line 89 in LoRa.cpp)
  5. Remove address from the parameters of the constructor in the header file (line 106 in LoRa.h)
  6. Remove the address paramaters from the header files of the LoRa/Transmit, LoRa/Receive, and LoRa/Receive_Blocking examples
  7. Upload the LoRa Receive example to one feather, and the Transmit example to the other feather.

You can view these changes in the most recent commit of FWV3. Note that I also changed some print statements, but these shouldn't effect anything.

Expected behavior:
A print statement on the transmit side indicated a received acknowledgement, and the received packet printed out on the receive side. Packet number increasing sequentially to indicate no packet loss.

Code: All code changes are in LoRa.cpp and LoRa.h in src/CommPlats. The examples used are Receive.ino and Transmit.ino in examples/"Communication Platforms"/LoRa

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

1 participant