Hello,
I am facing this strange behavior with a Sirf IV based gps module configured in NMEA mode with baudrate 115200. The system is a Ubuntu based GNU/Linux with 3.19.0-16 kernel and the the gps module is attached to USB port using ftdi_sio kernel module.
When I run gpsd with -n flag, I am able to detect the correct speed (115200), instead when no -n flag is provided, and the client connects, the detected speed is 4800.
Using gdb I saw that the problem originates in serial.c: gpsd_serial_open function when it calls tcgetattr.
- When "-n" flag is NOT provided, tcgetattr returns a termios structure with c_ispeed and c_outspeed equal to B4800
- When the "-n" flag is provided, as soon as gpsd starts and connects with gps module tcgetattr returns a structure with c_ispeed and c_ospeed correctly set at B115200
How is this even possible? The call chain is basically the same as far as I can see: gpsd_activate => gps_open => gpsd_serial_open.
I know that the error derives from a call to tcgetattr, so it should not be caused by gpsd, but it puzzles me that just changing how gpsd is called the speed is correctly detected.
Does anyone had a similar problem?
Thanks in advance,
Carlo Lobrano