Hello,
I prepared a LoRa Gateway using Dragino LoRa GPS HAT for RPi 3B+. This Gateway was set up using this method. And, I wrote ArduinoCore-stm32l0 to B-L072Z-LRWAN1.
I wrote a following code:
#include "LoRaWAN.h"
const char *devEui = "1111111111111111";
const char *appEui = "1111111111111111";
const char *appKey = "11111111111111111111111111111111";
void setup( void )
{
Serial.begin(9600);
while(!Serial){}
LoRaWAN.begin(AS923);
// LoRaWAN.setADR(false);
// LoRaWAN.setDataRate(1);
// LoRaWAN.setTxPower(10);
// LoRaWAN.setSubBand(2); // for TTN
LoRaWAN.joinOTAA(appEui, appKey, devEui);
Serial.println("JOIN()");
}
void loop( void )
{
if (LoRaWAN.joined() && !LoRaWAN.busy())
{
LoRaWAN.beginPacket();
LoRaWAN.write(0xef);
LoRaWAN.write(0xbe);
LoRaWAN.write(0xad);
LoRaWAN.write(0xde);
LoRaWAN.endPacket();
}
delay(30000);
}
Then, LoRaWAN.joined() does not become to 1. LoRaWAN.busy() is 0. So My device is not trying to send data. When I checked Gateway Overview, Status is “connected”, Last Seen is recurring the count every 30 seconds.
I tried to change Frequency Plan within Asia region, but the problem was not resolved. There are no mistakes in devEui/appEui/appKey.
What could this be caused by?
Thank you,