GPS in Mikrotik

Good day everyone.

The question is:

There is RB 953GS-5HnT and LTE modem Huawei ME909u-521
ROS 6.49.7
GPS package installed.
In the list of ports: serial0, usb2, usb3
How to set up and use GPS on this device?

Never worked with this.

https://wiki.mikrotik.com/wiki/Manual:System/GPS

https://wiki.mikrotik.com/wiki/Manual:System/GPS

Very good advice. Do you think I don’t know that the wiki has such a link?
How can I set up GPS on an LTE modem? There is not a word about it.

huawei_me909u_521_lte_lga_module_application_guide_english.pdf
12.GPS appliation scenarios

All this is wonderful. And how to connect it with Mikrotik? Should I switch my modem from LTE to PPP? I would not like it, as it will affect the speed.

Found this link on the forum. Interestingly, did the authors resolve the issue?

http://forum.mikrotik.com/t/gps-with-routeros-6-2x-and-huawei-me909u-521/86496/1

Each modem requires different things, none are exactly “easy”. So fair question. I don’t have a Huawei modems to be more specific.

But few things that might help GPS going here:

  • I’d start with “/port print” to see how many channels on the show up in LTE mode. The modem is going to be only one of usb2 or usb3 – not both.
  • You can use /system/serial-terminal port=usbX channel=Y with usbX being the modem’s usb port and then start with channel=0, and then channel=1. Each time typing “AT” to see if you get a response. If you start getting a bunch of lines starting with “$” then that’s the channel that’s needed for the /system/gps data-channel=.
  • If you’re only seeing one channel, then GPS port is not enabled via AT, or may not found by RouterOS… That could also be that LTE doesn’t show all of the channels too. You can try using “Ignore IPDirect modem” in V6 (/interface/lte/set mode=serial in V7) which should expose all the channels on the USB port. If you do this, then you need to the “PPP” (NOT LTE) interface for IP data from modem. If your speed are less than 30Mb/s, PPP is fine BUT you run into the limit of serial interface so that the max speed possible with PPP (while an LTE interface does not have such limit). So be better if LTE can be used…but to get the needed ports to show up, you may need to use PPP.

important to note is the Huawei modem many need some “AT” command enable NMEA output – this part I can’t help too much with but an AT manual for the modem should explain how to enable NMEA GPS output.

Thanks a lot, Amm0.
In Huawey modems, GPS output is enabled by the command “AT^WPDST=1,AT^WPDGP”.
While I’m waiting for the GPS antenna to be delivered to me.
I’ll try what you advised, I’ll unsubscribe.

I think these are the commands:
http://forum.mikrotik.com/t/gps-with-routeros-6-2x-and-huawei-me909u-521/86496/2

Those may not have worked since the AT commands control things like the GPS mode (“tower-based”/AGPS vs “real”/standalone GPS), antenna port used and desired accuracy in meters. My guess is if there isn’t accurate enough “fix”, the modem may not return anything was the cause of the issue in the above.

You might want to find the AT manual for the specific modem and verify them. If you can get to an AT terminal, make sure use an AT command one to read the position (and get one) before trying in the /system/gps.

Fine. Thanks again.

IMHO the problem is in firmware of these modems. Modem should have firmware >= 12.xx to have GPS working … found on Internet … do not ask where. I have few such modems and have no idea how to upgrade them as FOTA process is not working

The firmware version of my modem is 12.636.11.01.00

Installed a MicroTik ACGPSA antenna. The functionality turns on, but in the GPS tab all the numbers are zero and there are no satellites found.
:frowning:

Did you try various value in data-channel= within the GPS settings?

Is the modem getting GPS readings via an AT command?

Did you try various value in data-channel= within the GPS settings?

Yes, I try.

Is the modem getting GPS readings via an AT command?

How to check it?

It is interesting that after the commands

/interface lte at-chat lte1 input=“AT^WPDST=1”
/interface lte at-chat lte1 input=“AT^WPDGP”

and turning on GPS in the /ports tab opposite USB2, GPS appears for a few seconds, but then disappears.

I can't post the AT manual for these, but looked up the various AT commands needed to configure the GPS. You may have to adjust the below and google may help explain the various one.

use "standalone" mode e.g. do NOT use GPS from network, use antenna and real satellites (0=SA, 1=AGPS)

AT^WPDOM=0

use continuous read of GPS (0=once, 1=keep-running)

AT^WPDST=1

how accurate and how long should GPS should wait — this is most conservative max wait time (255) and 1000 meter accuracy

first is the max wait time for GPS answer (0-255 seconds)

second is the the desired accuracy (25-1000, default 50) – will return GPS position once accuracy has been meet

AT^WPQOS=255,1000

set all forms of GPS (bit mask, so 3 both, while 1 is US-GPS only, 2 is GLOSNAS only)

AT^WPCAP=3

set the NMEA port to use — here IDK, you may have try them to see what Mikrotik maps as the data-channel=

0 = "GPS port" (no idea what that be in RouterOS)

1 = use "first" serial channel for NMEA but guessing RouterOS may use this one, so...

2 = use "second" serial channel for NMEA

AT^WPPORT=2

start position — this you might want to use in /system/gps as the init command (and set the init-channel= to something valid other than the data-channel=)

AT^WPDGP

You can also add some logging, maybe it show the unsolicited replies to get more clues:

/system/logging/add topics=lte,!packet

There is an AT^WPINFO that should show if GPS is active, but AFAIK, there isn’t a command I see that reports the last fix.

But I suspect trying a different value in the AT^WPPORT shown above, but get you different results showing in /system/gps. As noted above also you may need to tweak the data-channel= if you change this one too.

Thank you so much for your detailed answer. I will try.

I tried it on another RB - RBM33G and another modem - SIERRA 7710. Previously, using the AT command, I turn on the GPS on the modem.
The same result - the functionality is turned on, there is no data. The functionality is enabled on USB3 port 2, on others it simply does not work from the word at all.
I 'm doing something wrong … Maybe the antenna is defective ?
It can 't not work on two different modems and different RB …

Each of modem types requires radically different setup. For Sierra, I wrote up GPS instructions for the MC7455 here: http://forum.mikrotik.com/t/mikrotik-lte-sierra-wireless-mc7455/158170/1 - pay attention to the steps 3 and 7. For NMEA data to be sent from modem, a $GPS_START command needs to be sent on the same channel as the GPS port (see step 7). Also, with most Sierra modem you can use the DIV antenna, instead of a separate GPS antenna. The LTE antenna need to support ~1.5Ghz but many do for the “shared” GPS antennas to work (see step 3 in linked post).


Seems unlikely the antenna is “broken” unless there is obvious signs of damage/poor connection/etc. But the GPS antenna does need to a view of the sky for “standalone GPS” to work & antennas needs to support GPS frequencies. Now if inside and a modem is configured for standalone GPS" you won’t get any readings & AT commands will show # of satellites in view (should be >3 satellites). There is a “assisted GPS” modes too, these modes use cell towers in various schemes to get a GPS fix but complex/errorprone & less accurate but can work indoors. The GPS method is control by the AT commands and Mikrotik GPS has little to do with this BUT it does have to setup right on the modem. The /system/gps really just parses NMEA messages from a serial port, but all of the data sent is control by the modem itself.