Heltec Lora CubeCell Fun – Part 1

I have recently been researching and doing some Making with LoRa devices. My main interest in this technology is for home automation and remote weather information. LoRa is an ideal solution here for three reasons:

  1.  The devices are relatively cheap, but they have doubled in price in the last year.
  2. The range of the devices is incredible – miles not feet.
  3. They are super low-power, meaning a battery can last for months or even years.

The first thing I did was build a LoRaWan gateway. I used a Rak2247 Gateway Concentrator with the matching Pi Hat.

RAK Pi Hat

RAK 2247

 

 

 

 

 

 

After mounting the rig atop a Pi3B+, I was able to get the device connected to TheThingsNetwork (TTN) without any trouble. The RAKWireless documentation is very good for this device.

Next, I attempted to get a LoRa end node device transmitting data through the gateway to TTN. This turned out to be much more fun (ahem.. frustrating).

The device I chose is the Heltec HTCC-AB02S CubeCell. It was $20 USD from Amazon. This device has an LCD display plus a GPS receiver as well as all the LoRa capabilities. Neato!

CubeCell Lora / GPS

Since I had the gateway running, and the CubeCell connected to my Arduino dev laptop, I thought I would be able to get one of the basic CubeCell LoRa code examples joining the TTN network. This is where the journey begins.

One of the first problems is the Heltec documentation is scrambled all over the place. Some of it is very good. Other stuff – not so much. There are lots of dead documentation links. YouTube videos help, but they required a large time investment, and some of the advice is just plain wrong.

The second problem is the fact that Lora is much more popular in Europe and Australia. The US has not adopted LoRa as quickly. When you do your Internet searches you will discover a lot of the US LoRa communities gathered steam about five years ago and have died out. As a result, almost all of the Heltec code and documentation focuses on Europe.

I compiled and uploaded a Heltec example program named SendReceive to the CubeCell. This is a simple app that joins the TTN network via the gateway and sends a packet of data. It then requests a response and waits for it. It displays the status of the action on the LCD.

The firmware uploaded fine and I knew it was working because the app spits out status information in the Arduino console. Alas, the device failed to connect to the TTN network.

I literally spent more than two days tinkering, tweaking, researching, and YouTubing, yet I still could not get the device to connect. To complicate things, there are three points of failure here: CubeCell, RAK gateway, TTN network.

I ruled out the TTN network as the problem, because it was happily reporting heartbeat status from the gateway. I was not sure the gateway RX was working because its logs did not report receiving any packets from the CubeCell. Does this mean no packets were in the air? Or was there something broken in the concentrator software config or hardware.

The CubeCell app said it was sending packets but could not connect to TTN. Did this mean there is a problem with the hardware? Or was it software?

In Part-2 – I explain how I solved the problem.

Sopwith

 

 

One thought on “Heltec Lora CubeCell Fun – Part 1

  1. Pingback: Heltec Lora CubeCell Fun – Part 2 | Electronic Adventures with Sopwith

Leave a Reply

Your email address will not be published. Required fields are marked *