Sensor registers can be accessed easily via i2c tools on NVIDIA Jetson devices. Example will utilize i2cset and i2cget commands from i2c-tools package. Please consult their man page for more options.
First inquire i2c bus and chip address information for a specific /dev/video*:
cat /sys/class/video4linux/video0/name
Output:
Example imx415 module(video0) is on i2c bus 32, chip address 0x1a.
Write:
sudo i2cset -f -y 32 0x1a 0x30 0x00 0x01 i
Write data 0x01 to address 0x3000 of device 0x1a on bus 32.
Read:
sudo i2cset -f -y 32 0x1a 0x30 0x00 i
sudo i2cget -f -y 32 0x1a
sudo i2cget -f -y 32 0x1a
Set pointer to address 0x3000. Do a default single read byte of 0x3000. Then read next address 0x3001.
Notes:
- Sensor must be operating to perform r/w. Start a stream application like argus_camera before i2c communication.
- Use f option to force access when device is busy. Because device 0x1a should be used by kernel, which shows as busy "UU" in i2cdetect.
- Use i option for 16-bit addressing mode. Most Sony sensors use 16bit register addressing.