Help Configuring Unsupported Smartwatch with Traccar Server

Helal2 days ago

Hey, I am new to Traccar. I have installed Traccar on my server, and it is running and working fine. However, I purchased a smartwatch that is not on the list of supported devices. The manufacturer provided a server configuration guide, which I would like to integrate with Traccar.

Here are the links they shared with me:

Beesure GPS Tracker Protocol : https://www.4p-touch.com/beesure-gps-setracker-server-protocol.html
Server Portal Configuration Guide: https://www.4p-touch.com/server-portal-configuration-guide.html

It seems similar to the Traccar watch protocol, but I'm not able to configure my server to properly receive data from the device. Could anyone help me with this or advise on what steps I need to take?

Thank you in advance!

Anton Tananaev2 days ago

What do you need to configure on the server?

Helal2 days ago

This is my traccar.xml file:

<properties>
  <entry key="database.driver">com.mysql.cj.jdbc.Driver</entry>
  <entry key="database.url">
    jdbc:mysql://localhost/traccar?zeroDateTimeBehavior=round&serverTimezone=UTC&allowPublicKeyRetrieval=true&useSSL=false&allowMultiQueries=true&autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8&sessionVariables=sql_mode=''
  </entry>
  <entry key="database.user">root</entry>
  <entry key="database.password">root</entry>
  <entry key="web.port">8082</entry>
  <entry key="logger.level">all</entry>
  <entry key="logger.file">/opt/traccar/logs/tracker-server.log</entry>
  <entry key="teltonika.port">5027</entry>
  <entry key="watch.port">5093</entry>
</properties>

Issue:
The port 5093 is only open for TCP, not UDP. However, other Traccar protocol ports are open for both TCP and UDP.

When I send a test packet through a Python script, it successfully hits the logs and enables a device (e.g., with the H02 protocol on port 5013). However, this does not work for port 5093, and there are no logs for that port.

Port status check results:

hp@ubuntu-2gb-sin-1:~$ sudo netstat -tuln | grep 5093
tcp6       0      0 :::5093                 :::*                    LISTEN     

hp@ubuntu-2gb-sin-1:~$ sudo netstat -tuln | grep 5001
tcp6       0      0 :::5001                 :::*                    LISTEN     
udp6       0      0 :::5001                 :::*

Logs for working ports (e.g., 5013 and H02 protocol):

2024-12-21 10:06:41  INFO: [Tc42086cb] connected
2024-12-21 10:06:41  INFO: [U16c7e3ad: h02 < 5.223.51.136] *HQ,1,V1,100641,V,2356.9027,N,09022.8075,E,000.29,000,211224,FFFF9FFF,470,02,00217,41677#
2024-12-21 10:06:41  WARN: [U16c7e3ad] error - Device is disabled - SecurityException (Disableable:32 < ConnectionManager:138 < BaseProtocolDecoder:135 < H02ProtocolDecoder:322 < ...)
2024-12-21 10:06:47  INFO: [Tc42086cb] disconnected

Logs for watch protocol on other ports (e.g., 5001):

2024-12-21 14:19:25  INFO: [U96977234: gps103 < 103.181.69.67] watch: '[3G*8800000017*00FD*UD,211224,201925,V,18.917990,S,47.5450083,E,0.00,0.0,0.0,0,87,1,0,0,00000011,7,255,646,2,81,11552,140,81,10281,127,81,10602,127,81,11553,126,81,10284,121,81,11122,119,81,10662,119,2,NETGEAR20,44:94:fc:43:5b:78, -47,TP-LINK_7650,98:de:d0:46:76:50,-88]'
2024-12-21 14:19:35  INFO: [U96977234: gps103 < 103.181.69.67] watch: '[3G*8800000017*00FD*UD,211224,201935,V,18.917990,S,47.5450083,E,0.00,0.0,0.0,0,87,1,0,0,00000011,7,255,646,2,81,11552,140,81,10281,127,81,10602,127,81,11553,126,81,10284,121,81,11122,119,81,10662,119,2,NETGEAR20,44:94:fc:43:5b:78, -47,TP-LINK_7650,98:de:d0:46:76:50,-88]'

Behavior:
If I use 5013 or any other specified port (5001, 5027, etc.), it hits the server logs successfully—except for port 5093.

Additional Note:
The device company has tested from their end but reported that my server is not ready to receive data.

I am not sure what changes or actions are needed to make port 5093 work properly and allow it to receive data on my Traccar server. Could you please advise me on this?

Your smartwatch doesn't support TCP?

Helala day ago

Yes, I believe it supports TCP. However, the problem is that my server is not receiving TCP packets either at port 5093. When I try to use port 5093, it does not appear in the Traccar logs, whereas other ports do log the incoming data

Your log shows UDP data, not TCP.

Helala day ago

Ah yes, I tested with UDP data earlier. Now, with TCP data, it is hitting the logs on port 5093. Thanks.

Could you please confirm if "watch" protocol is the correct one for my device? And does it work with Traccar?
I have added their documentation links below for reference:

Beesure GPS Tracker Protocol: https://www.4p-touch.com/beesure-gps-setracker-server-protocol.html
Server Portal Configuration Guide: https://www.4p-touch.com/server-portal-configuration-guide.html

If everything is correct, I will ask the device company to test again with my server at port 5093, as it is working for me with the test script.

What do you see in the logs?

Helala day ago

This is the response I received in the logs:

2024-12-21 19:35:31  INFO: [T5a65d787] connected
2024-12-21 19:35:31  INFO: [T5a65d787: watch < 104.248.171.254] [SG*8800000017*0000*LK]
2024-12-21 19:35:31 DEBUG: Event received
2024-12-21 19:35:31 DEBUG: Cache add device 10 references 1 key ConnectionKey[localAddress=/5.223.51.136:5093, remoteAddress=/104.248.171.254:58418]
2024-12-21 19:35:31 DEBUG: Message queued
2024-12-21 19:35:31 DEBUG: Cache add device 10 references 2 key java.lang.Object@30344637
2024-12-21 19:35:31  INFO: Event id: 8800000017, time: 2024-12-21 19:35:31, type: deviceOnline, notifications: 0
2024-12-21 19:35:31 DEBUG: Cache remove device 10 references 1 key java.lang.Object@30344637
2024-12-21 19:35:31 DEBUG: Event decoded 0
2024-12-21 19:35:31  INFO: [T5a65d787: watch > 104.248.171.254] [SG*8800000017*0002*LK]
2024-12-21 19:35:32  INFO: [T5a65d787: watch < 104.248.171.254] [SG*8800000017*008C*UD,220414,134652,A,22.571707,N,113.8613968,E,0.1,0.0,100,7,60,90,1000,50,0000,4,1,460,0,9360,4082,131,9360,4092,148,9360,4091,143,9360,4153,141]
2024-12-21 19:35:32 DEBUG: Event received
2024-12-21 19:35:32 DEBUG: Event decoded 1
2024-12-21 19:35:32 DEBUG: Cache add device 10 references 2 key 10
2024-12-21 19:35:32  INFO: [T5a65d787] id: 8800000017, time: 2014-04-22 13:46:52, lat: 22.57171, lon: 113.86140, speed: 0.1, course: 0.0
2024-12-21 19:35:32 DEBUG: Event handled
2024-12-21 19:35:32 DEBUG: Cache remove device 10 references 1 key 10

Note: I sent the data using a test script, not directly from the device.

You should disable debug logging. It never helps.

Helala day ago

I will disable the debug logging now. How about my protocol? Does everything look good to you? Is the Watch protocol the correct one for my device? Do I need to do anything else to receive device data, or is my server ready to receive data?

Looks like the standard watch protocol to me.

Helala day ago

Thanks a lot for your help.
I will follow up with the device company and test using the actual device data.