I have TX2 and camera ‘LI-JETSON-KIT-IMX377M12-X’.
and I connect two.
I take document about installing driver from Leopard(The company that made the camera)
following is document.
Please download the driver patch, kernel code and gcc tool chain from links below.
Drivers: Dropbox - File Deleted
------Setup the driver on TX2
- Download the L4T R28.1 for TX2 from link below.
and follow below steps to flash the R28.1 image the TX2.
Set the TX2 to recovery mode
sudo tar xpf Tegra186_Linux_R28.1.0_aarch64.tbz2
cd Linux_for_Tegra/rootfs/
sudo tar xpf …/…/Tegra_Linux_Sample-Root-Filesystem_R28.1.0_aarch64.tbz2
cd …
sudo ./apply_binaries.sh
Copy and replace the tegra186-quill-p3310-1000-c03-00-base.dtb under Linux_for_Tegra/kernel/dtb
sudo ./flash.sh jetson-tx2 mmcblk0p1
Note: You can also download the Jetpack 3.1 (which includes the L4T R28.1) from Nvidia website and install it to TX2 if needed.
-
After boot up, Copy Image, zImage to TX2 /boot.
-
copy 4.4.38-tegra-leopard.tgz to TX2 /lib/modules
sudo cp 4.4.38-tegra-leopard.tgz /lib/modules
cd /lib/modules
sudo tar zxvf 4.4.38-tegra-leopard.tgz
-
Copy camera_overrides.isp to TX2 /var/nvidia/nvcam/settings (if there is isp file)
sudo chmod 664 /var/nvidia/nvcam/settings/camera_overrides.isp
sudo chown root:root /var/nvidia/nvcam/settings/camera_overrides.isp
-
Reboot the TX2
-
Open a terminal and do "nvgstcapture-1.0”. You can will get live video output.
Note: Please make sure there is a camera on J1.
------Setup Argus software
Download the files from link below.
-
sudo apt-get update
-
sudo apt-get install cmake libgtk-3-dev libjpeg-dev libgles2-mesa-dev libgstreamer1.0-dev
-
tar zxvf argus_R28.1.tgz
-
cd argus
-
mkdir build && cd build
-
cmake …
-
make
-
sudo make install
-
Do "argus_camera --device=0”, “argus_camera --device=1” and “argus_camera --device=2”to get the video output. Video0 is J1 camera, video1 is J2 camera, and video3 is J3 camera.
Note:
- You can also use gstreamer commands to get video output. Below is an example.
gst-launch-1.0 nvcamerasrc fpsRange=“60.0 60.0" sensor-id=0 ! ‘video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)I420, framerate=(fraction)60/1’ ! nvtee ! nvvidconv flip-method=2 ! ‘video/x-raw(memory:NVMM), format=(string)I420’ ! nvoverlaysink -e
-
If you have cooling system (fan), you can use below commands to turn on/off the fan.
1) switch to the root user. sudo su 2) echo 255 > /sys/kernel/debug/tegra_fan/target_pwm //turn on echo 0 > /sys/kernel/debug/tegra_fan/target_pwm //turn off
-
If there are any new drivers, we will add them into link below.
- Compile the patch
If you would like to compile the patch file to get the driver. Please refer to below steps.
Download kernel code and Tool Chain from links below.
Kernel code: Dropbox - File Deleted
GCC ToolChain: Dropbox - File Deleted
Compile the kernel under 64 bit Ubuntu OS on Intel x64 PC. (Virtual machine is fine. We are using Ubuntu 16.04 64 bit OS)
-
Copy compile tool gcc-4.8.5-aarch64.tgz to /opt, and unzip it
sudo tar zxvf gcc-4.8.5-aarch64.tgz
-
Copy kernel_src.tbz2 and two patch files to /usr/src
sudo tar xpf kernel_src-tx2.tbz2
sudo chown -R <user_name> kernel
sudo chown -R <user_name> hardware
patch -p0 < tri_streaming_imx377_base28.1_TX2_NV_dtbs_20171208.patch
patch -p0 < tri_streaming_imx377_base28.1_TX2_NV_kernel_20171208.patch
Note: <user_name> is the user name of your Ubuntu OS. For example: sudo chown -R leopard kernel
-
Copy tx2.sh to /usr/src/kernel.
under /usr/src/kernel, do
source tx2.sh
-
Create a work folder under /home:
sudo mkdir /home/work
sudo chown -R <user_name> /home/work
-
In “kernel/kernel-4.4” folder, run:
make O=$TEGRA_KERNEL_OUT tegra18_defconfig
make O=$TEGRA_KERNEL_OUT zImage
make O=$TEGRA_KERNEL_OUT dtbs
You will get Image and zImage under /home/work/TX2/kernel/kernel_out/arch/arm64/boot and tegra186-quill-p3310-1000-c03-00-base.dtb under /home/work/TX2/kernel/kernel_out/arch/arm64/boot/dts.
I have question.
after step 6.Open a terminal and do "nvgstcapture-1.0”. You can will get live video output.
error occurred.
nvidia@tegra-ubuntu:/$ nvgstcapture-1.0
Encoder null, cannot set bitrate!
Encoder Profile = Baseline
Supported resolutions in case of CSI Camera
(2) : 640x480
(3) : 1280x720
(4) : 1920x1080
(5) : 2104x1560
(6) : 2592x1944
(7) : 2616x1472
(8) : 3840x2160
(9) : 3896x2192
(10): 4208x3120
(11): 5632x3168
(12): 5632x4224
Runtime CSI Camera Commands:
Help : 'h'
Quit : 'q'
Set Capture Mode:
mo:<val>
(1): image
(2): video
Get Capture Mode:
gmo
Set Sensor Id (0 to 10):
sid:<val> e.g., sid:2
Get Sensor Id:
gsid
Set sensor orientation:
so:<val>
(0): none
(1): Rotate counter-clockwise 90 degrees
(2): Rotate 180 degrees
(3): Rotate clockwise 90 degrees
Get sensor orientation:
gso
Set Whitebalance Mode:
wb:<val>
(0): off
(1): auto
(2): incandescent
(3): fluorescent
(4): warm-fluorescent
(5): daylight
(6): cloudy-daylight
(7): twilight
(8): shade
(9): manual
Get Whitebalance Mode:
gwb
Set Scene-Mode:
scm:<val>
(0): face-priority
(1): action
(2): portrait
(3): landscape
(4): night
(5): night-portrait
(6): theatre
(7): beach
(8): snow
(9): sunset
(10): steady-photo
(11): fireworks
(12): sports
(13): party
(14): candle-light
(15): barcode
Get Scene-Mode:
gscm
Set Color Effect Mode:
ce:<val>
(1): off
(2): mono
(3): negative
(4): solarize
(5): sepia
(6): posterize
(7): aqua
Get Color Effect Mode:
gce
Set Auto-Exposure Mode:
ae:<val>
(1): off
(2): on
(3): OnAutoFlash
(4): OnAlwaysFlash
(5): OnFlashRedEye
Get Auto-Exposure Mode:
gae
Set Flash Mode:
f:<val>
(0): off
(1): on
(2): torch
(3): auto
Get Flash Mode:
gf
Set Flicker Detection and Avoidance Mode:
fl:<val>
(0): off
(1): 50Hz
(2): 60Hz
(3): auto
Get Flicker Detection and Avoidance Mode:
gfl
Set Contrast (0 to 1):
ct:<val> e.g., ct:0.75
Get Contrast:
gct
Set Saturation (0 to 2):
st:<val> e.g., st:1.25
Get Saturation:
gst
Set Exposure Time in seconds:
ext:<val> e.g., ext:0.033
Get Exposure Time:
gext
Set Auto Exposure Lock(0/1):
ael:<val> e.g., ael:1
Get Auto Exposure Lock:
gael
Set Edge Enhancement (0 to 1):
ee:<val> e.g., ee:0.75
Get Edge Enhancement:
gee
Set ROI for AE:
It needs five values, ROI coordinates(top,left,bottom,right)
and weight in that order
aer:<val> e.g., aer:20 20 400 400 1.2
Get ROI for AE:
gaer
Set ROI for AWB:
It needs five values, ROI coordinates(top,left,bottom,right)
and weight in that order
wbr:<val> e.g., wbr:20 20 400 400 1.2
Get ROI for AWB:
gwbr
Set FPS range:
It needs two values, FPS Range (low, high) in that order
fpsr:<val> e.g., fpsr:15 30
Get FPS range:
gfpsr
Set WB Gains:
It needs four values (R, GR, GB, B) in that order
wbg:<val> e.g., wbg:1.2 2.2 0.8 1.6
Get WB Gains:
gwbg
Set TNR Strength (0 to 1):
ts:<val> e.g., ts:0.75
Get TNR Strength:
gts
Set TNR Mode:
tnr:<val>
(0): NoiseReduction_Off
(1): NoiseReduction_Fast
(2): NoiseReduction_HighQuality
Get TNR Mode:
gtnr
Capture: enter 'j' OR
followed by a timer (e.g., jx5000, capture after 5 seconds) OR
followed by multishot count (e.g., j:6, capture 6 images)
timer/multihot values are optional, capture defaults to single shot with timer=0s
Start Recording : enter '1'
Stop Recording : enter '0'
Video snapshot : enter '2' (While recording video)
Set Preview Resolution:
pcr:<val> e.g., pcr:3
(2) : 640x480
(3) : 1280x720
(4) : 1920x1080
(5) : 2104x1560
(6) : 2592x1944
(7) : 2616x1472
(8) : 3840x2160
(9) : 3896x2192
(10): 4208x3120
(11): 5632x3168
(12): 5632x4224
Note - For preview resolutions 4208x3120 and more use option --svs=nveglglessink
Get Preview Resolution:
gpcr
Set Image Resolution:
icr:<val> e.g., icr:3
(2) : 640x480
(3) : 1280x720
(4) : 1920x1080
(5) : 2104x1560
(6) : 2592x1944
(7) : 2616x1472
(8) : 3840x2160
(9) : 3896x2192
(10): 4208x3120
(11): 5632x3168
(12): 5632x4224
Get Image Capture Resolution:
gicr
Set Video Resolution:
vcr:<val> e.g., vcr:3
(2) : 640x480
(3) : 1280x720
(4) : 1920x1080
(5) : 2104x1560
(6) : 2592x1944
(7) : 2616x1472
(8) : 3840x2160
(9) : 3896x2192
Get Video Capture Resolution:
gvcr
Runtime encoder configuration options:
Set Encoding Bit-rate(in bytes):
br:<val> e.g., br:4000000
Get Encoding Bit-rate(in bytes):
gbr
Set Encoding Profile(only for H.264):
ep:<val> e.g., ep:1
(0): Baseline
(1): Main
(2): High
Get Encoding Profile(only for H.264):
gep
Force IDR Frame on video Encoder(only for H.264):
Enter 'f'
bitrate = 4000000
Encoder Profile = Baseline
Socket read error. Camera Daemon stopped functioning.....
gst_nvcamera_open() failed ret=0
** (nvgstcapture-1.0:19009): CRITICAL **: <create_capture_pipeline:4565> can't set camera to playing
** (nvgstcapture-1.0:19009): CRITICAL **: <main:5367> Capture Pipeline creation failed
** Message: <main:5374> Capture completed
** Message: <main:5424> Camera application will now exit
how can i fix ?
I connect the camera as follows.
https://leopardimaging.com/product/li-jetson-kit-imx377m12-x/