Galileo Protocol data string is splitted

Andres Ramos6 years ago

Hello, I'm trying to receive data string from Galileo GPS. Sometimes, it comes complete, like this:

2019-06-11 16:12:49  INFO: [a48c8864: 5034 < 190.111.82.62] HEX: 0170000333353830303430393034343533323110bb4d20fed2ff5c300c00a4ecff1a1251fb334d009608345e0a350740011841cf6e420810ea010a0333353830303430393034343533323110ba4d20fdd2ff5c300c0ba4ecff281251fb333300c207345e0a350740011841dc6e420810ea010a7f81
2019-06-11 16:12:49  INFO: ..................................................................

Then, I split data string, according my specific fields to insert in a database:

2019-06-11 16:12:49  INFO: tramaSlice..............034 < 190.111.82.62] HEX: 0170000333353830303430393034343533323110bb4d20fed2ff5c300c00a4ecff1a1251fb334d009608345e0a350740011841cf6e420810
2019-06-11 16:12:49  INFO: .....tramasssSlice [Ljava.lang.String;@71f4a72a
2019-06-11 16:12:49  INFO: tramaSlice..............0333353830303430393034343533323110ba4d20fdd2ff5c300c0ba4ecff281251fb333300c207345e0a350740011841dc6e420810
2019-06-11 16:12:49  INFO: .....tramasssSlice [Ljava.lang.String;@3c17dc51
2019-06-11 16:12:49  INFO: tramaSlice..............7f81
2019-06-11 16:12:49  INFO: .....tramasssSlice [Ljava.lang.String;@a68a9ed
2019-06-11 16:12:49  INFO: [a48c8864: 5034 > 190.111.82.62] HEX: 027f81
2019-06-11 16:12:49  INFO: ..................................................................

But sometimes it does not come complete and shows separately like this: (here the data string comes in four separatly data strings)

2019-06-11 16:12:35  INFO: [a48c8864: 5034 < 190.111.82.62] HEX: 0180020333353830303430393034343533323110b34d20bdd2ff5c300c97b0ecff6c1751fb33c900a40534440a350640011841d26e420810ea110a020000000000010003000000000001000333353830303430393034343533323110b24d20bbd2ff5c300ce4b0ecff2e1751fb33a600bf0534440a350640011841916e420810ea010a0333353830303430393034343533323110b14d20bad2ff5c300c05b1ecff171751fb339600b20534440a350640011841916e420810ea010a0333353830303430393034343533323110b04d20b8d2ff5c300c3eb1ecffed1651fb337000740534450a350740011841ab6e420810ea010a0333353830303430393034343533323110af4d20b7d2ff5c300c55b1ec
2019-06-11 16:12:35  INFO: ..................................................................
2019-06-11 16:12:35  INFO: tramaSlice..............034 < 190.111.82.62] HEX: 0180020333353830303430393034343533323110b34d20bdd2ff5c300c97b0ecff6c1751fb33c900a40534440a350640011841d26e420810ea110a020000000000010003000000000001000333353830303430393034343533323110b24d20bbd2ff5c300ce4b0ecff2e1751fb33a600bf0534440a350640011841916e420810
2019-06-11 16:12:35  INFO: .....tramasssSlice [Ljava.lang.String;@4a5beeed
2019-06-11 16:12:35  INFO:  countersSlice..............10b34d20bdd2ff5c300c97b0ecff6c1751fb33c900a40534440a350640011841d26e420810ea110a02000000000001000300000000000100
2019-06-11 16:12:35  INFO: 02000000000001000300000000000100 numPuertas.............2
2019-06-11 16:12:35  INFO: cadTem.............0200000000000100
2019-06-11 16:12:35  INFO: Fecha 2019-06-11 16:12:35.812 Puerta 2 Ingresos 0 Salidas 1
2019-06-11 16:12:35  INFO: guarda.............
2019-06-11 16:12:35  INFO: Guardando
2019-06-11 16:12:35  INFO: Inserccion de pasajeros exitosa
2019-06-11 16:12:35  INFO: cadTem.............0300000000000100
2019-06-11 16:12:35  INFO: Fecha 2019-06-11 16:12:35.812 Puerta 3 Ingresos 0 Salidas 1
2019-06-11 16:12:35  INFO: guarda.............
2019-06-11 16:12:35  INFO: Guardando
2019-06-11 16:12:35  INFO: Inserccion de pasajeros exitosa
2019-06-11 16:12:35  INFO: tramaSlice..............0333353830303430393034343533323110b14d20bad2ff5c300c05b1ecff171751fb339600b20534440a350640011841916e420810
2019-06-11 16:12:35  INFO: .....tramasssSlice [Ljava.lang.String;@34002e79
2019-06-11 16:12:35  INFO: Cadena no corresponde a conteo
2019-06-11 16:12:35  INFO: tramaSlice..............0333353830303430393034343533323110b04d20b8d2ff5c300c3eb1ecffed1651fb337000740534450a350740011841ab6e420810
2019-06-11 16:12:35  INFO: .....tramasssSlice [Ljava.lang.String;@2bb0eccb
2019-06-11 16:12:35  INFO: Cadena no corresponde a conteo
2019-06-11 16:12:35  INFO: tramaSlice..............0333353830303430393034343533323110af4d20b7d2ff5c300c55b1ec
2019-06-11 16:12:35  INFO: .....tramasssSlice [Ljava.lang.String;@13277a9e
2019-06-11 16:12:35  INFO: Cadena no corresponde a conteo
2019-06-11 16:12:35  INFO: [a48c8864: 5034 < 190.111.82.62] HEX: ffdb1651fb336f00cf0434450a350740011841d56e420810ea010a0333353830303430393034343533323110ae4d20b6d2ff5c300c6bb1ecffc51651fb3376005e0434450a350640011841da6e420810ea010a0333353830303430393034343533323110ad4d20b5d2ff5c300c78b1ecffa71651fb336d00cf0334450a350640011841d96e420810ea010a0333353830303430393034343533323110ac4d20b4d2ff5c300c7bb1ecff891651fb3369002d0334450a350640011841c46e420810ea010a0333353830303430393034343533323110ab4d20a9d2ff5c300c2ab1ecffe61551fb330000990234410a350640011841a26e420810ea010a0333353830303430393034343533323110aa4d20a1d2ff5c300ce9b0ecff5f1551fb33eb00cb02343e0a350940011841d06e420810ea010a0333353830303430393034343533323110a94d2099d2ff5c300c1cb0ec
2019-06-11 16:12:35  INFO: ..................................................................
2019-06-11 16:12:35  INFO: tramaSlice..............034 < 190.111.82.62] HEX: ffdb1651fb336f00cf0434450a350740011841d56e420810
2019-06-11 16:12:35  INFO: .....tramasssSlice [Ljava.lang.String;@69ec291
2019-06-11 16:12:35  INFO: Cadena no corresponde a conteo
2019-06-11 16:12:35  INFO: tramaSlice..............0333353830303430393034343533323110ae4d20b6d2ff5c300c6bb1ecffc51651fb3376005e0434450a350640011841da6e420810
2019-06-11 16:12:35  INFO: .....tramasssSlice [Ljava.lang.String;@33d857dd
2019-06-11 16:12:35  INFO: Cadena no corresponde a conteo
2019-06-11 16:12:35  INFO: tramaSlice..............0333353830303430393034343533323110ad4d20b5d2ff5c300c78b1ecffa71651fb336d00cf0334450a350640011841d96e420810
2019-06-11 16:12:35  INFO: .....tramasssSlice [Ljava.lang.String;@1fa233d9
2019-06-11 16:12:35  INFO: Cadena no corresponde a conteo
2019-06-11 16:12:35  INFO: tramaSlice..............0333353830303430393034343533323110ac4d20b4d2ff5c300c7bb1ecff891651fb3369002d0334450a350640011841c46e420810
2019-06-11 16:12:35  INFO: .....tramasssSlice [Ljava.lang.String;@37f95939
2019-06-11 16:12:35  INFO: Cadena no corresponde a conteo
2019-06-11 16:12:35  INFO: tramaSlice..............0333353830303430393034343533323110ab4d20a9d2ff5c300c2ab1ecffe61551fb330000990234410a350640011841a26e420810
2019-06-11 16:12:35  INFO: .....tramasssSlice [Ljava.lang.String;@47839f1d
2019-06-11 16:12:35  INFO: Cadena no corresponde a conteo
2019-06-11 16:12:35  INFO: tramaSlice..............0333353830303430393034343533323110aa4d20a1d2ff5c300ce9b0ecff5f1551fb33eb00cb02343e0a350940011841d06e420810
2019-06-11 16:12:35  INFO: .....tramasssSlice [Ljava.lang.String;@36145e8f
2019-06-11 16:12:35  INFO: Cadena no corresponde a conteo
2019-06-11 16:12:35  INFO: tramaSlice..............0333353830303430393034343533323110a94d2099d2ff5c300c1cb0ec
2019-06-11 16:12:35  INFO: .....tramasssSlice [Ljava.lang.String;@38a69f6f
2019-06-11 16:12:35  INFO: Cadena no corresponde a conteo
2019-06-11 16:12:35  INFO: [a48c8864: 5034 < 190.111.82.62] HEX: ff691351fb331201840234380a350640011841db6e420910ea090a020000000000030024de
2019-06-11 16:12:35  INFO: ..................................................................
2019-06-11 16:12:35  INFO: Error > begin 68, end 98, length 74
2019-06-11 16:12:35  INFO: [a48c8864: 5034 > 190.111.82.62] HEX: 0224de

And the espected data string was:

2019-06-11 16:12:35  INFO: [a48c8864: 5034 < 190.111.82.62] HEX: 0180020333353830303430393034343533323110b34d20bdd2ff5c300c97b0ecff6c1751fb33c900a40534440a350640011841d26e420810ea110a020000000000010003000000000001000333353830303430393034343533323110b24d20bbd2ff5c300ce4b0ecff2e1751fb33a600bf0534440a350640011841916e420810ea010a0333353830303430393034343533323110b14d20bad2ff5c300c05b1ecff171751fb339600b20534440a350640011841916e420810ea010a0333353830303430393034343533323110b04d20b8d2ff5c300c3eb1ecffed1651fb337000740534450a350740011841ab6e420810ea010a0333353830303430393034343533323110af4d20b7d2ff5c300c55b1ecffdb1651fb336f00cf0434450a350740011841d56e420810ea010a0333353830303430393034343533323110ae4d20b6d2ff5c300c6bb1ecffc51651fb3376005e0434450a350640011841da6e420810ea010a0333353830303430393034343533323110ad4d20b5d2ff5c300c78b1ecffa71651fb336d00cf0334450a350640011841d96e420810ea010a0333353830303430393034343533323110ac4d20b4d2ff5c300c7bb1ecff891651fb3369002d0334450a350640011841c46e420810ea010a0333353830303430393034343533323110ab4d20a9d2ff5c300c2ab1ecffe61551fb330000990234410a350640011841a26e420810ea010a0333353830303430393034343533323110aa4d20a1d2ff5c300ce9b0ecff5f1551fb33eb00cb02343e0a350940011841d06e420810ea010a0333353830303430393034343533323110a94d2099d2ff5c300c1cb0ecff691351fb331201840234380a350640011841db6e420910ea090a020000000000030024de0224de