MKRWAN 1310 Wont join network

Hi, I am trying to get an MKRWAN 1310 to join the things netwrok (V3). I have tried many things, starting with the usual examples in the arduino library MKRWAN_v2. The problem I have is that I see a message on my gateway, but instead of a Join Request it looks like an uplink, and the gateway does not seem to resond. The line in the gateway debug looks like this:

Here is my code, adapted from the examples:

if (!modem.begin((_lora_band)EU868)) {
    Serial.println("Failed to start module");
    while (1) {}
};

Serial.print("Your module version is: ");
Serial.println(modem.version());

Serial.print("Your device EUI is: ");
Serial.println(modem.deviceEUI());

int connected;

devAddr = "a8610a3434387a19";                       // From the murata chip

appKey = "36F2A12C64D6C157BC01CB1B5FA3DD82";        // From the things network
appEui = "0000000000000000";

// 36F2A12C64D6C157                                 // Join ID - from traffic on TTN

Serial.println("Connect with: AppEUI = `" + appEui + "` appKey = `" + appKey + "` DevAddr  =`"+devAddr+"`");

connected = modem.joinOTAA(appEui, appKey, devAddr);

if (!connected)
{
    Serial.println("Something went wrong; are you indoor? Move near a window and retry");
    while (1) {}
}

Can ayone see what I am doing wrong, I cant’t help thinking it must be simple, but cant seem to get a handle on it!

Quick reply via phone: did a topic last week on MKR WAN you may want to review

?

devAddr?

(What is DevEUI?) (per Displayed GW uplink message)

If attempting OTAA join the Addr is normally asigned after the join is accepted and is LNS specific (most usually 26 xx xx xx or similar for TTN).

That’s the Join Request - as a message from the device to the LNS, that’s an uplink. The gateway will never respond but it may be asked to transmit the Join Accept. We don’t refer to the console as debug at that level - it’s more informational.

Unfortunately adapted such that the internal DevEUI is being transcribed, as per Jeff, in to something that won’t fit or work (too big, you don’t allocate it for an OTAA join) And it’s not a parameter for the JoinOTAA, you a pushing a bogus devAddr in to the optional DevEUI parameter. And the Join uplink shows something completely different from your code. What is the Join ID and where did you find it?

If you could reflect on the information in the previous thread, particularly with regard to the beta nature of v2, hopefully a clean slate will help, particularly as I did check that the original v1 was working just fine.

Thanks very much guys ! - I was of course mixing things up in my code, not like me, but the frustration was probably the cause of my not thinking straight :slight_smile: Anyway - the final solution lay in the comment that the ‘v2’ version is in fact a beta version. That detail had escaped my notice. The original version of MKRWAN works fine - I hadn’t tried it yet, assuming that I should get the V2 version as being a newer update. Once again thanks very much !

1 Like