Arduino MKR WAN 1310 Join OTAA Timeout

Problem: Gateway sees Join-Request from newbie’s simple Arduino sketch using the MKRWAN library, but the expected Join-Accept is nowhere to be found.

  • DevEUI: a8610a34362d7b16 (created using Arduino Cloud)
  • AppEUI: 35b0134106b86bce (also created using Arduino Cloud)
  • Gateway: Browan MiniHub Pro (located about 8 meters away from device)
  • Modem firmware: ARD-078 1.2.3

The gateway receives the Join Request in an Uplink Message (attached) where the modem seems to insert random values for the nonce; they are not sequentially incremented as LoRaWan spec 1507 implies — I’m not sure if this is an issue. I’ve also attached screenshots of the Arduino Cloud Device, TTN Application, and Sketch.

My Question: Does anyone have recommendations for debugging this (if the Join-Request is well formed, how do I determine what goes wrong in the cloud)?


Redacted

Redacted

Welcome.

First, search the forum for join request not accepted as this is a common one. And then what happens to the GATEWYA and the DVWEICE when they shout at each other - the signals get a bit scrambled as they overload each others input circuits - LoRa = Long Range. 5m and wall, 20m better.

We don’t do attachments as we all then download stuff that has to be checked - you can repost the information inline to the message, formatted using the </> tool please.

I’m not a user of the Arduino app website so I’m not at all sure how that figures in the mix - is it just a web hook end point? And have you created an application & registered the device on TTN which is absolutely required and may explain why you aren’t seeing any join accept as LoRaWAN lives on the internet but isn’t a network of other people servers all connected except when it’s Packet Broker.

Also, which actual version of the MKRWAN library are you using - both “work” but v2 is in permanent beta and requires you to update the Murata module.

TL;DR, Arduino Cloud has no link to TTN - you MUST register your device on TTN. Or register your gateway on Arduino Cloud which we absolutely can’t help with because this forum is for TTN only.

I don’t think I’m overloading the receivers (current separation is 8m and two walls) as I see uplink but no downlink traffic logged by TTN gateway, but it’s easy to move the Browan gateway; I’ll try it.

The Arduino Cloud (AC) creates a device in TTN and I can see it there with the expected EIN, but its “Last Activity” is “never.” Curious. Likewise the AC creates a TTN application and I can see it with the TTN console. I have not learned how the AC does this, but I’ll post screenshots if the forum allows.

I’m using MKRWAN 1.1.0. …and off to investigate some more. :upside_down_face:

Uplink message with Join-Request containing good-to-my-eyes Join and Dev EUIs.

{
  "name": "gs.up.receive",
  "time": "2024-07-22T15:50:50.584606178Z",
  "identifiers": [
    {
      "gateway_ids": {
        "gateway_id": "eui-5813d3fffe1b35f6",
        "eui": "5813D3FFFE1B35F6"
      }
    }
  ],
  "data": {
    "@type": "type.googleapis.com/ttn.lorawan.v3.GatewayUplinkMessage",
    "message": {
      "raw_payload": "AM5ruAZBE7A1FnstNjQKYajRWrAl6q8=",
      "payload": {
        "m_hdr": {},
        "mic": "sCXqrw==",
        "join_request_payload": {
          "join_eui": "35B0134106B86BCE",
          "dev_eui": "A8610A34362D7B16",
          "dev_nonce": "5AD1"
        }
      },
      "settings": {
        "data_rate": {
          "lora": {
            "bandwidth": 500000,
            "spreading_factor": 8,
            "coding_rate": "4/5"
          }
        },
        "frequency": "904600000",
        "timestamp": 2698714434,
        "time": "2024-07-22T15:50:50.495568037Z"
      },
      "rx_metadata": [
        {
          "gateway_ids": {
            "gateway_id": "eui-5813d3fffe1b35f6",
            "eui": "5813D3FFFE1B35F6"
          },
          "time": "2024-07-22T15:50:50.495568037Z",
          "timestamp": 2698714434,
          "rssi": -45,
          "channel_rssi": -45,
          "snr": 10.5,
          "location": {
            "latitude": 45.9170762254361,
            "longitude": -116.063332875997,
            "altitude": 1036,
            "source": "SOURCE_REGISTRY"
          },
          "uplink_token": "CiIKIAoUZXVpLTU4MTNkM2ZmZmUxYjM1ZjYSCFgT0//+GzX2EMK67IYKGgwI2v/5tAYQlYfYlgIg0JOpv8WVEw==",
          "received_at": "2024-07-22T15:50:50.562123047Z"
        }
      ],
      "received_at": "2024-07-22T15:50:50.584450965Z",
      "correlation_ids": [
        "gs:uplink:01J3DJ6VERMEJBKATVV42RJX3D"
      ]
    },
    "band_id": "US_902_928"
  },
  "correlation_ids": [
    "gs:uplink:01J3DJ6VERMEJBKATVV42RJX3D"
  ],
  "origin": "ip-10-22-5-172.us-west-1.compute.internal",
  "context": {
    "tenant-id": "ChNtaWxsLWNyZWVrLXJlc2VhcmNo"
  },
  "visibility": {
    "rights": [
      "RIGHT_GATEWAY_TRAFFIC_READ"
    ]
  },
  "unique_id": "01J3DJ6VERA70MXFJZ1VNMTF8Y"
}

A better view of the Device on TTN:

A few hints about connection between TTN and AC:

Trying to debug too many things and with a ‘man-in-the-middle’ (Adruino Cloud)! Simply register device and GW in TTN , create you own TTN app and put device in it - look at received RSSI to ensure your are in the goldilocks range say -65 → -95dbm (will obviously work outside that range but if too high or too low, and depending on SNR’s, you end up having uncertainties and may be looking at debugging RF issues as well as the ‘logic’ of your device…