Hello! I have a question.

Hello!

I have a question. I am still working on sending and receiving binary data with chilipeppr and the serial port json server and I was able to make some progress. I can send binary data to the node and it responds correctly.

There is just a small issue:
When the node sends a 0x0D byte I receive a 0x0A. In the code of serial port json server in the file serialport.go when I do a print of the received data in the function reader() it is already incorrect. So, if I understand correctly it gets already written to it this way by goserial?
0x0A is \n newline character and 0x0D is \r return character so I assume there must be some byte to string conversion somewhere but I am unable to find where this happens before it gets written to the reader() function.

Any help would be very appreciated because I am kind of stuck. Thank you very much!

Regards,
Bastian

Got it!

I had to add the following line to serial_posix.go in goserial:
st.c_iflag &= ^C.tcflag_t(C.INLCR | C.ICRNL | C.IGNCR | C.IXON | C.IXOFF | C.IXANY)

This line deactivates the filtering of bytes like changing 0x0d to 0x0a, ignoring 0x11, etc.