Topic: NION Python NULL Byte for Serial Port?
I am having difficulty sending a NULL byte (0x00) out of the serial port with Python/NWare. For example, I am trying to send the string 0xF5 0x00 0x00 0x02 0x18 (port.write("\xF5\x00\x00\x02\x18") but all that comes out of the serial port is the 0xF5 byte. If I drop the 0x00 bytes ("\xF5\x02\x18") I get the whole string.
I can send each byte individually, one line of Python per byte (port.write("\xF5") etc), but then only the non-null bytes are sent out the serial port, so the string \xF5 \x00 \x00 \x02 \x18 comes out as \xF5 \x02 \x18.
I have tried various Python escape characters (â€œ\x00" , â€œ\00" ) as well as various manipulations with conversion functions (hex(), chr(), etc.). No matter what I do, there is no character output for the NULL byte.
I get the same results whether I am using a Windows serial port on a PC or a Linux serial port on the NioNode. I am using v1.4.4.