If the app gives an error message as described in the title, how do I know what element 10 is?
Neon?
Show us your blocks.
I think it's one of these, here I'm receiving various sensor data from the truck via bluetooth.
Actually, it is not possible for a byte to have a value greater than 255
ReceiveUnsignedBytes needs a positive number of bytes to receive (like perhaps 11?)
The -1 value is only for ReceiveText, where you want to scan for a Delimiter like \n.
What is your input stream?
This is the data stream and its transmitted by Bluetooth gateway device/controller connected on truck CANbus. The message starts from 43(hex). The message contains 15 bytes of data and "end of message byte" is 0D.
I did read somewhere that if I use -1 in that block I can set the delimiter to 0D and it will read up to that value?!?
That's only for text, which does not fit your data stream.
Unsigned Bytes it is, and you need to ask for all of them.
Keep a list as a buffer (init global buffer as create empty list) and append each incoming list of bytes to the end of the buffer.
To scan for the start of a message,
while AND(is not empty list(global buffer),
select item 1 of buffer not equal hex 43)
remove item 1 from buffer.