How to Use Lora Node 151 and send data To TTN(solved)

Good morning.

I just bought the HT-M01 lora gateway with lora node 151. The gateway works fine using the instructions from this link.

But for lora node 151 I find it difficult to get the right reference. can anyone help me in running this lora node 151. I plan to use it to send sensor data to TTN through the HT-M01 gateway.

what I have done is

  1. Install Keil MDK 5
  2. Request code samples from the heltec support team
  3. But I have never used keil before. I hope it’s here that can guide me

Thank you

1 Like

Now can you send date via Node 151 and HT-M01 can receive it?

BTW. How did you connect to TTN?

Now. I’m not able to use Node 151 . I use other node board like RFM95 to send data to TTN via gateway HT-M01 and it work normally . I use the link that i mention above .

Did you register the Node 151 in TTN? And can you paste the Node 151 output log?

BTW. the RFM95 use what MCU to drive?

Not yet. I don’t have any idea how to run this lora node(151) with Keil IDE. I use atmega328 with RFM95 . Can you help me how to use lora node 151 ?

The example code we provided can compile and run with LoRa Node 151 directly. But first of all, you need to have an MDK 5 installed.

Here is the document about how to download .bin files into LoRa Node 151:

Oke . What i have done

  1. Install MDK 5
  2. Open example code with MDK 5
  3. Install ST-Link utility. So I’m ready to compile .hex / .bin file to lora node board

Now, i’m confuse about configuration such a AppKey, DevEUI etc. in that example Code . Where is the file ? and How to configuration Frequency ? Frequency in my region is AS923 base on TTN

  1. Get your device EUI, Key etc. from the TTN:

  2. Change the relative EUI, Key in Commissioning.h


  • Use OTAA, keep OVER_THE_AIR_ACTIVATION macro definitions 1;
  • Use ABP, change OVER_THE_AIR_ACTIVATION macro definitions 0;
  1. Set the right sending frequency in the node example code
  • Change working band via Keil macro definitions

    Click the C/C++ label, chang the red line with your working band

  • Determining that the listening frequency of the gateway is the same as the sending frequency of the node. The node’s sending frequency relative code.
    For example, the 915MHz sending frequency band is here (in LoRaMac.c);

    Other band’s sending frequency also in LoRaMac.c file too.

Compile and download the .hex/.bin file into Node 151, it should working.

Relative document: How to Download Firmware into LoRa Node 151

1 Like

I tried to compile for USE_BAND_868 and get the error: “…error: L6050U: The code size of this image (45872 bytes) exceeds the maximum allowed for this version of the linker.”

That means I have to purchase a other version of Keil MDK 5 for about $1’535.-!

Have anyone tried to compile and download this with another tool like Platformio or so?

We are trying to provide a SW4ST version in the future.

Hi @hunter8801 . Thanks for your help . After i upgrade my IDE , Now my node 151 can send data to TTN . PROBLEM SOLVED .

Hai @damo . For Experiments, you can use Keil MDK 5 Trial Version for 7 or 30 Days . Just do request to Keil distributor on your country.

Thank you @Ali_Topan ! It took a while, but now I’ve done it. it works like a charm with TTN!
Now I try to connect a bmp280 sensor.

We had migration the example code from Keil to CubeIDE:star_struck:

Just contact your provider of download from your account page.

I have built the project succesfully in CubeIDE. But I have two questions:
How to check/set the right ferquency band in Cube (for Keil it is step 3 in your tutorial from Jul 11)?
Cube creates .elf file (not .hex or .bin) How to download it into node151 using ST-Link?

Thanks for help!

You can refer to the following two documents:

1 Like

Thanks! it’s perfect!

HI all

I have just received the Heltec LoRA 151 module and have loaded the example code as per instruction on site. I have it working on the EU 868 band and talking to TTN, but have found the following issues:

• The transmissions are always stuck at SF12. I have tried to set the default DR #define LORAWAN_DEFAULT_DATARATE from DR_0 to DR_7 in main.c this has no effect. I have also tried to set ADR #define LORAWAN_ADR_ON to 0 but has no effect.
#define LORAWAN_CONFIRMED_MSG_ON set to false this help that now the message sequence increments

• I have found that even if I receive a download command ADR to reset rate from TTN backend it does not respond to command !

• Cannot find where to set the power level ?

• Also how are people connecting payload in example code ?

Any other help to getting working correctly for EU on TTN.

I am happy to publish if we can get a good version working, as I see the lack of a good working version on TTN, as limiting the use and sales for Heltec and for the community limiting the use of a great cost effective low power product.


P.S Username on TTN community and Site " Vaelid"