Android Question Recieve Serial data


Active Member
Licensed User

I have project where I get at lot of data on bluetooth. I have not the possibility to use the prefix on receive.

The data string is 30 bytes long and always starts with 0,0,0,20 and ends with 26,0,0,0.

I can not figure at smart way to get the string right. When I start receive I don't know where in the string it starts and how many bytes i receive, so I have to catch the 0,0,0,20 and there after get the next 30 bytes and validate it ends with 26,0,0,0

Anyone have a smart and fast way to get this data?