MKR1300, RAK Wireless RAK7249 Gateway and TTN - newbie

I have added a RAK7249 Gateway on TTN and also added a MKR1300 as a device on TTN. (I also posted this on the RAKWireless forum).

Using the LoraSendAndReceive.ino demo sketch, the RAK7249 log and TTN log show the MKR1300 successfully joining the network, but sketch function join.OTAA returns 0 (meaning the connection failed).

Code snippet:
int connected = modem.joinOTAA(appEui, appKey);
if (!connected) {
Serial.println(“Something went wrong; are you indoor? Move near a window and retry”);
while (1) {}
}

The screenshot shows "Join Request" and then succeeds showing the "Join Accept"

Is anyone experiencing a similar issue?

Is there any way to see detailed debug information on why join.OTAA function is returning 0?

Thanks in advance.

I am using RAK7243 gateway. I was able to connect using WAN1300 using the example for LoraSendandReceive. When typing use bytes, not text strings. try this as an example:

03 67 01 10

This is the equivalent to:

Data Channel Type Value
03 ⇒ 3 67 ⇒ Temperature 0110 = 272 ⇒ 27.2°C

These articles might be a good start.

and this for Cayenne Low Power Payload (LPP) for your application payloads method.

Rak7204 samples