Problem using GPS (UART, NMEA) in DriveWorks 1.2


We are using PX2 with latest Drive PDK and DeiveWorks 1.2.
GPS is connected through USB-to-serial converter that is present in the system as /dev/ttyUSB0.
I can open it in a serial terminal and see the NMEA messages coming from GPS.

When I run sample_gps_logger, I get a “GPS[0] - 6694488 ERROR DW_NOT_AVAILABLE” error.
The error happens at initialization time. It does not even matter if GPS is connected or not.

Detailed output:

./sample_gps_logger --driver=gps.uart --params=device=/dev/ttyUSB0

[23-10-2018 19:41:35] Initialize DriveWorks SDK v1.2.400
[23-10-2018 19:41:35] Release build with GNU 4.9.4 from v1.2.0-rc11-0-ga7f5475 against Vibrante PDK v5.0.10.3
[23-10-2018 19:41:35] Platform: Detected Drive PX2 - Tegra A
[23-10-2018 19:41:35] TimeSource: monotonic epoch time offset is 1540343990994929
[23-10-2018 19:41:35] Platform: number of GPU devices detected 2
[23-10-2018 19:41:35] Platform: currently selected GPU device discrete ID 0
[23-10-2018 19:41:35] SDK: Resources mounted from /usr/local/driveworks-1.2/data/resources
[23-10-2018 19:41:35] SDK: Create NvMediaDevice
[23-10-2018 19:41:35] SDK: Create NvMediaIPPManager
[23-10-2018 19:41:35] egl::Display: found 2 EGL devices
[23-10-2018 19:41:35] egl::Display: use drm device: drm-nvdc
[23-10-2018 19:41:35] SensorFactory::createSensor() -> gps.uart, device=/dev/ttyUSB0
[23-10-2018 19:41:35] SensorFactory::createSensor() -> gps.uart, device=/dev/ttyUSB0
[23-10-2018 19:41:35] EndpointTTY: started on /dev/ttyUSB0

Do you know what causes this error and how to fix it?


Dear mikhailqydth,

Can I know which sensor you’re using?

The following is DriveWorks supported sensors for GPU.

 Xsens MTi-G-710 (serial based NMEA protocol + USB proprietary)
 Xsens MTI_G-710 (native)
 NovAtel SPAN-IGM (native)

Hi Steve,

We have Novatel SPAN, but I do not think we can connect it natively (USB). I think there is no Linux Novatel USB driver for ARM64 architecture (Drive PX2). I connect it over serial (RS232 UART) instead.

NVidia documentation suggests that DriveWorks can also work with generic NMEA over serial connection.
Command line option --driver=gps.uart for the GPS sample app should enable generic NMEA over serial connection (UART). Are you saying it is not implemented?

During testing I connect Novatel over RS232/UART and it sends NMEA messages, but the error I reported happens even if no GPS is connected.
I run this with ttyUSB0 being usb-to-serial adapter.
./sample_gps_logger --driver=gps.uart --params=device=/dev/ttyUSB0
Sometimes I do not even connect GPS to it, but I still get the error immediately after launch:

Maybe --driver=gps.uart is not really supported? It is described in DriveWorks documentation as valid.



Dear mikhailqydth,

If the device is connected to the UART part of the DPX2, I would suggest that you run it with the following options.
Please try the following command and let me know if an error occurred? Thanks.
./sample_gps_logger --driver=gps.uart --params=device=/dev/ttyACM0

Hi Steve,

I am not using a built-in UART for DPX2. I am not even sure if built-in UART exists. There is only Aurix UART in DPX2.

I am using an external USB to UART converter. It works fine with DPX2. I can see the GPS NMEA messages coming through that converter/port if I open it in Serial Terminal software on DPX2 Linux.

However, that UART port shows up in Linux as /dev/ttyUSB0, not as /dev/ttyACM0.

If I run the command exactly as you proposed, I get an exception “DW_HAL_CANNOT_OPEN_CHANNEL: EndpointTTY: cannot open device”. And this is expected since there is no /dev/ttyACM0 device in my DPX2.

Therefore I run the command using my serial port device name (ttyUSB0):
./sample_gps_logger --driver=gps.uart --params=device=/dev/ttyUSB0

It is the same command that I was running originally (mentioned in my first post). And I get the same error as before:
Please see my first post for detailed outupt.

“sample_gps_logger” application does not exit after error. It continues to run, but it does not do anything. It looks like it cannot read GPS messages.


We are encountering the same problem. We have NMEA UART device connected through USB to /dev/ttyACM0

Data we got looks reasonable:


Even recorder can record it, but we can not replay it:

./sample_gps_logger --driver=gps.uart --params=device=/dev/ttyACM0,baud=9600
[29-10-2018 2:23:51] Initialize DriveWorks SDK v1.2.400
[29-10-2018 2:23:51] Release build with GNU 4.9.4 from v1.2.0-rc11-0-ga7f5475 against Vibrante PDK v5.0.10.3
[29-10-2018 2:23:51] Platform: Detected Drive PX2 - Tegra A
[29-10-2018 2:23:51] TimeSource: monotonic epoch time offset is 1540802649055916
[29-10-2018 2:23:51] TimeSource: PTP ioctl returned error. Synchronized time will not be available.
[29-10-2018 2:23:51] TimeSource: Could not detect valid PTP time source at 'eth0'. Fallback to CLOCK_MONOTONIC.
[29-10-2018 2:23:51] Platform: number of GPU devices detected 2
[29-10-2018 2:23:51] Platform: currently selected GPU device discrete ID 0
[29-10-2018 2:23:51] SDK: Resources mounted from /usr/local/driveworks-1.2/data/resources
[29-10-2018 2:23:51] SDK: Create NvMediaDevice
[29-10-2018 2:23:51] SDK: Create NvMediaIPPManager
[29-10-2018 2:23:51] egl::Display: found 2 EGL devices
[29-10-2018 2:23:51] egl::Display: use drm device: drm-nvdc
[29-10-2018 2:23:51] SensorFactory::createSensor() -> gps.uart, device=/dev/ttyACM0,baud=9600
[29-10-2018 2:23:51] SensorFactory::createSensor() -> gps.uart, device=/dev/ttyACM0,baud=9600
[29-10-2018 2:23:51] EndpointTTY: started on /dev/ttyACM0

Thanks for help!

Dear tomas.cernik,

DriveWorks GPS NMEA decoder expects the NMEA sentence prefix for RMC and GGA to be “GP”. The logs you attached show “GN” instead (GNRMC, GNGGA, …). As per this prefix is the “Talker ID” and refers to the type of unit. Our gps.uart driver currently only supports “GP”.

Please let me know if you need GN. Thanks.

I was going to complain about GPS not working in driveworks, but I was using unsupported baudrate for serial port. As I learned, the max supported baudrate in driveworks is 115200 bps. It works with 115200.

I have a new question.
DriveWorks “gps.uart” driver parses NMEA messages coming from GPS and extracts the data that can be read by the user app.
I can configure my GPS to enable/disable specific NMEA messages and the result is reflected in “sample_gps_logger” output. For example, I need to enable GPGSA message to get “hdop” and “vdop” values in the sample output.

However, I never see “climb” value in “sample_gps_logger” output. I can see from the source code that this value is potentially available for user. Do you know what NMEA message I need to enable to get “climb” value from driveworks?
Maybe “climb” is only available with something like Novatel GPS (gps.novatel driver), not with generic NMEA GPS (“gps.uart” driver)?

Dear mikhailqydth,

The standard NMEA messages do not provide vertical speed / climb data, therefore we do not populate the corresponding field in dwGPSFrame (and the corresponding bit in the flags bit-field should be reset). Looking at the code, we currently only support climb data for XSens GPS. Thanks.