bitconnector / ttn_mapper_t-beam

23 stars 11 forks source link

No display working ! #6

Closed vincegre closed 2 years ago

vincegre commented 2 years ago

Hi

I downloaded your code, updated credentials, compiled it successfully in VSCode with Platform.io extension and upload it in my T-Beam and since the display is off (nothing displayed at all even pushing on buttons is doing nothing :( I have same T-Beam as you according at engravings on it no ? IMG_20210927_140915 How can I find out issue here ? I kept VSCode connected at Tbeam during reboot but no log shows up on the USB port :(

Thanks

Vincèn

vincegre commented 2 years ago

Although the screen is displaying nothing, it looks to be able to transmit something as I receive some messages in TTN console but I don't see any GPS data transmitted ! I have setup the console with the TTNmapper webhooks as explained on TTNMapper website ! The LED aside the GPS chipset is blinking red one time per second (module is outside so get full GPS signal without problem !) Screenshot_20210927_142850

bitconnector commented 2 years ago

Till now the program isn't using a display, because my t-beam doesn't have one. If you want to see whats going on, I'd recomend watching the Serial output on the USB

If you look at the port (3) you can see that the geofence is active at your location. If you want to see your coordinates you have to edit /src/locations.h

You can get your messages interpreted by copying /payload_formatter_v3.js into the tts console

Yeah maybe I should explain the LED a bit more. The LED glims while the board is running but the ESP is in deep sleep and it shines bright while the ESP looks for the GPS, transmits the message and waits for the end of the recive window. You can switch the board off by holding the power button for about 5 seconds and the LED should turn off

vincegre commented 2 years ago

Till now the program isn't using a display, because my t-beam doesn't have one. If you want to see whats going on, I'd recomend watching the Serial output on the USB

oki, will have to wait to have my own local gw as right now I need to put tbeam outside to get it received by a public TTN gw ;)

If you look at the port (3) you can see that the geofence is active at your location. If you want to see your coordinates you have to edit /src/locations.h

I made it but I had changed only one of the 3 towns listed. I have updated file like that now (with my GPS coordinates for my town Lausanne) and I guess it's correct like that ?

static Geofence geofence[] = {
    {46.3116, 6.37100, 50000}  // Lausanne
};

Side note about geofence, I noticed that message during compilation:

Building in release mode
Compiling .pio/build/esp32/src/gps.cpp.o
Compiling .pio/build/esp32/src/main.cpp.o
In file included from src/gps.hpp:5:0,
                 from src/main.cpp:8:
src/locations.h:10:17: warning: 'geofence' defined but not used [-Wunused-variable]
 static Geofence geofence[] = {
                 ^
Linking .pio/build/esp32/firmware.elf

and it still blocks with that when running:

Screenshot_20210928_145513

You can get your messages interpreted by copying /payload_formatter_v3.js into the tts console

Thanks, will add it in TTS console for uplink formatter ;)

Yeah maybe I should explain the LED a bit more. The LED glims while the board is running but the ESP is in deep sleep and it shines bright while the ESP looks for the GPS, transmits the message and waits for the end of the recive window. You can switch the board off by holding the power button for about 5 seconds and the LED should turn off

Well you speak of the Red light that is under display I guess ? (well opposite of GPS and Lora module, same side of board). On my board it's either dimmed red (when I power it on basically) and it gets red bright when I push breifly on power button or from time to time but pretty randomly ! If I understand well, when it's dimmed, ESP is in deep sleep, when it's full on, ESP is awake, getting datas from GPS and handling Lora transmission right ?

The other red led aside GPS neo6 chipset I think is off when no GPS lock and blinks slowly when GPS fixed.

bitconnector commented 2 years ago

I made it but I had changed only one of the 3 towns listed. I have updated file like that now (with my GPS coordinates for my town Lausanne) and I guess it's correct like that ?

For clearification locations included in this array are EXCLUDED from upload. I enlist my home and the homes of my friends in order to stop sending the location automaticly as soon as I'm nearby.

and it still blocks with that when running:

that is also the reason, why the msg in your payload is stating geofence instead of your coordinates

If you don't want this feature you can disable it completely by replacing it with

static Geofence geofence[] = {};

Side note about geofence, I noticed that message during compilation:

Yeah I know that error. You can safely ignore it. If you know how I can disable this compiler message let me know or please create a pull request :D

If I understand well, when it's dimmed, ESP is in deep sleep, when it's full on, ESP is awake, getting datas from GPS and handling Lora transmission right ? The other red led aside GPS neo6 chipset I think is off when no GPS lock and blinks slowly when GPS fixed.

exactly :)

vincegre commented 2 years ago

I got the TBeam working with TTS and send position (I modified a little code to sent position all time even if not moving at first for ease of test ;) I just have a weirdo issue as GPS values are completely wrong once passed through JSon uplink formatter Screenshot_20211010_162748 : and altitude (I'm around 630m here). I use the Javascript formatter included in project code. When I putted back code as original it doesn't send any Lora messages anymore even first time it catches GPS (complicated to move outside here for now with weather). If I modify the gps_moved loop to return true for both cases I'll get it to send GPS data all time so long it has a GPS fix right ?

Thanks