Thursday, November 10, 2011

OpenGTS client connection test with gps2opengts-free

WORK IN PROGRESS!!!

Just recently started playing setting up a GPS tracking server. Here is a follow up client connection on my Android phone with the free version of  gps2opengts. Here are some (incomplete) notes so far.

I hope you can at least find and install the gps2opengts-free on your own. I will skip that ;)
I will leave it up to you to figure out how to tunnel/port forward through your firewall as required.

OpenGTS server config change for "GPRMC" type of connections based on info from HERE.
Edit /var/lib/tomcat6/webapps/track/WEB-INF/webapp.conf and uncomment the the next 2 lines from the "# --- GPRMC properties" section:

gprmc.parm.account=acct
gprmc.parm.device=dev

Rebuild and deploy the tomcat container as noted from my server setup page:
ant all
ant track.deploy
ant gprmc.deploy

(re)Start tomcat:
service tomcat6 restart

OpenGTS web based vehicle setup for gps2opengts-free (should also work with GPS2OpenGTS_Pro):
1. Log into your OpenGTS server as a user "demo" (just playing with the demo install at this point!). 
1. From the "Main Menu" -> "Administration" tab -> "Vehicle Admin" -> create a new "Vehicle ID" of "test01".
2. From the "View/Edit Vehicle Information" section -> select the new vehicle and then "Edit" button.
3. "Unique ID" is required and will be the "test01" that is the only option for the free client gps2opengts-free. Otherwise add info to as many fields as you know/want. Make sure this vehicle is also "Active" = "Yes" and hit the "Change" button to save.

gps2opengts-free android app client setup:
I hope to document this tonight...

Note: As part of the frustration of initial install, I needed a little help from tcpdump to help figure out what was/was not happening. Again, my lack of tomcat knowledge was the reason for my issues:
tcpdump port 8080 -vvvvvv and not host THE_HOST_YOU_MAY_HAVE_SSHd_FROM

Note: I was hoping to find a handy to use wget to make local connection attempts. The assumption is that you are connecting via the "demo" default account like:
wget --post-data='/gprmc/Data?acct=demo&dev=test01&gprmc=$GPRMC,172413,A,3848.8028,N,08957.3521,W,0,000.0,171111,,*16' http://localhost:8080
But I have been unable to get this kinda thing to work. Wireshark shows the wget doing an http/1.0 post that is different that the gps2opengts_free http/1.1 post :(

Log information can be gotten from the /var/log/tomcat6/catalina.out  $GTS_HOME/logs/w-gprmc.log $GTS_HOME/logs/TrackWar.log or any other file in the $GTS_HOME/log/ directory.

5 comments:

  1. I have completed all the necessary configuration but getting this error in gtsdmtp.log file.

    [INFO_|11/22 14:47:57|ServerSocketThread$ServerSessionThread.run:1463] Remote client port: /192.168.1.203:49967[31000]
    [INFO_|11/22 14:47:57|AbstractClientPacketHandler.printSessionStart:204] Begin TCP communication: 192.168.1.203
    [INFO_|11/22 14:47:57|DMTPClientPacketHandler.sessionStarted:127] Begin Simplex communication: 192.168.1.203
    [ERROR|11/22 14:47:57|DMTPClientPacketHandler._parsePacket:927] Exception: Error:
    Invalid packet header [ServerError=F111, Packet=6465]
    at org.opendmtp.server.base.Packet.(Packet.java:656)
    at org.opendmtp.server.base.DMTPClientPacketHandler._parsePacket(DMTPClientPacketHandler.java:871)
    at org.opendmtp.server.base.DMTPClientPacketHandler.getHandlePacket(DMTPClientPacketHandler.java:197)
    at org.opengts.util.ServerSocketThread$ServerSessionThread.run(ServerSocketThread.java:1554)
    [ERROR|11/22 14:47:57|Packet.encode:859] Unknown encoding: -1
    [INFO_|11/22 14:47:57|ServerSocketThread$ServerSessionThread.run:1626] End of session ...
    [INFO_|11/22 14:47:57|DMTPClientPacketHandler.sessionTerminated:162] End Simplex communication: 192.168.1.203

    I am using gps2opengts_free in my samsung android phone. Any idea what could be wrong?

    Thanks,
    Aneesh

    ReplyDelete
  2. i am getting the following error in the w-gprmc.log file

    [WARN_|06/09 06:13:13|DCServerFactory._loadDCServerXML:640] DCServerConfig XML file not found: dcserver_w-gprmc.xml
    [INFO_|06/09 06:13:13|DCServerFactory._loadDCServerXML:647] DCServerConfig XML file not loaded: C:\Program Files\Java\apache-tomcat-7.0.27\webapps\gprmc\WEB-INF\dcservers.xml
    [INFO_|06/09 06:13:13|RTConfigContextListener.contextInitialized:211] java.awt.headless=false

    ReplyDelete
  3. Hi,
    Did you get gps2opengts runing?
    I have succesfully installed mine opengts server on Ubuntu 12.06, but I can't get it going. I'm interested in the more configurable application for android "Check me in" (in category GPS, of course). Are you willing to help me get it running on miy android phone?
    Maybe I just need to check the server is runing on the adecuate port, but i'm not sure.

    Thanks.

    ReplyDelete
  4. Thanks for the article. It worked for me as a charm. As for the Android side configuration and using curl for testing please check http://www.jvmhost.com/opengts-hosting

    ReplyDelete
  5. Hi,
    When I open the link "http://192.168.0.101:8080/gprmc/Data?acct=acct&dev=test01&gprmc=$GPRMC,172413,A,3848.8028,N,08957.3521,W,0,000.0,171111,,*16" in the browser, it gives me "OK". But, when I key in the same credentials(1.Servername :192.168.0.101 2.PortNumber : 8080 3.UserID:acct 4.VehicleID : test01 5. CommunicationMode : HTTP 6.LoggingInterval :5 ) and use the communication test screen in GPS2OpenGTS_Trial app, it gives me "Test [RX HTTP] : Error command"

    Can you tell me what I'm doing wrong

    ReplyDelete