Reg Adding GPS NMEA & GPS RAW Capabilities to get GPS location using mmcli
Ramu
ramumr06 at gmail.com
Mon Jun 22 08:20:39 UTC 2020
Hi Aleksander,
Thanks for the explanation.. Will try for GPGGA with antenna ...
1. Able to display nmea traces with *gps-nmea ..*
mmcli -m 0 --location-status
------------------------
Location | capabilities: 3gpp-lac-ci, gps-raw, gps-nmea, gps-unmanaged
| enabled: 3gpp-lac-ci, gps-raw, gps-nmea
| signals: no
------------------------
GPS | refresh rate: 30 seconds
root at tcs-imx6:~# mmcli -m 0 --location-get
--------------------------
3GPP | operator code: 404
| operator name: 49
| location area code: 0000
| tracking area code: C4E3
| cell id: 0DE0010B
--------------------------
GPS | nmea: $GPGSA,A,1,,,,,,,,,,,,,,,,*32
| $GPRMC,,V,,,,,,,,,,N,V*29
| $GPGLL,,,,,,V,N*64
| $GPVTG,,T,,M,,N,,K,N*2C
| $GPGGA,,,,,,0,,,,,,,,*66
2. For *gps-unmanaged *
mmcli -m 0 --location-status
------------------------
Location | capabilities: 3gpp-lac-ci, gps-raw, gps-nmea, gps-unmanaged
| enabled: 3gpp-lac-ci, gps-unmanaged
| signals: no
------------------------
GPS | refresh rate: 30 seconds
root at tcs-imx6:~# mmcli -m 0 --location-get
--------------------------
3GPP | operator code: 404
| operator name: 49
| location area code: 0000
| tracking area code: C4E3
| cell id: 0DE0010B
3. *For gps-raw : *
mmcli -m 0 --location-status
------------------------
Location | capabilities: 3gpp-lac-ci, gps-raw, gps-nmea, gps-unmanaged
| enabled: 3gpp-lac-ci, gps-raw
| signals: no
------------------------
GPS | refresh rate: 30 seconds
root at tcs-imx6:~# mmcli -m 0 --location-get
--------------------------
3GPP | operator code: 404
| operator name: 49
| location area code: 0000
| tracking area code: C4E3
| cell id: 0DE0010B
Regards
Ramu
On Mon, Jun 22, 2020 at 1:06 PM Aleksander Morgado <aleksander at aleksander.es>
wrote:
> Hey
>
> On Sat, Jun 20, 2020 at 3:39 PM Ramu <ramumr06 at gmail.com> wrote:
> >
> > I applied patches you mentioned for UDEV tags ... Seems to be working
> now..
> >
> > mmcli -m 0 --location-status
> > ------------------------
> > Location | capabilities: 3gpp-lac-ci, gps-raw, gps-nmea, gps-unmanaged
> > | enabled: 3gpp-lac-ci
> > | signals: no
> > ------------------------
> > GPS | refresh rate: 30 seconds
> >
>
> Good!
>
> > ### Enabling GPS working fine ###
> >
> > root at tcs-imx6:~# mmcli -m 0 --location-enable-gps-nmea
> > successfully setup location gathering
> > root at tcs-imx6:~# mmcli -m 0 --location-enable-gps-raw
> > successfully setup location gathering
> > root at tcs-imx6:~#
> >
>
> Ok.
>
> > ### Do we need get any location Data here ??? ####
> > root at tcs-imx6:~# mmcli -m 0 --location-get-gps-raw
> > error: no actions specified
> > root at tcs-imx6:~# mmcli -m 0 --location-get-gps-nmea
> > error: no actions specified
> >
>
> The command you're looking for is --location-get.
>
> > But the GPS data is comign on the ttyUSB1 port .. I have not connected
> any passive or active antenna for GPS as of now.. But seeing below data ...
> >
> > cat /dev/ttyUSB1
>
> If you are using --location-enable-gps-nmea or
> --location-enable-gps-raw you CANNOT touch the ttyUSB1 manually. You
> cannot "cat" it or any other thing, because you would be hijacking the
> data from ModemManager. If you need to cat or touch the ttyUSB1
> manually, you instead need to --location-enable-gps-unmanaged, so that
> MM takes care of starting the GPS engine, but then ignores the tty
> with the GPS data.
>
> > $GPVTG,,T,,M,,N,,K,N*2C
> > $GPGSA,A,1,,,,,,,,,,,,,,,,*32
> > $GPGGA,,,,,,0,,,,,,,,*66
> > $GPRMC,,V,,,,,,,,,,N,V*29
> > $GPGLL,,,,,,V,N*64
> > $GPVTG,,T,,M,,N,,K,N*2C
> > $GPGSA,A,1,,,,,,,,,,,,,,,,*32
> > $GPGGA,,,,,,0,,,,,,,,*66
> > $GPRMC,,V,,,,,,,,,,N,V*29
> > $GPGLL,,,,,,V,N*64
> > $GPVTG,,T,,M,,N,,K,N*2C
> > $GPGSA,A,1,,,,,,,,,,,,,,,,*32
> > $GPGGA,,,,,,0,,,,,,,,*66
> > $GPRMC,,V,,,,,,,,,,N,V*29
> > $GPGLL,,,,,,V,N*64
> >
>
> Given that your GPGGA trace doesn't give any location yet, the output
> of --location-get will not give you lat/long info, but it will still
> give you the list of NMEA traces received and read by ModemManager (as
> long as you don't hijack the tty as said above).
>
> Cheers!
>
> --
> Aleksander
> https://aleksander.es
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/modemmanager-devel/attachments/20200622/c312630b/attachment.htm>
More information about the ModemManager-devel
mailing list