Thank you for the replies.
I will send all details you need.
The Arduino IDE is 1.8.12
The Library I have installed 2.7.2
Thanks in advance
The Code I use is for the Sample SendOTA
#include <TheThingsNetwork.h>
// Set your AppEUI and AppKey
const char *appEui = "XXXXXXXX";
const char *appKey = "XXXXXXXX";
#define loraSerial Serial1
#define debugSerial Serial
// Replace REPLACE_ME with TTN_FP_EU868 or TTN_FP_US915
#define freqPlan TTN_FP_EU868
TheThingsNetwork ttn(loraSerial, debugSerial, freqPlan);
void setup()
{
loraSerial.begin(57600);
debugSerial.begin(9600);
// Wait a maximum of 10s for Serial Monitor
while (!debugSerial && millis() < 10000)
;
debugSerial.println("-- STATUS");
ttn.showStatus();
debugSerial.println("-- JOIN");
ttn.join(appEui, appKey);
}
void loop()
{
debugSerial.println("-- LOOP");
// Prepare payload of 1 byte to indicate LED status
byte payload[1];
payload[0] = (digitalRead(LED_BUILTIN) == HIGH) ? 1 : 0;
// Send it off
ttn.sendBytes(payload, sizeof(payload));
delay(10000);
}
The Arduino Serial Log is
-- STATUS
EUI: XXXXXX
Battery: 3273
AppEUI: XXXXXX
DevEUI: XXXXXX
Data Rate: 0
RX Delay 1: 1000
RX Delay 2: 2000
-- JOIN
Model: RN2483
Version: 1.0.3
Sending: mac set deveui XXXXXX
Sending: mac set adr off
Sending: mac set deveui XXXXXX
Sending: mac set appeui XXXXXX
Sending: mac set appkey XXXXXX
Sending: mac save
Sending: mac set rx2 3 869525000
Sending: mac set ch drrange 1 0 6
Sending: mac set ch dcycle 0 299
Sending: mac set ch dcycle 1 299
Sending: mac set ch dcycle 2 299
Sending: mac set ch freq 3 867100000
Sending: mac set ch drrange 3 0 5
Sending: mac set ch dcycle 3 499
Sending: mac set ch status 3 on
Sending: mac set ch freq 4 867300000
Sending: mac set ch drrange 4 0 5
Sending: mac set ch dcycle 4 499
Sending: mac set ch status 4 on
Sending: mac set ch freq 5 867500000
Sending: mac set ch drrange 5 0 5
Sending: mac set ch dcycle 5 499
Sending: mac set ch status 5 on
Sending: mac set ch freq 6 867700000
Sending: mac set ch drrange 6 0 5
Sending: mac set ch dcycle 6 499
Sending: mac set ch status 6 on
Sending: mac set ch freq 7 867900000
Sending: mac set ch drrange 7 0 5
Sending: mac set ch dcycle 7 499
Sending: mac set ch status 7 on
Sending: mac set pwridx 1
Sending: mac set retx 7
Sending: mac set dr 5
Sending: mac join otaa
Join not accepted: denied
Check your coverage, keys and backend status.
Sending: mac join otaa
Join not accepted: denied
Check your coverage, keys and backend status.
Sending: mac join otaa
Join not accepted: denied
Check your coverage, keys and backend status.
Sending: mac join otaa
Response is not OK: no_free_ch
Send join command failed
Sending: mac join otaa
Response is not OK: no_free_ch
Send join command failed
Sending: mac join otaa
Response is not OK: no_free_ch
Send join command failed
Sending: mac join otaa
Response is not OK: no_free_ch
Send join command failed
This is the Gateway Log
MQTT: Sending status packet
MQTT: Sending status succeeded: 44
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
LGMD:LORA: Accepted packet
MQTT: Sending UPLINK OK
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MQTT: Sending status packet
MQTT: Sending status succeeded: 45
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
LGMD:Rejected packet (0x11)
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MQTT: Sending status packet
MQTT: Sending status succeeded: 46
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MQTT: Sending status packet
MQTT: Sending status succeeded: 47
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
LORA: Kick LoRa module with ACK after not acked it for 60s
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MQTT: Sending status packet
MQTT: Sending status succeeded: 48
LGMD:LORA: Accepted packet
MQTT: Sending UPLINK OK
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
LGMD:LORA: Accepted packet
MQTT: Sending UPLINK OK
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MQTT: Sending status packet
MQTT: Sending status succeeded: 49
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
LGMD:LORA: Accepted packet
MQTT: Sending UPLINK OK
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
LGMD:Rejected packet (0x11)
LGMD:Rejected packet (0x11)
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
LGMD:LORA: Accepted packet
MQTT: Sending UPLINK OK
MQTT: Sending status packet
MQTT: Sending status succeeded: 50
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
LGMD:LORA: Accepted packet
MQTT: Sending UPLINK OK
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
LGMD:Rejected packet (0x11)
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
LGMD:LORA: Accepted packet
MQTT: Sending UPLINK OK
MQTT: Sending status packet
MQTT: Sending status succeeded: 51
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MQTT: Sending status packet
MQTT: Sending status succeeded: 52
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
LORA: Kick LoRa module with ACK after not acked it for 60s
MQTT: Sending status packet
MQTT: Sending status succeeded: 53
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MQTT: Sending status packet
MQTT: Sending status succeeded: 54
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
LGMD:Rejected packet (0x11)
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MQTT: Sending status packet
MQTT: Sending status succeeded: 55
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MQTT: Sending status packet
MQTT: Sending status succeeded: 56
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
LORA: Kick LoRa module with ACK after not acked it for 60s
LGMD:LORA: Accepted packet
MQTT: Sending UPLINK OK
LGMD:Rejected packet (0x11)
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MQTT: Sending status packet
MQTT: Sending status succeeded: 57
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
LGMD:LORA: Accepted packet
MQTT: Sending UPLINK OK
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
SNTP: State change from 7 to 1
SNTP: State change from 1 to 2
SNTP: State change from 2 to 3
SNTP: State change from 3 to 4
SNTP: State change from 4 to 5
SNTP: State change from 5 to 6
SNTP: State change from 6 to 7
LGMD:LORA: Accepted packet
MQTT: Sending UPLINK OK
MQTT: Sending status packet
MQTT: Sending status succeeded: 58
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MQTT: Sending status packet
MQTT: Sending status succeeded: 59
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
LGMD:Rejected packet (0x11)
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MQTT: Sending status packet
MQTT: Sending status succeeded: 60
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MQTT: Sending status packet
MQTT: Sending status succeeded: 61
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
LORA: Kick LoRa module with ACK after not acked it for 60s
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MQTT: Sending status packet
MQTT: Sending status succeeded: 62
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MQTT: Sending status packet
MQTT: Sending status succeeded: 63
LGMD:LORA: Accepted packet
MQTT: Sending UPLINK OK
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
LGMD:LORA: Accepted packet
MQTT: Sending UPLINK OK
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MQTT: Sending status packet
MQTT: Sending status succeeded: 64
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
LGMD:Rejected packet (0x11)
LGMD:LORA: Accepted packet
MQTT: Sending UPLINK OK
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MQTT: Sending status packet
MQTT: Sending status succeeded: 65
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
LGMD:Rejected packet (0x11)
MQTT: Sending status packet
MQTT: Sending status succeeded: 66
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MQTT: Sending status packet
MQTT: Sending status succeeded: 67
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
LGMD:Rejected packet (0x11)
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MQTT: Sending status packet
MQTT: Sending status succeeded: 68
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
LGMD:Rejected packet (0x11)
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
MQTT: Sending status packet
MQTT: Sending status succeeded: 69
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB
LGMD:LORA: Accepted packet
MQTT: Sending UPLINK OK
MON: SYS Stack size: 2845
MON: TCPIP Stack size: 3743
MON: APP Stack size: 3292
MON: LoRa Stack size: 3877
MON: heap usage: 284KB (287KB), free: 55KB