Mikrotik no JoinAccept

Hi all

I made a sensor node using STM32 and LMIC library and i’ve sucessfully send data to TTN using public gateways. Now i moved my sensor to a area covered by a Mikrotik KNOT RL8 gateway. I do not have access to the gateway management, just the gateway console on TTN. When i try to connect my sensor node i always get “EV_JOIN_TXCOMPLETE: no JoinAccept”. I already have on my code

LMIC_setClockError(MAX_CLOCK_ERROR * 3 / 100);

and tested different values (1, 2… up to 10) but no luck. If i move back my node sensor to a area covered by public gateways i can connect successfully, i just cannot connect to RL8 gateway.

At TTN console i can see the JoinRequest on the LR8 gateway, the JoinRequest on my node but it seems it fails receiving it on my sensor. I attach those requests below.
LR8 gateway is about 1000m apart from my sensor with clear view.

Can you please advise?

LR8 gateway

{
  "name": "gs.up.receive",
  "time": "2023-10-05T07:32:38.964284428Z",
  "identifiers": [
    {
      "gateway_ids": {
        "gateway_id": "eui-50313953300c4750",
        "eui": "50313953300C4750"
      }
    }
  ],
  "data": {
    "@type": "type.googleapis.com/ttn.lorawan.v3.GatewayUplinkMessage",
    "message": {
      "raw_payload": "AAEAAAAAAAAADw4G0H7Vs3Dy585j0Hw=",
      "payload": {
        "m_hdr": {},
        "mic": "zmPQfA==",
        "join_request_payload": {
          "join_eui": "0000000000000001",
          "dev_eui": "70B3D57ED0060E0F",
          "dev_nonce": "E7F2"
        }
      },
      "settings": {
        "data_rate": {
          "lora": {
            "bandwidth": 125000,
            "spreading_factor": 7,
            "coding_rate": "4/5"
          }
        },
        "frequency": "868100000",
        "timestamp": 3937357300,
        "time": "2023-10-05T07:32:34.827212Z"
      },
      "rx_metadata": [
        {
          "gateway_ids": {
            "gateway_id": "eui-50313953300c4750",
            "eui": "50313953300C4750"
          },
          "time": "2023-10-05T07:32:34.827212Z",
          "timestamp": 3937357300,
          "rssi": -116,
          "channel_rssi": -116,
          "snr": -8.75,
          "uplink_token": "CiIKIAoUZXVpLTUwMzEzOTUzMzAwYzQ3NTASCFAxOVMwDEdQEPSbvdUOGgwIls35qAYQ8b/cywMgoIKi5svCEA==",
          "received_at": "2023-10-05T07:32:38.919572403Z"
        }
      ],
      "received_at": "2023-10-05T07:32:38.964108273Z",
      "correlation_ids": [
        "gs:uplink:01HBZC1FDMZ6224XPX9PFVQF06"
      ],
      "crc_status": true
    },
    "band_id": "EU_863_870"
  },
  "correlation_ids": [
    "gs:uplink:01HBZC1FDMZ6224XPX9PFVQF06"
  ],
  "origin": "ip-10-100-4-199.eu-west-1.compute.internal",
  "context": {
    "tenant-id": "CgN0dG4="
  },
  "visibility": {
    "rights": [
      "RIGHT_GATEWAY_TRAFFIC_READ"
    ]
  },
  "unique_id": "01HBZC1FDM6B5D25PFGD1MB9A0"
}

Sensor node:

{
  "name": "ns.up.join.process",
  "time": "2023-10-05T07:32:39.170912396Z",
  "identifiers": [
    {
      "device_ids": {
        "device_id": "eui-70b3d57ed0060e0f",
        "application_ids": {
          "application_id": "basenode-0001"
        },
        "dev_eui": "70B3D57ED0060E0F",
        "join_eui": "0000000000000001",
        "dev_addr": "260B32AD"
      }
    }
  ],
  "data": {
    "@type": "type.googleapis.com/ttn.lorawan.v3.UplinkMessage",
    "raw_payload": "AAEAAAAAAAAADw4G0H7Vs3Dy585j0Hw=",
    "payload": {
      "m_hdr": {},
      "mic": "zmPQfA==",
      "join_request_payload": {
        "join_eui": "0000000000000001",
        "dev_eui": "70B3D57ED0060E0F",
        "dev_nonce": "E7F2"
      }
    },
    "settings": {
      "data_rate": {
        "lora": {
          "bandwidth": 125000,
          "spreading_factor": 7,
          "coding_rate": "4/5"
        }
      },
      "frequency": "868100000",
      "timestamp": 3937357300,
      "time": "2023-10-05T07:32:34.827212Z"
    },
    "rx_metadata": [
      {
        "gateway_ids": {
          "gateway_id": "eui-50313953300c4750",
          "eui": "50313953300C4750"
        },
        "time": "2023-10-05T07:32:34.827212Z",
        "timestamp": 3937357300,
        "rssi": -116,
        "channel_rssi": -116,
        "snr": -8.75,
        "uplink_token": "CiIKIAoUZXVpLTUwMzEzOTUzMzAwYzQ3NTASCFAxOVMwDEdQEPSbvdUOGgwIls35qAYQ8b/cywMgoIKi5svCEA==",
        "received_at": "2023-10-05T07:32:38.919572403Z"
      }
    ],
    "received_at": "2023-10-05T07:32:38.964762842Z",
    "correlation_ids": [
      "gs:uplink:01HBZC1FDMZ6224XPX9PFVQF06"
    ],
    "consumed_airtime": "0.061696s"
  },
  "correlation_ids": [
    "gs:uplink:01HBZC1FDMZ6224XPX9PFVQF06"
  ],
  "origin": "ip-10-100-6-18.eu-west-1.compute.internal",
  "context": {
    "tenant-id": "CgN0dG4="
  },
  "visibility": {
    "rights": [
      "RIGHT_APPLICATION_TRAFFIC_READ"
    ]
  },
  "unique_id": "01HBZC1FM23C9F28EXX9N7TWE9"
}

Please format your posts (use the </> option in message creation window or when editing…)

Ops… done!

how is the gateway connected to the internet

what is the latency

most of the join issues i have seen is that the node rx window are already closed when the conformation tx is occurring from the gateway or the rssi is to high your rssi looks good thought

I’ll try to check the gateway connection to internet.
Is it possible to check gateway latency on the TTN console? i read about some cli command but didn’t understand how to execute.

Thanks

you need to use the things stack cli

if i recall correctly it is

ttn-lw-cli.exe gateways get-connection-stats gatewayid

if you look in things stack doc you will see there are exactly how to install the cli and use it

there are a number off things dealing with gateways

Well, some more info:

  1. gateway is connected trough a radio link and then by fiber to the internet;
  2. ping from the gateway is around 50ms, i think is not bad (picture 1)
  3. i see join requests from my device on TTN console but with different DevAddr. My device is 26 0B 32 AD and i see some with 26 0B 71 ED, is this normal (picture 5)?
  4. at gateway console i see joinRequest on SF7, is this ok (picture 4)? At TTN console i use the recommended SF9 for RX2 (picture 3)

Thanks

01_ping
5_aplication


03_device

Join requests do not contain a DevAddr. The reply does and that is the address the device should use from that point onwards until it rejoins and gets a different address.

That is as it should be. The device determines the uplink SF and the network server the reply SF (same as the device in the first return slot or in your case SF9 in the second one).
What I am not seeing in the gateway log is the join-accepts the network server should be sending. However there might be another gateway which the network server thinks should send the reply. Can you show the contents (formatted json please, not a screen shot) of a join request message? It should contain a list of gateways that forwarded the request.

Looking at the gateway log it seems your gateway is connected to a second network server (join accept message with a different device address range), that can cause issues.

Hum… so after a “receive uplink message” of type JoinRequest on the gateway (TTN console), it should send a joinAccept message, right? I do see at TTN console:

  • the JoinRequest arriving on the gateway
  • the accept join-request, successfully processed join-request and forward join-accept message on the device
  • send downlink message on the gateway but only says “TX power: 16.15 Data rate: SF7BW125”

Does it mean the gateway is not sending the joinAccept?

The device is on a remote area with no LoRA coverage beside this gateway.

This is the join request arriving at the gateway:

{
  "name": "gs.up.receive",
  "time": "2023-10-12T09:37:04.687657144Z",
  "identifiers": [
    {
      "gateway_ids": {
        "gateway_id": "eui-50313953300c4750",
        "eui": "50313953300C4750"
      }
    }
  ],
  "data": {
    "@type": "type.googleapis.com/ttn.lorawan.v3.GatewayUplinkMessage",
    "message": {
      "raw_payload": "AAEAAAAAAAAADw4G0H7Vs3C469CyTJs=",
      "payload": {
        "m_hdr": {},
        "mic": "0LJMmw==",
        "join_request_payload": {
          "join_eui": "0000000000000001",
          "dev_eui": "70B3D57ED0060E0F",
          "dev_nonce": "EBB8"
        }
      },
      "settings": {
        "data_rate": {
          "lora": {
            "bandwidth": 125000,
            "spreading_factor": 7,
            "coding_rate": "4/5"
          }
        },
        "frequency": "868300000",
        "timestamp": 870952300,
        "time": "2023-10-12T09:37:04.313022Z"
      },
      "rx_metadata": [
        {
          "gateway_ids": {
            "gateway_id": "eui-50313953300c4750",
            "eui": "50313953300C4750"
          },
          "time": "2023-10-12T09:37:04.313022Z",
          "timestamp": 870952300,
          "rssi": -115,
          "channel_rssi": -115,
          "snr": -8,
          "uplink_token": "CiIKIAoUZXVpLTUwMzEzOTUzMzAwYzQ3NTASCFAxOVMwDEdQEOzapp8DGgwIwPyeqQYQ883nxwIg4Nu1xqzyDA==",
          "channel_index": 1,
          "received_at": "2023-10-12T09:37:04.639609084Z"
        }
      ],
      "received_at": "2023-10-12T09:37:04.687466227Z",
      "correlation_ids": [
        "gs:uplink:01HCHKYB5FHTQMW3V87DFGBN0N"
      ],
      "crc_status": true
    },
    "band_id": "EU_863_870"
  },
  "correlation_ids": [
    "gs:uplink:01HCHKYB5FHTQMW3V87DFGBN0N"
  ],
  "origin": "ip-10-100-4-199.eu-west-1.compute.internal",
  "context": {
    "tenant-id": "CgN0dG4="
  },
  "visibility": {
    "rights": [
      "RIGHT_GATEWAY_TRAFFIC_READ"
    ]
  },
  "unique_id": "01HCHKYB5F6VXCFPJP35PN0E54"
}

2 seconds after the gateway console shows only:

{
  "name": "gs.down.send",
  "time": "2023-10-12T09:37:06.493495277Z",
  "identifiers": [
    {
      "gateway_ids": {
        "gateway_id": "eui-50313953300c4750",
        "eui": "50313953300C4750"
      }
    }
  ],
  "data": {
    "@type": "type.googleapis.com/ttn.lorawan.v3.DownlinkMessage",
    "raw_payload": "IAnX0qC0k+XW6+lRti7WLaFV733DCmJVnV8OlRBlzpsz",
    "scheduled": {
      "data_rate": {
        "lora": {
          "bandwidth": 125000,
          "spreading_factor": 7,
          "coding_rate": "4/5"
        }
      },
      "frequency": "868300000",
      "timestamp": 875952300,
      "downlink": {
        "tx_power": 16.15,
        "invert_polarization": true
      },
      "concentrator_timestamp": "56710527148000"
    },
    "correlation_ids": [
      "gs:uplink:01HCHKYB5FHTQMW3V87DFGBN0N",
      "ns:downlink:01HCHKYCXWMGBA5HQ4ER8CBBW9",
      "ns:transmission:01HCHKYCXWMX51ZBQGFTQHW8WN"
    ]
  },
  "correlation_ids": [
    "gs:uplink:01HCHKYB5FHTQMW3V87DFGBN0N",
    "ns:downlink:01HCHKYCXWMGBA5HQ4ER8CBBW9",
    "ns:transmission:01HCHKYCXWMX51ZBQGFTQHW8WN"
  ],
  "origin": "ip-10-100-4-199.eu-west-1.compute.internal",
  "context": {
    "tenant-id": "CgN0dG4="
  },
  "visibility": {
    "rights": [
      "RIGHT_GATEWAY_TRAFFIC_READ"
    ]
  },
  "unique_id": "01HCHKYCXX51B2J14Z6825GJ72"
}

And i know that my device is on a remote area with no LoRA coverage beside this gateway.

Does the log on the LR8 show data is being transmitted? A join accept should be transmitted 5 seconds after the join request is received on the original frequency and SF or after 6 seconds on the RX2 frequency with SF9.