-
Notifications
You must be signed in to change notification settings - Fork 224
Adding AU915 V1.0.2rB Support #1011
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
base: master
Are you sure you want to change the base?
Adding AU915 V1.0.2rB Support #1011
Conversation
See mcci-catena#1010 for more information.
Hi @ElectronicallyE , Thank you for bringing up this Dwell time issue to our attention.
by removing the parentheses from the line 304 of lmic_au915.c, this build issue can be fixed. We will test the changes and let you know how it works; meanwhile, you can do the necessary code changes and update the pull request. Thank you. |
Added { to line 302 to fix issue on line 304
Hi @Pranau-R, Thanks for the reply. Quick fix on my end! I added a "{" to line 302. I believe this has updated the pull request automatically. Do let me know if there is anything else you need me to do. |
Hi @Pranau-R, Hope you are well. Just checking in to see if there are any further changes required. It would be great to see this merged soon! |
Hi @ElectronicallyE, Thank you for the reminder. The build issue has been resolved, and we have started testing the changes using the example sketch However, the device is currently unable to join the network. We have updated the sketch to include Please let us know if there’s anything we might be overlooking. Once the changes are tested and verified, we will proceed with merging. Thank you! |
Hi @Pranau-R, Thanks for the reply. If you are testing with a TTGO LoRa32 V1, you might need to downgrade the esp32 by Espressif Systems board library to 2.0.17. This is because the board has a 26 MHz crystal instead of the more common 40 MHz crystal which results in the clock not running at real-time and means the RX delay is incorrect. You would know this is an issue if you had to select a baud rate different to that specified in the code. More information is available here: I'll try the code this evening and let you know how I get on. Also make sure that the board is unplugged and plugged back in when trying to reconnect, instead of trying to use the "RST" button as I have found that this does not reset the device correctly. |
Hi @Pranau-R, This evening I have tested the code. I downloaded my modified branch and removed the existing library I had installed. The only changes I made in addition to my branch are: lmic_project_config.h
ttn-otaa.ino I changed I changed my "pin mapping" from...
to the following to match my board, being a TTGO LoRa32 V1 SX1276:
You will also see I have also modified I uploaded the code and the board connected first time. I power cycled the board several times without issue: ![]() ![]() Please note that I do have "Resets join nonces" enabled as there isn't any persistence (memory) written into the code. |
Hi @ElectronicallyE, Thank you for sharing the detailed test results. |
Hi @ElectronicallyE , As mentioned earlier, we have successfully pulled the latest changes from your Adding-AU915-1.0.2-Support branch and we followed the same steps you have outlined. As per the previous discussion: In lmic_project_config.h, we uncommented the following:
In ttn-otaa.ino, we:
The device is now able to join the network without any issues. However, it consistently joins using DR2, SF10, as shown in the TTN console screenshot below: Next, we plan to test using the compliance-otaa-halconfig.ino sketch for more detailed debug output. Thanks again! |
Hi @Pranau-R, Checked again this morning by reinstalling my branch, using the ttn-otaa.ino from scratch, making the exact same changes as I described above and it worked without an issue, sending the join request on DR0. I also created a new device in the TTN Console. Did you make sure that your version of the library included the changes I made to lmic_bandplan_au915.h a couple of days ago to change the DR depending on the LoRaWAN Regional Parameter version (see 6de5bee)? I had missed adding this in my original merge request. ![]() Here is my ttn-otaa.ino:
Here is my lmic_project_config.h:
There are no other files that I have changed as part of my testing. |
Hi @Pranau-R, Just checking in to see if you have had success with this? |
Hi, we discussed this in the engineering meeting this morning. Still not working for us. It's late in India, you should expect an update in the morning. We'll try to get this sorted soon. |
Hi @ElectronicallyE , We have pulled the latest changes: DR depending on the LoRaWAN Regional Parameter version and tested earlier, but still the device joined using DR2, SF10. We are conducting testing today and will update you on the status shortly. In the meantime, could you please share the Thanks! |
Hi @Pranau-R, Here are the "General Information" settings for the device I tested with the code: ![]() |
Hi @ElectronicallyE , As mentioned earlier, we used the compliance-otaa-halconfig.ino sketch to enable more detailed debug output during our testing. The following changes we made to this sketch:
No other modifications were done. However, we observed that the device still joins the network using DR2 (SF10). Please find the attached screenshots from the TTN Console and Terminal for your reference: ![]() ![]() Just for testing, we modified the following in the lmic_bandplan_au915.h file::
and
No changes were made in the lmic_project_config.h file, except uncommenting the following relevant definitions:
After the above modifications, we tested the device again. This time, it successfully joined the network using DR0 (SF12). Screenshots from TTN Console and Terminal are attached below for reference: ![]() ![]() We have tested these changes several times, and every time it joined using DR0 (SF12). Please let us know if there is anything we might have missed. Thank you! |
Hi @Pranau-R, In the first test, did you set Other than that, I'm not sure why you are experiencing the issue you are. I have listed my entire configuration above which didn't face this. As you have shown, something about the "if" statement which sets the DR is playing up for you. Can you check the |
Hi @ElectronicallyE , Apologies for the earlier miscommunication. To clarify, during both of our tests, we explicitly set: and commented out: For your reference, below is the lmic_project_config.h file content we used in both test runs:
We will also add a runtime check to confirm the Thanks for your support. |
Hi @ElectronicallyE , We have added debug messages to the code and discovered that the lmic_project_config.h file is not being included during the compilation process. This appears to be due to the ARDUINO_LMIC_PROJECT_CONFIG_H macro already being defined elsewhere, which prevents the conditional block in lmic_config_preconditions.h from taking effect:
As a result, the lmic_project_config.h file is ignored. We have tested this behavior on two separate machines and observed the same outcome. For context, we are using the Arduino IDE to build the sketch. Could you let us know which build environment you are using on your end? We are continuing to investigate and will share any further findings as we make progress. Thank you. |
Hi @Pranau-R, That's unusual behaviour. Hopefully that resolves issues on your end. I am using the Arduino IDE 2.3.6. |
Hi @ElectronicallyE , Thank you for the information. After further investigation of our BSP, we found that the macro ARDUINO_LMIC_PROJECT_CONFIG_H is already defined there with the value pointing to lmic_config_preconditions.h. Since this macro is pre-defined in the BSP’s boards.txt file, it prevents the conditional block in lmic_config_preconditions.h from executing as intended. To test for our Catena4610 board, we temporarily modified the conditional block as follows:
With this change, the board is now successfully joining the network using DR0 and SF12, as expected based on the settings in the lmic_project_config.h file. Thank you. |
Glad to hear you have had success @Pranau-R. Is it fair to say that this issue was a result of your board library rather than the Arduino-LMIC library directly? |
Hi @ElectronicallyE , This is not an issue. In our BSP, we have defined the ARDUINO_LMIC_PROJECT_CONFIG_H macro to point to a different configuration file. Therefore, this is expected behavior and not related to any issue within the arduino-lmic library. Thank you. |
Great, so does this mean these changes can now be merged @Pranau-R? |
Hi @ElectronicallyE , Yes, these changes are good to be merged. Thank you. |
@ElectronicallyE I would like to do a quick code review prior to merging. Unfortunately, I have personal business that will tie me up until the weekend. Thanks for your patience. I'll try to squeeze it in as soon as I can. |
Hi @terrillmoore,
This is follow-on from #1010.
As mentioned in my issues post, I have created this branch with the changes needed to support AU915 V1.0.2rB. I have updated README.md to reflect this change.
The only other change I have made is the addition of LMIC_selectSubBand(1) in ttn-otaa.ino to align with the other examples.
I have tested this code using both The Things Network and Chirpstack and am confident it works.
Your feedback and willingness to merge into the "master" would be appreciated.