B0475 64MP Camera restarts

Hello,

I have a B0475 64MP Camera module purchased from your website. I have downloaded your Arducamdemo.py program and I am running it just fine. However, I have noticed that in your program you have the option for “Camera restarts” and in your code you have a check to see if the camera has failed to return a frame and if that is the case you restart the camera.

My question is why do you need this ? why does the camera need a restart ? why should the camera return an empty frame that causes the need to do a camera restart ?

Here is a snippet from your program that deals with camera restarts.

while True:
ret, frame = cap.read()

    if not ret:
        if restart_times != 0:
            print("Unable to read video frame")
            success = False
            for i in range(1, restart_times + 1):
                print(f"reopen {i} times")
                try:
                    cap.reStart()
                    success = True
                    break
                except:
                    continue
            if success:
                continue
            else:
                print("reopen failed")

Hi,
Thank you for your inquiry regarding the camera restart functionality in our Arducamdemo.py program. There are two main reasons why we’ve implemented this feature:

  1. Connection Issues: In some cases, poor physical connections or intermittent interface issues can lead to failures in frame acquisition. The restart function helps to recover from these temporary connection problems without requiring manual intervention.
  2. Hot-Swapping Support: The demo program is designed to support hot-swapping of the camera while it’s running. This means you can disconnect and reconnect the camera during program execution. The restart functionality allows the program to detect when a camera has been reconnected and resume operation automatically.

Hello Dion,

Many thanks for your reply, but we are still having issues with the B0475 64MP USB cameras we purchased from your website.

We have downloaded and installed completely fresh images of Debian Bookworm 64bit via the Raspberry PI installer program and installed it on 9 different Raspberry Pi 5 4GB models connected to 9 different B0475 camera modules we purchased from yourselves. We have installed CV2 via the instructions given on your website (wiki).

https://docs.arducam.com/UVC-Camera/USB3-UVC-Camera-Kit/Quick-Start-Guide-for-Linux/

We have tried the following:

Using the USB cables supplied by yourselves.

Using very high quality USB cables.

Using very high speed and high quality Fibre optic USB cables.

Using 9 different Raspberry Pi 5 4GB models.

Using different SD Cards.

Testing with 9 different B0475 64MP Camera modules – all purchased from yourselves.

We have run your “Arducam_demo.py” program repeatedly over many days and weeks and it will randomly fail with a “select() timeout” error (see screenshot below).

Although your program will recover from this issue and restart, the whole process of detecting the camera has failed and restarting takes approx. 10 secs which is too long for us. We are using your cameras in a production environment and a 10 second delay means the machine will fail.

We have noticed that the issue seems to be when using CV2, if we run the qv4l2 program you also recommend as a test on your WIKI page the camera seems to run for days at a time with no issues. We really would prefer to use the camera with Python and ideally CV2 but do you have any other options we could try ? do you have some C++ code examples we could try ?

We desperately need a solution to this problem as we had planned to build many industrial machines using multiple B0475 cameras but this problem means we are now having to look for a replacement camera from another supplier.

Many thanks.

Ross.

Hi Ross,
We have been on the National Holiday from 10.1 ~ 10.7 and just returned to the office. We’re checking the problem you mentioned at the moment. Please stay tuned to this thread and we will update here if making any progress.

Hi Ross,
Please try the command below to start the program.

python3 arducam_demo.py -v 3

It will use cv2 to call the v4l2 interface and should get a stable connection.

Hi @Ross6699
I’m thrilled to say that we made a litter bit of progress in this matter. Please follow the guide video in the link below to update the firmware of the B0475 camera.

Hello Dion,

Well done !! Many thanks for looking into this for us. Hopefully if the cameras become stable then we can use these in production.

One question though, the cameras are installed on Raspberry Pi’s running Debian. Do you have an updated program for the firmware that we can run directly on the Raspberry Pi’s. We don’t use Windows !!

Thanks.

Hi @Ross6699
We don’t have an update program on Linux OS. You can run the update program on Windows OS to flash the new firmware and then use the camera on Raspberry Pi.

Hi @Dion

I am having the same problem as Ross and am getting the “select() timeout” error. I’m using two B0477 cameras with a jetson. Would you be able to share if there are any firmware updates for these cameras that can fix the issue?

Hello Dion,

Unfortunately we cannot run the Firmware update via Windows as our machines only run Linux, and are on the other side of the World so I cannot access them except via remote control. Could you ask the software team to write a new updater for Linux ?

Thanks.

Hello Dion,

I have tried the new firmware on a test module and it does seem to fix the timeout issues. I will keep testing to ensure it is now stable. Well done, and many thanks.

Hi @ben
Thank you for your inquiry.
How about trying it as well? The firmware tool is in the link below and you can refer to the guide video to update the firmware.

Hi @Dion
I tried this firmware but the cameras have stopped working altogether. Please share the correct firmware I should be using for B0477. Thanks!

Hi @ben
Oh no. I was expecting the weekend travel last Friday afternoon and didn’t notice you were using B0477. Please follow the link below to update the firmware for B0477.

Hi @Dion This version didn’t work either :frowning: I see the correct names when I use lsusb but the cameras don’t run. Is there a different version I can try?

Hi Ben,
Can you post the link where did you purchage this camera?

This was the link:

Hello,

Is there any news on whether your programmers can write the firmware update program for Unix ?

Hi @Ross6699
Unfortunately. We don’t have a plan to write a firmware update tool for Linux OS in the new future.

Hello,

I have noticed that on some of my B0475 cameras the min and max of certain ranges has changed. For example on one camera the Saturation has a range of 0-15 but on another camera the range is 0-100, there are also differences in the Gain, White Balance, Contrast and Exposure.

Why is this ? We are planning on using these cameras in a production environment where the program is set and if we have to change a camera for whatever reason we need to be able to just plug a new one in and go. Having differences in cameras that are supposed to be the same model (B0475) is not acceptable in a production setting.

How can we standardize these cameras ?