Protocol Watch - Warning

jcorreajr7 years ago

After setting the trace to work with the Watch protocol, port 5093

<entry key='watch.port'>5093</entry>

During the position updates the following warning occurs:

2017-10-24 16:57:12  INFO: [9FF24F00] connected
2017-10-24 16:58:08 DEBUG: [9FF24F00: 5093 < 108.175.9.125] HEX: 5b53472a393035313034373931372a303041372a55442c3234313031372c3138353830362c412c32392e3833393932312c532c35312e3135393433372c572c302e303030302c3030302c312c30382c38302c39302c302c35302c30303030303030302c362c312c3732342c362c3935312c343536332c3134382c3935312c343436372c3134332c3935312c343436322c3134322c3935312c343436382c3134312c3935312c343538332c3133392c3935312c343535332c3133382c2c30305d
2017-10-24 16:58:08  INFO: [9FF24F00] id: 9051047917, time: 2017-10-24 16:58:06, lat: -29.83992, lon: -51.15944, speed: 0.0, course: 0.0
2017-10-24 16:59:07 DEBUG: [9FF24F00: 5093 < 108.175.9.125] HEX: 5b53472a393035313034373931372a303041372a55442c3234313031372c3138353930362c412c32392e3833393933362c532c35312e3135393433302c572c302e303138352c3030302c312c30382c38302c39302c302c35302c30303030303030302c362c312c3732342c362c3935312c343536332c3134362c3935312c343436382c3134322c3935312c343538332c3134302c3935312c343436322c3133392c3935312c343436372c3133392c3935312c343532332c3133382c2c30305d
2017-10-24 16:59:07  WARN: [9FF24F00] error - For input string: "17*0" - NumberFormatException (... < WatchFrameDecoder:37 < ...)
2017-10-24 16:59:07  INFO: [9FF24F00] disconnected
2017-10-24 16:59:07  WARN: [9FF24F00] error - For input string: "17*0" - NumberFormatException (... < WatchFrameDecoder:37 < ... < MainEventHandler:115 < *:104 < ... < GeocoderHandler:52 < ...)

Although the warning sometimes occurs, it updates the positions.
I checked the lines for the warning and did not find anything out of the protocol standard:

[SG*9051047917*00A7*UD,241017,185507,A,29.839891,S,51.159433,W,0.0555,000,1,08,80,90,0,50,00000000,6,1,724,6,951,4461,155,951,4468,141,951,4467,140,951,4462,140,951,4553,138,951,4523,138,,00]

https://github.com/tananaev/traccar/blob/master/test/org/traccar/protocol/WatchProtocolDecoderTest.java

Anyone know what it could be?

Anton Tananaev7 years ago

Do you have protocol documentation for your device? There seems to be a problem with message length field.

jcorreajr7 years ago

I do not have device documentation (for a while)

By comparing the valid information with the error, I can not identify any differences between them. See the details below:

Information without errors:

[SG*9051047917*00A7*UD,241017,185806,A,29.839921,S,51.159437,W,0.0000,000,1,08,80,90,0,50,00000000,6,1,724,6,951,4563,148,951,4467,143,951,4462,142,951,4468,141,951,4583,139,951,4553,138,,00]

It was included without problems in the database

mysql> select id,protocol,deviceid,servertime,devicetime,fixtime,valid,latitude,longitude,altitude,speed,course,accuracy from positions where deviceid=82;

| 1264736 | watch    |       82 | 2017-10-24 16:58:08 | 2017-10-24 16:58:06 | 2017-10-24 16:58:06 |      | -29.839921 | -51.159437 |        1 |         0 |      0 | 

This error occurred:

[SG*9051047917*00A7*UD,241017,185906,A,29.839936,S,51.159430,W,0.0185,000,1,08,80,90,0,50,00000000,6,1,724,6,951,4563,146,951,4468,142,951,4583,140,951,4462,139,951,4467,139,951,4523,138,,00]

In Log:

2017-10-24 16:59:07  WARN: [9FF24F00] error - For input string: "17*0" - NumberFormatException (... < WatchFrameDecoder:37 < ...)
2017-10-24 16:59:07  INFO: [9FF24F00] disconnected
2017-10-24 16:59:07  WARN: [9FF24F00] error - For input string: "17*0" - NumberFormatException (... < WatchFrameDecoder:37 < ... < MainEventHandler:115 < *:104 < ... < GeocoderHandler:52 < ...)

As I said, comparing the two lines, I could not identify differences in field size between them.

Anton Tananaev7 years ago

The problem is with frame decoding because the message length is not correct.

I have got same problem - Chinese device TK905:

2017-11-06 23:32:22  WARN: [2691CF6D] error - For input string: "90*0" - NumberFormatException (... < WatchFrameDecoder:37 < ... < MainEventHandler:115 < *:104 < ... < GeocoderHandler:52 < ...)
2017-11-06 23:32:23  INFO: [B51C79B8] connected
2017-11-06 23:33:22 DEBUG: [B51C79B8: 5093 < 185.135.3.174] HEX: 5b53472a393035313035323739302a303039372a55442c3036313131372c3232333434362c412c35302e3232353632352c4e2c31382e3936353132352c452c302e303138352c3030302c302c30392c3130302c3130302c302c35302c30303030303030302c342c312c3236302c362c323032312c35353130372c3134372c323032312c35353130382c3134372c323032312c35353737382c3133342c323032312c35333939332c3133312c2c30305d
2017-11-06 23:33:22  INFO: [B51C79B8] id: 9051052790, time: 2017-11-06 23:34:46, lat: 50.22563, lon: 18.96513, speed: 0.0, course: 0.0
2017-11-06 23:34:19  INFO: [B51C79B8] disconnected
2017-11-06 23:48:54  INFO: [CDE090BE] connected
2017-11-06 23:49:03 DEBUG: [CDE090BE: 5093 < 185.135.3.173] HEX: 5b53472a393035313035323739302a303039372a55442c3036313131372c3232353032382c412c35302e3232353631352c4e2c31382e3936353132332c452c342e303337332c3030302c322c30342c3130302c3130302c302c35302c30303030303030302c342c312c3236302c362c323032312c35353130372c3134312c323032312c35353130382c3134312c323032312c35333939332c3133302c323032312c35353737382c3132362c2c30305d
2017-11-06 23:49:03  INFO: [CDE090BE] id: 9051052790, time: 2017-11-06 23:50:28, lat: 50.22562, lon: 18.96512, speed: 2.2, course: 0.0
2017-11-06 23:49:48  INFO: [74583BA5] connected
2017-11-06 23:49:48 DEBUG: [74583BA5: 5093 < 185.135.3.173] HEX: 5b53472a393035313035323739302a303037412a55442c3331313231362c3233303032312c562c35302e3232353631352c4e2c31382e3936353132332c452c342e303337332c3030302c39392c30302c3130302c3130302c302c35302c30303030303030302c322c312c3236302c362c323032312c35353130382c3134322c323032312c35353130372c3134312c2c30305d
2017-11-06 23:49:48  INFO: [74583BA5] id: 9051052790, time: 2017-01-01 00:00:21, lat: 50.22562, lon: 18.96512, speed: 2.2, course: 0.0
2017-11-06 23:49:50 DEBUG: [74583BA5: 5093 < 185.135.3.173] HEX: 5b53472a393035313035323739302a303030392a4c4b2c302c3130305d
2017-11-06 23:49:50  WARN: [74583BA5] error - For input string: "90*0" - NumberFormatException (... < WatchFrameDecoder:37 < ...)
2017-11-06 23:49:50  INFO: [74583BA5] disconnected
2017-11-06 23:49:50  WARN: [74583BA5] error - For input string: "90*0" - NumberFormatException (... < WatchFrameDecoder:37 < ... < MainEventHandler:115 < *:104 < ... < GeocoderHandler:52 < ...)
2017-11-06 23:49:51  INFO: [3EE5302F] connected
2017-11-06 23:50:06 DEBUG: [3EE5302F: 5093 < 185.135.3.173] HEX: 5b53472a393035313035323739302a303039372a55442c3036313131372c3232353132392c412c35302e3232353535392c4e2c31382e3936353136322c452c312e383333342c3030302c312c30362c3130302c3130302c302c35302c30303030303030302c342c312c3236302c362c323032312c35353130382c3134322c323032312c35353130372c3134302c323032312c35333939332c3133302c323032312c35353737382c3132362c2c30305d
2017-11-06 23:50:07  INFO: [3EE5302F] id: 9051052790, time: 2017-11-06 23:51:29, lat: 50.22556, lon: 18.96516, speed: 1.0, course: 0.0
2017-11-06 23:51:06 DEBUG: [3EE5302F: 5093 < 185.135.3.173] HEX: 5b53472a393035313035323739302a303041362a55442c3036313131372c3232353232392c412c35302e3232353534312c4e2c31382e3936353035352c452c302e323737382c3030302c302c30392c3130302c3130302c302c35302c30303030303030302c352c312c3236302c362c323032312c35353130382c3134312c323032312c35353130372c3134302c323032312c35333939332c3132392c323032312c35353737382c3132362c323032312c35353634372c3132332c2c30305d
2017-11-06 23:51:06  WARN: [3EE5302F] error - For input string: "90*0" - NumberFormatException (... < WatchFrameDecoder:37 < ...)
2017-11-06 23:51:06  INFO: [3EE5302F] disconnected
2017-11-06 23:51:06  WARN: [3EE5302F] error - For input string: "90*0" - NumberFormatException (... < WatchFrameDecoder:37 < ... < MainEventHandler:115 < *:104 < ... < GeocoderHandler:52 < ...)
2017-11-06 23:51:07  INFO: [43A7B438] connected
2017-11-06 23:52:06 DEBUG: [43A7B438: 5093 < 185.135.3.173] HEX: 5b53472a393035313035323739302a303041362a55442c3036313131372c3232353332382c412c35302e3232353631382c4e2c31382e3936353038382c452c302e303932362c3030302c302c30382c3130302c3130302c302c35302c30303030303030302c352c312c3236302c362c323032312c35353130382c3134312c323032312c35353130372c3133392c323032312c35333939332c3133302c323032312c35353737382c3132362c323032312c35353634372c3132332c2c30305d
2017-11-06 23:52:06  INFO: [43A7B438] id: 9051052790, time: 2017-11-06 23:53:28, lat: 50.22562, lon: 18.96509, speed: 0.1, course: 0.0
2017-11-06 23:53:05 DEBUG: [43A7B438: 5093 < 185.135.3.173] HEX: 5b53472a393035313035323739302a303041362a55442c3036313131372c3232353432382c412c35302e3232353538372c4e2c31382e3936353131302c452c302e323737382c3030302c302c30392c3130302c3130302c302c35302c30303030303030302c352c312c3236302c362c323032312c35353130382c3134312c323032312c35353130372c3133392c323032312c35333939332c3133302c323032312c35353737382c3132362c323032312c35353634372c3132332c2c30305d
2017-11-06 23:53:05  WARN: [43A7B438] error - For input string: "90*0" - NumberFormatException (... < WatchFrameDecoder:37 < ...)
2017-11-06 23:53:05  INFO: [43A7B438] disconnected
2017-11-06 23:53:05  WARN: [43A7B438] error - For input string: "90*0" - NumberFormatException (... < WatchFrameDecoder:37 < ... < MainEventHandler:115 < *:104 < ... < GeocoderHandler:52 < ...)
2017-11-06 23:53:06  INFO: [4066CCBF] connected
2017-11-06 23:54:05 DEBUG: [4066CCBF: 5093 < 185.135.3.173] HEX: 5b53472a393035313035323739302a303041362a55442c3036313131372c3232353532382c412c35302e3232353534352c4e2c31382e3936353132302c452c302e313438312c3030302c302c30392c3130302c3130302c302c35302c30303030303030302c352c312c3236302c362c323032312c35353130382c3134312c323032312c35353130372c3134302c323032312c35333939332c3133302c323032312c35353737382c3132362c323032312c35353634372c3132332c2c30305d
2017-11-06 23:54:05  INFO: [4066CCBF] id: 9051052790, time: 2017-11-06 23:55:28, lat: 50.22555, lon: 18.96512, speed: 0.1, course: 0.0
2017-11-06 23:54:43  INFO: [4066CCBF] disconnected

I can't say yet if it is the frame that is sent incorrectly.
When I was determining the protocol I was sending messages to 5001 (so that just the hex was printed) and the messages were like:

2017-11-06 22:21:54 DEBUG: [ADC839A5: 5001 < 185.135.3.175] HEX: 5b53472a393035313035323739302a303041372a5544322c3036313131372c3230313232352c412c35302e3232353530392c4e2c31382e3936353036382c452c302e353932362c3030302c302c30382c3130302c3130302c302c35302c30303030303030302c352c312c3236302c362c323032312c35353130372c3134362c323032312c35353130382c3134332c323032312c35333939332c3132392c323032312c35353737382c3132362c323032312c35353634372c3132312c2c30305d
2017-11-06 22:21:57 DEBUG: [ADC839A5: 5001 < 185.135.3.175] HEX: 5b53472a393035313035323739302a303039382a5544322c3036313131372c3230313332342c412c35302e3232353533342c4e2c31382e3936353131332c452c302e343235392c3030302c302c30372c3130302c3130302c302c35302c30303030303030302c342c312c3236302c362c323032312c35353130372c3134342c323032312c35353130382c3134312c323032312c35353737382c3133332c323032312c35333939332c3132352c2c30305d
2017-11-06 22:22:00 DEBUG: [ADC839A5: 5001 < 185.135.3.175] HEX: 5b53472a393035313035323739302a303039382a5544322c3036313131372c3230313432322c412c35302e3232353538302c4e2c31382e3936353133372c452c322e333135302c3137342c302c30372c3130302c3130302c302c35302c30303030303030302c342c312c3236302c362c323032312c35353130372c3134362c323032312c35353130382c3134352c323032312c35333939332c3132372c323032312c35353737382c3132362c2c30305d
2017-11-06 22:22:03 DEBUG: [ADC839A5: 5001 < 185.135.3.175] HEX: 5b53472a393035313035323739302a303039382a5544322c3036313131372c3230313532312c412c35302e3232353539352c4e2c31382e3936353131322c452c302e393633302c3030302c302c30382c3130302c3130302c302c35302c30303030303030302c342c312c3236302c362c323032312c35353130372c3134332c323032312c35353130382c3134322c323032312c35353737382c3133332c323032312c35333939332c3132392c2c30305d
2017-11-06 22:22:06 DEBUG: [ADC839A5: 5001 < 185.135.3.175] HEX: 5b53472a393035313035323739302a303039382a5544322c3036313131372c3230313632312c412c35302e3232353531392c4e2c31382e3936353039352c452c302e373232322c3030302c302c30372c3130302c3130302c302c35302c30303030303030302c342c312c3236302c362c323032312c35353130372c3134352c323032312c35353130382c3134342c323032312c35333939332c3132382c323032312c35353737382c3132342c2c30305d
2017-11-06 22:22:09 DEBUG: [ADC839A5: 5001 < 185.135.3.175] HEX: 5b53472a393035313035323739302a303039372a55442c3036313131372c3231323333342c412c35302e3232353439332c4e2c31382e3936353030322c452c302e333531382c3030302c312c30382c3130302c3130302c302c35302c30303030303030302c342c312c3236302c362c323032312c35353130382c3134312c323032312c35353130372c3133362c323032312c35353737382c3132352c323032312c35333939332c3132332c2c30305d
2017-11-06 22:22:12 DEBUG: [ADC839A5: 5001 < 185.135.3.175] HEX: 5b53472a393035313035323739302a303039382a5544322c3036313131372c3230313632372c412c35302e3232353532342c4e2c31382e3936353039302c452c302e363131312c3030302c302c30372c3130302c3130302c302c35302c30303030303030302c342c312c3236302c362c323032312c35353130372c3134352c323032312c35353130382c3134342c323032312c35333939332c3132382c323032312c35353737382c3132342c2c30305d
2017-11-06 22:22:15 DEBUG: [ADC839A5: 5001 < 185.135.3.175] HEX: 5b53472a393035313035323739302a303039382a5544322c3036313131372c3230313732372c412c35302e3232353534392c4e2c31382e3936353130372c452c302e343037342c3030302c302c30382c3130302c3130302c302c35302c30303030303030302c342c312c3236302c362c323032312c35353130372c3134372c323032312c35353130382c3134342c323032312c35353737382c3132382c323032312c35333939332c3132372c2c30305d
2017-11-06 22:22:18 DEBUG: [ADC839A5: 5001 < 185.135.3.175] HEX: 5b53472a393035313035323739302a303039382a5544322c3036313131372c3230313832362c412c35302e3232353531352c4e2c31382e3936353033332c452c312e303337312c3030302c302c30382c3130302c3130302c302c35302c30303030303030302c342c312c3236302c362c323032312c35353130372c3134382c323032312c35353130382c3134342c323032312c35353737382c3133322c323032312c35333939332c3132362c2c30305d
2017-11-06 22:22:21 DEBUG: [ADC839A5: 5001 < 185.135.3.175] HEX: 5b53472a393035313035323739302a303039382a5544322c3036313131372c3230313932362c412c35302e3232353538342c4e2c31382e3936353039332c452c312e303030302c3030302c312c30362c3130302c3130302c302c35302c30303030303030302c342c312c3236302c362c323032312c35353130372c3134382c323032312c35353130382c3134332c323032312c35353737382c3133312c323032312c35333939332c3132372c2c30305d
2017-11-06 22:22:24 DEBUG: [ADC839A5: 5001 < 185.135.3.175] HEX: 5b53472a393035313035323739302a303039382a5544322c3036313131372c3230323032352c412c35302e3232353530322c4e2c31382e3936353034382c452c302e333838392c3030302c312c30372c3130302c3130302c302c35302c30303030303030302c342c312c3236302c362c323032312c35353130372c3134372c323032312c35353130382c3134332c323032312c35353737382c3133322c323032312c35333939332c3132362c2c30305d
2017-11-06 22:22:26 DEBUG: [ADC839A5: 5001 < 185.135.3.175] HEX: 5b53472a393035313035323739302a303039382a5544322c3036313131372c3230323934302c412c35302e3232353534332c4e2c31382e3936353233322c452c322e313835332c3030302c312c30352c3130302c3130302c302c35302c30303030303030302c342c312c3236302c362c323032312c35353130372c3134372c323032312c35353130382c3134342c323032312c35353737382c3132382c323032312c35333939332c3132352c2c30305d
2017-11-06 22:22:29 DEBUG: [ADC839A5: 5001 < 185.135.3.175] HEX: 5b53472a393035313035323739302a303039382a5544322c3036313131372c3230333034302c412c35302e3232353537302c4e2c31382e3936353035372c452c302e383333342c3030302c312c30372c3130302c3130302c302c35302c30303030303030302c342c312c3236302c362c323032312c35353130372c3134372c323032312c35353130382c3134332c323032312c35353737382c3132382c323032312c35333939332c3132362c2c30305d
2017-11-06 22:22:33 DEBUG: [ADC839A5: 5001 < 185.135.3.175] HEX: 5b53472a393035313035323739302a303039382a5544322c3036313131372c3230333133392c412c35302e3232353535392c4e2c31382e3936353032322c452c302e323232322c3030302c312c30362c3130302c3130302c302c35302c30303030303030302c342c312c3236302c362c323032312c35353130372c3134382c323032312c35353130382c3134342c323032312c35353737382c3132382c323032312c35333939332c3132372c2c30305d
2017-11-06 22:22:50 DEBUG: [ADC839A5: 5001 < 185.135.3.175] HEX: 5b53472a393035313035323739302a303030392a4c4b2c302c3130305d
2017-11-06 22:22:51 DEBUG: [ADC839A5: 5001 < 185.135.3.175] HEX: 5b53472a393035313035323739302a303039372a55442c3036313131372c3231323431352c412c35302e3232353532332c4e2c31382e3936353038382c452c312e303030302c3030302c312c30382c3130302c3130302c302c35302c30303030303030302c342c312c3236302c362c323032312c35353130382c3134312c323032312c35353130372c3133352c323032312c35353737382c3132352c323032312c35333939332c3132322c2c30305d
2017-11-06 22:22:59  INFO: [ADC839A5] disconnected
2017-11-06 22:26:43  INFO: [F9BF2E01] connected


[SG*9051052790*0098*UD2,061117,201324,A,50.225534,N,18.965113,E,0.4259,000,0,07,100,100,0,50,00000000,4,1,260,6,2021,55107,144,2021,55108,141,2021,55778,133,2021,53993,125,,00]
[SG*9051052790*0098*UD2,061117,201422,A,50.225580,N,18.965137,E,2.3150,174,0,07,100,100,0,50,00000000,4,1,260,6,2021,55107,146,2021,55108,145,2021,53993,127,2021,55778,126,,00]
[SG*9051052790*0098*UD2,061117,201521,A,50.225595,N,18.965112,E,0.9630,000,0,08,100,100,0,50,00000000,4,1,260,6,2021,55107,143,2021,55108,142,2021,55778,133,2021,53993,129,,00]
[SG*9051052790*0098*UD2,061117,201621,A,50.225519,N,18.965095,E,0.7222,000,0,07,100,100,0,50,00000000,4,1,260,6,2021,55107,145,2021,55108,144,2021,53993,128,2021,55778,124,,00]
[SG*9051052790*0097*UD,061117,212334,A,50.225493,N,18.965002,E,0.3518,000,1,08,100,100,0,50,00000000,4,1,260,6,2021,55108,141,2021,55107,136,2021,55778,125,2021,53993,123,,00]
[SG*9051052790*0098*UD2,061117,201627,A,50.225524,N,18.965090,E,0.6111,000,0,07,100,100,0,50,00000000,4,1,260,6,2021,55107,145,2021,55108,144,2021,53993,128,2021,55778,124,,00]
[SG*9051052790*0098*UD2,061117,201727,A,50.225549,N,18.965107,E,0.4074,000,0,08,100,100,0,50,00000000,4,1,260,6,2021,55107,147,2021,55108,144,2021,55778,128,2021,53993,127,,00]
[SG*9051052790*0098*UD2,061117,201826,A,50.225515,N,18.965033,E,1.0371,000,0,08,100,100,0,50,00000000,4,1,260,6,2021,55107,148,2021,55108,144,2021,55778,132,2021,53993,126,,00]
[SG*9051052790*0098*UD2,061117,201926,A,50.225584,N,18.965093,E,1.0000,000,1,06,100,100,0,50,00000000,4,1,260,6,2021,55107,148,2021,55108,143,2021,55778,131,2021,53993,127,,00]
[SG*9051052790*0098*UD2,061117,202025,A,50.225502,N,18.965048,E,0.3889,000,1,07,100,100,0,50,00000000,4,1,260,6,2021,55107,147,2021,55108,143,2021,55778,132,2021,53993,126,,00]
[SG*9051052790*0098*UD2,061117,202940,A,50.225543,N,18.965232,E,2.1853,000,1,05,100,100,0,50,00000000,4,1,260,6,2021,55107,147,2021,55108,144,2021,55778,128,2021,53993,125,,00]
[SG*9051052790*0098*UD2,061117,203040,A,50.225570,N,18.965057,E,0.8334,000,1,07,100,100,0,50,00000000,4,1,260,6,2021,55107,147,2021,55108,143,2021,55778,128,2021,53993,126,,00]
[SG*9051052790*0098*UD2,061117,203139,A,50.225559,N,18.965022,E,0.2222,000,1,06,100,100,0,50,00000000,4,1,260,6,2021,55107,148,2021,55108,144,2021,55778,128,2021,53993,127,,00]

that would mean that the header part is fixed and should not cause problem... but it does.
I do not know if the device gets feedback from the server. If so then possible scenario is that for 5001 the protocol was unmatched so the server replied with such a message and device continued sending first message, while for 5093 the answer from the server is different (got match) and it sends then another message - who knows?

Anton Tananaev7 years ago

I believe the issue is already fixed. Wait for the next official release or build a version from source code.

jcorreajr7 years ago

In next release traccar v. 15?