Open dphaas opened 8 months ago
Best not to make any changes on this yet. There seems to be an issue with a zero byte read, port.read(0). If one is to believe the doc strings for read() (Read one or more bytes....) this function does not support zero bytes but the default is readlen = int 0. Something doesn't like port.read(0). I'm not sure if it is pyftdi, the ftdi driver, the device I am communicating with or my protocol analyzer. Changing to port.read(1) seems to make the problem go away. I may dig into this more later but for now I have a work-around.
If port in non-smb_mode, successfully reads the loop continues when it should attempt to write. I modified the code to work as intended (I think) with comments below.