Hello everyone…this is my first post. Asking for help is very traumatic to me – but I’m desperate
Please let me know if my level of detail is incorrect.
I have two HTCC-AB01 CubeCells and an HT-M00 two-channel gateway. I’m successfully sending data to TTN with either CubeCell. My problem is that in any sketch where I include LoraWan the Loop() Switch statement goes from DEVICE_STATE_INIT --> DEVICE_STATE_JOIN --> DEVICE_STATE_SLEEP and then gets stuck. Messages are then sent to TTN continuously but DEVICE_STATE_CYCLE and DEVICE_STATE_SEND are never processed and there is only ~5 seconds between cycles.
I’ve read that Serial activity will halt a sleep cycle but adding diagnostic Print statements doesn’t appear to affect the process.
14:33:17.061 -> case DEVICE_STATE_INIT
14:33:17.061 -> case DEVICE_STATE_JOIN
14:33:17.061 -> joining…TX on freq 903900000 Hz at DR 3 power 20 dBm
14:33:17.095 -> case DEVICE_STATE_SLEEP
14:33:17.095 -> case DEVICE_STATE_SLEEP
14:33:17.095 -> case DEVICE_STATE_SLEEP
14:33:17.095 -> case DEVICE_STATE_SLEEP
14:33:17.095 -> case DEVICE_STATE_SLEEP
.
.
.
This goes on forever with DEVICE_STATE_SLEEP being processed continuously and DEVICE_STATE_CYCLE and DEVICE_STATE_SEND never processed.
The example sketches using timer and interrupt sleep work fine, but as soon as I run any sketch using LoRaWan, the Loop() process I describe above is seen in every case.
The easiest sketch to demonstrate the problem is the LoraWan example. I’ve changed the OTAA/ABP, the channel mask (0x0300 to use the first two channels in band 2) and added Serial.println statements to track processing. If I take out the prints the data in TTN is identical (so no prepareTxFrame is being processed) and the duty cycle isn’t correct so I’m guessing Serial processing isn’t affecting things.
Here are my current board details (I’ve also tried using AT+ for the duty cycle without luck).
14:33:16.619 -> Copyright @2019-2020 Heltec Automation.All rights reserved.
14:33:16.891 ->
14:33:16.891 -> AT Rev 1.3
14:33:16.891 -> +AutoLPM=1
14:33:16.891 ->
14:33:16.891 -> +LORAWAN=1
14:33:16.891 ->
14:33:16.891 -> +KeepNet=0
14:33:16.891 -> +OTAA=1
14:33:16.891 -> +Class=A
14:33:16.891 -> +ADR=0
14:33:16.891 -> +IsTxConfirmed=0
14:33:16.891 -> +AppPort=2
14:33:16.891 -> +DutyCycle=60000
14:33:16.891 -> +ConfirmedNbTrials=4
14:33:16.891 -> +ChMask=000000000000000000000300
14:33:16.925 -> +DevEui=7C9EBDXXXXXXXXX(For OTAA Mode)
14:33:16.925 -> +AppEui=70B3D5XXXXXXXXXX(For OTAA Mode)
14:33:16.925 -> +AppKey=56938E3666EXXXXXXXXXXXXXXXXXXX(For OTAA Mode)
14:33:16.925 -> +NwkSKey=00000000000000000000000000000000(For ABP Mode)
14:33:16.925 -> +AppSKey=00000000000000000000000000000000(For ABP Mode)
14:33:16.925 -> +DevAddr=00000000(For ABP Mode)
14:33:16.925 ->
14:33:16.925 ->
Than you in advance. I really hope I’m doing something stupid.