Closed DavideNesi closed 5 years ago
The shown value is the battery voltage. Very strange that you don't see other packets. Sure, that there is no packet loss in your LoRa connection? Perhaps using a single channel gateway?
To debug your issue, please provide serial console log, written with debug level 4 (set debug level in platformio.ini, then recompile and reflash).
And please remove decoder and coverter from TTN console, to see all raw payload data. Sure, that you installed the appropriate decoder/converter for the selected payload format (plain)?
I'm using the rak831, decoder and converter removed. I used this ones https://github.com/cyberman54/ESP32-Paxcounter/blob/master/src/TTN/plain_decoder.js https://github.com/cyberman54/ESP32-Paxcounter/blob/master/src/TTN/plain_converter.js
having a look at the debug log seems like it just send 2 bytes
I (17034) wifi: ic_enable_sniffer [I][main.cpp:330] setup(): Starting IRQ Handler... [I][main.cpp:340] setup(): Starting Wifi Channel rotation... [I][main.cpp:365] setup(): Starting Interrupts... [I][lorawan.cpp:278] onEvent(): EV_JOINING [I][lorawan.cpp:209] onEvent(): ADR=1, SF=9, TXPOWER=15 [I][lorawan.cpp:278] onEvent(): EV_JOINED [D][cyclic.cpp:38] doHousekeeping(): Wifiloop 1388 bytes left | Taskstate = 3 [D][cyclic.cpp:41] doHousekeeping(): IRQhandler 2232 bytes left | Taskstate = 0 [D][cyclic.cpp:44] doHousekeeping(): Gpsloop 1500 bytes left | Taskstate = 2 [D][cyclic.cpp:54] doHousekeeping(): LEDloop 480 bytes left | Taskstate = 2 [D][battery.cpp:51] read_voltage(): Raw: 2480 / Voltage: 4254mV [I][cyclic.cpp:60] doHousekeeping(): Voltage: 4254mV [D][cyclic.cpp:38] doHousekeeping(): Wifiloop 1388 bytes left | Taskstate = 3 [D][cyclic.cpp:41] doHousekeeping(): IRQhandler 2232 bytes left | Taskstate = 0 [D][cyclic.cpp:44] doHousekeeping(): Gpsloop 1500 bytes left | Taskstate = 2 [D][cyclic.cpp:54] doHousekeeping(): LEDloop 480 bytes left | Taskstate = 2 [D][battery.cpp:51] read_voltage(): Raw: 2480 / Voltage: 4254mV [I][cyclic.cpp:60] doHousekeeping(): Voltage: 4254mV [D][senddata.cpp:84] sendCounter(): No valid GPS position [D][senddata.cpp:54] sendCounter(): No valid GPS position. GPS data not appended to counter data. [I][lorawan.cpp:406] lora_enqueuedata(): 2 bytes enqueued for LORA interface [I][senddata.cpp:63] sendCounter(): Counter cleared [D][battery.cpp:51] read_voltage(): Raw: 2479 / Voltage: 4252mV [I][lorawan.cpp:406] lora_enqueuedata(): 2 bytes enqueued for LORA interface [I][lorawan.cpp:278] onEvent(): EV_TX_START [I][lorawan.cpp:341] lora_send(): 2 byte(s) sent to LoRa [I][lorawan.cpp:278] onEvent(): EV_TX_COMPLETE [I][lorawan.cpp:278] onEvent(): EV_TX_START [I][lorawan.cpp:341] lora_send(): 2 byte(s) sent to LoRa [I][lorawan.cpp:278] onEvent(): EV_TX_COMPLETE [D][cyclic.cpp:38] doHousekeeping(): Wifiloop 1388 bytes left | Taskstate = 3 [D][cyclic.cpp:41] doHousekeeping(): IRQhandler 2232 bytes left | Taskstate = 0 [D][cyclic.cpp:44] doHousekeeping(): Gpsloop 1500 bytes left | Taskstate = 2 [D][cyclic.cpp:54] doHousekeeping(): LEDloop 480 bytes left | Taskstate = 2 [D][battery.cpp:51] read_voltage(): Raw: 2480 / Voltage: 4254mV [I][cyclic.cpp:60] doHousekeeping(): Voltage: 4254mV [D][cyclic.cpp:38] doHousekeeping(): Wifiloop 1388 bytes left | Taskstate = 3 [D][cyclic.cpp:41] doHousekeeping(): IRQhandler 2232 bytes left | Taskstate = 0 [D][cyclic.cpp:44] doHousekeeping(): Gpsloop 1500 bytes left | Taskstate = 2 [D][cyclic.cpp:54] doHousekeeping(): LEDloop 480 bytes left | Taskstate = 2 [D][battery.cpp:51] read_voltage(): Raw: 2480 / Voltage: 4254mV [I][cyclic.cpp:60] doHousekeeping(): Voltage: 4254mV [D][senddata.cpp:84] sendCounter(): No valid GPS position [D][senddata.cpp:54] sendCounter(): No valid GPS position. GPS data not appended to counter data. [I][lorawan.cpp:406] lora_enqueuedata(): 2 bytes enqueued for LORA interface [I][senddata.cpp:63] sendCounter(): Counter cleared [D][battery.cpp:51] read_voltage(): Raw: 2480 / Voltage: 4254mV [I][lorawan.cpp:406] lora_enqueuedata(): 2 bytes enqueued for LORA interface [I][lorawan.cpp:278] onEvent(): EV_TX_START [I][lorawan.cpp:341] lora_send(): 2 byte(s) sent to LoRa [I][lorawan.cpp:278] onEvent(): EV_TX_COMPLETE [I][lorawan.cpp:341] lora_send(): 2 byte(s) sent to LoRa [I][lorawan.cpp:278] onEvent(): EV_TX_START [I][lorawan.cpp:278] onEvent(): EV_TX_COMPLETE [D][cyclic.cpp:38] doHousekeeping(): Wifiloop 1388 bytes left | Taskstate = 3 [D][cyclic.cpp:41] doHousekeeping(): IRQhandler 2232 bytes left | Taskstate = 0 [D][cyclic.cpp:44] doHousekeeping(): Gpsloop 1468 bytes left | Taskstate = 2 [D][cyclic.cpp:54] doHousekeeping(): LEDloop 480 bytes left | Taskstate = 2 [D][battery.cpp:51] read_voltage(): Raw: 2480 / Voltage: 4254mV [I][cyclic.cpp:60] doHousekeeping(): Voltage: 4254mV
Which version / commit of repo did you use?
1.7.11
currently using a tbeam with oled attached to it. The screen shows me all the counting going without problems
I tried with a different tbeam on different application without decoder and converter. I got bot port 1 and port 8 packets but both are 2 bytes
and this is what i got from the debug:
I (3690) wifi: ic_enable_sniffer [I][main.cpp:355] setup(): Starting Interrupt Handler... [I][main.cpp:365] setup(): Starting Wifi Channel rotation... [I][main.cpp:391] setup(): Starting Interrupts... [W][gpsread.cpp:80] get_gpstime(): GPS has no confident time [I][main.cpp:411] setup(): Unable to sync system time with GPS [I][lorawan.cpp:278] onEvent(): EV_JOINING [D][cyclic.cpp:54] doHousekeeping(): Wifiloop 1404 bytes left | Taskstate = 1 [D][cyclic.cpp:57] doHousekeeping(): IRQhandler 2604 bytes left | Taskstate = 0 [D][cyclic.cpp:60] doHousekeeping(): Gpsloop 1488 bytes left | Taskstate = 1 [D][cyclic.cpp:70] doHousekeeping(): LEDloop 480 bytes left | Taskstate = 2 [D][battery.cpp:51] read_voltage(): Raw: 2300 / Voltage: 4202mV [I][cyclic.cpp:76] doHousekeeping(): Voltage: 4202mV [D][senddata.cpp:84] sendCounter(): No valid GPS position [D][senddata.cpp:54] sendCounter(): No valid GPS position. GPS data not appended to counter data. [I][lorawan.cpp:406] lora_enqueuedata(): 2 bytes enqueued for LORA interface [I][senddata.cpp:63] sendCounter(): Counter cleared [D][battery.cpp:51] read_voltage(): Raw: 2326 / Voltage: 4246mV [I][lorawan.cpp:406] lora_enqueuedata(): 2 bytes enqueued for LORA interface [D][cyclic.cpp:54] doHousekeeping(): Wifiloop 1404 bytes left | Taskstate = 3 [D][cyclic.cpp:57] doHousekeeping(): IRQhandler 2540 bytes left | Taskstate = 0 [D][cyclic.cpp:60] doHousekeeping(): Gpsloop 1488 bytes left | Taskstate = 2 [D][cyclic.cpp:70] doHousekeeping(): LEDloop 480 bytes left | Taskstate = 2 [D][battery.cpp:51] read_voltage(): Raw: 2326 / Voltage: 4246mV [I][cyclic.cpp:76] doHousekeeping(): Voltage: 4246mV [I][lorawan.cpp:209] onEvent(): ADR=1, SF=9, TXPOWER=15 [I][lorawan.cpp:278] onEvent(): EV_JOINED [I][lorawan.cpp:278] onEvent(): EV_TX_START [I][lorawan.cpp:341] lora_send(): 2 byte(s) sent to LoRa [I][lorawan.cpp:278] onEvent(): EV_TX_COMPLETE [I][lorawan.cpp:278] onEvent(): EV_TX_START [I][lorawan.cpp:341] lora_send(): 2 byte(s) sent to LoRa [D][cyclic.cpp:54] doHousekeeping(): Wifiloop 1404 bytes left | Taskstate = 0 [D][cyclic.cpp:57] doHousekeeping(): IRQhandler 2540 bytes left | Taskstate = 0 [D][cyclic.cpp:60] doHousekeeping(): Gpsloop 1472 bytes left | Taskstate = 1 [D][cyclic.cpp:70] doHousekeeping(): LEDloop 480 bytes left | Taskstate = 2 [D][battery.cpp:51] read_voltage(): Raw: 2324 / Voltage: 4244mV [I][cyclic.cpp:76] doHousekeeping(): Voltage: 4244mV [I][lorawan.cpp:278] onEvent(): EV_TX_COMPLETE
The device shows the paxcount and voltage, as it should do. What do you expect, what do you miss?
ok, evrything sorted out! thank you!
The payload i get with tbeam is just this small thinghy, possibly a problem with tbeam? i have decoder and converter in place, packet is plain