Vinicius Alves wrote:how can I build a byte array and one of the elements to be an unsigned byte ?
Just use an signed byte array -- it should work. It's all bits over the wire, and 8 bits is 8 bits regardless of whether it is signed or unsigned.
Now, to get a unsigned byte to and from a signed byte element does require special handling. You can't assign an unsigned byte value (assume short or int) to a signed byte, you need to AND out the higher order bits, and OR it into place. You can't assign an signed byte to a unsigned byte value (again assume or or int); actually you can, but then you need to AND out the higher order bits.
Henry