9600 baud gps in datalogger

User feedbacks of the latest ESP32 based Freematics ONE+
ramsaymike
Posts: 8
Joined: Sun Aug 19, 2018 8:43 pm

9600 baud gps in datalogger

Postby ramsaymike » Sun Aug 19, 2018 8:53 pm

I am unable to get an older 9600 baud gps module to work in Datalogger (V5). It works fine in the simple gps program example. Does anyone know what changes other than the obvious config.h that have to be made? Thanks.

stanley
Site Admin
Posts: 745
Joined: Sat Mar 01, 2014 3:15 am

Re: 9600 baud gps in datalogger

Postby stanley » Sun Aug 26, 2018 11:06 pm

Default baudrate is defined in FreematicsPlus.h of the library. It is also possible to specify GPS baudrate by passing it as first argument of gpsInit().

ramsaymike
Posts: 8
Joined: Sun Aug 19, 2018 8:43 pm

Re: 9600 baud gps in datalogger

Postby ramsaymike » Sat Sep 01, 2018 9:25 pm

I was able to fine it and can confirm that it works just fine. Thanks for the reply

ramsaymike
Posts: 8
Joined: Sun Aug 19, 2018 8:43 pm

Re: 9600 baud gps in datalogger

Postby ramsaymike » Sat Nov 24, 2018 10:39 pm

So it appears that I don't have this figured out! After much frustration I found that the baud rate was hard coded and once changed worked fine! No idea was is going on of course...


bool FreematicsESP32::gpsBegin(unsigned long baudrate, bool buffered, bool softserial)
{
pinMode(PIN_GPS_POWER, OUTPUT);
// turn on GPS power
Serial.println(baudrate);
digitalWrite(PIN_GPS_POWER, HIGH);

if (buffered && !nmeaBuffer) nmeaBuffer = new char[NMEA_BUF_SIZE];
nmeaBytes = 0;

if (!gpsData) gpsData = new GPS_DATA;
memset(gpsData, 0, sizeof(GPS_DATA));

if (taskGPS.running()) {
taskGPS.resume();
} else if (!softserial) {
uart_config_t uart_config = {
.baud_rate = 9600, <<<<<<<<<<<<<<<<<<<<<<< changed here from 115000 <<<<<<<<<<<<<<<<<<<<<<
.data_bits = UART_DATA_8_BITS,
.parity = UART_PARITY_DISABLE,
.stop_bits = UART_STOP_BITS_1,
.flow_ctrl = UART_HW_FLOWCTRL_DISABLE,
.rx_flow_ctrl_thresh = 122,
};


Return to “Freematics ONE+”

Who is online

Users browsing this forum: No registered users and 1 guest