Not a bug, but is there a fix for this issue with malformed position Wifi names in Watch protocol?

Track-trace2a year ago

Within the watch protocol we can see that the device reports positions with the Wifi names and mac addresses of Wifi routers / Hotspots which are in close proximity.
More often in the log i could see that devices disconnected from the server because of an NumberformatExeception.

After looking closely at the log i see that many of these occurrences are because of the devices reported positions which include Wifi names that use brackets in the Wifi Name.
For instance names like [Wifi Hotspot] , [LG_Wall-Mount A/C] or [Washing Machine]
This create the NumberformatExeception since because of the ] bracket at the end of the Wifi name the server sees this closing bracket ] as the end of the string. And since this is incomplete data it will result in the NumberformatExeception error and disconnects the device.
After some time the device comes online again, but logicly goes offline again if it still reports the wifi name with closing bracket ] in it.

So, question is, can you think about some kind of fix for this ?

For instance ignore that data string in this case so that the device does not get disconnected (or any other idear which might not break the data string). I would think its better to discard that malformed data then make the device go offline constantly.

Anton Tananaeva year ago

Do you have some HEX samples?

Track-trace2a year ago

Here are three examples. Im trying to get the Marktdown right.

[LG_Wall-Mount A/C breaks the string with ] at the end of the Wifi Name [LG_Wall-Mount A/C].

[3G*880900242*013D*UD,120623,140020,A,48.949273,N, 4.3783060,E,18.56,43.8,0.0,12,100,76,226120,0,00000000,2,255,204,8,3110,55025,146,3130,49297,124,5,BangingWifi,34:a1:ed:e1:91:4f,-71,BAR WiFi,36:a2:e1:ed:a1:de,-72,NetworkWifi,26:de:a1:ed:e1:a0,-73,Fiber,36:a1:ed:e1:91:4f,-75,[LG_Wall-Mount A/C]e725,66:a1:ed:e1:e7:25,-82,15.0]
2023-06-12 14:03:13  INFO: [T098aa11c] connected
2023-06-12 14:03:13  INFO: [T098aa11c: watch < 89.109.110.136] 5b33472a3838303930303234322a303133442a55442c3132303632332c3134303032302c412c34382e3934393237332c4e2c20342e333738333036302c452c31382e35362c34332e382c302e302c31322c3130302c37362c3232363132302c302c30303030303030302c322c3235352c3230342c382c333131302c35353032352c3134362c333133302c34393239372c3132342c352c42616e67696e67576966692c33343a61313a65643a65313a39313a34662c2d37312c42415220576946692c33363a61323a65313a65643a61313a64652c2d37322c4e6574776f726b576966692c32363a64653a61313a65643a65313a61302c2d37332c46696265722c33363a61313a65643a65313a39313a34662c2d37352c5b4c475f57616c6c2d4d6f756e7420412f435d653732352c36363a61313a65643a65313a65373a32352c2d38322c31352e305d
2023-06-12 14:03:13  INFO: [T098aa11c] error - For input string: "[LG_Wall-Mount A/C" - NumberFormatException (... < WatchProtocolDecoder:154 < *:445 < ExtendedObjectDecoder:75 < ... < WrapperContext:102 < ...)
2023-06-12 14:03:13  INFO: [T098aa11c] error - minimumReadableBytes : -5 (expected: >= 0) - IllegalArgumentException (... < WatchProtocolDecoder:382 < ExtendedObjectDecoder:75 < ... < WrapperContext:102 < ...)
2023-06-12 14:03:13  INFO: [T098aa11c] disconnected

DIRECT[HCS breaks the string

[3G*8809002243*018B*UD,120623,140059,A,48.949273,N, 4.3783060,E,11.36,43.0,0.0,11,70,96,304077,0,00000000,7,255,204,8,3120,14593,133,3120,14595,131,3120,54470,126,3120,51533,125,3120,54465,123,3120,51972,122,3120,10531,120,5,DIRECT[HCS]force,32:a1:ed:e1:f8:71,-68,NewRoad,54:47:a1:ed:e1:e6,-72,SpotOn322,ac:a1:ed:e1:88:a2,-73,Router0383,68:a1:ed:e1:51:aa,-73,LOCaL-Wifi,b4:f2:a1:ed:e1,-74,7.6]
2023-06-12 14:05:42  INFO: [Tbcca96eb: watch < 89.109.111.23] 5b33472a383830393030323234332a303138422a55442c3132303632332c3134303035392c412c34382e3934393237332c4e2c20342e333738333036302c452c31312e33362c34332e302c302e302c31312c37302c39362c3330343037372c302c30303030303030302c372c3235352c3230342c382c333132302c31343539332c3133332c333132302c31343539352c3133312c333132302c35343437302c3132362c333132302c35313533332c3132352c333132302c35343436352c3132332c333132302c35313937322c3132322c333132302c31303533312c3132302c352c4449524543545b4843535d666f7263652c33323a61313a65643a65313a66383a37312c2d36382c4e6577526f61642c35343a34373a61313a65643a65313a65362c2d37322c53706f744f6e3332322c61633a61313a65643a65313a38383a61322c2d37332c526f75746572303338332c36383a61313a65643a65313a35313a61612c2d37332c4c4f43614c2d576966692c62343a66323a61313a65643a65312c2d37342c372e365d
2023-06-12 14:05:42  INFO: [Tbcca96eb] error - For input string: "DIRECT[HCS" - NumberFormatException (... < WatchProtocolDecoder:154 < *:445 < ExtendedObjectDecoder:75 < ... < WrapperContext:102 < ...)
2023-06-12 14:05:42  INFO: [Tbcca96eb] error - minimumReadableBytes : -5 (expected: >= 0) - IllegalArgumentException (... < WatchProtocolDecoder:382 < ExtendedObjectDecoder:75 < ... < WrapperContext:102 < ...)
2023-06-12 14:05:42  INFO: [Tbcca96eb] disconnected

[Ideal Games breaks the string

[3G*8809002358*0178*UD,120623,140156,A,48.949273,N, 4.3783060,E,4.81,264.9,0.0,10,48,91,102012,0,00000000,7,255,204,8,3140,54466,131,3140,11669,126,3140,55891,121,3140,54465,119,3140,48220,118,3140,54470,116,3140,10592,113,5,HotSpot,fa:a1:ed:e1:0b:71,-74,WifiOn,c6:27:a1:ed:e1:b8,-75,NEW9040,c4:a1:ed:e1:62:b6,-79,[Ideal Games],18:a1:ed:e1:f5:2,-81,House_of_Cards,44:a1:ed:e1:4:98,-81,9.2]
2023-06-12 14:06:48  INFO: [T90333195] connected
2023-06-12 14:06:48  INFO: [T90333195: watch < 89.109.17.130] 5b33472a383830393030323335382a303137382a55442c3132303632332c3134303135362c412c34382e3934393237332c4e2c20342e333738333036302c452c342e38312c3236342e392c302e302c31302c34382c39312c3130323031322c302c30303030303030302c372c3235352c3230342c382c333134302c35343436362c3133312c333134302c31313636392c3132362c333134302c35353839312c3132312c333134302c35343436352c3131392c333134302c34383232302c3131382c333134302c35343437302c3131362c333134302c31303539322c3131332c352c486f7453706f742c66613a61313a65643a65313a30623a37312c2d37342c576966694f6e2c63363a32373a61313a65643a65313a62382c2d37352c4e4557393034302c63343a61313a65643a65313a36323a62362c2d37392c5b496465616c2047616d65735d2c31383a61313a65643a65313a66353a322c2d38312c486f7573655f6f665f43617264732c34343a61313a65643a65313a343a39382c2d38312c392e325d
2023-06-12 14:06:48  INFO: [T90333195] error - For input string: "[Ideal Games" - NumberFormatException (... < WatchProtocolDecoder:154 < *:445 < ExtendedObjectDecoder:75 < ... < WrapperContext:102 < ...)
2023-06-12 14:06:48  INFO: [T90333195] error - minimumReadableBytes : -5 (expected: >= 0) - IllegalArgumentException (... < WatchProtocolDecoder:382 < ExtendedObjectDecoder:75 < ... < WrapperContext:102 < ...)
2023-06-12 14:06:48  INFO: [T90333195] disconnected
Anton Tananaeva year ago
Track-trace2a year ago

Have tested and working correctly. Thanks for the support.