I have a GPS on serial port 1 that outputs a constant NMEA data stream. I wish to route the data stream from the serial port to my WAN interface (ether0) and then direct the data to an outside IP address (back office) on a specific port. What commands are needed to make this happen? Thank you.
You might be able to use the special-login command to direct a ssh login to the serial port that the GPS is running on.
Sam
Thanks Sam. Would this be done in a script or could this run always in the background? I would like this to act like a ‘service’ that runs on startup and updates the back-office server every 15-30 seconds at minimum. Thanks.
The special-login basically forces a user account to hit a serial port instead of the terminal … so you could create a user called ‘gps’, assign it to serial0, and when you SSH in using the ‘gps’ user it will direct connect to serial0 instead of the cli.
You would need to script or pull that data from ssh/telnet and do what you need with it on your systems … not sure if that helps.
If you just need the lat/long emailed to you periodically you can script that … whats the end goal?
Sam
Yes, there is NMEA data (or binary data) constantly coming off the GPS to the serial port, every once in a while I need this data to be automatically sent to a central server, where near real-time data can be processed (lat, long, alt, etc).
Sounds like a simple script can do this. I’ll look into what has to happen for that…
If you just need the values you can have MT decipher the NEMA and send you the results, ie:
/system gps monitor once file=gps
/tool e-mail send to=you from=me subject=GPS_OUTPUT file=gps.txt
I tried sending the /system gps monitor once output to the email but it seems the output always ends up on the console and not in the email… not sure why.
Sam
may/25/2006 10:23:10 by RouterOS 2.9.23
software id = xxxx-M4T
date-and-time: may/25/2006 17:23:10
longitude: “W 11x 10’ 50’'”
latitude: “N 3x 9’ 48’'”
altitude: “185.199997m”
speed: “0.037040 km/h”
valid: yes
Hi,
Did you solve this issue? Have you found any reliable solution? I’m currently interested in a solution like this. I have to send the GPS data to a TCP server for tracking.
I’m using a RB912UAG and a 3G modem Huawei em820w.
Thank you in advance for your swift response.