heltec_esp32_lora_v3: example LoRaWAN_TTN not working

Hello Ropg,

Luckily I found your library. The Heltec libraries and instructions are terrible. I have a device on which I have installed the Lora example. After entering the TTN access data via the serial console I always get the following error message. What could be my mistake?

Enter LoRaWAN band (e.g. EU868 or US915)  [EU868]
Enter subband for your frequency plan, if applicable. Otherwise just press Enter.  []
Enter joinEUI (64 bits, 16 hex characters.) Press enter to use all zeroes.  [0000110220330440]
Enter devEUI (64 bits, 16 hex characters)  [70B3D57EDBD69B2C]
Enter appKey (128 bits, 32 hex characters)  [1B799FCFA9EABED1FE6863AC31237181]
Enter nwkKey (128 bits, 32 hex characters)  [1773074BA234B63D1683A13F76CCF6D1]
Thank you. Provisioning information saved to flash.
Now joining network.
Could not join network. We'll try again later.
Going to deep sleep now
Next TX in 900 s

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 42 (19 by maintainers)

Most upvoted comments

I’ve replicated your situation as closely as I know how to and I must say it works for me.

  • Helteck Stick v3, no battery, connected to Mac via USB

  • Mac running Arduino IDE version 2.3.3

  • Heltec_ESP32_LoRa_v3 version 1.0.3

  • RadioLib version 7.0.2

  • LoRaWAN_ESP32 version 1.2.0

  • Compiled the LoRaWAN_TTN.ino example with added #define HELTEC_NO_DISPLAY as only modification.

  • Uncommented RADIOLIB_DEBUG_PROTOCOL in RadioLib.

  • Set “Tools / Erase all flash before sketch upload” to make sure there’s no old provisioning data hanging around.

  • Created a new end device ‘heltec-stick’ on TTN:

image
  • Copy-paste the info into the serial dialog and away we go:
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x1 (POWERON),boot:0x28 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3818,len:0x109c
load:0x403c9700,len:0x4
load:0x403c9704,len:0xb50
load:0x403cc700,len:0x2fe4
entry 0x403c98ac
Temperature: 27.80 °C
Radio init
RLB_PRO: [persist] Reading from NVS
RLB_PRO: [persist] No or incomplete provisioning. Getting from console.
No provisioning data found in flash.
Please enter the provisioning information needed to join the LoRaWAN network.

Enter LoRaWAN band (e.g. EU868 or US915)  [EU868]
Enter subband for your frequency plan, if applicable. Otherwise just press Enter.  []
Enter joinEUI (64 bits, 16 hex characters.) Press enter to use all zeroes.  [0000000000000000]
Enter devEUI (64 bits, 16 hex characters)  [70B3D57ED006B0A0]
Enter appKey (128 bits, 32 hex characters)  [51322616E7E6F0A1C0FAB578AFA77E16]
Enter nwkKey (128 bits, 32 hex characters)  [E698A10DEAA159A4CF57121C06F68BD0]
RLB_PRO: [persist] Reading from NVS
RLB_PRO: [persist]      band: EU868
RLB_PRO: [persist]   joinEUI: 0000000000000000
RLB_PRO: [persist]    devEUI: 70b3d57ed006b0a0
RLB_PRO: [persist]    appKey: 
RLB_PRO: 00000000: 51 32 26 16 e7 e6 f0 a1 c0 fa b5 78 af a7 7e 16  Q2&........x..~.
RLB_PRO: [persist]    nwkKey: 
RLB_PRO: 00000000: e6 98 a1 0d ea a1 59 a4 cf 57 12 1c 06 f6 8b d0  ......Y..W......
Thank you. Provisioning information saved to flash.
Now joining network.
RLB_PRO: [persist] beginOTAA
RLB_PRO: [persist] bootcount == 0
RLB_PRO: [persist] No nonces found in NVS
RLB_PRO: [persist] activateOTAA
RLB_PRO: Setting up dynamic channels
RLB_PRO: UL:   0 1 868.100 (0 - 5) | DL:   0 1 868.100 (0 - 5)
RLB_PRO: UL:   1 1 868.300 (0 - 5) | DL:   1 1 868.300 (0 - 5)
RLB_PRO: UL:   2 1 868.500 (0 - 5) | DL:   2 1 868.500 (0 - 5)
RLB_PRO: [MAC] 0x03
RLB_PRO: 00000000: 20                                                                 
RLB_PRO: LinkAdrReq: dataRate = 2, txSteps = 0, nbTrans = 0
RLB_PRO: LinkAdrAns: 07
RLB_PRO: [MAC] 0x04
RLB_PRO: 00000000: 07                                               .                 
RLB_PRO: DutyCycleReq: max duty cycle = 1/2^7
RLB_PRO: [MAC] 0x05
RLB_PRO: 00000000: 00 d2 ad 84                                      ....              
RLB_PRO: RXParamSetupReq: Rx1DrOffset = 0, rx2DataRate = 0, freq = 869.525
RLB_PRO: [MAC] 0x08
RLB_PRO: 00000000: 01                                               .                 
RLB_PRO: RXTimingSetupReq: delay = 1 sec
RLB_PRO: [MAC] 0x09
RLB_PRO: 00000000: 05                                               .                 
RLB_PRO: [MAC] 0x0c
RLB_PRO: 00000000: 65                                               e                 
RLB_PRO: ADRParamSetupReq: limitExp = 6, delayExp = 5
RLB_PRO: [MAC] 0x0f
RLB_PRO: 00000000: fa                                               .                 
RLB_PRO: RejoinParamSetupReq: maxTime = 15, maxCount = 10
RLB_PRO: 
RLB_PRO: PHY:  Frequency UL = 868.100 MHz
RLB_PRO: LoRa: SF = 10, TX = 16 dBm, BW = 125.0 kHz, CR = 4/5
RLB_PRO: JoinRequest sent (DevNonce = 0) <-- Rx Delay start
RLB_PRO: 00000000: 00 00 00 00 00 00 00 00 00 a0 b0 06 d0 7e d5 b3  .............~..
RLB_PRO: 00000010: 70 00 00 35 76 f1 3e                             p..5v.>           
RLB_PRO: 
RLB_PRO: PHY:  Frequency DL = 868.100 MHz
RLB_PRO: LoRa: SF = 10, TX = 16 dBm, BW = 125.0 kHz, CR = 4/5
RLB_PRO: Opening Rx1 window (231 ms timeout)... <-- Rx Delay end 
RLB_PRO: Closing Rx1 window
RLB_PRO: JoinAccept (JoinNonce = 1, previously 0):
RLB_PRO: 00000000: 20 01 00 00 13 00 00 75 08 0b 26 83 05 18 4f 84   ......u..&...O.
RLB_PRO: 00000010: e8 56 84 b8 5e 84 88 66 84 58 6e 84 00 48 be c4  .V..^..f.Xn..H..
RLB_PRO: 00000020: 16                                               .                 
RLB_PRO: LoRaWAN revision: 1.1
RLB_PRO: Setting up dynamic channels
RLB_PRO: UL:   0 1 868.100 (0 - 5) | DL:   0 1 868.100 (0 - 5)
RLB_PRO: UL:   1 1 868.300 (0 - 5) | DL:   1 1 868.300 (0 - 5)
RLB_PRO: UL:   2 1 868.500 (0 - 5) | DL:   2 1 868.500 (0 - 5)
RLB_PRO: [MAC] 0x05
RLB_PRO: 00000000: 03 d2 ad 84                                      ....              
RLB_PRO: RXParamSetupReq: Rx1DrOffset = 0, rx2DataRate = 3, freq = 869.525
RLB_PRO: [MAC] 0x08
RLB_PRO: 00000000: 05                                               .                 
RLB_PRO: RXTimingSetupReq: delay = 5 sec
RLB_PRO: Processing CFList
RLB_PRO: [MAC] 0x07
RLB_PRO: 00000000: 03 18 4f 84 50                                   ..O.P             
RLB_PRO: UL:   3 1 867.100 (0 - 5) | DL:   3 1 867.100 (0 - 5)
RLB_PRO: [MAC] 0x07
RLB_PRO: 00000000: 04 e8 56 84 50                                   ..V.P             
RLB_PRO: UL:   4 1 867.300 (0 - 5) | DL:   4 1 867.300 (0 - 5)
RLB_PRO: [MAC] 0x07
RLB_PRO: 00000000: 05 b8 5e 84 50                                   ..^.P             
RLB_PRO: UL:   5 1 867.500 (0 - 5) | DL:   5 1 867.500 (0 - 5)
RLB_PRO: [MAC] 0x07
RLB_PRO: 00000000: 06 88 66 84 50                                   ..f.P             
RLB_PRO: UL:   6 1 867.700 (0 - 5) | DL:   6 1 867.700 (0 - 5)
RLB_PRO: [MAC] 0x07
RLB_PRO: 00000000: 07 58 6e 84 50                                   .Xn.P             
RLB_PRO: UL:   7 1 867.900 (0 - 5) | DL:   7 1 867.900 (0 - 5)
RLB_PRO: [persist] Activation successful
RLB_PRO: [persist] Nonces and session data saved to RTC RAM
RLB_PRO: [persist] Nonces saved to NVS. (Only actually written if changed.)
RLB_PRO: Uplink MAC payload:
RLB_PRO: 00000000: 0b 01                                            ..                
RLB_PRO: Uplink (FCntUp = 0) decoded:
RLB_PRO: 00000000: d8 cd 04 3c 00 00 00 00 00 00 00 00 f8 9b ce 3f  ...<...........?
RLB_PRO: 00000010: 40 75 08 0b 26 82 00 00 85 1c 01 37 5e 12 ba ab  @u..&......7^...
RLB_PRO: 00000020: 14                                               .                 
RLB_PRO: 
RLB_PRO: PHY:  Frequency UL = 867.500 MHz
RLB_PRO: LoRa: SF = 10, TX = 16 dBm, BW = 125.0 kHz, CR = 4/5
RLB_PRO: Uplink sent <-- Rx Delay start
RLB_PRO: 
RLB_PRO: PHY:  Frequency DL = 867.500 MHz
RLB_PRO: LoRa: SF = 10, TX = 16 dBm, BW = 125.0 kHz, CR = 4/5
RLB_PRO: Opening Rx1 window (231 ms timeout)... <-- Rx Delay end 
RLB_PRO: Closing Rx1 window
RLB_PRO: Downlink (NFCntDown = 0) encoded:
RLB_PRO: 00000000: 49 00 00 00 00 01 75 08 0b 26 00 00 00 00 00 10  I.....u..&......
RLB_PRO: 00000010: 60 75 08 0b 26 88 00 00 fa 52 75 50 ed b7 81 68  `u..&....RuP...h
RLB_PRO: 00000020: 88 d6 ee db                                      ....              
RLB_PRO: [MAC] 0x0b
RLB_PRO: 00000000: 01                                               .                 
RLB_PRO: RekeyConf: server version = 1.1
RLB_PRO: [MAC] 0x03
RLB_PRO: 00000000: 41 ff 00 00 00 00 00 00 00 00 00 00 00 01        A.............    
RLB_PRO: LinkAdrReq: dataRate = 4, txSteps = 1, nbTrans = 1
RLB_PRO: UL:   0 1 868.100 (0 - 5) | DL:   0 1 868.100 (0 - 5)
RLB_PRO: UL:   1 1 868.300 (0 - 5) | DL:   1 1 868.300 (0 - 5)
RLB_PRO: UL:   2 1 868.500 (0 - 5) | DL:   2 1 868.500 (0 - 5)
RLB_PRO: UL:   3 1 867.100 (0 - 5) | DL:   3 1 867.100 (0 - 5)
RLB_PRO: UL:   4 1 867.300 (0 - 5) | DL:   4 1 867.300 (0 - 5)
RLB_PRO: UL:   5 1 867.500 (0 - 5) | DL:   5 1 867.500 (0 - 5)
RLB_PRO: UL:   6 1 867.700 (0 - 5) | DL:   6 1 867.700 (0 - 5)
RLB_PRO: UL:   7 1 867.900 (0 - 5) | DL:   7 1 867.900 (0 - 5)
RLB_PRO: LinkAdrAns: 07
RLB_PRO: [MAC] 0x06
RLB_PRO: DevStatusAns: status = 0xff08
Message sent, downlink received.
Going to deep sleep now
RLB_PRO: [persist] Nonces and session data saved to RTC RAM
RLB_PRO: [persist] Nonces saved to NVS. (Only actually written if changed.)
Next TX in 1194 s

Which makes my data show up at TTN:

image

I have seriously no clue what could be different on your end at this point, but at least now you have a complete working situation to compare against.

Good luck!