Wifi/BLE Paxcounter Project with ESP32 boards


(Verkehrsrot) #165

New paxcounter v1.3.71 released:

  • Reworked IDE settings to use Espressif32 platform v1.0.1
  • Increased app partition table size to 2 MB
  • New feature: reading battery voltage by ADC (if supported by board), new rcommand 0x83
  • Improved performance by decreasing watchdog trigger delays in loop tasks
  • Small bug fixes

(Amedee) #166

This has probably nothing to do with the Paxcounter, it might be better in the ESP32 thread…

Disclaimer: I have zero experience with ESP32…

I just received a TTGO v2.1 and the display is looking strange:


(I have modified the splash screen to highlight the issue)

I first thought the display was broken on one side, but when it is flipped the broken part is flipped as well.

This is the latest code, problem is identical if I rollback to 1.3.6 / 0.12.0 ESP32 platform.

It looks to me the issue is hardware (display controller)…

Any other idea? Anything I can try?

Thanks


(Verkehrsrot) #167

just give the device a power cycle (disconnect USB and battery). After second boot this strange effect disappears.

I had this with new devices, too, and it always disappeared after 2nd power cycle.

I have no idea what’s the root cause for this strange behaviour. Maybe it’s caused by some issue between SSD1306 display controller and U8x8 library.


(Amedee) #168

Much better :grinning:

IMG_1826

The power cycle did the trick, thank you!


(Verkehrsrot) #169

But the remaining question is: WHY?


(Amedee) #170

As far as I can see once it is power-cycled, it remains good.

So maybe the “factory firmware” put the display in a weird mode which is only reset at the next power cycle…


#171

The OLED display does not have RST connected via a GPIO. When the code is halted and the device (ESP32/display) is not reset the old contens stays on the display. A power cycle forces the display to lose its contents so this could possibly explain it.


(Amedee) #172

Just made some current measurement with the TTGO V2.1…

TTGOv21

At 3.7v it takes a bit more than 300mA in operation, with small peaks to 385mA when it sends a LORA packet.

I still have a mystery to solve: I can’t power it on with a battery, I need to briefly apply power from the USB; then when it is on I can’t power it off, I have to unplug the battery.
The documented single-click / double-click doesn’t seem to work…


#173

that screen looks like a siglent 3055 :sunglasses:


(Verkehrsrot) #174

The double click button does work.
If no USB is plugged and a battery is attached while it is off, then you can power on with single press on the button, and power off with double press.


(Verkehrsrot) #175

New pacounter firmware version 1.3.8 is out!

It now supports the new TTGO T-Beam board, including GPS!

The generated payload fields are ttnmapper compatible. You can have ttnmapper integration of your paxcounter device in TTN with a few clicks.

Code is for serial GPS interface. Will be enhanced to I2C soon.

Paxcounter v1.3.8


(Amedee) #176

Doesn’t work for me :pensive:
The button physically works, because reset is working, but I can’t power on, nor power off (to test power off, I boot with USB + battery, then switch USB off so it is battery only. I can do reset and it will reboot, but I can’t power it off…)

Some hardware issue I’m afraid…


(Verkehrsrot) #177

You need to boot on battery, otherwise the switch only resets the board.


(Amedee) #178

Yeah…
… but that doesn’t work :frowning:
Nothing happens when I press the button


(Verkehrsrot) #179

Hmm, i don’t know. On my board it works, same on TTGO T-Beam. It took while until i figured it out how to operate the button. Maybe same to you :wink:


(Verkehrsrot) #180

Here how i did it:

  • disconnect USB and battery from board
  • connect battery (full?)
  • press button once
    -> board powers up
  • press button twice
    -> board switches off

(Amedee) #181

Yes, this is what I did…
I tried with the LiPos I use for my other nodes, and with my lab power supply; pressing the button just does nothing.
Short press, long press… nothing worked :roll_eyes:

Other than that, it is working quite good: with the device indoor, I see that packets are received by a gateway 8km from home!

> select * from gateway order by time desc limit 3
name: gateway
time                           channel dev_id            gtw_id               rssi snr
----                           ------- ------            ------               ---- ---
2018-06-10T19:04:34.467040803Z 1       bulles-ttg21-01   eui-b827ebfffed1c970 -41  9.5   <-- mine
2018-06-10T19:04:34.46688818Z  1       bulles-ttg21-01   bigbazar             -119 -12   <-- 8km
2018-06-10T19:04:34.4667012Z   1       bulles-ttg21-01   bulles-ic880-02      -45  12.5  <-- mine

(Bluesensing) #182

8 km, that s a lot. do you live in rural area, sending from a hill? line of sight?

thx
g.


(Amedee) #183

Both points are in Brussels, so it is not particularly rural…
But I think they are both on a higher point compared to the surroundings; there are probably not too many buildings between both.
Note that the owner of the ˋbigbazar` gateway is anonymous, I have no mean of contacting him to check the correctness of its position… probably need some “wardriving” in that area…


#184

Is there a smart way to upgrade in platformio? I just copied the new code over the old and redid the settings.