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:
https://docs.heltec.cn/#/en/user_manual/how_to_download_firmware_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


    PS.

  • 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
    image
    USE_BAND_433
    USE_BAND_470
    USE_BAND_470PREQUEL
    USE_BAND_780
    USE_BAND_868
    USE_BAND_915
    USE_BAND_915_HYBRID
    etc.

  • 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

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. http://www.keil.com/distis/

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.