I'm probably missing something stupendously obvious, but I need to write raw hex values to a net socket.
I've tried sckt.write([0xFF], 'hex'), but I receive ASCII encoded data at the far end.
Also tried sckt.write('FF'), sckt.write('0xFF'), constructing a Uint8Array and sending that, but no matter what I do I just get ascii data.
Found the answer :d http://forum.espruino.com/conversations/304363/#comment13617635
Thanks for the link! I did update the docs previously, but they'll only go online when 1v93 is released I'm afraid!
Another option is to just use an escape sequence in a string: sckt.write("\xFF")
Don't worry about formatting, just type in the text and we'll take care of making sense of it. We will auto-convert links, and if you put asterisks around words we will make them bold.
For a full reference visit the Markdown syntax.
© Espruino, powered by microcosm.
Report a problem