Hello, Is it possible to send binary data via the serial port?

Hello,

Is it possible to send binary data via the serial port?

I am trying to send binary data in form of bytes encapsulated with the SLIP protocol via the widget-spjs to the node .

Is this possible? In the documentation I can only see methods to send strings or JSONS.

Thank you!

Not sure actually. Binary wasn’t specifically taken into account. If you look at the Go code for SPJS it does just pass through whatever it receives on the websocket to the serial port. There are many places where byte arrays are converted to strings, but Go uses Unicode (double byte) characters for strings so that may mess it up, or it may work.

Yep, I think it messes things up. Because everything gets converted to String. Wenn I send the hexadecimals with a serial console program the node responds correctly but sending over SPJS doesn’t work.
Time to learn some Go!

Thank you for your answer!