1

I'm struggling with the multiple device connection to the master device. How to handle the connection timeouts to the slave devices. "LoRa module SX1278 ISM-410-525MHz". It is perfectly working for one to one connections. But i have struggle on logic, for connecting multiple slave devices.

Easy to connect one device. But harder to connect more than one device if wake up on the same time.

Here, I have attached the code. LoRa module SX1278. And used STM32CubeIde for code

 if (atoi(msg_id) < 11){

            responce = SX1278_LoRaEntryRx(&SX1278, 16, 2000);
            HAL_Delay(500);
            responce = SX1278_LoRaRxPacket(&SX1278);

          if (responce > 1 && responce < 10 ){

                  SX1278_read(&SX1278,(uint8_t*)RXDATA, responce);
                  memcpy(RXDATA, strl, sizeof(RXDATA));
                  HAL_Delay(2000);
                  count1 ++;
                  if(count1 == 1){
                        count1 = 0;
                        loop_count += 1;
                        if(Uart_first != 1){
                            HAL_UART_Init(&huart1);
    }
                  ConnectPacket();
  }
}

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.