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

Updated board definitions for the LoRaWAN Examples #1052

Merged
merged 9 commits into from
Apr 14, 2024
Merged

Updated board definitions for the LoRaWAN Examples #1052

merged 9 commits into from
Apr 14, 2024

Conversation

Velocet
Copy link
Contributor

@Velocet Velocet commented Apr 3, 2024

Since i don't trust HelTec to get their board configurations right (or up-to-date) i used Arduino core for the ESP32 variants as source.

Clarify intended purpose. Remove unsupported modules.
Added HelTec boards and corrected some errors
Added HelTec boards and corrected some errors
Added HelTec boards and corrected some errors
Copy link
Owner

@jgromes jgromes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution! I left some comments, some things are not totally clear to me.

README.md Outdated Show resolved Hide resolved
examples/LoRaWAN/LoRaWAN_ABP/configABP.h Show resolved Hide resolved
@HeadBoffin
Copy link
Collaborator

I glanced over the recent pin contributions but I haven't figured out why the Arduino IDE uses the #define board names that it does beyond the perils of having the Heltec BSP installed or not. Or indeed why there are variants of some boards defined that don't appear to exist in real life or how we've ended up with a set of pins added but the pragma says they aren't and how the WiFi board with LoRa on it has different pins from the board that doesn't have WiFi in it's name is beyond me. The other pragma description needs reviewing as well:

#pragma message ("ARDUINO_heltec_wifi_kit_32_V2 awaiting pin map")

#pragma message ("Using TTGO LoRa32 v2.1 marked T3_V1.6.1 + Display")

For instance the Heltec LoRa32 V3 that we use as the primary SX1262 test appears as heltec_wifi_kit_32_V3 whereas there are other Heltec's that have LoRa in their board name!

I'll revisit the recent changes and XRef them against the vendor supplied schematics & https://github.com/lnlp/pinout-diagrams who created LMIC-node with all its setup / configs for different boards.

I've got most of the boards so I can do a real-life check as well, I'll come back with further observations by end of Friday.

@HeadBoffin
Copy link
Collaborator

@Velocet, as we've only just stabilised LoRaWAN and I can't see how it fits in to your home automation plans, would it be better to make RadioLib a dependency on your wrapper rather than fork the code?

@Velocet
Copy link
Contributor Author

Velocet commented Apr 4, 2024

@HeadBoffin Let me try to enlighten you! xD

The "official" short board name for the V3 is WIFI_LoRa_32_V3 but what gets used in the end is the folder name:

-DARDUINO_HELTEC_WIFI_LORA_32_V2            // ALL CAPS
-DARDUINO_BOARD="HELTEC_WIFI_LORA_32_V2"    // ALL CAPS
-DARDUINO_VARIANT="heltec_wifi_lora_32_V2"  // FolDer namE (watch out for the V2 at the end!)

The mentioned heltec_wifi_kit_32_V3 is the same board without the LoRa module. Since the pins are the same and you are not using the board defined pin names this works! But don't try to understand any of these names. I never had any failures with the official arduino-esp32 pin definitions as those get updated and reviewed more often. Maybe a hint to only use those would be good as most manufacturer implementations suck (or are wrong.. even in arduino-esp32: the SX1262 has no DIO0 but it is defined^^).

I only forked RadioLib so i can test more easily and maybe make some contributions as i get along. In the end it will just be a protocol addition.

Copy link
Contributor Author

@Velocet Velocet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cross checked again with official definitions. No errors found.

I can't remove the readme from the PR?

@HeadBoffin
Copy link
Collaborator

Cross checked again with official definitions.

Which ones?

@StevenCellist
Copy link
Collaborator

I can't remove the readme from the PR?

Well, then re-upload it!

@Velocet
Copy link
Contributor Author

Velocet commented Apr 4, 2024

Will do so when i'm back home. Thanks for the hint. Seems the app doesn't let me do it.

@matthias-bs
Copy link
Contributor

Another interesting issue regarding board definitions: espressif/arduino-esp32#9423

@HeadBoffin
Copy link
Collaborator

Another interesting issue regarding board definitions: espressif/arduino-esp32#9423

Like standing on quick sand some days!

@Velocet
Copy link
Contributor Author

Velocet commented Apr 10, 2024

Finally readded the README.md. Now everything should be resolved.

@jgromes jgromes merged commit 91f89fa into jgromes:master Apr 14, 2024
30 checks passed
@jgromes
Copy link
Owner

jgromes commented Apr 14, 2024

@Velocet looks good now, merged - thanks!

However, with the caveat that I am not sure if these configuration files and pinmaps will remain long-term. So far it seems more trouble than it's worth (it is prone to breaking if the platform provider makes a brekign change and the CI for it is a nightmare). Guess we'll see ...

@matthias-bs
Copy link
Contributor

I'm still wondering why you get all-capitalized defines an I don't... I double-checked my setup - it's all up-to-date.

@StevenCellist
Copy link
Collaborator

I see all caps for both Arduino and PlatformIO.

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

Successfully merging this pull request may close these issues.

5 participants