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.
sckt.write([0xFF], 'hex')
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.
sckt.write('FF')
sckt.write('0xFF')
@dave_irvine started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
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.