cancel
Showing results for 
Search instead for 
Did you mean: 

Automatic re-join after reset or power-off

Josse EVEN
Associate
Posted on April 16, 2018 at 17:33

Hi!

Sorry but in Semtech Generic lora driver implementation, file MAIN.C , i need to connect the lora cube for call AT+JOIN and join OTAA network.

I would like to automaticly join after reset or power off, also i think it's here but don't know how to call function :o

int main( void )

{

/* STM32 HAL library initialization*/

HAL_Init( );

/* Configure the system clock*/

SystemClock_Config( );

/* Configure the debug mode*/

DBG_Init( );

/* Configure the hardware*/

HW_Init( );

/* USER CODE BEGIN 1 */

/* USER CODE END 1 */

CMD_Init();

/* Configure the Lora Stack*/

lora_Init( &LoRaMainCallbacks, &LoRaParamInit);

/* main loop*/

while( 1 )

{

/* run the LoRa class A state machine*/

lora_fsm( );

CMD_Process();

send_exti();

DISABLE_IRQ( );

/* if an interrupt has occurred after DISABLE_IRQ, it is kept pending

* and cortex will not enter low power anyway */

if ((lora_getDeviceState() == DEVICE_STATE_SLEEP) && (IsNewCharReceived() == RESET))

{

#ifndef LOW_POWER_DISABLE

LowPower_Handler( );

#endif

}

ENABLE_IRQ();

/* USER CODE BEGIN 2 */

/* USER CODE END 2 */

}

}

Thanks !!!

1 REPLY 1
Josse EVEN
Associate
Posted on April 19, 2018 at 08:30

Nobody ????