TTGO T3 v1.6.2 aka "V2.1.6" - Downlink not working (using v4.0.0) [SOLVED!]

I’ve now spent about 3 working days in debugging the issue. I try to get the downlink working using Arduino-LMIC v4.0.0 on my TTGO T3 v1.6.2 module. I’ve already read some related postings here… and double checked the pin numbers. The official board schematics can be found at ESP32-Paxcounter/T3_V1.6.pdf at master · LilyGO/ESP32-Paxcounter · GitHub – I measured the pins using a Ohmmeter… they are connected as stated in the document:

RST = 23, NSS = 18, SCK = 5, MOSI = 27, MISO = 19, DIO0 = 26, DIO1 = 33 (via 22 ohm resistor), DIO2 = 32 (via 22 ohm resistor). The microcontroller is a ESP32-PICO-D4 - so all pins should be interrupt capable. The LORA-module is shielded and labeled “TTGO // 868/915 MHz // Modle: LORA32”, which seems to be SX1276 based or at least compatible.

I adapted the TTN-ABP-Example and used the following pin map definition:

#define PIN_SPI_SS    18 // ESP32 GPIO18 (Pin18) -- HPD13A NSS/SEL (Pin4) SPI Chip Select Input
#define PIN_SPI_MOSI  27 // ESP32 GPIO27 (Pin27) -- HPD13A MOSI/DSI (Pin6) SPI Data Input
#define PIN_SPI_MISO  19 // ESP32 GPIO19 (Pin19) -- HPD13A MISO/DSO (Pin7) SPI Data Output
#define PIN_SPI_SCK   5  // ESP32 GPIO5 (Pin5)   -- HPD13A SCK (Pin5) SPI Clock Input

#define RST   23 // connected to ESP32 RST/EN
#define DIO0  26 // ESP32 GPIO26 wired on PCB to HPD13A
#define DIO1  33 // HPDIO1 on pcb, needs to be wired external to GPIO33
#define DIO2  32 // HPDIO2 on pcb, needs to be wired external to GPIO32 (not necessary for LoRa, only FSK)


const lmic_pinmap lmic_pins = {
    .nss = PIN_SPI_SS,
    .rxtx = LMIC_UNUSED_PIN,
    .rst = RST,
    .dio = {DIO0, DIO1, DIO2},
    .rxtx_rx_active = 0,
    .rssi_cal = 10,
    .spi_freq = 8000000
};

I’m in europe and hence used this lmic_project_config.h:

#define CFG_eu868 1
#define CFG_sx1276_radio 1
#define LMIC_USE_INTERRUPTS 1

I commented out LMIC_DEBUG_LEVEL, since this posting said it could cause timing issues … and hence problems with the downlink. I successfully used a different Lora library (GitHub - sandeepmistry/arduino-LoRa: An Arduino library for sending and receiving data using LoRa radi) to check reception, which works. I set the module to continuous RX @ 868100000 Hz and received multiple packets. Don’t know how much traffic is nearby.

Using the Arduino LMIC library I’m quite steadily reaching a gateway (about 7.5 km away, 176m higher on a hill) using SF9. According to the TTN console the gateway reports SNRs between 2 and -12, so even some SF7 packets get through. Hence, I expect to be near enough to receive the confirmation in the RX1 window. I set the “confirm” parameter to 1 in the LMIC_setTxData2()-call, to get an ACK back. However, the module just tries to send the frame multiple times with increased spread factors… until it seems to give up.

08:55:37.642 -> 3469258: EV_TXSTART
08:55:37.690 -> Packet queued Successfully!    <<<--- modified this output (checks return value of LMIC_setTxData2)
08:57:33.153 -> 3584763: EV_TXSTART
08:59:28.685 -> 3700268: EV_TXSTART
09:01:24.155 -> 3815773: EV_TXSTART
09:03:19.661 -> 3931279: EV_TXSTART
09:05:15.200 -> 4046784: EV_TXSTART
09:07:10.688 -> 4162289: EV_TXSTART
09:09:06.180 -> 4277794: EV_TXSTART
09:09:09.391 -> 4280977: EV_TXCOMPLETE (includes waiting for RX windows)

I also tried LMIC_setClockError(MAX_CLOCK_ERROR * 20 / 100); – but no luck… there should be a “Received ack” message, according to the example code … but I never get one.

Since I do not own any second Lora Device nor any gateway, I’m now running out of ideas what to check. I already went nearby (~150 to 200 m) the working TTN gateway. But, either the gateway had issues … or the antenna is quite directed … or the signal strength was too high??? Whatever, I had even trouble to get any uplink data through to TTN. Might also be kind of blocked already for using too much air time, because of the testing needed. Maybe, also the gateway might not respond properly with an ACK due to some compatibility issue… or it just has ACKs disabled somehow.

Any idea what to try next? Where is the code in the library that’s responsible for the RX1-window? I’d like to try setting it up to just “receive” as soon the TX is done for 10 seconds…

Thanks for your support!

Stefan

I’ve just found the posting EV_JOIN_TXCOMPLETE: no JoinAccept - #2 by tmm … which in essence tells that LMIC_setClockError() is clamped to 0.5%. However, I see any crystal in the schematics
of the board - so I believe the ESP32 runs on an internal RC oscillator, which might be quite imprecise.

Found the hint about the compliance-script (compliance-otaa-halconfig.ino). I had a hard time to get it compiling… patched in the pin config into hal/getpinmap_ttgo_lora32_v1.cpp and inserted a “#define ARDUINO_TTGO_LoRa32_V1” in this file too (else I got a linker error) and also in hal\getpinmap_thisboard.cpp… adding the define to “lmic_project_config.h” did not work for some reason… Where do you usually define which board is to be used? Or is this a constant that usually comes from the Arduino IDE (selected board in menu?)

Here the results of the compliance test:

12:16:33.661 -> 
12:16:33.661 -> ------------------------------------------------------------------------------
12:16:33.661 -> compliance-otaa-halconfig.ino
12:16:33.661 -> Version 3.0.99.10
12:16:33.708 -> LMIC version 4.0.0 configured for region 1.
12:16:33.708 -> Remember to select 'Line Ending: Newline' at the bottom of the monitor window.
12:16:33.708 -> ------------------------------------------------------------------------------
12:16:33.708 -> 
12:16:33.708 -> calibration not supported
12:16:33.708 -> Packet queued
12:16:33.708 -> 316712 (5067 ms): EV_JOINING
12:16:41.667 -> 421559 (6744 ms): EV_TXSTART: ch=2 rps=0x01 (SF7 BW125 CR 4/5 Crc IH=0), datarate=5, opmode=88C, txend=422168, avail=0
12:16:41.667 -> 737199 (11795 ms): EV_RXSTART: freq=868.5 rps=0x81 (SF7 BW125 CR 4/5 NoCrc IH=0), datarate=5, opmode=88C, txend=425449, avail=0, rxtime=737824, rxsyms=8
12:16:41.709 -> 799699 (12795 ms): EV_RXSTART: freq=869.5 rps=0x86 (SF12 BW125 CR 4/5 NoCrc IH=0), datarate=5, opmode=88C, txend=425449, avail=0, rxtime=800324, rxsyms=7
12:16:41.709 -> 814686 (13034 ms): EV_JOIN_TXCOMPLETE, saveIrqFlags 0x80, nLateRx=0 ticks=0
12:17:50.584 -> 4727735 (75643 ms): EV_TXSTART: ch=1 rps=0x01 (SF7 BW125 CR 4/5 Crc IH=0), datarate=5, opmode=88C, txend=4728349, avail=0
12:17:50.584 -> 5043372 (80693 ms): EV_RXSTART: freq=868.3 rps=0x81 (SF7 BW125 CR 4/5 NoCrc IH=0), datarate=5, opmode=88C, txend=4731622, avail=0, rxtime=5043997, rxsyms=8
12:17:50.584 -> 5105872 (81693 ms): EV_RXSTART: freq=869.5 rps=0x86 (SF12 BW125 CR 4/5 NoCrc IH=0), datarate=5, opmode=88C, txend=4731622, avail=0, rxtime=5106497, rxsyms=7
12:17:50.630 -> 5120859 (81933 ms): EV_JOIN_TXCOMPLETE, saveIrqFlags 0x80, nLateRx=0 ticks=0
12:19:00.788 -> 9116329 (145861 ms): EV_TXSTART: ch=0 rps=0x01 (SF7 BW125 CR 4/5 Crc IH=0), datarate=5, opmode=88C, txend=9116943, avail=0
12:19:00.788 -> 9431966 (150911 ms): EV_RXSTART: freq=868.1 rps=0x81 (SF7 BW125 CR 4/5 NoCrc IH=0), datarate=5, opmode=88C, txend=9120216, avail=0, rxtime=9432591, rxsyms=8
12:19:00.788 -> 9494466 (151911 ms): EV_RXSTART: freq=869.5 rps=0x86 (SF12 BW125 CR 4/5 NoCrc IH=0), datarate=5, opmode=88C, txend=9120216, avail=0, rxtime=9495091, rxsyms=7
12:19:00.840 -> 9509453 (152151 ms): EV_JOIN_TXCOMPLETE, saveIrqFlags 0x80, nLateRx=0 ticks=0
12:20:14.474 -> 13719478 (219511 ms): EV_TXSTART: ch=2 rps=0x02 (SF8 BW125 CR 4/5 Crc IH=0), datarate=4, opmode=88C, txend=13720092, avail=0
12:20:14.523 -> 14038331 (224613 ms): EV_RXSTART: freq=868.5 rps=0x82 (SF8 BW125 CR 4/5 NoCrc IH=0), datarate=4, opmode=88C, txend=13726581, avail=0, rxtime=14038956, rxsyms=7
12:20:14.523 -> 14100831 (225613 ms): EV_RXSTART: freq=869.5 rps=0x86 (SF12 BW125 CR 4/5 NoCrc IH=0), datarate=4, opmode=88C, txend=13726581, avail=0, rxtime=14101456, rxsyms=7
12:20:14.523 -> 14115817 (225853 ms): EV_JOIN_TXCOMPLETE, saveIrqFlags 0x80, nLateRx=0 ticks=0
12:22:20.670 -> 21606250 (345700 ms): EV_TXSTART: ch=0 rps=0x02 (SF8 BW125 CR 4/5 Crc IH=0), datarate=4, opmode=88C, txend=21606863, avail=0
12:22:20.670 -> 21925102 (350801 ms): EV_RXSTART: freq=868.1 rps=0x82 (SF8 BW125 CR 4/5 NoCrc IH=0), datarate=4, opmode=88C, txend=21613352, avail=0, rxtime=21925727, rxsyms=7
12:22:20.718 -> 21987602 (351801 ms): EV_RXSTART: freq=869.5 rps=0x86 (SF12 BW125 CR 4/5 NoCrc IH=0), datarate=4, opmode=88C, txend=21613352, avail=0, rxtime=21988227, rxsyms=7
12:22:20.718 -> 22002588 (352041 ms): EV_JOIN_TXCOMPLETE, saveIrqFlags 0x80, nLateRx=0 ticks=0
12:24:22.440 -> 29215954 (467455 ms): EV_TXSTART: ch=1 rps=0x02 (SF8 BW125 CR 4/5 Crc IH=0), datarate=4, opmode=88C, txend=29216568, avail=0
12:24:22.440 -> 29534807 (472556 ms): EV_RXSTART: freq=868.3 rps=0x82 (SF8 BW125 CR 4/5 NoCrc IH=0), datarate=4, opmode=88C, txend=29223057, avail=0, rxtime=29535432, rxsyms=7
12:24:22.440 -> 29597307 (473556 ms): EV_RXSTART: freq=869.5 rps=0x86 (SF12 BW125 CR 4/5 NoCrc IH=0), datarate=4, opmode=88C, txend=29223057, avail=0, rxtime=29597932, rxsyms=7
12:24:22.488 -> 29612294 (473796 ms): EV_JOIN_TXCOMPLETE, saveIrqFlags 0x80, nLateRx=0 ticks=0
12:26:22.719 -> 36728961 (587663 ms): EV_TXSTART: ch=0 rps=0x03 (SF9 BW125 CR 4/5 Crc IH=0), datarate=3, opmode=88C, txend=36729575, avail=0
12:26:22.719 -> 37053606 (592857 ms): EV_RXSTART: freq=868.1 rps=0x83 (SF9 BW125 CR 4/5 NoCrc IH=0), datarate=3, opmode=88C, txend=36741856, avail=0, rxtime=37054231, rxsyms=7
12:26:22.767 -> 37116106 (593857 ms): EV_RXSTART: freq=869.5 rps=0x86 (SF12 BW125 CR 4/5 NoCrc IH=0), datarate=3, opmode=88C, txend=36741856, avail=0, rxtime=37116731, rxsyms=7
12:26:22.767 -> 37131092 (594097 ms): EV_JOIN_TXCOMPLETE, saveIrqFlags 0x80, nLateRx=0 ticks=0
12:30:19.349 -> 51518013 (824288 ms): EV_TXSTART: ch=1 rps=0x03 (SF9 BW125 CR 4/5 Crc IH=0), datarate=3, opmode=88C, txend=51518627, avail=0
12:30:19.349 -> 51842658 (829482 ms): EV_RXSTART: freq=868.3 rps=0x83 (SF9 BW125 CR 4/5 NoCrc IH=0), datarate=3, opmode=88C, txend=51530908, avail=0, rxtime=51843283, rxsyms=7
12:30:19.397 -> 51905158 (830482 ms): EV_RXSTART: freq=869.5 rps=0x86 (SF12 BW125 CR 4/5 NoCrc IH=0), datarate=3, opmode=88C, txend=51530908, avail=0, rxtime=51905783, rxsyms=7
12:30:19.397 -> 51920144 (830722 ms): EV_JOIN_TXCOMPLETE, saveIrqFlags 0x80, nLateRx=0 ticks=0
12:34:18.262 -> 66449582 (1063193 ms): EV_TXSTART: ch=2 rps=0x03 (SF9 BW125 CR 4/5 Crc IH=0), datarate=3, opmode=88C, txend=66450196, avail=0
12:34:18.262 -> 66774227 (1068387 ms): EV_RXSTART: freq=868.5 rps=0x83 (SF9 BW125 CR 4/5 NoCrc IH=0), datarate=3, opmode=88C, txend=66462477, avail=0, rxtime=66774852, rxsyms=7
12:34:18.310 -> 66836727 (1069387 ms): EV_RXSTART: freq=869.5 rps=0x86 (SF12 BW125 CR 4/5 NoCrc IH=0), datarate=3, opmode=88C, txend=66462477, avail=0, rxtime=66837352, rxsyms=7
12:34:18.310 -> 66851713 (1069627 ms): EV_JOIN_TXCOMPLETE, saveIrqFlags 0x80, nLateRx=0 ticks=0
12:38:44.095 -> 83054912 (1328878 ms): EV_TXSTART: ch=1 rps=0x04 (SF10 BW125 CR 4/5 Crc IH=0), datarate=2, opmode=88C, txend=83055526, avail=0
12:38:44.142 -> 83389861 (1334237 ms): EV_RXSTART: freq=868.3 rps=0x84 (SF10 BW125 CR 4/5 NoCrc IH=0), datarate=2, opmode=88C, txend=83078111, avail=0, rxtime=83390486, rxsyms=7
12:38:44.142 -> 83452361 (1335237 ms): EV_RXSTART: freq=869.5 rps=0x86 (SF12 BW125 CR 4/5 NoCrc IH=0), datarate=2, opmode=88C, txend=83078111, avail=0, rxtime=83452986, rxsyms=7
12:38:44.142 -> 83467347 (1335477 ms): EV_JOIN_TXCOMPLETE, saveIrqFlags 0x80, nLateRx=0 ticks=0
12:45:27.535 -> 108267731 (1732283 ms): EV_TXSTART: ch=0 rps=0x04 (SF10 BW125 CR 4/5 Crc IH=0), datarate=2, opmode=88C, txend=108268345, avail=0
12:45:27.535 -> 108602680 (1737642 ms): EV_RXSTART: freq=868.1 rps=0x84 (SF10 BW125 CR 4/5 NoCrc IH=0), datarate=2, opmode=88C, txend=108290930, avail=0, rxtime=108603305, rxsyms=7
12:45:27.535 -> 108665180 (1738642 ms): EV_RXSTART: freq=869.5 rps=0x86 (SF12 BW125 CR 4/5 NoCrc IH=0), datarate=2, opmode=88C, txend=108290930, avail=0, rxtime=108665805, rxsyms=7
12:45:27.535 -> 108680166 (1738882 ms): EV_JOIN_TXCOMPLETE, saveIrqFlags 0x80, nLateRx=0 ticks=0
12:52:31.832 -> 134788081 (2156609 ms): EV_TXSTART: ch=2 rps=0x04 (SF10 BW125 CR 4/5 Crc IH=0), datarate=2, opmode=88C, txend=134788695, avail=0
12:52:31.832 -> 135123030 (2161968 ms): EV_RXSTART: freq=868.5 rps=0x84 (SF10 BW125 CR 4/5 NoCrc IH=0), datarate=2, opmode=88C, txend=134811280, avail=0, rxtime=135123655, rxsyms=7
12:52:31.882 -> 135185530 (2162968 ms): EV_RXSTART: freq=869.5 rps=0x86 (SF12 BW125 CR 4/5 NoCrc IH=0), datarate=2, opmode=88C, txend=134811280, avail=0, rxtime=135186155, rxsyms=7
12:52:31.882 -> 135200516 (2163208 ms): EV_JOIN_TXCOMPLETE, saveIrqFlags 0x80, nLateRx=0 ticks=0
12:58:46.167 -> 158153812 (2530460 ms): EV_TXSTART: ch=0 rps=0x05 (SF11 BW125 CR 4/5 Crc IH=0), datarate=1, opmode=88C, txend=158154426, avail=0
12:58:46.167 -> 158517049 (2536272 ms): EV_RXSTART: freq=868.1 rps=0x85 (SF11 BW125 CR 4/5 NoCrc IH=0), datarate=1, opmode=88C, txend=158205299, avail=0, rxtime=158517674, rxsyms=7
12:58:46.167 -> 158579549 (2537272 ms): EV_RXSTART: freq=869.5 rps=0x86 (SF12 BW125 CR 4/5 NoCrc IH=0), datarate=1, opmode=88C, txend=158205299, avail=0, rxtime=158580174, rxsyms=7
12:58:46.167 -> 158594536 (2537512 ms): EV_JOIN_TXCOMPLETE, saveIrqFlags 0x80, nLateRx=0 ticks=0
13:13:45.159 -> 214341745 (3429467 ms): EV_TXSTART: ch=2 rps=0x05 (SF11 BW125 CR 4/5 Crc IH=0), datarate=1, opmode=88C, txend=214342358, avail=0
13:13:45.159 -> 214704981 (3435279 ms): EV_RXSTART: freq=868.5 rps=0x85 (SF11 BW125 CR 4/5 NoCrc IH=0), datarate=1, opmode=88C, txend=214393231, avail=0, rxtime=214705606, rxsyms=7
13:13:45.159 -> 214767481 (3436279 ms): EV_RXSTART: freq=869.5 rps=0x86 (SF12 BW125 CR 4/5 NoCrc IH=0), datarate=1, opmode=88C, txend=214393231, avail=0, rxtime=214768106, rxsyms=7
13:13:45.206 -> 214782467 (3436519 ms): EV_JOIN_TXCOMPLETE, saveIrqFlags 0x80, nLateRx=0 ticks=0
13:28:58.944 -> 271452855 (4343245 ms): EV_TXSTART: ch=1 rps=0x05 (SF11 BW125 CR 4/5 Crc IH=0), datarate=1, opmode=88C, txend=271453469, avail=0
13:28:58.944 -> 271816092 (4349057 ms): EV_RXSTART: freq=868.3 rps=0x85 (SF11 BW125 CR 4/5 NoCrc IH=0), datarate=1, opmode=88C, txend=271504342, avail=0, rxtime=271816717, rxsyms=7
13:28:58.944 -> 271878592 (4350057 ms): EV_RXSTART: freq=869.5 rps=0x86 (SF12 BW125 CR 4/5 NoCrc IH=0), datarate=1, opmode=88C, txend=271504342, avail=0, rxtime=271879217, rxsyms=7
13:28:58.944 -> 271893579 (4350297 ms): EV_JOIN_TXCOMPLETE, saveIrqFlags 0x80, nLateRx=0 ticks=0
13:46:26.446 -> 336881463 (5390103 ms): EV_TXSTART: ch=0 rps=0x06 (SF12 BW125 CR 4/5 Crc IH=0), datarate=0, opmode=88C, txend=336882077, avail=0
13:46:26.446 -> 337285916 (5396574 ms): EV_RXSTART: freq=868.1 rps=0x86 (SF12 BW125 CR 4/5 NoCrc IH=0), datarate=0, opmode=88C, txend=336974166, avail=0, rxtime=337286541, rxsyms=7
13:46:26.446 -> 337348416 (5397574 ms): EV_RXSTART: freq=869.5 rps=0x86 (SF12 BW125 CR 4/5 NoCrc IH=0), datarate=0, opmode=88C, txend=336974166, avail=0, rxtime=337349041, rxsyms=7
13:46:26.494 -> 337363403 (5397814 ms): EV_JOIN_TXCOMPLETE, saveIrqFlags 0x80, nLateRx=0 ticks=0
14:12:01.495 -> 432820921 (6925134 ms): EV_TXSTART: ch=1 rps=0x06 (SF12 BW125 CR 4/5 Crc IH=0), datarate=0, opmode=88C, txend=432821534, avail=0
14:12:01.495 -> 433225373 (6931605 ms): EV_RXSTART: freq=868.3 rps=0x86 (SF12 BW125 CR 4/5 NoCrc IH=0), datarate=0, opmode=88C, txend=432913623, avail=0, rxtime=433225998, rxsyms=7
14:12:01.495 -> 433287873 (6932605 ms): EV_RXSTART: freq=869.5 rps=0x86 (SF12 BW125 CR 4/5 NoCrc IH=0), datarate=0, opmode=88C, txend=432913623, avail=0, rxtime=433288498, rxsyms=7
14:12:01.495 -> 433302860 (6932845 ms): EV_JOIN_TXCOMPLETE, saveIrqFlags 0x80, nLateRx=0 ticks=0
14:40:18.476 -> 538883236 (8622131 ms): EV_TXSTART: ch=2 rps=0x06 (SF12 BW125 CR 4/5 Crc IH=0), datarate=0, opmode=88C, txend=538883849, avail=0
14:40:18.476 -> 539287688 (8628603 ms): EV_RXSTART: freq=868.5 rps=0x86 (SF12 BW125 CR 4/5 NoCrc IH=0), datarate=0, opmode=88C, txend=538975938, avail=0, rxtime=539288313, rxsyms=7
14:40:18.476 -> 539350188 (8629603 ms): EV_RXSTART: freq=869.5 rps=0x86 (SF12 BW125 CR 4/5 NoCrc IH=0), datarate=0, opmode=88C, txend=538975938, avail=0, rxtime=539350813, rxsyms=7
14:40:18.523 -> 539365175 (8629842 ms): EV_JOIN_TXCOMPLETE, saveIrqFlags 0x80, nLateRx=0 ticks=0
14:40:18.523 -> 539365179 (8629842 ms): EV_JOIN_FAILED: freq=869.5 rps=0x86 (SF12 BW125 CR 4/5 NoCrc IH=0), opmode=C
15:08:38.515 -> 645138173 (10322210 ms): EV_TXSTART: ch=1 rps=0x06 (SF12 BW125 CR 4/5 Crc IH=0), datarate=0, opmode=88C, txend=645138787, avail=0
15:08:38.561 -> 645542626 (10328682 ms): EV_RXSTART: freq=868.3 rps=0x86 (SF12 BW125 CR 4/5 NoCrc IH=0), datarate=0, opmode=88C, txend=645230876, avail=0, rxtime=645543251, rxsyms=7
15:08:38.561 -> 645605126 (10329682 ms): EV_RXSTART: freq=869.5 rps=0x86 (SF12 BW125 CR 4/5 NoCrc IH=0), datarate=0, opmode=88C, txend=645230876, avail=0, rxtime=645605751, rxsyms=7
15:08:38.561 -> 645620112 (10329921 ms): EV_JOIN_TXCOMPLETE, saveIrqFlags 0x80, nLateRx=0 ticks=0

Seems to have issues receiving Downlink either…

FINALLY! It’s working with OTAA! …reading things carefully can safe lot’s of work hours:

// This EUI must be in little-endian format, so least-significant-byte
// first. When copying an EUI from ttnctl output, this means to reverse
// the bytes. For TTN issued EUIs the last bytes should be 0xD5, 0xB3,
// 0x70.

Unfortunately, this is DIFFERENT from how you have to copy the NWKSKEY, APPSKEY … and keys in general. So when you had read the comments for ABP first, you kind of THINK you don’t need to read stuff carefully… and just ignore the “LSB”-Order needed for the EUIs… I actually even read this and thought “No, that must be wrong… All the other stuff was msb and I could copy it from the TTN console; why should one not stick to one byte order in the same library!” especially when reading the hint with the LAST 3 Bytes when generated EUIs from TTN are used.

Hope people with the same problem will find this solution… at least the pinmap should be confirmed now and is useful for others.

Note that I added “#define LMIC_ENABLE_arbitrary_clock_error” to the project-config file and used LMIC_setClockError(MAX_CLOCK_ERROR * 1/100); to allow for a maximum clock error of 1%. I estimated the clock speed to be roughly 0.343% faster than it should be from the log files. Limiting it to 0.4% or 0.5% might be a too small margin for error… especially, for outdoor applications if temperatures might get much higher or lower than indoors… and could cause the oscillator to deviate even more.

Thanks for providing and supporting the library!
Looking forward to use it for some cool projects now! :metal:

PS: Note that the above mentioned compliance-script will NOT join the network. I thought this was some compliance test directly supported by TTN / LORAAlliance… with some “magic” APPEUI, DEVEUI and APPKEY. But, it’s not… it’s for testing with a special compliance test device (RWC5020A)!!!

Hence, even thought you can use it to debug stuff… you would at least need to fill the correct EUIs and APPKEY.

ALSO! I did choose a random APPKEY when creating the device this time… Last times I used the “fill all zeroes”-Button and had an all 0x00-values key afterwards. This might also cause some trouble (as I read elsewhere). But, I don’t know if I officially need to apply for that APPKEY-number-space… since TTN tells me to look it up or ask the manufacturer. Hence, this “I choose my own” might cause collisions somewhere. If you know more about this… please leave a comment! Thx!

Handy overview: