1. Check driver installation
Run the following command to check whether the Arducam driver is installed:
dmesg | grep arducam
If the driver is installed correctly, the command will output information similar to the following
(note: the output may be different from the following figure):
If the driver is not installed, please refer to this document to install the driver:
1) Hardware connection check
Check the cable between the camera and the HAT
Check HAT power supply (when via GPIO):
Check HAT power supply (when via USB):
2) CAM HAT status check
Check the LED lights on the HAT
To check the status of the HAT, we can judge by the LED lights on the HAT, under normal circumstances, the green LED on the HAT will flash several times when the HAT is powered on and when the camera is turned on.
A. When using GPIO power supply
The green LED will flash several times when the HAT is connected to the power supply. If the green LED does not flash, then the HAT may be damaged.
B. When using USB power supply
Just like using the GPIO power supply, the LED on the HAT will flash several times when the power is turned on.
C. When using the software to open the camera
When using the software to run the camera, the green LED on the HAT will also flash several times (take arducam_displayer.py as an example below):
3. Single channel test
A. Update firmware
Download the firmware update tool to Jetson Nano (this tool can only be used on Jetson Nano):
Perform the following steps to update the firmware:
(Please modify the file name and module name to the actual name)
tar xzvf b0267_channel_test.tar.gz cd b0267_channel_test/ sudo ./firmware_update -h # show help. sudo ./firmware_update -i 7 -m B0267_ov9281_four_in_one_single_channel_firmware
After the firmware update is complete, please completely power off the Jetson Nano and Camera HAT and then power on again. (Sometimes there will be an error if the power goes on)
B. Test Steps
- View supported resolutions and formats
2. Choose the resolution with the smallest width (1280×800 in this example)
3. Download and run the test program
git clone https://github.com/ArduCAM/MIPI_Camera.git cd MIPI_Camera/Jetson/Jetvariety/example/ python3 arducam_displayer.py -f GREY --width 1280 --height 800 --channel 0
–width Used to specify the image width (please specify the minimum resolution here)
–height Used to specify the image height
–f Used to specify the image format
Please refer to the output of the v4l2-ctl --list-formats-ext command to set the above three parameters
–channel Used to specify the channel (0~3)
C. Test Results
Under normal circumstances, the preview should be displayed (note: please execute export DISPLAY=:0 when logging in with ssh)
If you can’t preview normally, and the following error occurs, it means that there is a problem with this channel.
There may be a problem with the cable connection of this channel, or the cable/camera is damaged.
select timeout VIDIOC_DQBUF: Resource temporarily unavailable Traceback (most recent call last): File "arducam_displayer.py", line 121, in <module> display(cap, arducam_utils, args.fps) File "arducam_displayer.py", line 35, in display frame = resize(frame, 1280.0) File "arducam_displayer.py", line 13, in resize width = frame.shape AttributeError: 'NoneType' object has no attribute 'shape'
D. Special cases
When performing a single-channel test, it is very difficult for all channels to be abnormal. If you encounter this situation, please carefully check whether the cable connection is correct.
In addition, you can try to remove all cameras and use only a single camera for single-channel testing:
After testing a camera each time, remove the current camera and use the same interface to test other cameras:
When using MIPI_RX0 as a test interface, you can execute the following code to test a single channel: (for other interfaces, please modify the value of the channel parameter)
python3 arducam_displayer.py -f GREY --width 1280 --height 800 --channel 0
E. Other problems
When using the camera, something similar to the following occurs:
- Open two terminals
- Run the camera:
- In another terminal, try to increase HTS
# Get the current HTS value python3 rw_sensor.py -r 0x380c 0x380d # Increase HTS python3 rw_sensor.py -r 0x380c 0x380d -v 0x0A 0x50