MKR1300 + Dragino LG01 Gateway + TTN

  1. forget OTAA with most single channel gateways, including Dragino LG01 (look here), because they do not manage downlinks.

  2. ABP has no real join, so there is no error in using it. The issue is that the basic examples of MKR WAN 1300 send confirmed packets, which again cannot be done with LG01. Change the parameters of err = modem.endPacket(true) from true to false to send without confirmation.
    However, even when sending with confirmation the packet should reach the gateway, but just one every 8 or so, because the gateway is listening to one frequency (and one SF), and the node is sending on at least 3. So, send more than one time and wait until one packet is received.

Of course the SF should be the one set in the gateway ( modem.dataRate(DR) ), but as far as I remember ADR is off by default. Better to have the firmware updated to the last version.

However, if you want to use packets, you need also to create an app, register the node and put its keys in the secret.h tab of the example. In any case the gateway should see any packet sent on its configured frequency even if not correctly associated to an app.