No connection to lorawan by paxcount

I have a Lilygo T3_V1.6.1 2010104 board and wanted to install the latest npaxcounter 3.6.1 with Visal Studio 1.88 and platcormio core v6.1.14. I did everything as in the instructions

This error occurs during the build

.pio/libdeps/usb/MCCI LoRaWAN LMIC library/src/hal/getpinmap_thisboard.cpp: In function ‘const Arduino_LMIC::HalPinmap_t* Arduino_LMIC::GetPinmap_ThisBoard()’:
.pio/libdeps/usb/MCCI LoRaWAN LMIC library/src/hal/getpinmap_thisboard.cpp:71:72: note: #pragma message: Board not supported – use an explicit pinmap
#pragma message(“Board not supported – use an explicit `pinmap”)
^

APPEUI and APP KEY are missing when I transfer it to the lilygo

Can you upload your project in full on Github / Google Drive?

It’s not my project, it’s this one

I did it exactly as in the instructions and configured lorawan that way, but somehow it is not transferred

loraconf.h

static const u1_t DEVEUI[8] = {0x30, 0x83, 0x98, 0xDC, 0xBC, 0x.., 0x.., 0x..};
static const u1_t APPEUI[8] = {0x70, 0xB3, 0xD5, 0x7E, 0xD0, 0x.., 0x.., 0x..};
static const u1_t APPKEY[16] = {0xC9, 0xBF, 0x4F, 0xB1, 0x6D, 0x49, 0xF4, 0x73, 0x2D, 0xB2, 0xAB, 0xDD, 0x.., 0x.., 0x.., 0x..};

but APPEUI & APPKEY missing in TTGO

--- Terminal on COM3 | 115200 8-N-1
--- Available filters and text transformations: colorize, debug, default, direct, esp32_exception_decoder, hexlify, log2file, nocontrol, printable, send_on_enter, time
--- More details at https://bit.ly/pio-monitor-filters
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H
17:36:44.685 > ets J]␋␂�␂201␓��Ғ�:5�C�HH���0� (P�UI=�_RE�␔U�I����0x13�SP�e␅MQ_FL��%=�T)����˥�ͥ�: 1������2,��]A:0x�YC��k_d���0,qߖ��0x00��E��:0x�,csz���i0x0bhdߖ��0x00�␗}��v:0��j
17:36:44.685 > [␋��DIO�␚���k dZ��j
17:36:44.685 > loa����fff���bb���1184C!�+��0�␓���00����i13�&�H�녑�0x4�80��bb�n:3�&j�Y␋�� 0x���e4��I (392) src/sdcard.cpp: looking for SD-card...
17:36:44.685 > E (422) sdmmc_common: sdmmc_init_ocr: send_op_cond (1) returned 0x107
17:36:44.685 > E (422) vfs_fat_sdmmc: sdmmc_card_init failed (0x107).
17:36:44.685 > I (422) src/sdcard.cpp: No SD-card found (263)
17:36:44.685 > I (426) src/configmanager.cpp: Loading device configuration from NVRAM...
17:36:44.685 > I (434) src/configmanager.cpp: Runtime configuration v3.6.1 loaded
17:36:44.685 > D (439) src/reset.cpp: Timezone set to CET-1CEST,M3.4.0/2,M10.4.0/3
17:36:44.685 > I (445) src/main.cpp: Starting paxcounter_dd1fd171 v3.6.1 (runmode=0 / restarts=0)
17:36:44.685 > I (452) src/main.cpp: code build date: 1712507633
17:36:44.685 > I (456) src/main.cpp: This is ESP32 chip with 2 CPU cores, WiFi/BT/BLE, silicon revision 1, 4MB embedded Flash
17:36:44.685 > I (466) src/main.cpp: Internal Total heap 223660, internal Free Heap 195900
17:36:44.685 > I (473) src/main.cpp: ChipRevision 1, Cpu Freq 240, SDK Version v4.4.5
17:36:44.685 > I (479) src/main.cpp: Flash Size 4194304, Flash Speed 40000000
17:36:44.685 > I (485) src/main.cpp: Wifi/BT software coexist version 1.2.0
17:36:44.685 > I (490) src/main.cpp: IBM LMIC version 1.6.1468577746
17:36:44.685 > I (495) src/main.cpp: Arduino LMIC version 4.1.1.0
17:36:44.685 > I (500) src/lorawan.cpp: DevEUI: 308398DCBC38....
17:36:44.685 > I (504) C:/Users/user123/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-i2c.c: Initialising I2C Master: sda=21 scl=22 freq=100000
17:36:44.685 > I (518) src/i2c.cpp: Starting I2C bus scan...
17:36:44.685 > W (521) C:/Users/user123/.platformio/packages/framework-arduinoespressif32/libraries/Wire/src/Wire.cpp: Bus already started in Master Mode.
17:36:44.685 > I (653) src/i2c.cpp: Device found at 0x3C, type = Unknown
17:36:44.685 > I (653) src/i2c.cpp: 1 I2C device(s) found
17:36:44.685 > W (654) C:/Users/user123/.platformio/packages/framework-arduinoespressif32/libraries/Wire/src/Wire.cpp: Bus already started in Master Mode.
17:36:49.699 > I (10801) src/main.cpp: Starting LED Controller...
17:36:49.705 > I (10801) src/power.cpp: ADC characterization based on reference voltage stored in eFuse
17:36:49.716 > I (10806) src/main.cpp: Starting libpax...
17:36:49.716 > I (10806) src/main.cpp: WIFISCAN: on
17:36:49.722 > I (10809) src/main.cpp: BLESCAN: on
17:36:49.727 > I (10813) .pio/libdeps/usb/libpax/lib/libpax/blescan.cpp: Initializing bluetooth scanner ...
17:36:50.429 > I (11530) .pio/libdeps/usb/libpax/lib/libpax/blescan.cpp: BLE Scanning started
17:36:50.630 > I (11731) .pio/libdeps/usb/libpax/lib/libpax/blescan.cpp: Bluetooth scanner started
17:36:50.638 > I (11740) src/main.cpp: Starting rcommand interpreter...
17:36:50.645 > I (11740) src/rcommand.cpp: Rcommand send queue created, size 55 Bytes
17:36:50.656 > I (11740) src/lorawan.cpp: LORA send queue created, size 530 Bytes
17:36:50.663 > I (11764) src/lorawan.cpp: Starting LMIC...
17:36:50.668 > D (11765) src/lorawan.cpp: JOINING
17:36:50.674 > I (11765) src/main.cpp: Starting Interrupt Handler...
17:36:50.679 > I (11766) src/main.cpp: Starting Timers...
17:36:50.706 > I (11801) src/timekeeper.cpp: Starting time pulse...
17:36:50.706 > I (11802) src/timekeeper.cpp: Timepulse: internal (ESP32 hardware timer)
17:36:51.449 > D (12550) src/lorawan.cpp: TXSTART
17:36:51.707 > I (12802) src/main.cpp: Features: DISP LED BATT OTA LORA PLAIN TIME
17:36:51.730 > I (12831) src/timesync.cpp: [12.460] Timeserver sync request started, seqNo#102
17:36:56.502 > D (17603) src/lorawan.cpp: RXSTART
17:36:57.501 > D (18602) src/lorawan.cpp: RXSTART
17:36:57.743 > D (18844) src/lorawan.cpp: JOIN_WAIT
17:37:21.735 > D (42831) src/cyclic.cpp: Heap: Free:96544, Min:88264, Size:221364, Alloc:86004, StackHWM:2120
17:37:21.741 > D (42831) src/cyclic.cpp: IRQhandler 2120 bytes left | Taskstate = 0
17:37:21.747 > D (42835) src/cyclic.cpp: Rcommand interpreter 2528 bytes left | Taskstate = 2
17:37:21.752 > D (42842) src/cyclic.cpp: LMiCtask 2120 bytes left | Taskstate = 1
17:37:21.758 > D (42847) src/cyclic.cpp: Lorasendtask 2512 bytes left | Taskstate = 2
17:37:21.769 > D (42854) src/cyclic.cpp: LEDloop 424 bytes left | Taskstate = 1
17:37:49.734 > D (70830) src/senddata.cpp: Sending count results: pax=6 / wifi=1 / ble=5
17:37:49.740 > D (70833) src/senddata.cpp: sending Payload for Port 1
17:37:51.735 > D (72829) src/cyclic.cpp: Heap: Free:96544, Min:88264, Size:221364, Alloc:86004, StackHWM:2120
17:37:51.740 > D (72830) src/cyclic.cpp: IRQhandler 2120 bytes left | Taskstate = 0
17:37:51.746 > D (72833) src/cyclic.cpp: Rcommand interpreter 2528 bytes left | Taskstate = 2
17:37:51.751 > D (72840) src/cyclic.cpp: LMiCtask 2120 bytes left | Taskstate = 1
17:37:51.757 > D (72846) src/cyclic.cpp: Lorasendtask 2512 bytes left | Taskstate = 2
17:37:51.768 > D (72852) src/cyclic.cpp: LEDloop 424 bytes left | Taskstate = 1
17:37:58.751 > D (79851) src/lorawan.cpp: TXSTART 1
17:38:03.801 > D (84902) src/lorawan.cpp: RXSTART 1
17:38:04.806 > D (85903) src/lorawan.cpp: RXSTART 1
17:38:05.045 > D (86145) src/lorawan.cpp: JOIN_WAIT 1
17:38:21.730 > D (102830) src/cyclic.cpp: Heap: Free:96544, Min:88264, Size:221364, Alloc:86004, StackHWM:2120
17:38:21.741 > D (102831) src/cyclic.cpp: IRQhandler 2120 bytes left | Taskstate = 0
17:38:21.747 > D (102834) src/cyclic.cpp: Rcommand interpreter 2528 bytes left | Taskstate = 2
17:38:21.753 > D (102841) src/cyclic.cpp: LMiCtask 2120 bytes left | Taskstate = 1
17:38:21.758 > D (102847) src/cyclic.cpp: Lorasendtask 2512 bytes left | Taskstate = 2
17:38:21.769 > D (102854) src/cyclic.cpp: LEDloop 424 bytes left | Taskstate = 1
17:38:49.731 > D (130831) src/senddata.cpp: Sending count results: pax=6 / wifi=2 / ble=4
17:38:49.742 > D (130834) src/senddata.cpp: sending Payload for Port 1
17:38:51.735 > D (132829) src/cyclic.cpp: Heap: Free:96544, Min:88264, Size:221364, Alloc:86004, StackHWM:2120
17:38:51.741 > D (132830) src/cyclic.cpp: IRQhandler 2120 bytes left | Taskstate = 0
17:38:51.746 > D (132834) src/cyclic.cpp: Rcommand interpreter 2528 bytes left | Taskstate = 2
17:38:51.752 > D (132841) src/cyclic.cpp: LMiCtask 2120 bytes left | Taskstate = 1
17:38:51.758 > D (132847) src/cyclic.cpp: Lorasendtask 2512 bytes left | Taskstate = 2
17:38:51.769 > D (132853) src/cyclic.cpp: LEDloop 424 bytes left | Taskstate = 1
17:39:09.784 > D (150884) src/lorawan.cpp: TXSTART 2
17:39:14.836 > D (155936) src/lorawan.cpp: RXSTART 2
17:39:15.839 > D (156935) src/lorawan.cpp: RXSTART 2
17:39:16.081 > D (157177) src/lorawan.cpp: JOIN_WAIT 2
17:39:21.737 > D (162830) src/cyclic.cpp: Heap: Free:96544, Min:88264, Size:221364, Alloc:86004, StackHWM:2120
17:39:21.742 > D (162831) src/cyclic.cpp: IRQhandler 2120 bytes left | Taskstate = 0
17:39:21.747 > D (162834) src/cyclic.cpp: Rcommand interpreter 2528 bytes left | Taskstate = 2

sorry I am a beginner at VS.

I have only installed VS Code C/C++ and platformIO ide

maybe a bug with toolchain?

I don’t know how to solve it

Meaning what? The code looks in regards to “sets the right pinmap”, so I think that can be ignored.

Also note that TTN shows you the DEVEUI etc. in reverse order than what the LMIC stack wants (LMIC wants in LSB, TTN shows in MSB by default).

If the keys and EUIs are right, then you also have to make sure that there is a TTN gateway in your vicinity. Not sure if you operate your own gateway or not.

https://www.thethingsnetwork.org/map

I have my own gateway next to me, that’s not the problem. In the Terminel log, see above, it only says DEVEUI.

If everything was correct, it would also say APPEUI and APPKEY.

here you can see … APPEUI and APPKEY = 000000…

Well, the logs indicate that the OTAA Join was not yet successfull, so it can’t have yet acquired a device adress (and with it the net id as the first few bits), so that is “normal”. You have to look into why its JoinRequst is not being answered with a JoinAccept. If you have your own gateway next to you, go look at the packet logs. Are there any join requests with a DevEUI as you’ve set? Is it being forwarded to the TTN console?

Note that depending on your geographical region, you need to set the configuration macros for the LMIC region, too. (US900, EU868, CN470, etc…).

This is how I bought the paxcount, but I couldn’t register it with TTN. But here you can see that APPEUI and APPKEY are displayed. The only strange thing is that
17:36:44.685 > I (504) C:/Users/user123/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-i2c.c: Initialising I2C Master: sda=21 scl=22 freq=100000
REgion is right … EU868

In gateway

Wed Apr 10 22:02:18 2024 daemon.info lora_pkt_fwd[2529]:
Wed Apr 10 22:02:18 2024 daemon.info lora_pkt_fwd[2529]: REPORT~ ################## Report at: 2024-04-10 21:02:18 UTC ##################
Wed Apr 10 22:02:18 2024 daemon.info lora_pkt_fwd[2529]: REPORT~ ### [UPSTREAM] ###
Wed Apr 10 22:02:18 2024 daemon.info lora_pkt_fwd[2529]: REPORT~ # RF packets received by concentrator: 0
Wed Apr 10 22:02:18 2024 daemon.info lora_pkt_fwd[2529]: REPORT~ # CRC_OK: 0.00%, CRC_FAIL: 0.00%, NO_CRC: 0.00%
Wed Apr 10 22:02:18 2024 daemon.info lora_pkt_fwd[2529]: REPORT~ # RF packets forwarded: 0 (0 bytes)
Wed Apr 10 22:02:18 2024 daemon.info lora_pkt_fwd[2529]: REPORT~ # PUSH_DATA datagrams sent: 0 (0 bytes)
Wed Apr 10 22:02:18 2024 daemon.info lora_pkt_fwd[2529]: REPORT~ # PUSH_DATA acknowledged: 0.00%
Wed Apr 10 22:02:18 2024 daemon.info lora_pkt_fwd[2529]: REPORT~ ### [DOWNSTREAM] ###
Wed Apr 10 22:02:18 2024 daemon.info lora_pkt_fwd[2529]: REPORT~ # PULL_DATA sent: 1 (100.00% acknowledged)
Wed Apr 10 22:02:18 2024 daemon.info lora_pkt_fwd[2529]: REPORT~ # PULL_RESP(onse) datagrams received: 0 (0 bytes)
Wed Apr 10 22:02:18 2024 daemon.info lora_pkt_fwd[2529]: REPORT~ # RF packets sent to concentrator: 0 (0 bytes)
Wed Apr 10 22:02:18 2024 daemon.info lora_pkt_fwd[2529]: REPORT~ # TX errors: 0
Wed Apr 10 22:02:18 2024 daemon.info lora_pkt_fwd[2529]: REPORT~ # BEACON queued: 0
Wed Apr 10 22:02:18 2024 daemon.info lora_pkt_fwd[2529]: REPORT~ # BEACON sent so far: 0
Wed Apr 10 22:02:18 2024 daemon.info lora_pkt_fwd[2529]: REPORT~ # BEACON rejected: 0
Wed Apr 10 22:02:18 2024 daemon.info lora_pkt_fwd[2529]: REPORT~ ### [PPS] ###
Wed Apr 10 22:02:18 2024 daemon.info lora_pkt_fwd[2529]: REPORT~ # SX1301 time (PPS): 63714561
Wed Apr 10 22:02:18 2024 daemon.info lora_pkt_fwd[2529]: INFO: [jit] queue is empty
Wed Apr 10 22:02:18 2024 daemon.info lora_pkt_fwd[2529]: INFO~ ### [GPS] ###
Wed Apr 10 22:02:18 2024 daemon.info lora_pkt_fwd[2529]: INFO~ # GPS *FAKE* coordinates: latitude 22.700000, longitude 114.240000, altitude 450 m
Wed Apr 10 22:02:18 2024 daemon.info lora_pkt_fwd[2529]: INFO~ ##### END #####
Wed Apr 10 22:02:18 2024 daemon.info lora_pkt_fwd[2529]: RXTX~ {"stat":{"time":"2024-04-10 21:02:18 UTC","lati":22.700000,"long":114.240000,"alti":450,"rxnb":0,"rxok":0,"rxfw":0,"ackr":0.0,"dwnb":0,"txnb":0}}
Wed Apr 10 22:02:19 2024 daemon.info lora_pkt_fwd[2529]: INFO~ [up] PUSH_ACK received in 45 ms
Wed Apr 10 22:02:19 2024 daemon.info lora_pkt_fwd[2529]: INFO~ [down] PULL_ACK received in 41 ms
Wed Apr 10 22:02:20 2024 daemon.info lora_pkt_fwd[2529]: PKT_FWD~ JOIN_REQ+ {"AppEUI":,"9A6706D07ED5B370", "DevEUI":,"FEFE38BCDC988330", "DevNonce": "43278"}
Wed Apr 10 22:02:20 2024 daemon.info lora_pkt_fwd[2529]: RXTX~ {"rxpk":[{"tmst":95410115,"time":"2024-04-10T21:02:20.567403Z","chan":0,"rfch":1,"freq":868.100000,"stat":1,"modu":"LORA","datr":"SF7BW125","codr":"4/5","lsnr":8.5,"rssi":-79,"size":23,"data":"AJpnBtB+1bNw/v44vNyYgzAOqf4qTYE="}]}
Wed Apr 10 22:02:20 2024 daemon.info lora_pkt_fwd[2529]: INFO~ [up] PUSH_ACK received in 32 ms
Wed Apr 10 22:02:26 2024 user.notice iot_keep_alive: Internet Access OK: via wlan0-2
Wed Apr 10 22:02:26 2024 user.notice iot_keep_alive: use WAN or WiFi for internet access now
Wed Apr 10 22:02:41 2024 user.notice iot_keep_alive: Internet Access OK: via wlan0-2
Wed Apr 10 22:02:41 2024 user.notice iot_keep_alive: use WAN or WiFi for internet access now
Wed Apr 10 22:02:49 2024 daemon.info lora_pkt_fwd[2529]:
Wed Apr 10 22:02:49 2024 daemon.info lora_pkt_fwd[2529]: REPORT~ ################## Report at: 2024-04-10 21:02:49 UTC ##################
Wed Apr 10 22:02:49 2024 daemon.info lora_pkt_fwd[2529]: REPORT~ ### [UPSTREAM] ###
Wed Apr 10 22:02:49 2024 daemon.info lora_pkt_fwd[2529]: REPORT~ # RF packets received by concentrator: 1
Wed Apr 10 22:02:49 2024 daemon.info lora_pkt_fwd[2529]: REPORT~ # CRC_OK: 100.00%, CRC_FAIL: 0.00%, NO_CRC: 0.00%
Wed Apr 10 22:02:49 2024 daemon.info lora_pkt_fwd[2529]: REPORT~ # RF packets forwarded: 1 (23 bytes)
Wed Apr 10 22:02:49 2024 daemon.info lora_pkt_fwd[2529]: REPORT~ # PUSH_DATA datagrams sent: 1 (241 bytes)
Wed Apr 10 22:02:49 2024 daemon.info lora_pkt_fwd[2529]: REPORT~ # PUSH_DATA acknowledged: 100.00%
Wed Apr 10 22:02:49 2024 daemon.info lora_pkt_fwd[2529]: REPORT~ ### [DOWNSTREAM] ###
Wed Apr 10 22:02:49 2024 daemon.info lora_pkt_fwd[2529]: REPORT~ # PULL_DATA sent: 1 (100.00% acknowledged)
Wed Apr 10 22:02:49 2024 daemon.info lora_pkt_fwd[2529]: REPORT~ # PULL_RESP(onse) datagrams received: 0 (0 bytes)
Wed Apr 10 22:02:49 2024 daemon.info lora_pkt_fwd[2529]: REPORT~ # RF packets sent to concentrator: 0 (0 bytes)
Wed Apr 10 22:02:49 2024 daemon.info lora_pkt_fwd[2529]: REPORT~ # TX errors: 0
Wed Apr 10 22:02:49 2024 daemon.info lora_pkt_fwd[2529]: REPORT~ # BEACON queued: 0
Wed Apr 10 22:02:49 2024 daemon.info lora_pkt_fwd[2529]: REPORT~ # BEACON sent so far: 0
Wed Apr 10 22:02:49 2024 daemon.info lora_pkt_fwd[2529]: REPORT~ # BEACON rejected: 0
Wed Apr 10 22:02:49 2024 daemon.info lora_pkt_fwd[2529]: REPORT~ ### [PPS] ###
Wed Apr 10 22:02:49 2024 daemon.info lora_pkt_fwd[2529]: REPORT~ # SX1301 time (PPS): 123714517
Wed Apr 10 22:02:49 2024 daemon.info lora_pkt_fwd[2529]: INFO: [jit] queue is empty
Wed Apr 10 22:02:49 2024 daemon.info lora_pkt_fwd[2529]: INFO~ ### [GPS] ###
Wed Apr 10 22:02:49 2024 daemon.info lora_pkt_fwd[2529]: INFO~ # GPS *FAKE* coordinates: latitude 22.700000, longitude 114.240000, altitude 450 m
Wed Apr 10 22:02:49 2024 daemon.info lora_pkt_fwd[2529]: INFO~ ##### END #####
Wed Apr 10 22:02:49 2024 daemon.info lora_pkt_fwd[2529]: RXTX~ {"stat":{"time":"2024-04-10 21:02:49 UTC","lati":22.700000,"long":114.240000,"alti":450,"rxnb":1,"rxok":1,"rxfw":1,"ackr":100.0,"dwnb":0,"txnb":0}}
Wed Apr 10 22:02:49 2024 daemon.info lora_pkt_fwd[2529]: INFO~ [up] PUSH_ACK received in 57 ms
Wed Apr 10 22:02:49 2024 daemon.info lora_pkt_fwd[2529]: INFO~ [down] PULL_ACK received in 59 ms
Wed Apr 10 22:02:56 2024 user.notice iot_keep_alive: Internet Access OK: via wlan0-2
Wed Apr 10 22:02:56 2024 user.notice iot_keep_alive: use WAN or WiFi for internet access now
Wed Apr 10 22:03:01 2024 daemon.err uhttpd[1240]: Error: no such table: livepkts
Wed Apr 10 22:03:02 2024 daemon.err uhttpd[1240]: Error: no such table: gwdb
Wed Apr 10 22:03:02 2024 daemon.err uhttpd[1240]: Error: no such table: gwdb
Wed Apr 10 22:03:02 2024 daemon.err uhttpd[1240]: Error: no such table: gwdb
Wed Apr 10 22:03:02 2024 daemon.err uhttpd[1240]: Error: no such table: gwdb
Wed Apr 10 22:03:02 2024 daemon.err uhttpd[1240]: Error: no such table: gwdb

well… I just went through this with the same board and finally had success joining my RA7268 lora gateway this afternoon.

Here are the things that I had to do:

  • loraconf.h : set the APPEUI as well as the APPKEY. These numbers came from my application configuration screen, they were initially blank but had an auto generate button which I clicked on to have some generated. Do not enter a deveui in your loraconf.h file; it will be provided by the gateway application once you successfully join.

  • lmic_config.h uncomment the #define DFG_us915 1 line (line 11)

  • platformio.ini : uncomment line 18 halfile = ttgov21new.h

  • platformio.ini: I had to change the upload speed to my board in order to get platformio to play nicely / upload code to it.

  • paxcounter.conf I set the correct POSIX timezone string which I found here: posix timezone list

Hopefully this helps you eddi.
-Hawley

So assuming this DevEUI matches the one you put in your loraconf.h, that does look good. If you see that in the gateway logs, is the same JoinRequest forwarded to the TTN console when you look at the Gateway logs or device logs there?

yes thanks has worked now