Alternative library for Heltec ESP32 LoRa v3 a.k.a. HTIT-WB32LA

Hi all,

I made an alternative to the official Arduino library for the ESP32 LoRa v3 board that uses RadioLib and is generally extremely well documented. Working examples include The Things Network LoRaWAN (with deep sleep between sends while saving the flash by only writing there when necessary), a spectrum analyzer and more.

Check it out…

spectrum_analyzer

1 Like

Are there any examples utilizing the LoRa communication functionality?

After looking at the examples, there is one called LoRa_rx_tx.ino. This implies that there can be transmission of both directions, but in the comments at the bottom it says “// Can’t do Serial or display things here, takes too much time for the interrupt”. Is there a way to send packets from one LoRa board to another using this example? If so, would I be able to use the serial command line or would it be another means?

The LoRa_rx_tx example sends and receives packets using the LoRa modulation, with the characteristics as specified in the #define lines in the beginning. That comment refers to the fact that that part of the code is an interrupt service routine, so one cannot do things that take a relatively large amount of time (like serial communications) right there. So it just sets a flag and lets the rest of the code print out the information about the received packet.

I agree 100% about the Heltec firmware being very confusing and also the fact some really trivial bugs are not being corrected.
Some firmware like the CubeCell still use the old arduino “timer” library causing compilation errors you have to fix in their arduino core.
Really poor software maintenance.

That said, the ESP32 Lora v3 is a great hardware and the core library is actually great. So I am not sure where you are seeing any challenges in using the system.

I am also one of the maintainers of thé ClusterDuck Protocol open source projet which is managed through the Linux Foundation and we support Heltec LoRa boards without any major problems.

We also leverage the RadioLib library.
If you are interested you can checkout the project here: https://github.com/ClusterDuck-Protocol/ClusterDuck-Protocol

Hi Amir,

I dunno, I found it all confusing to be honest. There’s all these Github pages, and they have READMEs full of dead links. Just randomly, clicking now:

If I google the board by name, what I think is its main page at heltec sometimes takes 10 seconds to load and links to this repo which links to this one. On the first one it says it requires the second. Then on the second one’s README, under “instructions / relative boards”, the link for this board is 404. The instructions for Mac below that are, for anyone but seasoned developers, straight-out intimidating. Then there’s all these confusing and different links to https://resource.heltec.cn where there’s yet more zip files with libraries, many old links to a repo whose development has been ‘stoped’.

I mean, I figured it out in the end, but only because I’ve worked with ESP32s enough and more despite their efforts than because of it. Someone new to all of this could not use this as their starting point. And yes, the hardware is very nice, which is why I decided to give it some love, also to have everything that I learned about this board in one place.

In the process, I improved on the display library (they merged my PRs, so I can go back to depending on it) and wrote and added my own button library that’s particularly useful if you have only one button: all the usual button functions and also allows:

if (button.event(LONG, SHORT))

 

Did you notice that while the board definition for this board that comes when you add the board manager URL from one of these repos allows for setting of all sorts of lora stuff, but has completely removed the basic ability to select different size partitions? I’m still considering whether to take it to the next level and publish my own board-manager URL. Also, their board definitions also offer all of the existing ESP32 boards again, and their own definitions have made their way into the standard Espressif ESP32 definitions file, so you actually don’t even need to install theirs.

1 Like

Hi Rop

Yeah. There are multiple repos and also confusing version number. What is really happening is there are 2 separate repos:

One for the Arduino code and one for the Lora library.

For arduino core:

For LoRa:

However, I’d recommend using RadioLib instead of the Heltec implementation. So you only need the core.

For our project also we are no longer using the Arduino IDE, instead opted for PlatformIO which provides a far more professional environment and the Heltec boards are also automatically pulled in when you specify the board names. This has so far been working well.

As for the Heltec boards also in the espressif32 generic board definition, don’t use them. They actually don’t work. At least that’s my experience.

I didn’t notice the partition definition missing. Again probably because we are now using platformIO.

So it’s a major pain for people who are not so familiar with the technology or don’t have enough experience with embedded software development unfortunately.
But it’s not all negative :slight_smile:
The LoRa v3 is a good platform to work with.

Hi Amir. I know, I know. I love the hardware.

Did you notice that in their official board definitions for the Arduino IDE, you cannot set different partition tables? (Even on the Heltec boards where you can choose different tables, they are not offering some of the 8 MB ones and offering lots of tables for different size flash chips.)

I created a board manager URL to go with my library. Life really is less painful if you don’t use anything from the official Heltec repositories and use my library instead. It’s all in the README.

This library now has full support for the Wireless Stick Lite, in addition to Wireless Stick and the original 128x64 OLED board.