Integrate Wireless Tracker with The Things Network

I’m using the wireless tracker for a university project:

Remote sensor data collection module that will push the collected data alongside GPS telemetry to a The Things Network Application.

I have managed to extract the license, AppEUI, AppKey, and DevEUI. I then registered the device on The Things Network console. When I use any of the LoraWAN examples, I set the channel Mask to [{0xFF00}…] since that is required for TTN here in Canada, or else it uploads on the incorrect sub-frequencies.

I was able to get activity from my node in TTN:

The problem is that my node is saying:
“join failed, join again at 30s later”
In the serial terminal, so it’s clear that the program is not recognizing the successful join. How can I resolve this issue? I’m also new to LoRa in general so some documentation on using the LoRa code would be nice.

Other question: Why is the Wireless Tracker code isolated from Heltec Dev Board Repo, and authored by just one person? I’m going to be building a moderately large program so I was hoping to build in PlatformIO, but now I’m relegated to using this library in Arduino, which is a pain for multi-file management, intellisense etc.

update: am no longer able to see my device in the ttn console

Hello it is always a bit difficult with the Heltec boards.
If you tell us which board you use exactly (with picture from Heltec) and which code (here of course only the example keys), then maybe someone can help you.

By the way, if you get an error like this on the serial port
“SHA-256 comparison failed:
12:30:22.970 -> Calculated: dcde8d8a4817d9d69a72476672…
12:30:22.970 -> Expected: fffffffffffffffffffffffffffffffff…”,
you can safely ignore it. Unfortunately, while never really fathomed the cause. Another question : What payload are you using and in what format? You have to decode the payload. The used GPS receivers also work with different formats (don’t confuse with the payload). TTn seems to establish a connection

I’m using the HTIT-Tracker V1.1 board available on the website currently. The code I am using is from Aaron-Lee’s repo, specifically: LoraWan.ino

I haven’t configured a payload formatter yet (again, new to LoRa) but was just hoping to be able to stream “hello” to my console. I’m now running into a problem with even getting my device on the network unfortunately.

Some recommendations:

  • You can only join on TTN once a minute. So trying to rejoin within a minute will never result in a downlink (join-accept) so the node will never join if this attempt is within a minute from the last.
  • View the Wireless Tracker as an ESP32-S3 with extra modules. Do not use it as a Wireless Tracker board. Because as you found out, that sucks. The ESP32-S3 is happy with PIO.
  • This also means you cannot use the Heltec libraries, which for the GPS module and display is also not necessary as long as you modify the default libraries for those to use the correct pins.
  • Regarding LoRaWAN: keep an eye out on the forum; in a few days I’ll post a new alternative which you can use. I do not have access to US bands so cannot guarantee functionality out-of-the-box but will be happy to provide support and do the required bugfixing.

Maybe they don’t have a Gatway nearby. I didn’t have a gateway near me either and switched to Helium for a short time. they can just take the code with them. Finally I got a homegateway for 100 Euro:
Here you can look:
https://ttnmapper.org/heatmap/

Hey thanks for getting back. I will modify the code to wait a minute before the next join attempt.

I’ve relegated to programming the board with PIO and using the Arduino SX126x library that is compatible with the ESP32 and just needs pin requirements (it’s not working currently but need to make a few changes). I managed to extract the source code for the display and GPS so no problems there thankfully.

I still find it incredibly strange that the libraries (and consequently documentation) are all over the place for this specific module. In retrospect I should have gotten one of the v3 lora + wifi kits and just added a gps module to avoid the headache. No time now with project deadlines unfortunately.

Thank you and will do.

Hey! I actually chose TTN because there are two gateways in my city, one is about 1.7km from my apartment and the other is quite close to my uni. When I run the example code from Heltec with freq debugging, I am seeing the RX coming from one of the gateways. As mentioned, I was able to see my device briefly in the console at one point but my node was not seeing the join accepted message. So it kept pinging TTN to join. Now I can’t even achieve that behaviour unfortunately.