Can I send binary data with az iot device c2d-message, that is represented with HEX like 0x86 0x54 0x32?
I converted a string to another with backslash escapes interpreted and then feed it to az iot device c2d-message command.
But I got UnicodeEncodeError as shown below. Will it work if I specify proper content encoding?
$ CMD = "\x86\x54\x32"
$ OUTPUT="$(echo -e $CMD)"
$ az iot device c2d-message send --device-id $DEVICE_ID -n $NAME --data $OUTPUT
...
UnicodeEncodeError: 'utf-8' codec can't encode character '\udc86' in position 0: surrogates not allowed
Can I send binary data with
az iot device c2d-message, that is represented with HEX like0x86 0x54 0x32?I converted a string to another with backslash escapes interpreted and then feed it to
az iot device c2d-messagecommand.But I got UnicodeEncodeError as shown below. Will it work if I specify proper content encoding?