Adding new device (CJ720 protocol)

Mufti2 years ago

Connect device to server

I have a Chinese device that is configured to publish to http://www.gpscj.com/ on port 7700
I followed the documentation and some suggestions in previous posts but I'm still struggling to direct the data to my traccar server.

Question

  1. Am I doing something wrong? kindly check the logs below
  2. I would appreciate it if you could also help me understand the logs

What I have tried

  1. Follow the clone page
  2. suggestion from here
  3. I tried to follow the identify protocol but is going over my head

Kindly assist

Logs

These are some logs I got from my experiments trying to connect the device, I am relatively new to traccar and GPS protocols, and really don't understand what is going on yet.

2022-10-20 15:28:35  INFO: [T44af2db3] connected
2022-10-20 15:28:35  INFO: [T44af2db3: gps103 < 63.251.232.75] 160301008a0100008603038f09c3b4e0a1eff358635a26a3e92924c6dd7a06fdcca959de0cdc3b6b7934ff00001ac02fc02bc011c007c013c009c014c00a0005002f0035c012000a0100004300000011000f00000c35342e3231362e39302e3836000500050100000000000a00080006001700180019000b00020100000d000a00080401040302010203ff01000100
2022-10-20 15:28:35  INFO: [T44af2db3] error - begin 21, end 24, length 23 - StringIndexOutOfBoundsException (... < Gps103ProtocolDecoder:413 < ExtendedObjectDecoder:72 < ... < WrapperContext:102 < ...)
2022-10-20 15:28:35  INFO: [T44af2db3] error - begin 21, end 24, length 10 - StringIndexOutOfBoundsException (... < Gps103ProtocolDecoder:413 < ExtendedObjectDecoder:72 < ... < WrapperContext:102 < ...)
2022-10-20 15:28:35  INFO: [T44af2db3] error - begin 21, end 24, length 20 - StringIndexOutOfBoundsException (... < Gps103ProtocolDecoder:413 < ExtendedObjectDecoder:72 < ... < WrapperContext:102 < ...)
2022-10-20 15:28:35  INFO: [T44af2db3] disconnected
2022-10-20 15:31:29  INFO: [T3b657106] connected
2022-10-20 15:31:29  INFO: [T3b657106] disconnected
2022-10-20 17:02:23  INFO: [T617acf15] connected
2022-10-20 17:02:23  INFO: [T617acf15] disconnected
2022-10-20 17:49:21  INFO: [Tb005b945] connected
2022-10-20 17:49:21  INFO: [Tb005b945: xexun < 192.241.214.237] 4d474c4e44445f35342e3231362e39302e38365f353030360a
2022-10-20 17:49:31  INFO: [Tb005b945] disconnected
2022-10-20 18:01:09  INFO: [Tb578aab5] connected
2022-10-20 18:01:09  INFO: [Tb578aab5: watch < 192.241.220.215] 4d474c4e44445f35342e3231362e39302e38365f353039330a
2022-10-20 18:01:19  INFO: [Tb578aab5] disconnected
Anton Tananaev2 years ago
  1. Where's the data from your device?
  2. Do you have protocol documentation?
Mufti2 years ago

Thanks for the response
you can find the docs here

Anton Tananaev2 years ago

Looks like you forgot to share the file. No permissions.

And what about the first question? Why did you skip it?

Mufti2 years ago

Sorry about that

  1. Where's the data from your device?

I honestly have no idea. My thinking is a connection needs to be established before i get to see data..

  1. Do you have protocol documentation?

Protocol documentation here

Anton Tananaev2 years ago

So, it sounds like your device is simply doesn't send any data.

Mufti2 years ago

Well, I don't know if that is the case.
I do get location data on the Yuntrack App and the web app when I change back to the Chinese domain

Anton Tananaev2 years ago

If you don't see it in the logs, it means that it's not reporting anything or you have some other network issue.

Mufti2 years ago

That is my question. Is it that I am doing something wrong or some devices can not communicate with the traccar server

Anton Tananaev2 years ago

It has nothing to do with Traccar. Your device either send data or it doesn't. To be clear, Traccar will show the HEX data even if the port is wrong or the format is not supported. If your device sends something, it will show in the logs.

Track-trace2 years ago

@Mufti

So the first thing i would think about is that you actually set the correct IP an Port correctly to make the device connect with your traccar server..

So read out / check the device config to check if it is actually set to send data to your server ip and port.

Check if the server device port is open and can be reached from the internet https://www.traccar.org/port-check/
Make sure you start your traccar server first.

When you paste HEX data from your log into https://www.traccar.org/hex-decoder/ and press decode you will actually see that the data you have in the log is no position data from your device.

Thus your device data does not reach your traccar server.

So make sure that the server port is open and can be accessed from the internet. If you cant acces the port with the Tool https://www.traccar.org/port-check/ them make sure to check there is no firewall blocking your port (this can be for instance the firewall on a router or your computer / server itself). If so open the device port in your firewall to forward the port to your traccar server..

Track-trace2 years ago

And The traccar server log is your main source to see any incoming data. So check your log after you made changes and restarted ( i noticed that i had to restart traccar server when i made changes to my firewall). Also for instance your device can stay offline in your weblogin while you could already see data in the log (for instance when you added the wrong ID when adding the device to traccar). So your log is all you need for such troubleshooting.