RUTX50 how to get GPS coordinates without gpsctl?

Hi.

From the CLI of RUTX50 I need to get GPS coordinates and latitude and speed and direction.

Today I use gpsctl but I need another way todo it, is there any other easy way? From a file or any other command.

(Why I ask is that gpsd crash if you poll gpsctl too often)

Depending on just how you need to use the values etc have you looked at setting up NMEA outputs Services>GPS>NMEA ? Position, Speed & Heading is available in $GPRMC

Hello,

This seems to be the easiest option. However, the issue lies with the polling frequency, so other similar options will still likely crash. As Mattk suggested, using the Services > GPS > NMEA option is a viable solution. Just keep in mind that this will generate NMEA sentences, not the readable GPS information provided by gpsctl.

Best regards,

How does NMEA get the data from the gsm/gps module ?
I guess NMEA using serial interface to the chip and then using AT commands?

Then I could make my own python program instead, sound more easy then using NMEA.

You have any info regarding using AT commands ? (or is this a bad solution ?)

Hello,

NMEA sentences can be accessed directly from one of the modem ports. If a GPS connection is established, you will receive the correct NMEA sentences. You can try using AT commands, but this method is not likely to be better than using gpsctl.

Here is an example of how NMEA sentences are obtained:

2024-07-30

Best regards,

Thank, that feels like a good solution then.
I just need to make a python program to decode what I need then.

If its not working for a long term solution, I will dig more into this PDF about the chip that you have for the RUTX50:

https://sixfab.com/wp-content/uploads/2024/01/Quectel_QConnectManager_Linux_User_Guide_V1.0.pdf

I now tried to make a python program that access the /dev/ttyUSB1

But got this error message: Serial exception: device reports readiness to read but returned no data (device disconnected or multiple access on port?)

and after that not even cat /dev/ttyUSB1 works and I need to reboot the router.
ut this show up correct: ubus call gsm.modem0 info | grep gps
“gps_port”: “/dev/ttyUSB1”,

If I stop the gpsd service the script can connect to the usb1 port but then no data flowing.

Any idé what the problem might be?

If gpsd is not enabled, GPS data won’t be visible. And if gpsd is enabled, it occupies ttyUSB1. gsmctl -A AT+QGPS=1 should start the GPS on the module and gsmctl -A AT+QGPSEND should turn it off without enabling gpsd. In that case you should be able to connect to ttyUSB1

1 Like

This topic was automatically closed 40 hours after the last reply. New replies are no longer allowed.