Hi, I’m curious if the H7 has been tested for use over a long period of time? Magnitude of days? I’ve got a program that runs using the RPC Library to check for high temperatures and do a bunch of stuff with the trigger. I’ve found that when testing my program overnight, the camera seems to stop transmitting and needs a hard reset to work again.
My program gets the H7 to run a temp detection script and return true/false based on timing and previous conditions, as well as stream the feed to my PC, so I’m not sure if this could be something like a ram issue?
I was able to check on my previous test that it failed after about 16 hours.
reset is always welcome.
i do it for such applications that requires continuous working conditions.
regardless the camera… i reset plcs, arduinos …
sometimes i hard reset boards with switches.
depends on the app.
give it a try…
I’ve implemented a remote call to reset the sensor and reinitialize settings on the H7 every 6 hours. I’ll be remoting in this weekend to check if it’s still alive and will update on Monday! Thanks!
It looks like the camera failed after about 10 hours still, even with the reset. I’ll keep trying to test this but I’m not sure what the issue could be yet.
sad to hear that.
how much meters are the usb cable?
did you try to power the camera locally via vin pin?
does your usb cable have shield?
did you try another?
the camera stops transmitting what? does it works at all that moment?
do you have some outputs to check it like leds or on board leds ?
Hi sorry for the delay in response, I’ve been doing some more testing. Before, for a reset, I simply threw a sensor.reset() command. Now I’ve figured out a way to do a hard reset through the code by toggling the USB ports on my Raspberry Pi using the uhubctl library.
Now it looks like it’s working, but I’ve just encountered a
termios.error: (5, ‘Input/output error’)
message. It looks like I can just throw an exception for this error but I’m continuing to debug. In regards to your questions: The cable is just 1m long with shielding. I haven’t tried another yet, but I’m planning on trying another if my errors are persisting. The camera is still powered, but it seems like it can’t perform the called methods, as the Raspberry Pi is receiving none as a result, which I believe means there was an issue communicating. [However, as I said above I’ve been able to fix this I think through a hard reset of the device.]
The most recent traceback looks like it’s coming from the serial library. Below is the whole traceback:
Traceback (most recent call last):
File “/home/raspi3/Desktop/master_controller_device_test.py”, line 477, in
powercycleusb()
File “/home/raspi3/Desktop/master_controller_device_test.py”, line 289, in powercycleusb
reinit()
File “/home/raspi3/Desktop/master_controller_device_test.py”, line 308, in reinit
img = get_frame_buffer_call_back(“sensor.GRAYSCALE”, “sensor.QVGA”, cutthrough=True, silent=True)
File “/home/raspi3/Desktop/master_controller_device_test.py”, line 64, in get_frame_buffer_call_back
result = interface.call(“jpeg_image_snapshot”, “%s,%s” % (pixformat_str, framesize_str))
File “/home/raspi3/Desktop/rpc.py”, line 219, in call
return self.__get_result(recv_timeout) if self.__put_command(self._hash(name, len(name)), data, send_timeout) else None
File “/home/raspi3/Desktop/rpc.py”, line 186, in __put_command
self._flush()
File “/home/raspi3/Desktop/rpc.py”, line 391, in _flush
self.__ser.reset_input_buffer()
File “/usr/lib/python3/dist-packages/serial/serialposix.py”, line 661, in reset_input_buffer
termios.tcflush(self.fd, termios.TCIFLUSH)
termios.error: (5, ‘Input/output error’)
Seems like the RPI doesn’t handle the flush command which doesn’t return anything. Can’t really say for that error other than pyserial I guess doesn’t handle it.
Sorry for a late response but I’m just clarifying, you’re saying the Raspberry Pi isn’t flushing the buffer correctly? Is there a workaround that could be done to “manually” flush the buffer instead?
I don’t know, the issue is happening because of the particular implementation of how pyserial works on the RPi.
I don’t have the ability to provide help support for all systems our software can run on. This isn’t an issue on the desktop implementation of pyserial on a PC over a USB to serial UART.