Hi there!
I am trying to send an array of bytes as an MQTT payload.
The first byte of my payload needs to be value 255 ...
My payload is a string (everything but that byte). So suppose:
Dim command as String ="?THIS IS MY MQTT MESSAGE"
Dim payload() as byte = command.GetBytes("ASCII")
payload(0) = 255
ok ... this does not work. And if I do a log (payload(0)) I get -1 (signed byte!).
Could it be that the MQTT library bombs because of it ?
If I change that 255 value into any ascii value, it gets sent. But when I insert a 255 value, nothing happens with MQTT.
Any help is appreciated,
Enrique
I am trying to send an array of bytes as an MQTT payload.
The first byte of my payload needs to be value 255 ...
My payload is a string (everything but that byte). So suppose:
Dim command as String ="?THIS IS MY MQTT MESSAGE"
Dim payload() as byte = command.GetBytes("ASCII")
payload(0) = 255
ok ... this does not work. And if I do a log (payload(0)) I get -1 (signed byte!).
Could it be that the MQTT library bombs because of it ?
If I change that 255 value into any ascii value, it gets sent. But when I insert a 255 value, nothing happens with MQTT.
Any help is appreciated,
Enrique