2018-04-16 08:33 AM
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 !!!
2018-04-18 11:30 PM
Nobody ????