bitconnector / ttn_mapper_t-beam

23 stars 11 forks source link

Cannot seem to get a GPS fix #23

Closed ameeuw closed 7 months ago

ameeuw commented 7 months ago

Hi Lukas - great approach to the firmware. I really like the minimalistic approach and can't wait getting it to work so I can extend it with my personal use-cases (will fork and add them then..)

After struggling the whole day with getting the join to work with TTN I updated the TTN settings as read in https://github.com/bitconnector/LittleWan/issues/1 to "Frequency plan Europe 863-870 MHz (SF9 for RX2 - recommended), LoRaWAN version MAC V1.0.4 and Regional Parameters version PHY V1.0". This gave me the long awaited success on the join...

Now I have it running and connected but the GPS does not seem to get a fix. I have the T-Beam v1.2 with the AXP2101 chip and I am somehow suspecting it to not power the GPS appropriately... Here is the log of board including axp_print().

Any suggestions what to try? I tried taking the timeout out of the gps_loop() while loop but that also gave nothing... Will leave it for the night now and see what the status in the morning is..

Best, Arne

rst:0x5 (DEEPSLEEP_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13232
load:0x40080400,len:3028
entry 0x400805e4
AXP2101 PMU init succeeded
isCharging:YES
isDischarge:NO
isVbusIn:YES
getBattVoltage:4198mV
getVbusVoltage:5156mV
getSystemVoltage:5136mV
getBatteryPercent:100%

=========================================
DC1  : +   Voltage: 3300 mV 
DC2  : -   Voltage: 0900 mV 
DC3  : -   Voltage: 0900 mV 
DC4  : -   Voltage: 1100 mV 
DC5  : -   Voltage: 1200 mV 
ALDO1: -   Voltage: 1800 mV 
ALDO2: +   Voltage: 3300 mV 
ALDO3: +   Voltage: 3000 mV 
ALDO4: -   Voltage: 2900 mV 
BLDO1: -   Voltage: 1800 mV 
BLDO2: -   Voltage: 2800 mV 
=========================================
4198
Wakeup caused by timer
GPS-loop
$GPRMC,170929.00,V,,,,,,,191123,,,N*70
$GPVTG,,,,,,,,,N*30
$GPGGA,170929.00,,,,,0,00,99.99,,,,,,*62
$GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30
$GPGSV,1,1,00*79
$GPGLL,,,,,170929.00,V,N*4E
GPS-end: no fix
bitconnector commented 7 months ago

Hi, the Log is great!

Starting from the line "GPS-Loop" till "GPS-end: no fix" you can actually see, that the GPS is clearly powered on and sending NMEA messages to the ESP32. But the GPS doesn't have a fix.

Try to let the device running for a day with clear view to the sky. Sometimes this little GPS Antenna needs more time. especially for the first proper location. I now it is frustrating but you just have to wait longer.

Modifying the gps_loop() function will not bring any better results. It is designed to catch a single set of messages and turn the ESP32 back to sleep even without fix to save power. The GPS will keep running until you send the Device in deepsleep mode or switch it off

ameeuw commented 7 months ago

Thank you so much for the advice - actually I moved the t-beam to another room yesterday (with better view to the open sky) and then it worked like a charm - even the joining sequence was accelerated... I guess my office is just not in the most ideal place. Now I get a fix, and it is sending messages...Let's close this.