HOWTO: I2C cmd scripts usage of VEYE-MIPI-290/327 on RaspberryPI Platform

A new version of this artical is HERE.Please refer to that arical.


We provide a Shell script to set params of VEYE-MIPI-290 on RaspberryPI, which is open source.
Download:i2c_cmd on github

Which I2C

We will use I2C-1 to communicate with VEYE Camera Module on RP3b/b+、CM3. I provide camera_i2c_config script to set the pin multiplexing.
In case you do not know how to use I2C-1, I provide you [How to open I2C-0] below.

### Open [i2c-dev0] device file
1.  /boot/config.txt
    dtparam = i2c_arm = on 
2. /etc/modules
`i2c-dev `
3. i2c-0 devices will appear
`ls /dev/i2c-0`
4. Check VEYE-MIPI-290/327 i2c address
`i2cdetect -y 0`
the address is 0x3b



There are four files:camera_i2c_config、i2c_read、i2c_write、
Run camera_i2c_config first to set Pin mux, then

camera_i2c_config USAGE

Computer Module

Hardware Connection :
Use Enhanced Interface Board We provided to attach VEYE Camera Module to CM3.

Attach a VEYE Camera (to CAM1)
Attach CD1_SDA (J6 pin 37) to GPIO2 (J5 pin 5).
Attach CD1_SCL (J6 pin 39) to GPIO3 (J5 pin 7).

Attach a VEYE Camera (to CAM0)
Attach CD0_SDA (J6 pin 45) to GPIO44 .
Attach CD0_SCL (J6 pin 47) to GPIO45 .

Download dt-blob.bin from here, rename it to dt-blob.bin and place it in /boot/,then

./camera_i2c_config [cameranum]

Other Boards

./camera_i2c_config USAGE

Usage: ./ [-r/w] [-f] function name -p1 param1 -p2 param2
-r read
-w write
-f [function name] function name
-p1 [param1] param1 of each function
-p2 [param1] param2 of each function
function list and param,ref to [veye_mipi_290_isp_function_and_param.pdf]
support functions: devid,hdver,wdrmode,videoformat,mirrormode,denoise,agc,lowlight


  • devid
./ -r -f devid
value description
0x02 MIPI, WDRDisable, 2Lane
0x22 MIPI, WDREnable, 2Lane
0x13 LVDS,WDRDisable,3Lane
0x33 LVDS,WDREnable,3Lane
  • hdver
./ -r -f hdver
value description
0xXX Version
  • wdrmode
./ -r -f wdrmode
./ -w -f wdrmode -p1 [value]
value description
0x00 Back Light Mode OFF
0x01 Back Light Mode ON, LOW
0x02 Back Light Mode ON, HIGH
0x03 WDR Enable
  • videoformat
./ -r -f videoformat
./ -w -f videoformat -p1 [value]


value description
  • mirrormode
./ -r -f mirrormode
./ -w -f mirrormode -p1 [value]
value description
0x00 Normal
0x01 Mirror
0x02 V-Flip
0x03 Mirror And V-Flip(180 Degree Rotate)
  • denoise
./ -r -f denoise
./ -w -f denoise -p1 [value]
value description
0x00 NR 2D Mode = OFF; NR 3D Mode = OFF
0x01 NR 2D Mode = OFF; NR 3D Mode = LOW
0x02 NR 2D Mode = OFF; NR 3D Mode = MIDDLE
0x03 NR 2D Mode = OFF; NR 3D Mode = HIGH
0x04 NR 2D Mode = LOW; NR 3D Mode = OFF
0x05 NR 2D Mode = LOW; NR 3D Mode = LOW
0x06 NR 2D Mode = LOW; NR 3D Mode = MIDDLE
0x07 NR 2D Mode = LOW; NR 3D Mode = HIGH
0x08 NR 2D Mode =MIDDLE; NR 3D Mode = OFF
0x09 NR 2D Mode =MIDDLE; NR 3D Mode = LOW
0x0A NR 2D Mode = MIDDLE; NR 3D Mode = MIDDLE
0x0B NR 2D Mode = MIDDLE; NR 3D Mode = HIGH
0x0C NR 2D Mode =HIGH; NR 3D Mode = OFF
0x0D NR 2D Mode =HIGH; NR 3D Mode = LOW
0x0E NR 2D Mode = HIGH; NR 3D Mode = MIDDLE
0x0F NR 2D Mode = HIGH; NR 3D Mode = HIGH
  • agc
./ -r -f agc
./ -w -f agc -p1 [value]
value description
0x00~0x0F AGC intensity
  • lowlight
./ -r -f lowlight
./ -w -f lowlight -p1 [value]

| ———— | ———— |
| value | description |
| 0x01 | 1/2(FRAME RATE) |
| 0x03 | 1/4
| 0x05 | 1/6(FRAME RATE) |
| 0x07 | 1/8
| 0x09 | 1/10(FRAME RATE) |
| 0x0B | 1/15
| 0x0D | 1/20(FRAME RATE) |
| 0x0F | 1/25
| 0x11 | 1/30*(FRAME RATE) |
| 0x00 | Fixed frame rate (25/30) |
– daynightmode

./ -r -f daynightmode
./ -w -f daynightmode -p1 [value]
value description
0xFF Color Mode
0xFE Black&White Mode
0xFC Trigger Mode

Leave a Reply

Your email address will not be published.