Confusion with web port and protocol port

jm.glez.otero7 years ago

Hi guys,

I have a TK-star device. When opening, it is said on the cover LK-109, so I am assuming it has protocol h02 and port 5013. The device is working fine via SMS and I am trying to connect it to a traccar server installed in my computer running windows server. This what I did:

  • I have hired a Public IP. Let's call it from now on: my_public_ip
  • I have installed traccar server on my computer and have changed the web port to 8080. Now I can access to the traccar admin panel of this server from anywhere just by placing the following in the browser: my_public_ip:8080
  • I have set up my device with the following commands: first, adminip123456 my_public_ip:8080, second, apn123456 my_simcard_apn, and third, gprs123456. All the command where succesful, as I can see after doing check123456.

Definitely, my device is not reaching the server, because when I check the log file, there is not incoming data. Interesting enough is that when I use the tool to check if certain port is open or close, I can see that my port 5013 is close. Maybe is that the reason? In case I manage to open it, how I should send the command ipadmin to the device? There are two ports, the 8080 and the 5013, and that is confusing me.

Thanks in advance,

JM

visiondrive7 years ago

Are you using 8080 as the port on your tracker via this command reference my_public_ip:8080 as if so then that is wrong.

You said the port for your device was 5013 so I suspect your command should look like this my_public_ip:5013 (I have not checked your model).

Also port 5013 needs be open on your firewall to allow access.

8080 is for web access and not device/tracker access.

Anton Tananaev7 years ago

Traccar doesn't use port 8080 at all. I'm not sure where you got that number from. Port for web interface is 8082. Ports 5xxx are for devices.

jm.glez.otero7 years ago

Hi guys,

Thank you for your answers. The 8080 port is the one that I know for sure is opened, so what I did was to change the default web port on traccar from 8082 to 8080.

The origin of my confusion was that, when I use the traccar client from my phone, I should write on the server address field: my_public_ip:8080 (and not the 5055), and it worked. Why was that? For that reason I thought that for the devices I should do the same, making them to point to the 8080 (in my case).

I'll follow yor advises: make sure all the 5xxx ports are open and setting up my device with my_public_ip:5013. Even though 5013 may not be the actual port for my protocol device, at least I hope to notice incoming data on the server log.

I'll write you soon.

Thanks,

JM

visiondrive7 years ago

Do you actually need to set the port in your tracker as this is not normal - yes it is set in the client but normally you only need to set the server address in the tracker (without the port).

jm.glez.otero7 years ago

Hi guys,

I'll give you some updates about my case.

  1. Finally I managed to open the ports. All the 5xxxx ports of my server are now open as I double checked this via the traccar port checker.

  2. I updated my device config sending the command: adminip123456 my_public_ip:5013 (so now my device is pointing to a candidate port)

After doing that, now I can notice in the server-log that there is "something" hitting this port. Following the instruccion of the traccar support, I let the device hitting the server all the night, with the hope of getting and HEX messages that allow me to determine the actual protocol of my device. After all the night, this is the log that I got:

2018-01-31 00:07:18  INFO: [A485F8F8] connected
2018-01-31 00:17:24  INFO: [D1868D80] connected
...
2018-01-31 02:57:01  INFO: [D4A30087] connected
2018-01-31 03:00:48  INFO: [406A7339] connected
2018-01-31 03:00:48 DEBUG: [406A7339: 5007 < 80.82.77.139] HEX: 57000000001111070000ffff030000fe03000014001c080a0800000000000000040101010000000001
2018-01-31 03:01:18  INFO: [406A7339] disconnected
2018-01-31 03:05:48  INFO: [6134DC35] connected
...
2018-01-31 07:27:31  INFO: [B3A506D1] connected
2018-01-31 08:42:46  INFO: [90A83B1B] connected
2018-01-31 08:42:48 DEBUG: [90A83B1B: 5060 < 196.52.43.52] HEX: 4f5054494f4e53207369703a6361726f6c406368696361676f2e636f6d205349502f322e300d0a5669613a205349502f322e302f55445020706333332e61746c616e74612e636f6d3b6272616e63683d7a39684734624b686a6873386173733837370d0a4d61782d466f7277617264733a2037300d0a546f3a203c7369703a6361726f6c406368696361676f2e636f6d3e0d0a46726f6d3a20416c696365203c7369703a616c6963654061746c616e74612e636f6d3e3b7461673d313932383330313737340d0a43616c6c2d49443a2061383462346337366536363731300d0a435365713a203633313034204f5054494f4e530d0a436f6e746163743a203c7369703a616c69636540706333332e61746c616e74612e636f6d3e0d0a4163636570743a206170706c69636174696f6e2f7364700d0a436f6e74656e742d4c656e6774683a20300d0a0d0a
2018-01-31 08:43:19  WARN: [90A83B1B] error - An existing connection was forcibly closed by the remote host - IOException (...)
2018-01-31 08:43:19  INFO: [90A83B1B] disconnected
2018-01-31 09:15:44  INFO: [EAD9E6E6] connected
2018-01-31 09:15:59  INFO: [3B95AD65] connected
2018-01-31 09:25:23  INFO: [2249AB9B] connected
2018-01-31 09:35:05  INFO: [1A68E9BE] connected

As you can see, everything was connected and disconnected messages, and the HEX messages that appeared were not a help. Any clue about what is going on here?

Thanks,

JM

Anton Tananaev7 years ago

I don't see anything on port 5013 in your log, which means that either you provided wrong fragment or your device doesn't send anything, assuming that the port is accessible.

jm.glez.otero7 years ago

But where all this connected and disconnected messages comes from? The only device that is interacting with the server is this tk-star device. That is telling me that the port are accessible, right?

Anton Tananaev7 years ago

If ports are open to the internet it can be anything. Probably some bots probing your server for vulnerabilities. There is nothing on port 5013, so there is no way to tell if it's open, but I'm assuming that it is if all other ports are.

jm.glez.otero7 years ago

If fact, the fragment that I posted (I've just checked), supposedly correspond to port 5001. I was trying with the dfferent ports (the ones that traccar suggest to try to identifiy in case of chinese clones), until I fix in 5001 from 8:50pm to 7:00am this morning, in the hope of finding an HEX message.

So, definitely, none of these messages come from a gps tracker? Then, thats means that I havnet configured yet my device properly... But I am running out of ideas. Apn is set, correct ip + port is set, ports are open....

Anton Tananaev7 years ago

It can be a device issue or a SIM card issue or some device configuration issue. There is no way to say for sure what the root cause is, but the problem is that device doesn't send any data to the server.

visiondrive7 years ago

Have you tried using the traccar client - this is by far the simplest and easiest way to determine if your server and firewall configuration is valid.

jm.glez.otero7 years ago

Yeah, I used tha traccar client in different mobile devices, and it worked perfectly on my server...

visiondrive7 years ago

I am not sure what your problem is other than maybe the tracker is not sending to the server at all. Can you email me the manual for your device and the commands you have been using to define the SERVER and APN please - sales@visiondrive.net.au