cyberman54 / ESP32-Paxcounter

Wifi & BLE driven passenger flow metering with cheap ESP32 boards
https://cyberman54.github.io/ESP32-Paxcounter/
Other
1.75k stars 408 forks source link

Test of development branch #189

Closed mutton74 closed 6 years ago

mutton74 commented 6 years ago

Tested this out, thanks for making it available with the band plans.

After following the instructions to setup all the conf files, I have got it working.

There was an error while building and only worked after commenting out a couple of lines. Below is the error

Compiling .pioenvs\ttgov1\src\lorawan.cpp.o
src\display.cpp: In function 'void refreshtheDisplay()':
src\display.cpp:148:23: error: 'lora_datarate' was not declared in this scope
u8x8.printf("%c%c", lora_datarate[LMIC.datarate * 2],
^
*** [.pioenvs\ttgov1\src\display.cpp.o] Error 1
*** [.pioenvs\ttgov1\src\display.cpp.o] Error 1 

Also, while a join happens immediately after powering on, the first measurement doesn't happen from anywhere between 5-10 minutes, but then reports at the set intervals after that, will have to read the conf file instructions a little more to work that one out.

Thanks Paul

cyberman54 commented 6 years ago

Build error should be fixed now, please retry. Don't know what 's causing the long pause before first transmit, it should happen after the number of seconds set in paxcounter.conf.

mutton74 commented 6 years ago

Retried, works well without error

I suspect the long time to join will be because of sub band choice

In Arduino IDE, in my sketch I usually drop in

LMIC_setClockError(MAX_CLOCK_ERROR * 1 / 100); LMIC_selectSubBand(1);

I think I saw the Clock error setting somewhere but can't see a sub band choice anywhere.

For TTN and AU915 (AU921 in MCCI Library) we need to start at 916.8 - Channel 8 - the second sub band.

cyberman54 commented 6 years ago

@mutton74 I added AU921 support by adding LMIC_selectSubBand(1) in main.cpp line 180 in code in branch development. Could you please re-check and state the results here? Thanks.

mutton74 commented 6 years ago

Have just tested it on a TTGo V2 and Heltec and both work perfectly now, thanks!!!

Joins immediately and then sends data at the specified time, every time.