How to use LI-JETSON-KIT-IMX377M12-X with TX2

Hi nkumarpsjes,
Yes, please replace the tegra186-quill-p3310-1000-c03-00-base.dtb file under Linux_for_Tegra/kernel/dtb after running sudo ./appy_binaries.sh .

Did you do below steps before your step#2? You can download the L4TR28.1 files from the link below. We got these files from Nvidia official website. Other BSP versions (like R28.2 or R24.2.1) won’t work with this driver.

[i]1. 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[/i]

Simon,
Here’s my command line history (can’t attach pics for some reason):

1069  tar xpf  Tegra186_Linux_R28.1.0_aarch64.tbz2
 1070  ls
 1071  cd Linux_for_Tegra/rootfs/
 1072  sudo tar xpf ../../Tegra_Linux_Sample-Root-Filesystem_R28.1.0_aarch64.tbz2
 1073  cd ..
 1074  sudo ./apply_binaries.sh
 1075  diff -w ../../Driver/Binaries/tegra186-quill-p3310-1000-c03-00-base.dtb kernel/dtb/tegra186-quill-p3310-1000-c03-00-base.dtb
 1076  vi ./apply_binaries.sh
 1077  sudo cp -v ../../Driver/Binaries/tegra186-quill-p3310-1000-c03-00-base.dtb kernel/dtb/
 1078  lsusb
 1079  sudo ./flash.sh jetson-tx2 mmcblk0p1

#7 was to see if both files were indeed different.

Ok, after above steps, THEN I do:

  1. After boot up, copy Image, zImage to /boot on TX2.
  2. copy 4.4.38-tegra-leopard.tgz to /lib/modules on TX2.
    sudo cp 4.4.38-tegra-leopard.tgz /lib/modules
    cd /lib/modules
    sudo tar zxvf 4.4.38-tegra-leopard.tgz
  3. 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

Correct?

Hi nkumarpsjes,

Yes, the steps are correct. Please make sure you reboot the TX2 after you did the steps. After the boot up, do “nvgstcapture-1.0” to see if you can get video output.
Please make sure there is a camera on J1 of the adapter board.

Sorry Simon, but it still errors out!
I am testing on:
L1-TX1-CB carrier board
IMX377 camera module on J1

Strange thing is it never creates /dev/video0.

  1. Did your colleague use the same dropbox link as we do? In case, if files happens to be slightly different.
  2. Did your colleague test on IMX377?
  3. After final boot, do we have to run sudo apt-get updates and sudo apt-get install dist-upgrade?
  4. Is 4.4.38-tegra-leopard supposed to replace 4.4.38-tegra in /lib/modules?
  5. I noticed that /lib/modules/4.4.38-tegra-leopard/source → /home/simon/TX2/IMX274/NV/IMX274_20171018/kernel/kernel-4.4 is different camera that my IMX377

Thanks

Hi nkumarpsjes,

I see. From jc.jang’s picture in comment #7. It should be Nvidia EVA board instead of LI-TX1-CB.
For LI-TX1-CB, please use the TX2 driver in below guide.

Hi Simon,

Would it still work for IMX377? You link indicates it is for IMX274.

Thanks

Hi nkumarpsjes,
Sorry for my mistake. The file in my last comment is for IMX274. We don’t have the IMX377 TX2 driver for our LI-TX1-CB yet.
We have below IMX377 driver for TX1 R24.2.1 + TX1-CB.

Ok. When do you plan to release IMX377 driver for TX2?
I already have working IMX377 on TX1 but since you mentioned in email about trying TX2 on LI-TX1-CB, I thought I should try it.

Hi nkumarpsjes,
Our team will work on the TX2 IMX377 driver for LI-TX1-CB board and should be able to get it ready in a few weeks or earlier. I will paste the driver here once we get it ready.

Hi SimonZhu

I read your 19th answer.

After I do below steps,

  1. 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

I get’tegra186-quill-p3310-1000-c03-00-base.dtb’ in my host Ubuntu PC at ‘/home/jc/Downloads/Linux_for_Tegra/kernel/dtb’

Now please listen carefully

This sentence : ‘Copy and replace the tegra186-quill-p3310-1000-c03-00-base.dtb under Linux_for_Tegra/kernel/dtb’

I don’t understand.

According to your 16th answer, you said 'No, it’s not on the TX2. Linux_for_Tegra/kernel/dtb is on your Ubuntu host PC. ’

Yes, I actually check that I have a ‘tegra186-quill-p3310-1000-c03-00-base.dtb’ on my host Ubuntu PC at ‘/home/jc/Downloads/Linux_for_Tegra/kernel/dtb’

Now I’m going to copy and replace that.

I do not understand what it means to be replaced.

On my host pc, already have ‘tegra186-quill-p3310-1000-c03-00-base.dtb’.

I already have a file, what should I replace?

It’s too confusing.

Hi jc.jang,
Your address ‘/home/jc/Downloads/Linux_for_Tegra/kernel/dtb’ is correct too since the L4T R28.1 OS image can be uncompressed in anywhere. The tegra186-quill-p3310-1000-c03-00-base.dtb we provided is different with the one under /home/jc/Downloads/Linux_for_Tegra/kernel/dtb , so please copy the tegra186-quill-p3310-1000-c03-00-base.dtb (which we provided) and replace the one under /home/jc/Downloads/Linux_for_Tegra/kernel/dtb.

hi jc.jang

The tegra186-quill-p3310-1000-c03-00-base.dtb is in the Driver.zip(Leopard provided) file from his dropbox link. For me, Simon gave [url]Dropbox - File Deleted
Download zip (Driver.zip) from above link and unzip it.

Then in the Binaries directory, there is update copy of tegra186-quill-p3310-1000-c03-00-base.dtb. Copy that to Linux_for_Tegra/kernel/dtb i.e
sudo cp -v Binaries/tegra186-quill-p3310-1000-c03-00-base.dtb Linux_for_Tegra/kernel/dtb

Make sure you THIS after you run sudo ./apply_binaries.sh and before sudo ./flash.sh jetson-tx2 mmcblk0p1

This is what I understood from his chat.
Hope it helps

Hi jc.jang,
How is the testing? Is the camera working now? Please let us know if you still have issues.

Hi SimonZhu.

Now I finish updating L4T 27.1 → 28.1

and finish installing jetpack 3.1

but I try to capture using camera. error occurred

I follow this step

2. After boot up, Copy Image, zImage to TX2 /boot.

3. 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

4. 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

5. Reboot the TX2

6. Open a terminal and do "nvgstcapture-1.0”. You can will get live video output.

my stauts like this :

nvidia@tegra-ubuntu:/boot$ ls
dtb tegra186-quill-p3310-1000-a00-00-base.dtb
efi tegra186-quill-p3310-1000-c03-00-base.dtb
extlinux tegra186-quill-p3310-1000-c03-00-dsi-hdmi-dp.dtb
Image zImage
initrd

nvidia@tegra-ubuntu:/lib/modules$ ls
4.4.38-tegra 4.4.38-tegra-leopard 4.4.38-tegra-leopard.tgz

and I do “nvgstcapture-1.0”, I got error like this :

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:9950): CRITICAL **: <create_capture_pipeline:4565> can't set camera to playing

** (nvgstcapture-1.0:9950): CRITICAL **: <main:5367> Capture Pipeline creation failed
** Message: <main:5374> Capture completed
** Message: <main:5424> Camera application will now exit

I have two camera, I conntect on J1 and J2.

additionally, I try to setup argus software.

------Setup Argus software

Download the files from link below.

https://www.dropbox.com/s/0t6388fsiocuvz7/argus_R28.1.tgz?dl=0

1. sudo apt-get update

2. sudo apt-get install cmake libgtk-3-dev libjpeg-dev libgles2-mesa-dev libgstreamer1.0-dev

3. tar zxvf argus_R28.1.tgz

4. cd argus

5. mkdir build && cd build

6. cmake ..

7. make

8. sudo make install

9. 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.

but this occurred error too like this :

nvidia@tegra-ubuntu:~$ argus_camera --device=0
Executing Argus Sample Application (argus_camera)
Argus Version: 0.96.2 (multi-process)
Error generated. /home/nvidia/Downloads/argus/apps/camera/modules/Dispatcher.cpp, initialize:848 No cameras available
Error generated. /home/nvidia/Downloads/argus/apps/camera/modules/Dispatcher.cpp, Dispatcher:801 (propagating)
(NvCameraUtils) Error InvalidState: Mutex already initialized (in Mutex.cpp, function initialize(), line 41)
(Argus) Error InvalidState:  (propagating from src/rpc/socket/client/ClientSocketManager.cpp, function open(), line 54)
(Argus) Error InvalidState:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function openSocketConnection(), line 205)
(Argus) Error InvalidState: Cannot create camera provider (in src/rpc/socket/client/SocketClientDispatch.cpp, function createCameraProvider(), line 129)
Error generated. /home/nvidia/Downloads/argus/apps/camera/modules/Dispatcher.cpp, initialize:840 Failed to create CameraProvider
Error generated. /home/nvidia/Downloads/argus/apps/camera/modules/Dispatcher.cpp, getInstance:824 Initalization failed
(Argus) Error InvalidState: Receive thread is not running cannot send. (in src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 94)
(Argus) Error InvalidState:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 101)
(Argus) Error InvalidState: Receive thread is not running cannot send. (in src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 94)
(Argus) Error InvalidState:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 101)
Error generated. /home/nvidia/Downloads/argus/apps/camera/modules/Dispatcher.cpp, initialize:840 Failed to create CameraProvider
Error generated. /home/nvidia/Downloads/argus/apps/camera/modules/Dispatcher.cpp, getInstance:824 Initalization failed
(NvCameraUtils) Error InvalidState: Mutex already initialized (in Mutex.cpp, function initialize(), line 41)
(Argus) Error InvalidState:  (propagating from src/rpc/socket/client/ClientSocketManager.cpp, function open(), line 54)
(Argus) Error InvalidState:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function openSocketConnection(), line 205)
(Argus) Error InvalidState: Cannot create camera provider (in src/rpc/socket/client/SocketClientDispatch.cpp, function createCameraProvider(), line 129)
(Argus) Error InvalidState: Receive thread is not running cannot send. (in src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 94)
(Argus) Error InvalidState:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 101)
Error generated. /home/nvidia/Downloads/argus/apps/camera/modules/Dispatcher.cpp, initialize:840 Failed to create CameraProvider
Error generated. /home/nvidia/Downloads/argus/apps/camera/modules/Dispatcher.cpp, getInstance:824 Initalization failed
(Argus) Error InvalidState: Receive thread is not running cannot send. (in src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 94)
(Argus) Error InvalidState:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 101)
(Argus) Error InvalidState: Receive thread is not running cannot send. (in src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 94)
(Argus) Error InvalidState:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 101)
Error generated. /home/nvidia/Downloads/argus/apps/camera/modules/Dispatcher.cpp, initialize:840 Failed to create CameraProvider
Error generated. /home/nvidia/Downloads/argus/apps/camera/modules/Dispatcher.cpp, getInstance:824 Initalization failed
(NvCameraUtils) Error InvalidState: Mutex already initialized (in Mutex.cpp, function initialize(), line 41)
(Argus) Error InvalidState:  (propagating from src/rpc/socket/client/ClientSocketManager.cpp, function open(), line 54)
(Argus) Error InvalidState:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function openSocketConnection(), line 205)
(Argus) Error InvalidState: Cannot create camera provider (in src/rpc/socket/client/SocketClientDispatch.cpp, function createCameraProvider(), line 129)
(Argus) Error InvalidState: Receive thread is not running cannot send. (in src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 94)
(Argus) Error InvalidState:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 101)
Error generated. /home/nvidia/Downloads/argus/apps/camera/modules/Dispatcher.cpp, initialize:840 Failed to create CameraProvider
Error generated. /home/nvidia/Downloads/argus/apps/camera/modules/Dispatcher.cpp, getInstance:824 Initalization failed
(Argus) Error InvalidState: Receive thread is not running cannot send. (in src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 94)
(Argus) Error InvalidState:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 101)
(Argus) Error InvalidState: Receive thread is not running cannot send. (in src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 94)
(Argus) Error InvalidState:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 101)
Error generated. /home/nvidia/Downloads/argus/apps/camera/modules/Dispatcher.cpp, initialize:840 Failed to create CameraProvider
Error generated. /home/nvidia/Downloads/argus/apps/camera/modules/Dispatcher.cpp, getInstance:824 Initalization failed
terminate called after throwing an instance of 'std::logic_error'
  what():  basic_string::_M_construct null not valid
Aborted (core dumped)

how can I fix this error?

please let me know.

also, I wonder camera connect well…

can I check camera connecting well using ‘v4l2’?

→ I install v4l2-utils and I do ‘v4l2-ctl --list-devices’

it has occurred :

Failed to open /dev/video0: No such file or directory

thank you

HI nkumarpsjes

I install jetpack thanks to you

Hi jc.jang,
Before you flash the TX2 with R28.1, did you copy and replace the tegra186-quill-p3310-1000-a00-00-base.dtb under Linux_for_Tegra/kernel/dtb on your Ubuntu host PC? You didn’t mention this step in your comment #34.

Simon,

The L4T R28.1 for TX2 only affects CSI camera, it does not affect USB3.0 Camera, is it? Since IMX377 is not supported in TX2 R28.1, I was thinking to use any USB3.0 (UVC compliant) camera on TX2.

Thanks

Hi nkumarpsjes,
You are right. The UVC cameras can work on TX2 R28.1 or other version.
For IMX377 TX2 driver on our LI-TX1-CB board, we should be able to provide the driver next week.

Hi SimodZhu

I copy and replace the tegra186-quill-p3310-1000-a00-00-base.dtb under Linux_for_Tegra/kernel/dtb on my Ubuntu host PC

I refer to guide documents and nkumarpsjes’s 32th answer.

Hi jc.jang,

So is it all working now? Can you see video using nvgstcapture-1.0?