LPXingxing / LI-AR0234CS-STEREO-GMSL2

HAWK Driver on Xavier
10 stars 0 forks source link

No cameras available on Orin 35.1 #3

Closed EmbeddedDesign closed 1 year ago

EmbeddedDesign commented 1 year ago

I am using an Orin Dev Kit with a Leopard LI-AR0234CS-STEREO-GMSL2 Hawk camera and am failing to detect any cameras.

I am using the directions, binaries, and ISP overrides from the 35.1 directory of this repo. I have confirmed that my LI-AR0234CS-STEREO-GMSL2 Hawk camera, E3653-A03 adapter board, and LI-JTX1-SUB-ADPT V1.0 interposer are all functional and work great on an AGX Xavier Dev Kit running the R32.6.1 (Jetpack 4.6) drivers from Leopard. The camera is connected to port 1 per the instructions.

I am running Jetson Linux 35.1 with JetPack 5.0.2 (5.10.104-tegra):

$ cat /etc/nv_tegra_release 
# R35 (release), REVISION: 1.0, GCID: 31346300, BOARD: t186ref, EABI: aarch64, DATE: Thu Aug 25 18:41:45 UTC 2022

$ uname -r
5.10.104-tegra

$ sudo apt-cache show nvidia-jetpack
Package: nvidia-jetpack
Version: 5.0.2-b231

I load max96712.ko, ar0234.ko, and bmi088.ko in order from /etc/modules at boot:

$ cat /etc/modules
max96712
nv_ar0234
bmi088

lsmod confirms the kernel moduels are loaded:

bmi088              24576  0
kfifo_buf           16384  1 bmi088
nv_ar0234           24576  0
max96712            20480  1 nv_ar0234

I have copied the tegra194-p2888-0001-p2822-0000.dtb and tegra234-p3701-0000-p3737-0000.dtb to the /boot/dtb/ directory:

$ ls /boot/dtb/
kernel_tegra194-p2888-0001-p2822-0000.dtb
kernel_tegra234-p3701-0000-p3737-0000.dtb

ISP overrides have been copied to var/nvidia/nvcam/settings/ and have correct permissions:

$ ls /var/nvidia/nvcam/settings/
camera_overrides.isp

$ ls -l /var/nvidia/nvcam/settings/
total 108
-rw-rw-r-- 1 root root 110369 Nov 19 11:09 camera_overrides.isp

Running nvgstcapture produces a black display window and the following output:

$ nvgstcapture
Encoder null, cannot set bitrate!
Encoder Profile = High
Supported resolutions in case of ARGUS Camera
  (2) : 640x480
  (3) : 1280x720
  (4) : 1920x1080
  (5) : 2104x1560
  (6) : 2592x1944
  (7) : 2616x1472
  (8) : 3840x2160
  (9) : 3896x2192
  (10): 4208x3120
  (11): 5632x3168
  (12): 5632x4224

Runtime ARGUS Camera Commands:

  Help : 'h'
  Quit : 'q'
  Set Capture Mode:
      mo:<val>
          (1): image
          (2): video
  Get Capture Mode:
      gmo
  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 sensor mode:
      smo:<val> e.g., smo:1
  Get sensor mode:
      gsmo
  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 Saturation (0 to 2):
      st:<val> e.g., st:1.25
  Get Saturation:
      gst
  Set Exposure Compensation (-2 to 2):
      ec:<val> e.g., ec:-2
  Get Exposure Compensation:
      gec
  Set Auto Whitebalance Lock:
      awbl:<val> e.g., awbl:0
  Get Auto Whitebalance Lock:
      awbl
  Set Auto Exposure Lock:
      ael:<val> e.g., ael:0
  Get Auto Exposure Lock:
      gael
  Set TNR Mode:
      tnrm:<val> e.g., tnrm:1
          (0): OFF
          (1): FAST
          (2): HIGH QUALITY
  Get TNR Mode:
      gtnrm
  Set TNR Strength (-1 to 1):
      tnrs:<val> e.g., tnrs:0.5
  Get TNR Strength:
      gtnrs
  Set EE Mode:
      eem:<val> e.g., eem:1
          (0): OFF
          (1): FAST
          (2): HIGH QUALITY
  Get EE Mode:
      geem
  Set EE Strength (-1 to 1):
      ees:<val> e.g., ees:0.5
  Get EE Strength:
      gees
  Set Auto Exposure Anti-Banding (0 to 3):
      aeab:<val> e.g., aeab:2
          (0): OFF
          (1): MODE AUTO
          (2): MODE 50HZ
          (3): MODE 60HZ
  Get Auto Exposure Anti-Banding:
      gaeab
  Set Gain Range:
      gr:<val><space><val> e.g., gr:1 16
  Get Gain Range:
      ggr
  Set Exposure Time Range:
      etr:<val><space><val> e.g., etr:34000 35000
  Get Exposure Time Range:
      getr
  Set ISP Digital Gain Range:
      dgr:<val><space><val> e.g., dgr:2 152
  Get ISP Digital Gain Range:
      gdgr
  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)
  Get Preview Resolution:
      gpcr
  Get Image Capture Resolution:
      gicr
  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 = High
Encoder control-rate = 1
Encoder EnableTwopassCBR = 0

Using winsys: x11 
Opening in BLOCKING MODE 
**** Message: 11:10:52.960: <main:4651> iterating capture loop ....
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:751 No cameras available**
NvMMLiteOpen : Block : BlockType = 4 
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4

I did notice that, like in previous versions, Setup Procedure 2/2 calls for copying “Image” to the /boot directory. However, no Image blob is provided for 35.1. Is this required? Similarly, in the Run Camera section of the documentation, Multimedia_JXAV_R35.1.tgz is referenced but no links are provided.

I presume I'm missing something that should be included in the repository but any assistance or recommendations would be very much appreciated.

EmbeddedDesign commented 1 year ago

UPDATE

I reflashed L4T and JetPack from scratch and installed the SDK components from SDKManager. Apparently doing a dist-upgrade and installing JetPack from apt is somehow not the same as flashing from scratch but that's a different issue. This seems to have gotten me a bit further, though there still appear to be some issues.

I now have /dev/video0 and /dev/video1 and v4l2 shows these devices:

$ v4l2-ctl --list-devices
NVIDIA Tegra Video Input Device (platform:tegra-camrtc-ca):
    /dev/media0

vi-output, ar0234 30-0018 (platform:tegra-capture-vi:0):
    /dev/video0
    /dev/video1

dmesg is also now seeing the Hawk camera, though there appear to be some errors:

$ sudo dmesg | grep ar0234
[   14.835589] ar0234 30-0018: probing v4l2 sensor.
[   14.840362] ar0234 30-0018: ar0234_probe: channel 0
[   14.856608] Modules linked in: nv_ar0234(+) max96712 ip_tables x_tables
[   15.029472]  init_module+0x2c/0x1000 [nv_ar0234]
[   15.082996] ar0234 30-0018: tegracam sensor driver:ar0234_v2.0.6
[   15.089178] ar0234 30-0018: ar0234_power_on: power on
[   15.222259] ar0234 30-0018: ar0234_hawk_link_check: channel 0, 
[   15.222782] ar0234 30-0018: linA=da, linB=0
[   15.222784] ar0234 30-0018: ar0234_hawk_link_check: channel 0, 
[   15.222785] ar0234 30-0018: linA=da, linB=0
[   15.222787] ar0234 30-0018: ar0234_write_table: channel 0, 
[   17.922251] ar0234 30-0018: single detect success
[   17.927111] ar0234 30-0018: ar0234_write_table: channel 0, 
[   18.142392] ar0234 30-0018: ar0234_board_setup++
[   18.143336] ar0234 30-0018: ar0234_power_on: power on
[   18.179823] ar0234 30-0018: ar0234_power_off:
[   18.180092] tegra-camrtc-capture-vi tegra-capture-vi: subdev ar0234 30-0018 bound
[   18.189938] ar0234 30-0018: Detected AR0234 sensor
[   18.195018] ar0234 30-0010: probing v4l2 sensor.
[   18.199778] ar0234 30-0010: ar0234_probe: channel 13
[   18.216042] Modules linked in: snd_soc_tegra186_asrc snd_soc_tegra210_ope snd_soc_tegra186_dspk snd_soc_tegra210_iqc snd_soc_tegra186_arad snd_soc_tegra210_mvc snd_soc_tegra210_afc snd_soc_tegra210_admaif aes_ce_blk snd_soc_tegra210_amx snd_soc_tegra210_adx snd_soc_tegra210_dmic crypto_simd snd_soc_tegra210_mixer snd_soc_tegra210_sfc snd_soc_tegra210_i2s snd_soc_tegra_pcm cryptd aes_ce_cipher ghash_ce rtl8822ce sha2_ce ofpart sha256_arm64 rtk_btusb snd_hda_codec_hdmi sha1_ce nvgpu cmdlinepart btusb snd_hda_tegra snd_soc_tegra210_adsp btrtl ucsi_ccg snd_hda_codec snd_soc_tegra_machine_driver qspi_mtd snd_soc_tegra_utils btbcm typec_ucsi input_leds btintel snd_soc_simple_card_utils snd_soc_spdif_tx pwm_fan cfg80211 snd_soc_tegra210_ahub tegra_bpmp_thermal bmi088 userspace_alert nct1008 typec tegra210_adma nvadsp ina3221 kfifo_buf snd_hda_core mtd nvmap spi_tegra114 nvidia(O) binfmt_misc nv_ar0234(+) max96712 ip_tables x_tables
[   18.473413]  init_module+0x2c/0x1000 [nv_ar0234]
[   18.523127] debugfs: Directory 'ar0234_a' with parent '/' already present!
[   18.530227] ar0234 30-0010: tegracam sensor driver:ar0234_v2.0.6
[   18.536413] ar0234 30-0010: ar0234_power_on: power on
[   18.666252] ar0234 30-0010: ar0234_hawk_link_check: channel 13, 
[   18.666255] ar0234 30-0010: ar0234_hawk_link_check: channel 13, 
[   18.666256] ar0234 30-0010: ar0234_hawk_link_check: channel 13, 
[   18.666257] ar0234 30-0010: ar0234_write_table: channel 13, 
[   18.882250] ar0234 30-0010: ar0234_board_setup++
[   18.882783] ar0234 30-0010: ar0234_power_on: power on
[   18.922321] ar0234 30-0010: ar0234_power_off:
[   18.923026] tegra-camrtc-capture-vi tegra-capture-vi: subdev ar0234 30-0010 bound
[   18.931596] ar0234 30-0010: Detected AR0234 sensor
[   18.936672] ar0234 31-0018: probing v4l2 sensor.
[   18.941475] ar0234 31-0018: ar0234_probe: channel 13
[   18.957752] Modules linked in: snd_soc_tegra186_asrc snd_soc_tegra210_ope snd_soc_tegra186_dspk snd_soc_tegra210_iqc snd_soc_tegra186_arad snd_soc_tegra210_mvc snd_soc_tegra210_afc snd_soc_tegra210_admaif aes_ce_blk snd_soc_tegra210_amx snd_soc_tegra210_adx snd_soc_tegra210_dmic crypto_simd snd_soc_tegra210_mixer snd_soc_tegra210_sfc snd_soc_tegra210_i2s snd_soc_tegra_pcm cryptd aes_ce_cipher ghash_ce rtl8822ce sha2_ce ofpart sha256_arm64 rtk_btusb snd_hda_codec_hdmi sha1_ce nvgpu cmdlinepart btusb snd_hda_tegra snd_soc_tegra210_adsp btrtl ucsi_ccg snd_hda_codec snd_soc_tegra_machine_driver qspi_mtd snd_soc_tegra_utils btbcm typec_ucsi input_leds btintel snd_soc_simple_card_utils snd_soc_spdif_tx pwm_fan cfg80211 snd_soc_tegra210_ahub tegra_bpmp_thermal bmi088 userspace_alert nct1008 typec tegra210_adma nvadsp ina3221 kfifo_buf snd_hda_core mtd nvmap spi_tegra114 nvidia(O) binfmt_misc nv_ar0234(+) max96712 ip_tables x_tables
[   19.072515]  init_module+0x2c/0x1000 [nv_ar0234]
[   19.073174] ar0234 31-0018: tegracam sensor driver:ar0234_v2.0.6
[   19.270778] ar0234 31-0018: ar0234_power_on: power on
[   19.398250] ar0234 31-0018: ar0234_hawk_link_check: channel 13, 
[   19.398253] ar0234 31-0018: ar0234_hawk_link_check: channel 13, 
[   19.398254] ar0234 31-0018: ar0234_hawk_link_check: channel 13, 
[   19.398255] ar0234 31-0018: ar0234_write_table: channel 13, 
[   19.398749] ar0234 31-0018: ar0234_write_reg:i2c write failed, 0x301a = 2058
[   19.406024] ar0234 31-0018: ar0234 detect error
[   19.410742] ar0234: probe of 31-0018 failed with error -1
[   19.416327] ar0234 31-0010: probing v4l2 sensor.
[   19.421103] ar0234 31-0010: ar0234_probe: channel 13
[   19.437341] Modules linked in: snd_soc_tegra186_asrc snd_soc_tegra210_ope snd_soc_tegra186_dspk snd_soc_tegra210_iqc snd_soc_tegra186_arad snd_soc_tegra210_mvc snd_soc_tegra210_afc snd_soc_tegra210_admaif aes_ce_blk snd_soc_tegra210_amx snd_soc_tegra210_adx snd_soc_tegra210_dmic crypto_simd snd_soc_tegra210_mixer snd_soc_tegra210_sfc snd_soc_tegra210_i2s snd_soc_tegra_pcm cryptd aes_ce_cipher ghash_ce rtl8822ce sha2_ce ofpart sha256_arm64 rtk_btusb snd_hda_codec_hdmi sha1_ce nvgpu cmdlinepart btusb snd_hda_tegra snd_soc_tegra210_adsp btrtl ucsi_ccg snd_hda_codec snd_soc_tegra_machine_driver qspi_mtd snd_soc_tegra_utils btbcm typec_ucsi input_leds btintel snd_soc_simple_card_utils snd_soc_spdif_tx pwm_fan cfg80211 snd_soc_tegra210_ahub tegra_bpmp_thermal bmi088 userspace_alert nct1008 typec tegra210_adma nvadsp ina3221 kfifo_buf snd_hda_core mtd nvmap spi_tegra114 nvidia(O) binfmt_misc nv_ar0234(+) max96712 ip_tables x_tables
[   19.694583]  init_module+0x2c/0x1000 [nv_ar0234]
[   19.745368] debugfs: Directory 'ar0234_b' with parent '/' already present!
[   19.752472] ar0234 31-0010: tegracam sensor driver:ar0234_v2.0.6
[   19.758658] ar0234 31-0010: ar0234_power_on: power on
[   19.886249] ar0234 31-0010: ar0234_hawk_link_check: channel 13, 
[   19.886251] ar0234 31-0010: ar0234_hawk_link_check: channel 13, 
[   19.886253] ar0234 31-0010: ar0234_hawk_link_check: channel 13, 
[   19.886254] ar0234 31-0010: ar0234_write_table: channel 13, 
[   19.886638] ar0234 31-0010: ar0234_write_reg:i2c write failed, 0x301a = 2058
[   19.893898] ar0234 31-0010: ar0234 detect error
[   19.899254] ar0234: probe of 31-0010 failed with error -1
[   19.907454] ar0234 30-0018: ar0234_open:
[   19.907556] ar0234 30-0010: ar0234_open:
[   32.526324] ar0234 30-0010: ar0234_open:
[   32.526386] ar0234 30-0018: ar0234_open:
[   49.806808] ar0234 30-0018: ar0234_power_on: power on
[   49.840333] ar0234 30-0018: ar0234_write_table: channel 0, 
[   49.950287] ar0234 30-0018: ar0234_set_mode: mode index:0
[   49.950298] ar0234 30-0018: ar0234_write_table: channel 0, 
[   50.058278] ar0234 30-0018: ar0234_write_table: sleep 500
[   50.449264] ar0234 30-0018: ar0234_write_table: channel 0, 
[  137.685391] ar0234 30-0018: ar0234_open:
[  137.685403] ar0234 30-0010: ar0234_open:

Running nvgstcapture now produces the following output along with a black window on first run, though subsequent runs simply hang and produce no window:

$ nvgstcapture
Encoder null, cannot set bitrate!
Encoder Profile = High
Supported resolutions in case of ARGUS Camera
  (2) : 640x480
  (3) : 1280x720
  (4) : 1920x1080
  (5) : 2104x1560
  (6) : 2592x1944
  (7) : 2616x1472
  (8) : 3840x2160
  (9) : 3896x2192
  (10): 4208x3120
  (11): 5632x3168
  (12): 5632x4224

Runtime ARGUS Camera Commands:

  Help : 'h'
  Quit : 'q'
  Set Capture Mode:
      mo:<val>
          (1): image
          (2): video
  Get Capture Mode:
      gmo
  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 sensor mode:
      smo:<val> e.g., smo:1
  Get sensor mode:
      gsmo
  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 Saturation (0 to 2):
      st:<val> e.g., st:1.25
  Get Saturation:
      gst
  Set Exposure Compensation (-2 to 2):
      ec:<val> e.g., ec:-2
  Get Exposure Compensation:
      gec
  Set Auto Whitebalance Lock:
      awbl:<val> e.g., awbl:0
  Get Auto Whitebalance Lock:
      awbl
  Set Auto Exposure Lock:
      ael:<val> e.g., ael:0
  Get Auto Exposure Lock:
      gael
  Set TNR Mode:
      tnrm:<val> e.g., tnrm:1
          (0): OFF
          (1): FAST
          (2): HIGH QUALITY
  Get TNR Mode:
      gtnrm
  Set TNR Strength (-1 to 1):
      tnrs:<val> e.g., tnrs:0.5
  Get TNR Strength:
      gtnrs
  Set EE Mode:
      eem:<val> e.g., eem:1
          (0): OFF
          (1): FAST
          (2): HIGH QUALITY
  Get EE Mode:
      geem
  Set EE Strength (-1 to 1):
      ees:<val> e.g., ees:0.5
  Get EE Strength:
      gees
  Set Auto Exposure Anti-Banding (0 to 3):
      aeab:<val> e.g., aeab:2
          (0): OFF
          (1): MODE AUTO
          (2): MODE 50HZ
          (3): MODE 60HZ
  Get Auto Exposure Anti-Banding:
      gaeab
  Set Gain Range:
      gr:<val><space><val> e.g., gr:1 16
  Get Gain Range:
      ggr
  Set Exposure Time Range:
      etr:<val><space><val> e.g., etr:34000 35000
  Get Exposure Time Range:
      getr
  Set ISP Digital Gain Range:
      dgr:<val><space><val> e.g., dgr:2 152
  Get ISP Digital Gain Range:
      gdgr
  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)
  Get Preview Resolution:
      gpcr
  Get Image Capture Resolution:
      gicr
  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 = High
Encoder control-rate = 1
Encoder EnableTwopassCBR = 0

Using winsys: x11 
Opening in BLOCKING MODE 
** Message: 15:38:36.678: <main:4651> iterating capture loop ....
NvMMLiteOpen : Block : BlockType = 4 
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4 
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 1920 x 1200 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 16.000000; Exposure Range min 28000, max 13000000;

GST_ARGUS: 960 x 600 FR = 120.000005 fps Duration = 8333333 ; Analog Gain range min 1.000000, max 16.000000; Exposure Range min 28000, max 22000000;

GST_ARGUS: Running with following settings:
   Camera index = 0 
   Camera mode  = 1 
   Output Stream W = 960 H = 600 
   seconds to Run    = 0 
   Frame Rate = 120.000005 
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
nvbuf_utils: dmabuf_fd -1 mapped entry NOT found
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadExecute:694 NvBufSurfaceFromFd Failed.
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadFunction:247 (propagating)
LPXingxing commented 1 year ago

Hi Operator,     Thank you for you reporting the issue.     1. After insmod max96712/nv_ar0234/bmi088 ko, you will see video0/1/2/3 in /dev folder.     2. kernel log will help me debug. "dmesg > 1.log"     3. Double check if dtb file update successfully.         dmesg | grep DTB.

Thanks Xingxing

在 2022/11/20 3:46, Operator 写道:

I am using an Orin Dev Kit with a Leopard LI-AR0234CS-STEREO-GMSL2 Hawk camera and am failing to detect any cameras.

I am using the directions, binaries, and ISP overrides from the 35.1 directory https://github.com/LPXingxing/LI-AR0234CS-STEREO-GMSL2/tree/main/35.1 of this repo. I have confirmed that my LI-AR0234CS-STEREO-GMSL2 Hawk camera, E3653-A03 adapter board, and LI-JTX1-SUB-ADPT V1.0 interposer are all functional and work great on an AGX Xavier Dev Kit running the R32.6.1 (Jetpack 4.6) drivers from Leopard. The camera is connected to port 1 per the instructions.

I am running Jetson Linux 35.1 with JetPack 5.0.2 (5.10.104-tegra):

|$ cat /etc/nv_tegra_release # R35 (release), REVISION: 1.0, GCID: 31346300, BOARD: t186ref, EABI: aarch64, DATE: Thu Aug 25 18:41:45 UTC 2022 $ uname -r 5.10.104-tegra $ sudo apt-cache show nvidia-jetpack Package: nvidia-jetpack Version: 5.0.2-b231 |

I load max96712.ko, ar0234.ko, and bmi088.ko in order from /etc/modules at boot:

|$ cat /etc/modules max96712 nv_ar0234 bmi088 |

lsmod confirms the kernel moduels are loaded:

|bmi088 24576 0 kfifo_buf 16384 1 bmi088 nv_ar0234 24576 0 max96712 20480 1 nv_ar0234 |

I have copied the tegra194-p2888-0001-p2822-0000.dtb and tegra234-p3701-0000-p3737-0000.dtb to the /boot/dtb/ directory:

|$ ls /boot/dtb/ kernel_tegra194-p2888-0001-p2822-0000.dtb kernel_tegra234-p3701-0000-p3737-0000.dtb |

ISP overrides have been copied to var/nvidia/nvcam/settings/ and have correct permissions:

|$ ls /var/nvidia/nvcam/settings/ camera_overrides.isp $ ls -l /var/nvidia/nvcam/settings/ total 108 -rw-rw-r-- 1 root root 110369 Nov 19 11:09 camera_overrides.isp |

Running nvgstcapture produces a black display window and the following output:

|$ nvgstcapture Encoder null, cannot set bitrate! Encoder Profile = High Supported resolutions in case of ARGUS Camera (2) : 640x480 (3) : 1280x720 (4) : 1920x1080 (5) : 2104x1560 (6) : 2592x1944 (7) : 2616x1472 (8) : 3840x2160 (9) : 3896x2192 (10): 4208x3120 (11): 5632x3168 (12): 5632x4224 Runtime ARGUS Camera Commands: Help : 'h' Quit : 'q' Set Capture Mode: mo: (1): image (2): video Get Capture Mode: gmo Set sensor orientation: so: (0): none (1): Rotate counter-clockwise 90 degrees (2): Rotate 180 degrees (3): Rotate clockwise 90 degrees Get sensor orientation: gso Set sensor mode: smo: e.g., smo:1 Get sensor mode: gsmo Set Whitebalance Mode: wb: (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 Saturation (0 to 2): st: e.g., st:1.25 Get Saturation: gst Set Exposure Compensation (-2 to 2): ec: e.g., ec:-2 Get Exposure Compensation: gec Set Auto Whitebalance Lock: awbl: e.g., awbl:0 Get Auto Whitebalance Lock: awbl Set Auto Exposure Lock: ael: e.g., ael:0 Get Auto Exposure Lock: gael Set TNR Mode: tnrm: e.g., tnrm:1 (0): OFF (1): FAST (2): HIGH QUALITY Get TNR Mode: gtnrm Set TNR Strength (-1 to 1): tnrs: e.g., tnrs:0.5 Get TNR Strength: gtnrs Set EE Mode: eem: e.g., eem:1 (0): OFF (1): FAST (2): HIGH QUALITY Get EE Mode: geem Set EE Strength (-1 to 1): ees: e.g., ees:0.5 Get EE Strength: gees Set Auto Exposure Anti-Banding (0 to 3): aeab: e.g., aeab:2 (0): OFF (1): MODE AUTO (2): MODE 50HZ (3): MODE 60HZ Get Auto Exposure Anti-Banding: gaeab Set Gain Range: gr: e.g., gr:1 16 Get Gain Range: ggr Set Exposure Time Range: etr: e.g., etr:34000 35000 Get Exposure Time Range: getr Set ISP Digital Gain Range: dgr: e.g., dgr:2 152 Get ISP Digital Gain Range: gdgr 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) Get Preview Resolution: gpcr Get Image Capture Resolution: gicr Get Video Capture Resolution: gvcr Runtime encoder configuration options: Set Encoding Bit-rate(in bytes): br: e.g., br:4000000 Get Encoding Bit-rate(in bytes): gbr Set Encoding Profile(only for H.264): ep: 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 = High Encoder control-rate = 1 Encoder EnableTwopassCBR = 0 Using winsys: x11 Opening in BLOCKING MODE ** Message: 11:10:52.960: iterating capture loop .... Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:751 No cameras available NvMMLiteOpen : Block : BlockType = 4 ===== NVMEDIA: NVENC ===== NvMMLiteBlockCreate : Block : BlockType = 4 |

I did notice that, like in previous versions, Setup Procedure 2/2 calls for copying “Image” to the /boot directory. However, no Image blob is provided for 35.1. Is this required? Similarly, in the Run Camera section of the documentation, Multimedia_JXAV_R35.1.tgz is referenced but no links are provided.

I presume I'm missing something that should be included in the repository but any assistance or recommendations would be very much appreciated.

— Reply to this email directly, view it on GitHub https://github.com/LPXingxing/LI-AR0234CS-STEREO-GMSL2/issues/3, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMQCUW46YYWWKTQSS5O4UQ3WJEU73ANCNFSM6AAAAAASFO5E7I. You are receiving this because you are subscribed to this thread.Message ID: @.***>

EmbeddedDesign commented 1 year ago

Hi @LPXingxing, thank you for the reply.

  1. After insmod max96712/nv_ar0234/bmi088 ko, you will see video0/1/2/3 in /dev folder.

Yes indeed, I have video0/video1 in my /dev directory:

$ ls /dev | grep video
video0
video1
  1. kernel log will help me debug. "dmesg > 1.log"

Of course, dmesg log attached. I believe the relevant portion begins around line 835. dmesg.log

  1. Double check if dtb file update successfully. dmesg | grep DTB.

The only reference I see to DTB in dmesg is this line:

$ sudo dmesg | grep DTB
[    0.003680] DTB Build time: Oct 11 2022 15:16:57

I can confirm that I have replaced the kernel_tegra234-p3701-0000-p3737-0000.dtb with the one provided in the 35.1 directory of this repo:

$ ls -l /boot/dtb/
total 348
-rw-r--r-- 1 root root 354963 **Nov 21** 19:25 kernel_tegra234-p3701-0000-p3737-0000.dtb

My system did not have a kernel_tegra194-p2888-0001-p2822-0000.dtb in /boot/dtb by default so I'm assuming I need only the tegra234-p3701 DTB? (I have also tried with both present with no luck).

LPXingxing commented 1 year ago

Hi Operator,     There is a max96712 and ar0234 driver in default system. You need delete it. Seem I missed this step in the release note. I will update the release note.

sudo rm /lib/modules/ker.../kernel/driver/media/i2c/max96712.ko

sudo rm /lib/modules/ker.../kernel/driver/media/i2c/nv_ar0234.ko

Thanks Xingxing

在 2022/11/22 11:32, Operator 写道:

Hi @LPXingxing https://github.com/LPXingxing, thank you for the reply.

 1. After insmod max96712/nv_ar0234/bmi088 ko, you will see
    video0/1/2/3 in /dev folder.

Yes indeed, I have video0/video1 in my /dev directory:

|$ ls /dev | grep video video0 video1 |

 2. kernel log will help me debug. "dmesg > 1.log"

Of course, dmesg log attached. I believe the relevant portion begins around line 835. dmesg.log https://github.com/LPXingxing/LI-AR0234CS-STEREO-GMSL2/files/10063161/dmesg.log

 3. Double check if dtb file update successfully.
    dmesg | grep DTB.

The only reference I see to DTB in dmesg is this line:

|$ sudo dmesg | grep DTB [ 0.003680] DTB Build time: Oct 11 2022 15:16:57 |

I can confirm that I have replaced the kernel_tegra234-p3701-0000-p3737-0000.dtb with the one provided in the 35.1 directory of this repo:

|$ ls -l /boot/dtb/ total 348 -rw-r--r-- 1 root root 354963 Nov 21 19:25 kernel_tegra234-p3701-0000-p3737-0000.dtb |

My system did not have a kernel_tegra194-p2888-0001-p2822-0000.dtb in /boot/dtb by default so I'm assuming I need only the tegra234-p3701 DTB? (I have also tried with both present with no luck).

— Reply to this email directly, view it on GitHub https://github.com/LPXingxing/LI-AR0234CS-STEREO-GMSL2/issues/3#issuecomment-1322987358, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMQCUW7FPMGWV2TW2K2MTMDWJQ5EPANCNFSM6AAAAAASFO5E7I. You are receiving this because you were mentioned.Message ID: @.***>

EmbeddedDesign commented 1 year ago

Thank you @LPXingxing, Indeed, that did the trick!

I didn't even think to look for existing modules as it wasn't an issue with the Xavier drivers. This does explain why they seemed to keep loading even after removing them from my /etc/modules file (which is apparently not needed as they load correctly by default when simply replacing the files you call out above) and rmmod was having a lot of trouble removing them.

As a note, there also looks to be a /lib/modules/5.10.104-tegra/kernel/drivers/iio/imu/bmi088/bmi088.ko in the default fs.