Having trouble with USB_VCP

I’m sorry, that’s what I meant. I ran your code as is and Blender crashed because of no timeout. Then I ran the code again WITH a timeout and received the struct error, I’m assuming the camera isn’t sending ANY data so Blender is just reading nothing which is why I’m getting the error. THEN I started lighting up LED’s and stuff to prove that the board was still receiving the snap signal just to be sure. At any iteration I couldn’t receive a signal from the camera in Blender. Also I set checkpoints in Blender to make sure DTR is true.

Okay so it looks like dsrdtr is ignored on Windows, adding setDTR(True) after opening the port seems to fix it.

import sys, serial, struct
port = 'COM3'
sp = serial.Serial(port, baudrate=115200, bytesize=serial.EIGHTBITS, parity=serial.PARITY_NONE, xonxoff=False, rtscts=False, stopbits=serial.STOPBITS_ONE, timeout=5, dsrdtr=True)
sp.setDTR(True)
sp.write(b"snap")
size = struct.unpack('<L', sp.read(4))[0]
sp.close()
print(size)

IT’S FINALLY WORKING…sort of. When I run the code as is print(size) comes out as 1885433459. Any idea what that is?

No, check main.py you’re probably sending something else.

You were correct. Everything is working great now. Thank y’all so much for the help, I really appreciate it.

What was the solution to the ‘1885433459’ problem? I’m getting the same

I had a similar issue when receiving values from the frame buffer after writing over serial port (Im using python3.6 with the pyserial module and openmv h7 plus on a windows machine). Switching rtscts=True and dsrdtr=False did the trick for me in the python script when instantiating the serial port