Changes

Jump to navigation Jump to search
Line 1: Line 1:  
[[V-by-One-HS KIT appnotes 4 rpi/zh|查看中文]]
 
[[V-by-One-HS KIT appnotes 4 rpi/zh|查看中文]]
 +
 +
=== Overview ===
 +
V-by-One® HS is a high-performance SerDes solution provided by THine, offering excellent performance and cost-effectiveness.
 +
 +
We have developed the V-by-One-HS KIT product based on the V-by-One® HS solution, specifically designed for long-range transmission of images from MV series and RAW series camera products.
 +
 +
The V-by-One-HS KIT features great adaptability, a wide range of input-output interfaces, and comprehensive driver support.
 +
 +
==== Camera module list ====
 +
{| class="wikitable"
 +
!Series
 +
!Model
 +
!Status
 +
|-
 +
|MV series
 +
|MV-MIPI-IMX178M
 +
|Done
 +
|-
 +
|MV series
 +
|MV-MIPI-SC130M
 +
|Done
 +
|-
 +
|MV series
 +
|MV-MIPI-IMX296M
 +
|Done
 +
|-
 +
|MV series
 +
|MV-MIPI-IMX287M
 +
|Done
 +
|-
 +
|MV series
 +
|MV-MIPI-IMX265M
 +
|Done
 +
|-
 +
|MV series
 +
|MV-MIPI-IMX264M
 +
|Done
 +
|-
 +
|RAW series
 +
|RAW-MIPI-SC132M
 +
|Done
 +
|-
 +
|RAW sereies
 +
|RAW-MIPI-AR0234M
 +
|ing
 +
|-
 +
|RAW sereies
 +
|RAW-MIPI-IMX462M
 +
|ing
 +
|}
 +
 +
==== Essential preparations ====
 +
V-by-One provides a transparent channel for long-range transmission of images, I2C, and IO.
 +
 +
For the functionality of the camera module itself, it is similar to connecting the camera module directly to the Raspberry Pi using the MIPI interface.
 +
 +
Therefore, it is essential to refer to the instructions on [[Mv series camera appnotes 4 rpi|how to use the MV series camera module on the Raspberry Pi platform]].
 +
 +
===Hardware Setup===
 +
====Connection of V-by-One-HS-RX and Camera====
 +
 +
===== MV series camera =====
 +
The two are connected using 0.5 mm pitch*30P FFC cable with opposite direction. The cable must be inserted with the silver contacts facing outside.
 +
{| class="wikitable"
 +
!TOP
 +
!BOTTOM
 +
|-
 +
|[[File:V-by-One-HS-RX connect with MV cam.jpg|alt=|center|thumb|600x600px|V-by-One-HS-RX to MV-MIPI-X|link=http://wiki.veye.cc/index.php/File:V-by-One-HS-RX_connect_with_MV_cam.jpg]]
 +
|[[File:V-by-One-HS-RX to MV-MIPI-X.jpg|alt=|center|thumb|600x600px|V-by-One-HS-RX to MV-MIPI-X|link=http://wiki.veye.cc/index.php/File:V-by-One-HS-RX_to_MV-MIPI-X.jpg]]
 +
|}
 +
 +
===== RAW series camera =====
 +
RAW series cameras have two output specifications: 15-pin interface and 22-pin interface.
 +
 +
* For the 22-pin interface type:
 +
 +
Use a 0.5mm pitch * 22-pin FFC with an  opposite direction. Please ensure that the silver contact surfaces are facing outward.
 +
 +
* For the 15-pin interface type (RAW-MIPI-SC132M):
 +
 +
Use a 15-to-22 pin FFC with a same-side direction. Please ensure that the silver contact surfaces are facing outward.
 +
 +
==== Connection of V-by-One-HS-RX and V-by-One-HS-TX ====
 +
In most cases, only one coaxial cable is sufficient to meet the image transmission bandwidth requirements. One coaxial cable can provide an effective bandwidth of 3.2Gbps.
 +
 +
Below are scenarios where two coaxial cables are required:
 +
 +
* RAW-MIPI-AR0234M: Configured as 4 lanes and output format set to RAW10.
 +
 +
==== Connection of  V-by-One-HS-RX and Raspberry Pi ====
 +
 +
===== Power Supply =====
 +
The V-by-One-HS-RX requires a 12V DC power supply. You can choose either J1 or J2 for the power input.
 +
 +
===== Raspberry Pi Model B and Model B+ =====
 +
Use a 1mm pitch 15-pin FFC  to connect V-by-One-HS-RX's J9 to the Raspberry Pi's MIPI CSI-2 interface.
 +
 +
===== Raspberry Pi Zero, Zero W, and Computer Module =====
 +
Use a 0.5mm pitch 22-pin FFC to connect V-by-One-HS-RX's J7 to the Raspberry Pi's MIPI CSI-2 interface.
 +
<br />[[File:V-By-One-HS-Kit with MV camera.jpg|center|thumb|800x800px|V-By-One-HS-Kit with MV camera|link=http://wiki.veye.cc/index.php/File:V-By-One-HS-Kit_with_MV_camera.jpg]]
 +
 +
=== V4L2 mode manual ===
 +
We have saved the code for v4l2 mode in this [https://github.com/veyeimaging/raspberrypi_v4l2 github repository].
 +
 +
====Download the driver package====
 +
<code>wget <nowiki>https://github.com/veyeimaging/raspberrypi_v4l2/releases/latest/download/raspberrypi_v4l2.tgz</nowiki></code>
 +
====Install driver====
 +
<code>tar -xzvf raspberrypi_v4l2.tgz</code>
 +
 +
<code>cd raspberrypi_v4l2/release/</code>
 +
 +
<code>chmod +x *</code>
 +
 +
<code>sudo ./install_driver.sh veye_mvcam</code>
 +
 +
==== Use the suitable veye_vbyone.dtbo ====
 +
V-by-One has many configuration options, such as the MIPI rate, the number of MIPI lanes for the camera, the number of V-by-One-HS-TX output lanes, whether IO uses the local mode or remote mode, and the number of coaxial cables used.
 +
 +
The default configuration is as follows:
 +
 +
* MIPI rate: 1.5Gbps/lane
 +
* Camera MIPI signal: 2 lanes
 +
* IO mode: Near-end mode
 +
* Number of coaxial cables: 1
 +
 +
Please note that these are the default settings, and they can be customized based on specific requirements or preferences.
 +
 +
You can choose the appropriate "veye_vbyone-[option].dtbo" file, rename it to "veye_vbyone.dtbo," and then copy it to the "/boot/overlay" directory.
 +
 +
Alternatively, if you need to use a different configuration for the V-by-One setup, simply refer to the [[Build drivers from source for rpi|camera driver source code compilation guide for the Raspberry Pi platform]]. Modify the "veye_vbyone.dts" file according to your requirements, recompile it to obtain the "veye_vbyone.dtbo" file, and then copy it to the "/boot/overlay" directory.
 +
 +
Once the installation is complete, reboot your Raspberry Pi to apply the changes.
 +
 +
====Uninstall the driver====
 +
If you need to change to Legacy mode, or want to change to another camera module model driver, you must uninstall the current driver first.
 +
 +
<code>sudo ./uninstall_driver.sh veye_vbyone</code>
 +
 +
<code>sudo ./uninstall_driver.sh veye_mvcam</code>
 +
====Check system status====
 +
Take MV-MIPI-IMX178M as an example.
 +
 +
<code>dmesg | grep mvcam</code>
 +
 +
You can see the camera model and the version of the camera probed during the Linux boot phase.
 +
 +
<code>camera is: MV-MIPI-IMX178M</code>
 +
 +
<code>firmware version: 0x1080102</code>
 +
 +
And the /dev/video0 node exists, which proves that the camera status is normal.
 +
====v4l2-ctl application examples====
 +
Please refer to the corresponding section in the article on [[Mv series camera appnotes 4 rpi|How to use MV series camera modules on the Raspberry Pi platform]].
 +
 +
=== Legacy mode manual ===
 +
We store the code for legacy patterns in this [https://github.com/veyeimaging/mvcam_raspberrypi github repository].
 +
 +
====Download the software package====
 +
<code>git clone <nowiki>https://github.com/veyeimaging/mvcam_raspberrypi.git</nowiki></code>
 +
 +
Add executable permissions:
 +
 +
<code>chmod +x -R ./mvcam_raspberrypi/</code>
 +
====Software package main content introduction====
 +
camera_i2c_config:Automatically recognizes different Raspberry Pi board types and controls the power on pins to power the camera.
 +
 +
vbyone_i2c_init.sh: Script for initializing and configuring the V-by-One link.
 +
 +
mv_raspicam:Realize image preview, image saving and other functions.
 +
 +
mv_mipi_i2c.sh:Scripts for reading and setting camera parameters via i2c protocol.
 +
 +
==== Initialize the V-by-One link ====
 +
First, execute the vbyone_i2c_init.sh script.
 +
 +
Instructions for using the vbyone_i2c_init.sh script:
 +
 +
<code>Use the I2C command to initialize the SERDES channel of V-by-One.</code>
 +
 +
<code>Usage:  ./vbyone_i2c_init.sh</code>
 +
 +
<code>options:</code>
 +
 +
<code>   -b [i2c bus num]        i2c bus number,default 10</code>
 +
 +
<code>   -n [coax number]        coax number [1,2],default 1</code>
 +
 +
<code>   -s [camera mipi datarate]    1500 means:1500Mbps/lan; 1188 means: 1188Mbps/lan</code>
 +
 +
<code>   -l [camera lan number]  2 or 4</code>
 +
 +
<code>   -r [io remote or local]    0 means use io locally(on TX side); 1 means use io remotely(on RX side)</code>
 +
 +
<code>   -h                            print this help</code>
 +
 +
Once the V-by-One link is initialized, you can use the mv_mipi_i2c.sh script to read the camera's version number and confirm whether the camera registers are accessible correctly.
 +
 +
Please refer to  [[Mv series camera appnotes 4 rpi|How to use MV series camera modules on the Raspberry Pi platform]] for more usage.
 +
 +
=== Local mode and Remote mode of IO ===
 +
The IO of V-by-One-HS_KIT can be configured to  local mode and remote. These two modes are only applicable to MV series cameras.
 +
 +
====Local mode====
 +
Access the corresponding IO of the MV camera locally at the TX end of V-by-One.
 +
{| class="wikitable"
 +
!MV Cam pin
 +
!TX pin
 +
!function
 +
|-
 +
|TriggerIN_IO
 +
|GPIO0
 +
|trigger in
 +
|-
 +
|OUT_IO1
 +
|GPIO2
 +
|Strobe/userout
 +
|-
 +
|OUT_IO2
 +
|GPIO3
 +
|Strobe/userout/triggerout
 +
|}
 +
====Remote mode====
 +
Remote access to the corresponding IO of the MV camera is possible at the RX end of V-by-One.
 +
{| class="wikitable"
 +
!MV Cam pin
 +
!TX pin
 +
!RX pin
 +
!function
 +
!Direction
 +
|-
 +
|TriggerIN_IO
 +
|GPIO0
 +
|GPIO0
 +
|trigger in
 +
|RX-->TX
 +
|-
 +
|OUT_IO1
 +
|GPIO2
 +
|GPIO2
 +
|Strobe/userout
 +
|TX-->RX
 +
|-
 +
|OUT_IO2
 +
|GPIO3
 +
|GPIO3
 +
|Strobe/userout/triggerout
 +
|TX-->RX
 +
|}
 +
 +
=== Common issue ===
 +
 +
* Do not use i2cdetect
 +
 +
After system initialization, avoid using the i2cdetect command to detect address devices, as it may disrupt the established SerDes link.
 +
 +
===Document History===
 +
 +
*2023-07-30
 +
 +
First release version.

Navigation menu