Page 1 of 1
9600 baud gps in datalogger
Posted: Sun Aug 19, 2018 8:53 pm
by ramsaymike
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.
Re: 9600 baud gps in datalogger
Posted: Sun Aug 26, 2018 11:06 pm
by stanley
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().
Re: 9600 baud gps in datalogger
Posted: Sat Sep 01, 2018 9:25 pm
by ramsaymike
I was able to fine it and can confirm that it works just fine. Thanks for the reply
Re: 9600 baud gps in datalogger
Posted: Sat Nov 24, 2018 10:39 pm
by ramsaymike
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,
};