Getting IndexOutOfBoundsException error for iotm protocol

wmfairuz10 months ago

Hi,

I have a Xirgo XG3780 that I configured to send data to port 5218.

I see logs when I turn on the devices but it seems there's an error. But some data did entered the database though (albeit valid column is 0).

I wonder what can I do to fix this. Thanks in advance!

2024-02-29 15:25:47  INFO: [Tcf8dc0a0] connected
2024-02-29 15:25:47  INFO: [Tcf8dc0a0: iotm < 121.123.244.19] 103200044d51545404c200f0000f38363736303430353439343638383500130d0a2b434d45204552524f523a203431300d0a0000
2024-02-29 15:25:47  INFO: Event id: 867604054946885, time: 2024-02-29 15:25:47, type: deviceOnline, notifications: 0
2024-02-29 15:25:47  INFO: [Tcf8dc0a0: iotm > 121.123.244.19] 20020000
2024-02-29 15:25:47  INFO: [Tcf8dc0a0: iotm < 121.123.244.19] 8219000400143836373630343035343934363838352f4f55544301
2024-02-29 15:25:47  INFO: [Tcf8dc0a0: iotm > 121.123.244.19] 90020004
2024-02-29 15:26:26  INFO: [T85071483] connected
2024-02-29 15:26:26  INFO: [T85071483: iotm < 113.210.87.247] 103200044d51545404c200f0000f38363736303430353439343638383500130d0a2b434d45204552524f523a203431300d0a0000
2024-02-29 15:26:26  INFO: [T85071483: iotm > 113.210.87.247] 20020000
2024-02-29 15:26:26  INFO: [T85071483: iotm < 113.210.87.247] 8219000200143836373630343035343934363838352f4f55544301
2024-02-29 15:26:26  INFO: [T85071483: iotm > 113.210.87.247] 90020002
2024-02-29 15:26:28  INFO: [T85071483: iotm < 113.210.87.247] 32fc0700054243452f44000302020800453480cf141503000156006ec085650d02b0000000809066f340050430cb0f0500301f1003054003064003074004023012030b300301a0001000001100001200001300001400009400009500019600000200030520001500030120001b00001c0001560078c085650d02b0000000809066f340050430c70f050030171003054003064003074004023012030b300301a0001000001100001200001300001400009400009500019600000200030520001500030120001b00001c0001560082c085650d02b0000000809066f340050430cd0f05003007100305400306400307400402301c030b300301a0001000001100001200001300001400009400009500019600000200030520001500030120001b00001c000156008cc085650d02b0000000809066f340050430c90f0500301f100305400306400307400402301c030b300301a0001000001100001200001300001400009400009500019600000200030520001500030120001b00001c0001560096c085650d02b0000000809066f340050430c90f0500300f1003054003064003074004023009030b300301a0001000001100001200001300001400009400009500019600000200030520001500030120001b00001c00015600a0c085650d02b0000000809066f340050430cd0f050030ff0f03054003064003074004023012030b300301a0001000001100001200001300001400009400009500019600000200030520001500030120001b00001c00015600aac085650d02b0000000809066f340050430ca0f0500301f1003054003064003074004023012030b300301a0001000001100001200001300001400009400009500019600000200030520001500030120001b00001c00015600b4c085650d02b0000000809066f340050430cd0f0500301f1003054003064003074004023012030b300301a0001000001100001200001300001400009400009500019600000200030520001500030120001b00001c00016a00bec085650d02b0000000809066f340050430cd0f0500301f1003054003064003074004023012030b300301a00e00d013aa4940806ccb42000022040000220100100000110000120000130000140000940000950001960000020003052000150004012004001b00001c00015500c8c085650d02b0000000809066f340050430cd0f0500301710030540030640030740030230030b300301a0001000001100001200001300001400009400009500019600000200030520001500030120001b00001c00015600d2c085650d02b0000000809066f340050430cd0f0500300f1003054003064003074004023012030b300301a0001000001100001200001300001400009400009500019600000200030520001500030120001b00001c0083
2024-02-29 15:26:28  INFO: [T85071483] error - index: 55, length: 17099 (expected: range(0, 106)) - IndexOutOfBoundsException (... < IotmProtocolDecoder:70 < *:224 < *:271 < BaseMqttProtocolDecoder:79 < ExtendedObjectDecoder:75 < ...)
2024-02-29 15:26:28  INFO: [T85071483] disconnected
2024-02-29 15:26:28  INFO: Event id: 867604054946885, time: 2024-02-29 15:26:28, type: deviceOffline, notifications: 0
wmfairuz10 months ago

But sometimes, I'll get this log with no errors:

2024-02-29 15:34:39  INFO: [T47efb9e6] connected
2024-02-29 15:34:39  INFO: [T47efb9e6: iotm < 58.71.137.246] 103200044d51545404c200f0000f38363736303430353439343638383500130d0a2b434d45204552524f523a203431300d0a0000
2024-02-29 15:34:39  INFO: Event id: 867604054946885, time: 2024-02-29 15:34:39, type: deviceOnline, notifications: 0
2024-02-29 15:34:39  INFO: [T47efb9e6: iotm > 58.71.137.246] 20020000
2024-02-29 15:34:39  INFO: [T47efb9e6: iotm < 58.71.137.246] 8219000400143836373630343035343934363838352f4f55544301
2024-02-29 15:34:39  INFO: [T47efb9e6: iotm > 58.71.137.246] 90020004

And also this:

2024-02-29 15:35:19  INFO: [Tee779170: iotm < 121.121.167.182] 32880800054243452f44000302020800453480cf14150300015700d6c185650d02b0000000809066f340050430c30f050030171003054003064003074004023009030b300301a000100000110000120000130000140000940000950001960000020003052000150004012004001b00001c00015900e0c185650d02b0000000809066f340050430c00f0500300f1003054003064003074004023012050b3036010301a000100000110000120000130000140000940000950001960000020003052000150004012004001b00001c00015900eac185650d02b0000000809066f340050430bd0f05003017100305400306400307400402301c050b3036010301a000100000110000120000130000140000940000950001960000020003052000150004012004001b00001c00015900f4c185650d02b0000000809066f340050430c10f0500301f1003054003064003074004023012050b3036010301a000100000110000120000130000140000940000950001960000020003052000150004012004001b00001c00015900fec185650d02b0000000809066f340050430c90f0500301f1003054003064003074004023012050b3036010301a000100000110000120000130000140000940000950001960000020003052000150004012004001b00001c0001590008c285650d02b0000000809066f340050430c90f050030171003054003064003074004023012050b3036010301a000100000110000120000130000140000940000950001960000020003052000150004012003001b00001c0001590012c285650d02b0000000809066f340050430bb0f0500301f100305400306400307400402301c050b3036010301a000100000110000120000130000140000940000950001960000020003052000150004012004001b00001c000159001cc285650d02b0000000809066f340050430c00f050030071003054003064003074004023012050b3036010301a000100000110000120000130000140000940000950001960000020003052000150004012004001b00001c0001590026c285650d02b0000000809066f340050430c00f05003017100305400306400307400402301c050b3036010301a000100000110000120000130000140000940000950001960000020003052000150004012004001b00001c0001590030c285650d02b0000000809066f340050430c10f050030171003054003064003074004023012050b3036010301a000100000110000120000130000140000940000950001960000020003052000150004012004001b00001c000159003ac285650d02b0000000809066f340050430c70f0500301f1003054003064003074004023012050b3036010301a0001000001100001200001300001400009400009500019600000200030520001500
2024-02-29 15:35:19  INFO: [Tee779170: iotm < 121.121.167.182] 04012004001b00001c00ed
2024-02-29 15:35:19  INFO: [Tee779170] id: 867604054946885, time: 2023-12-23 01:05:26, lat: 0.00000, lon: 0.00000, course: 0.0
2024-02-29 15:35:19  INFO: [Tee779170] id: 867604054946885, time: 2023-12-23 01:05:36, lat: 0.00000, lon: 0.00000, course: 0.0
2024-02-29 15:35:19  INFO: [Tee779170] id: 867604054946885, time: 2023-12-23 01:05:46, lat: 0.00000, lon: 0.00000, course: 0.0
2024-02-29 15:35:19  INFO: [Tee779170] id: 867604054946885, time: 2023-12-23 01:05:56, lat: 0.00000, lon: 0.00000, course: 0.0
2024-02-29 15:35:19  INFO: [Tee779170] id: 867604054946885, time: 2023-12-23 01:06:06, lat: 0.00000, lon: 0.00000, course: 0.0
2024-02-29 15:35:19  INFO: [Tee779170] id: 867604054946885, time: 2023-12-23 01:06:16, lat: 0.00000, lon: 0.00000, course: 0.0
2024-02-29 15:35:19  INFO: [Tee779170] id: 867604054946885, time: 2023-12-23 01:06:26, lat: 0.00000, lon: 0.00000, course: 0.0
2024-02-29 15:35:19  INFO: [Tee779170] id: 867604054946885, time: 2023-12-23 01:06:36, lat: 0.00000, lon: 0.00000, course: 0.0
2024-02-29 15:35:19  INFO: [Tee779170] id: 867604054946885, time: 2023-12-23 01:06:46, lat: 0.00000, lon: 0.00000, course: 0.0
2024-02-29 15:35:19  INFO: [Tee779170] id: 867604054946885, time: 2023-12-23 01:06:56, lat: 0.00000, lon: 0.00000, course: 0.0
2024-02-29 15:35:19  INFO: [Tee779170] id: 867604054946885, time: 2023-12-23 01:07:06, lat: 0.00000, lon: 0.00000, course: 0.0
2024-02-29 15:35:19  INFO: [Tee779170: iotm > 121.121.167.182] 40020003
Anton Tananaev10 months ago

Maybe the protocol decoder needs to be updated.

Do you have the protocol documentation?

wmfairuz10 months ago
wmfairuz9 months ago

It seems like the length expected is longer than the actual data received. In this case, does the device send a wrong data? Or the data being truncated somewhere?

Thanks

Anton Tananaev9 months ago

Most like something is not fully supported in the decoder.

wmfairuz9 months ago

Is is possible that the data showed in the log is already truncated? If so maybe I can try to modify the decoder

Anton Tananaev9 months ago

Truncated? What do you mean?

wmfairuz9 months ago

Sorry, after more investigation, it's not truncated, just sometimes the log comes in 2 lines like below:

2024-03-28 07:56:39  INFO: [T15708b03: iotm < 113.211.116.140] 32850800054243452f44000702020800453480cf14150300016c008b35e9650d02b000600ebe09baf440050430910f0500305d130305400306400307400402309f040b30270301a00e00d0dbc74940416ccb420000070c2700b500001000001100001200001300001400009400009500019600000200040520460015000401200c001b00001c00016d00e335e9650d02b0000000c009baf440050430b50f050030e02e0305400306400307400502309301050b302c010301a00e00d06ba749409d6dcb420000070a2c01e1ff0010000011000012000113000014000094000095000196000002000305200015000401200a001b00001c00016d00e835e9650d02b0000000c009baf440050430b30f050030d82e0305400306400307400502309d01050b302c010301a00e00d06ba749409d6dcb420000080a2c01e1ff0010000011000012000113000014000094000095000196000002000305200015000401200a001b00001c00016d00ed35e9650d02b0000000c009baf440050430ba0f050030d02e030540030640030740050230a601050b302c010301a00e00d06ba749409d6dcb420000070b2c01e1ff0010000011000012000113000014000094000095000196000002000305200015000401200b001b00001c00016d00f235e9650d02b0000000c009baf440050430b40f050030e02e0305400306400307400502309d01050b302c010301a00e00d06ba749409d6dcb420000070b2c01e1ff0010000011000012000113000014000094000095000196000002000305200015000401200b001b00001c00016d00f735e9650d02b0000000c009baf440050430b50f050030d02e0305400306400307400502309d01050b302c010301a00e00d06ba749409d6dcb420000060f2c01e1ff0010000011000012000113000014000094000095000196000002000305200015000401200f001b00001c00016d00fc35e9650d02b0000000c009baf440050430b40f050030f02e0305400306400307400502309d01050b302c010301a00e00d06ba749409d6dcb420000070e2c01e1ff0010000011000012000113000014000094000095000196000002000305200115000401200e001b00001c00016d000136e9650d02b0000000c009baf440050430b80f050030c02e0305400306400307400502309d01050b302c010301a00e00d06ba749409d6dcb420000070e2c01e1ff0010000011000012000113000014000094000095000196000002000305200015000401200e001b00001c00016d000636e9650d02b0000000c009baf440050430b80f050030e82e0305400306400307400502309301050b302c010301a00e00d06ba749409d6dcb420000060e2c01e1ff001000001100001200011300001400009400009500019600000200030520011500040120
2024-03-28 07:56:39  INFO: [T15708b03: iotm < 113.211.116.140] 0e001b00001c0098
wmfairuz9 months ago

Btw, I've been investigating around and manage to pinpoint the error comes when the sensor type is 32 and/or sensor ID is 46. Not really sure which one making the error though.

2024-03-28 08:07:10  INFO: [T97168ef4: iotm < 113.211.105.254] 32850800054243452f44000302020800453480cf14150300016c008b35e9650d02b000600ebe09baf440050430910f0500305d130305400306400307400402309f040b30270301a00e00d0dbc74940416ccb420000070c2700b500001000001100001200001300001400009400009500019600000200040520460015000401200c001b00001c00016d00e335e9650d02b0000000c009baf440050430b50f050030e02e0305400306400307400502309301050b302c010301a00e00d06ba749409d6dcb420000070a2c01e1ff0010000011000012000113000014000094000095000196000002000305200015000401200a001b00001c00016d00e835e9650d02b0000000c009baf440050430b30f050030d82e0305400306400307400502309d01050b302c010301a00e00d06ba749409d6dcb420000080a2c01e1ff0010000011000012000113000014000094000095000196000002000305200015000401200a001b00001c00016d00ed35e9650d02b0000000c009baf440050430ba0f050030d02e030540030640030740050230a601050b302c010301a00e00d06ba749409d6dcb420000070b2c01e1ff0010000011000012000113000014000094000095000196000002000305200015000401200b001b00001c00016d00f235e9650d02b0000000c009baf440050430b40f050030e02e0305400306400307400502309d01050b302c010301a00e00d06ba749409d6dcb420000070b2c01e1ff0010000011000012000113000014000094000095000196000002000305200015000401200b001b00001c00016d00f735e9650d02b0000000c009baf440050430b50f050030d02e0305400306400307400502309d01050b302c010301a00e00d06ba749409d6dcb420000060f2c01e1ff0010000011000012000113000014000094000095000196000002000305200015000401200f001b00001c00016d00fc35e9650d02b0000000c009baf440050430b40f050030f02e0305400306400307400502309d01050b302c010301a00e00d06ba749409d6dcb420000070e2c01e1ff0010000011000012000113000014000094000095000196000002000305200115000401200e001b00001c00016d000136e9650d02b0000000c009baf440050430b80f050030c02e0305400306400307400502309d01050b302c010301a00e00d06ba749409d6dcb420000070e2c01e1ff0010000011000012000113000014000094000095000196000002000305200015000401200e001b00001c00016d000636e9650d02b0000000c009baf440050430b80f050030e82e0305400306400307400502309301050b302c010301a00e00d06ba749409d6dcb420000060e2c01e1ff001000001100001200011300001400009400009500019600000200030520011500040120
2024-03-28 08:07:10  INFO: [T97168ef4: iotm < 113.211.105.254] 0e001b00001c0098


2024-03-28 08:07:10  INFO: type: 2 length: 8
2024-03-28 08:07:10  INFO: record: 453480cf14150300
2024-03-28 08:07:10  INFO: imei: 867604054946885
2024-03-28 08:07:10  INFO: type: 1 length: 108
2024-03-28 08:07:10  INFO: record: 8b35e9650d02b000600ebe09baf440050430910f0500305d130305400306400307400402309f040b30270301a00e00d0dbc74940416ccb420000070c2700b500001000001100001200001300001400009400009500019600000200040520460015000401200c001b00001c00
2024-03-28 08:07:10  INFO: sensor type: 13 sensor ID: b002
2024-03-28 08:07:10  INFO: sensor type: 5 sensor ID: 3004
2024-03-28 08:07:10  INFO: sensor type: 5 sensor ID: 3000
2024-03-28 08:07:10  INFO: sensor type: 3 sensor ID: 4005
2024-03-28 08:07:10  INFO: sensor type: 3 sensor ID: 4006
2024-03-28 08:07:10  INFO: sensor type: 3 sensor ID: 4007
2024-03-28 08:07:10  INFO: sensor type: 4 sensor ID: 3002
2024-03-28 08:07:10  INFO: sensor type: 11 sensor ID: 2730
2024-03-28 08:07:10  INFO: sensor type: 73 sensor ID: 4140
2024-03-28 08:07:10  INFO: sensor type: 108 sensor ID: 42cb
2024-03-28 08:07:10  INFO: sensor type: 0 sensor ID: 700
2024-03-28 08:07:10  INFO: sensor type: 12 sensor ID: 27
2024-03-28 08:07:10  INFO: sensor type: 0 sensor ID: 1100
2024-03-28 08:07:10  INFO: sensor type: 0 sensor ID: 1200
2024-03-28 08:07:10  INFO: sensor type: 0 sensor ID: 1300
2024-03-28 08:07:10  INFO: sensor type: 0 sensor ID: 1400
2024-03-28 08:07:10  INFO: sensor type: 0 sensor ID: 9400
2024-03-28 08:07:10  INFO: sensor type: 0 sensor ID: 9500
2024-03-28 08:07:10  INFO: sensor type: 0 sensor ID: 9601
2024-03-28 08:07:10  INFO: sensor type: 0 sensor ID: 200
2024-03-28 08:07:10  INFO: sensor type: 0 sensor ID: 504
2024-03-28 08:07:10  INFO: sensor type: 32 sensor ID: 46
2024-03-28 08:07:10  INFO: [T97168ef4] error - index: 97, length: 21 (expected: range(0, 108)) - IndexOutOfBoundsException (... < IotmProtocolDecoder:67 < *:225 < *:285 < BaseMqttProtocolDecoder:79 < ExtendedObjectDecoder:75 < ...)