Community discussions

MikroTik App
 
m2mconnectivity
newbie
Topic Author
Posts: 25
Joined: Mon Sep 20, 2010 2:52 am

Sending GPS data to a TCP server

Mon Sep 20, 2010 3:03 am

Hello all,
I'm using RB411 at the moment and GPS is working fine on it. I have got some customers who want to send this GPS data to a TCP server (this application will lead the RouterBoard to act as a tracker). So can anyone please assist me how can I achieve this goal.
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26385
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: Sending GPS data to a TCP server

Mon Sep 20, 2010 9:06 am

you can either write the gps data to a text file, and make the remote program get it with FTP, or you can email this data and then make the remote program get it from the mails.
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Sending GPS data to a TCP server

Mon Sep 20, 2010 1:55 pm

There is a script in the wiki that may have part of what you want in it.
http://wiki.mikrotik.com/wiki/GPS_text_ ... Earth/Maps
 
m2mconnectivity
newbie
Topic Author
Posts: 25
Joined: Mon Sep 20, 2010 2:52 am

Re: Sending GPS data to a TCP server

Tue Sep 21, 2010 8:51 am

guys,
thanks...I appreciate your suggestion :)
But what I really want to do is, make RB411 as a TCP client and push gps data to a TCP server.
This is a really demanding feature at the moment from our customers.
Any suggestion??
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26385
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: Sending GPS data to a TCP server

Tue Sep 21, 2010 8:56 am

we already gave you all the options. there is no way to push anything
 
m2mconnectivity
newbie
Topic Author
Posts: 25
Joined: Mon Sep 20, 2010 2:52 am

Re: Sending GPS data to a TCP server

Tue Sep 21, 2010 9:15 am

normis, is there any way to make the router as a TCP client i-e when router powers up, it should connect to server IP:PORT?
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26385
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: Sending GPS data to a TCP server

Tue Sep 21, 2010 9:16 am

again. no!
 
dssmiktik
Forum Veteran
Forum Veteran
Posts: 732
Joined: Fri Aug 17, 2007 8:42 am

Re: Sending GPS data to a TCP server

Wed Sep 22, 2010 4:28 am

Another option could be to use include GPS data in an HTTP GET request.
/tool fetch host=<server> src-path="/path/to/page.cgi?gpsp1=<val1>&gpsp2=<val2> ...
Then, on the server you could setup a server-side language (say php, python, etc...) to parse the received data. This method relies on already defined standards/software (http server, server language, tcp, etc...). Once the data is parsed, you server-side code could generate data sent to raw sockets if desired.
 
solutionsbw
just joined
Posts: 8
Joined: Thu Apr 03, 2014 11:30 am

Re: Sending GPS data to a TCP server

Mon May 19, 2014 5:28 pm

Hello all,
I'm using RB411 at the moment and GPS is working fine on it. I have got some customers who want to send this GPS data to a TCP server (this application will lead the RouterBoard to act as a tracker). So can anyone please assist me how can I achieve this goal.

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.
 
sc0tt
just joined
Posts: 15
Joined: Thu Sep 25, 2014 5:34 am

Re: Sending GPS data to a TCP server

Sat Oct 04, 2014 3:20 pm

wow gps nice
 
BobcatGuy
Member Candidate
Member Candidate
Posts: 240
Joined: Thu Apr 19, 2007 7:41 am

Re: Sending GPS data to a TCP server

Sat Nov 19, 2016 10:52 pm

Something I am working on too.. with GPSGate Server. The URL the device ( in my case a cell phone) send out is this format: ( Captured by packet Sniffer on Mikrotik)
"http://mygps.server.com/gpsgateserver/g ... =GHXKlK622"

Note, the user name is actually in plain text in the URL, I have replaced mine with " Username " ( Capitalization was the same as entered on server) The password appears to be a MD5hash? it is the same in each transmission from the device, but it is NOT the password I had typed into the GPSgate server.

opening this URL from a web browser will yield a result of :
ERROR Wrong username or password
So, this appears that the FETCH command will work, once the username and password issue is resolved. I think in GPS gate server I can create a device that will not require this password, but just a unique identifier number.

I did notice that in terminal on ROS that as soon as you type the " ? " in the gpsgate.aspx? it brings up the help menu, and the ? is not in the URL, not sure what it would do when it is added to a script.

I will try to figure out the password issue, or create another device profile in gpsgate server as it id flexible on how it works. I too would rather use a mikrotik for my tracking, has more options available to me.
Last edited by BobcatGuy on Sat Nov 19, 2016 11:16 pm, edited 1 time in total.
 
BobcatGuy
Member Candidate
Member Candidate
Posts: 240
Joined: Thu Apr 19, 2007 7:41 am

Re: Sending GPS data to a TCP server

Sat Nov 19, 2016 11:16 pm

AHH, more googleing and I found something...
How the password is encypted.. for GPS gate server

http://forum.gpsgate.com/viewtopic.php?t=5638

Now, since I know nothing about programming, I will have to learn that to figure how the password is encrypted... and well... if it was already encrypted, why didn't it work when I sent the encrypted text in the URL....

I should just buy a tracking device... :(


UPDATE!!!!!

YAY!!!
I was using Edge browser with that URL, and it always changed the password to lower case, I tried it on an Samsung using chrome, and did the proper capitalization, and the simple two letter word came back that gave me wood.

OK

was the response.

Didn't think it worked, BUT the mouse in my brain was running...
The time stamp that you enter MUST be UTC time, not local. I tried for 20 minutes, and it never moved, then I added my 7 hours to that timestamp in the URL and WORKED! In a flash I was across the world.

Testing Mikrotik using FETCH command in a script does not update the GPSgate Server..

Still testing

FINAL UPDATE!!!
The result is from forum search for aspx? need this formatting:
/tool fetch url=("http://Mygps.server.com/gpsgateserver/g ... =GIHJEY622")

NOTEs
Needs (" and ") for URL string
The aspx\?longitude Needs the \ before the ?

The Time has to be UTC time in 24 hour, date is obvious formatting
Co-ordinates are Decimal even with a " - " for west coordinates
Username is Case Sensitive
Password is Case sensitive too and those values are samples only
Speed value is MPH as I tried 50.3 which showed up as 93.2 Km/h on the server database
FYI, GPSgate Server is free with 5 licenses for personal and commercial use. and any additional ones are 50 USD each, one time fee. I like it because I know where my data goes, my own server, where third party servers I have no control over.

Hope this helps. Now to get a GPS receiver for the MT!
 
BobcatGuy
Member Candidate
Member Candidate
Posts: 240
Joined: Thu Apr 19, 2007 7:41 am

Re: Sending GPS data to a TCP server

Sun Nov 20, 2016 8:43 am

I found this, which may be of interest to some other than MT for posting another product :-) HOWEVER, it has a LAN port that you can connect to a Routerboard!
https://www.alibaba.com/product-detail/ ... 18353.html
 
nemke
Member Candidate
Member Candidate
Posts: 160
Joined: Thu Jul 31, 2014 2:52 am

Re: Sending GPS data to a TCP server

Sat Jul 21, 2018 8:49 pm

I found this, which may be of interest to some other than MT for posting another product :-) HOWEVER, it has a LAN port that you can connect to a Routerboard!
https://www.alibaba.com/product-detail/ ... 18353.html
Hello
I have LtAP mini LTE like tracker and GPS Gate Server.
Can you share script (tool fatch url:.... ) for MT, and setup of GPS Gate Server to work with this ? I like to see positition of MT on Server.
GPS work on LtAP

THANK YOU

Who is online

Users browsing this forum: abbio90, Semrush [Bot] and 58 guests