# Basler MIPI CSI not detecting

**URL:** <https://community.solid-run.com/t/basler-mipi-csi-not-detecting/194>\
**Category:** NXP i.MX8M Plus\
**Tags:** iMX8M-plus\
**Created:** [November 9, 2021, 10:29pm UTC](https://community.solid-run.com/t/basler-mipi-csi-not-detecting/194 "2021-11-09T22:29:57Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![mobileoverlord](https://avatars.discourse-cdn.com/v4/letter/m/a8b319/32.png) [@mobileoverlord](https://community.solid-run.com/u/mobileoverlord)\
**Post date:** [November 9, 2021, 10:29pm UTC](https://community.solid-run.com/t/basler-mipi-csi-not-detecting/194/1 "2021-11-09T22:29:57Z")

</div>

Hello,

I am trying to get a Basler Dart daA3840 CSI Camera connected and working with the MIPI CSI port on the iMX8 M Plus SOM. I have built the imx-image-full in yocto using Gatesgarth successfully. At runtime I am receiving some errors coming after loading the basler\_camera\_driver\_vvcam kernel module

```auto
[7.406198] i2c_transfer() failed: -6
[7.409890] basler_read_register_chunk() failed: -6
[7.414791] basler_read_register() failed: -6

```

When I try to run one of the simple examples with pypylon The code is unable to detect any camera instances. Here is a snippet of what I am running. Nothing is printed in the output.

```auto
from pypylon import pylon

tl_factory = pylon.TlFactory.GetInstance()
devices = tl_factory.EnumerateDevices()
for device in devices:
    print(device.GetFriendlyName())

```

---

<div class="post-metadata">

**Author:** ![mobileoverlord](https://avatars.discourse-cdn.com/v4/letter/m/a8b319/32.png) [@mobileoverlord](https://community.solid-run.com/u/mobileoverlord)\
**Post date:** [November 9, 2021, 10:36pm UTC](https://community.solid-run.com/t/basler-mipi-csi-not-detecting/194/2 "2021-11-09T22:36:46Z")

</div>

I have also attempted to access the camera through OpenCV and I am receiving the following dimes prints

```auto
[881.648266] cma: cma_alloc: alloc failed, req-size: 4050 pages, ret: -12
[881.658522] cma: cma_alloc: alloc failed, req-size: 4050 pages, ret: -12
[882.854179] enter viv_isp_exit_module
[882.857897] enter isp_hw_remove
[882.890438] enter viv_dwe_exit_module
[882.894151] enter dwe_hw_remove
[882.897522] vvcam dewarp driver removed
[882.939871] : Unregistered all entities
[883.047189] i2c_transfer() failed: -6
[883.050881] basler_read_register_chunk() failed: -6
[883.055869] basler_read_register() failed: -6
[883.096649] imx8_media_dev: module is from the staging directory, the quality is unknown, you have been warned.
[883.156339] enter viv_dwe_init_module
[883.160318] enter dwe_hw_probe
[883.163846] vvcam dewarp driver probed
[883.206355] enter viv_isp_init_module
[883.210412] enter isp_hw_probe
[883.219844] cma: cma_alloc: alloc failed, req-size: 4050 pages, ret: -12
[883.230151] cma: cma_alloc: alloc failed, req-size: 4050 pages, ret: -12
[883.240740] vvcam isp driver registered
[886.776558] cma: cma_alloc: alloc failed, req-size: 4050 pages, ret: -12
[886.792166] cma: cma_alloc: alloc failed, req-size: 4050 pages, ret: -12
[886.807685] cma: cma_alloc: alloc failed, req-size: 4050 pages, ret: -12
[886.823155] cma: cma_alloc: alloc failed, req-size: 4050 pages, ret: -12
[886.838825] unsupported dwe command 259
[886.838833] unsupported dwe command 260

```

---

<div class="post-metadata">

**Author:** ![jnettlet](https://dub1.discourse-cdn.com/flex005/user_avatar/community.solid-run.com/jnettlet/32/62_2.png) [@jnettlet](https://community.solid-run.com/u/jnettlet)\
**Post date:** [November 10, 2021, 9:57am UTC](https://community.solid-run.com/t/basler-mipi-csi-not-detecting/194/3 "2021-11-10T09:57:56Z")

</div>

That BSP contained a bug in the Basler device connected to the MIPI CSI port used on the SOM. I believe that is fixed in the most recent BSP. I will post a link to a test image. Sorry about the confusion.

---

<div class="post-metadata">

**Author:** ![mobileoverlord](https://avatars.discourse-cdn.com/v4/letter/m/a8b319/32.png) [@mobileoverlord](https://community.solid-run.com/u/mobileoverlord)\
**Post date:** [November 10, 2021, 2:41pm UTC](https://community.solid-run.com/t/basler-mipi-csi-not-detecting/194/4 "2021-11-10T14:41:30Z")

</div>

Sounds great. If you could also provide a link to the fix I can patch it in. Thanks!

---

<div class="post-metadata">

**Author:** ![mobileoverlord](https://avatars.discourse-cdn.com/v4/letter/m/a8b319/32.png) [@mobileoverlord](https://community.solid-run.com/u/mobileoverlord)\
**Post date:** [November 17, 2021, 3:32pm UTC](https://community.solid-run.com/t/basler-mipi-csi-not-detecting/194/5 "2021-11-17T15:32:23Z")

</div>

Checking in to see if you have discovered a pending fix in the BSP. I saw some commits regarding the MIPI clock speed in the 5.4.x 2.3.0 BSP but no references to the 5.10 branch.

---

<div class="post-metadata">

**Author:** ![SimpleSoft](https://avatars.discourse-cdn.com/v4/letter/s/8baadc/32.png) [@SimpleSoft](https://community.solid-run.com/u/SimpleSoft)\
**Post date:** [February 19, 2022, 4:20pm UTC](https://community.solid-run.com/t/basler-mipi-csi-not-detecting/194/6 "2022-02-19T16:20:38Z")

</div>

Hello,

I still have an issue with Basler Dart daA3840 CSI Camera with the latest image.  
Where I can find a fixed image?

---

<div class="post-metadata">

**Author:** ![jnettlet](https://dub1.discourse-cdn.com/flex005/user_avatar/community.solid-run.com/jnettlet/32/62_2.png) [@jnettlet](https://community.solid-run.com/u/jnettlet)\
**Post date:** [February 20, 2022, 8:31am UTC](https://community.solid-run.com/t/basler-mipi-csi-not-detecting/194/7 "2022-02-20T08:31:38Z")

</div>

This has been fixed in our latest Yocto BSP that will be released this week. The initial kernel code has been posted here, [GitHub - SolidRun/linux-stable at lf-5.10.72-2.2.0-sr](https://github.com/SolidRun/linux-stable/tree/lf-5.10.72-2.2.0-sr). I am still working on fine tuning the memory allocations for the 1GB SOM variants.

---

<div class="post-metadata">

**Author:** ![SimpleSoft](https://avatars.discourse-cdn.com/v4/letter/s/8baadc/32.png) [@SimpleSoft](https://community.solid-run.com/u/SimpleSoft)\
**Post date:** [February 20, 2022, 9:44am UTC](https://community.solid-run.com/t/basler-mipi-csi-not-detecting/194/8 "2022-02-20T09:44:20Z")

</div>

Thank you

---

<div class="post-metadata">

**Author:** ![SimpleSoft](https://avatars.discourse-cdn.com/v4/letter/s/8baadc/32.png) [@SimpleSoft](https://community.solid-run.com/u/SimpleSoft)\
**Post date:** [June 9, 2022, 9:48am UTC](https://community.solid-run.com/t/basler-mipi-csi-not-detecting/194/9 "2022-06-09T09:48:13Z")

</div>

Can you share tunning memory results for 1GB memory?  
I guess you are talking about VVCAM, ISP\_REG\_BASE and ISP\_REG\_BASE in version.h?

---

<div class="post-metadata">

**Author:** ![jnettlet](https://dub1.discourse-cdn.com/flex005/user_avatar/community.solid-run.com/jnettlet/32/62_2.png) [@jnettlet](https://community.solid-run.com/u/jnettlet)\
**Post date:** [June 13, 2022, 5:21am UTC](https://community.solid-run.com/t/basler-mipi-csi-not-detecting/194/10 "2022-06-13T05:21:26Z")

</div>

Those settings are all specific to the device and won’t change. I am mostly working to tweak the Linux kernel settings for CMA memory allocation that are used for allocating large contiguous buffers that are used primarily by the multimedia subsystems.

---

<div class="post-metadata">

**Author:** ![SimpleSoft](https://avatars.discourse-cdn.com/v4/letter/s/8baadc/32.png) [@SimpleSoft](https://community.solid-run.com/u/SimpleSoft)\
**Post date:** [June 13, 2022, 10:08pm UTC](https://community.solid-run.com/t/basler-mipi-csi-not-detecting/194/11 "2022-06-13T22:08:50Z")

</div>

My 1GB Module perfectly works with the camera. It seems the configuration was done correctly. Can you point me to the source tree with these settings?  
Thank you

---

<div class="post-metadata">

**Author:** ![jnettlet](https://dub1.discourse-cdn.com/flex005/user_avatar/community.solid-run.com/jnettlet/32/62_2.png) [@jnettlet](https://community.solid-run.com/u/jnettlet)\
**Post date:** [June 14, 2022, 3:26am UTC](https://community.solid-run.com/t/basler-mipi-csi-not-detecting/194/12 "2022-06-14T03:26:53Z")

</div>

This is done in the device-tree file for the board. You can see the memory node that is dedicated to cma.

---

<div class="post-metadata">

**Author:** ![meetgandhi-eic](https://avatars.discourse-cdn.com/v4/letter/m/e79b87/32.png) [@meetgandhi-eic](https://community.solid-run.com/u/meetgandhi-eic)\
**Post date:** [February 12, 2024, 8:05am UTC](https://community.solid-run.com/t/basler-mipi-csi-not-detecting/194/13 "2024-02-12T08:05:57Z")

</div>

Hi,

I’m trying to bring-up the Basler Dart daA3840 CSI camera with iMx8 MP solidrun board. ([https://wiki.analog.com/\_media/resources/eval/user-guides/eval-adtf3175-nxz/som\_carrier-datasheet.pdf](https://wiki.analog.com/_media/resources/eval/user-guides/eval-adtf3175-nxz/som_carrier-datasheet.pdf))

The camera has been probed successfully but I’m not able to capture the frames. Also v4l2-ctl command line tool gives error and not able to detect the frame format.

Here is the dump of dmesg when camera driver is probed:

[Feb 9 11:14] : Unregistered all entities  
[+0.061861] basler\_camera\_driver\_vvcam: loading out-of-tree module taints kernel.  
[+0.059659] ABRM FamilyName not supported  
[+0.033668] ABRM: Manufacturer: Basler, Model: daA3840-30mc, Device: 108220-05, Serial: basler:40097239  
[+0.026257] imx8\_media\_dev: module is from the staging directory, the quality is unknown, you have been warned.  
[+0.001677] mx8-img-md: Registered mxc\_isi.0.capture as /dev/video0  
[+0.000129] mx8-img-md: Registered sensor subdevice: basler-camera-vvcam 3-0036 (1)  
[+0.000006] mx8-img-md: Registered sensor subdevice: adsd3500 1-0038 (2)  
[+0.000007] mx8-img-md: created link [mxc\_isi.0] =\> [mxc\_isi.0.capture]  
[+0.000005] mx8-img-md: created link [mxc-mipi-csi2.0] =\> [mxc\_isi.0]  
[+0.000007] mx8-img-md: created link [adsd3500 1-0038] =\> [mxc-mipi-csi2.0]  
[+0.000004] mx8-img-md: created link [basler-camera-vvcam 3-0036] =\> [mxc-mipi-csi2.1]  
[+0.000005] mxc-md 32c00000.bus:camera: mxc\_md\_create\_links  
[+0.050899] enter viv\_video\_init\_module  
[+0.046688] enter viv\_dwe\_init\_module  
[+0.000435] enter dwe\_hw\_probe  
[+0.000546] vvcam dewarp driver probed  
[+0.083172] enter viv\_isp\_init\_module  
[+0.000476] enter isp\_hw\_probe  
[+0.000795] vvcam isp driver registered  
[+0.000530] enter isp\_hw\_probe  
[+0.000401] vvcam isp driver registered  
[+0.015007] enter isp\_mi\_stop  
[+0.008057] enter isp\_mi\_stop

Here is the dump of v4l2-ctl output:

analog@aditof:~$ v4l2-ctl --all -d /dev/video1  
Driver Info:  
Driver name : viv\_v4l2\_device  
Card type : VIV  
Bus info : platform:viv0  
Driver version : 5.10.72  
Capabilities : 0x84200001  
Video Capture  
Streaming  
Extended Pix Format  
Device Capabilities  
Device Caps : 0x04200001  
Video Capture  
Streaming  
Extended Pix Format  
Media Driver Info:  
Driver name : vvcam-video  
Model : viv\_media  
Serial :  
Bus info :  
Media version : 5.10.72  
Hardware revision: 0x00000000 (0)  
Driver version : 5.10.72  
Interface Info:  
ID : 0x03000003  
Type : V4L Video  
Entity Info:  
ID : 0x00000001 (1)  
Name : viv\_v4l20  
Function : V4L2 I/O  
Pad 0x01000002 : 0: Sink, Must Connect  
Link 0x02000011: from remote pad 0x1000010 of entity ‘vvcam-isp.0’: Data, Enabled  
Priority: 2  
Video input : 0 (camera: ok)  
Format Video Capture:  
Width/Height : 0/0  
Pixel Format : ‘’  
Field : None  
Bytes per Line : 0  
Size Image : 0  
Colorspace : Rec. 709  
Transfer Function : Default (maps to Rec. 709)  
YCbCr/HSV Encoding: Default (maps to Rec. 709)  
Quantization : Default (maps to Full Range)  
Flags :  
Crop Capability Video Capture:  
Bounds : Left 0, Top 0, Width 0, Height 0  
Default : Left 0, Top 0, Width 0, Height 0  
Pixel Aspect: 1/1  
Selection Video Capture: crop, Left 0, Top 0, Width 0, Height 0, Flags:  
Selection Video Capture: crop\_default, Left 0, Top 0, Width 0, Height 0, Flags:  
Selection Video Capture: crop\_bounds, Left 0, Top 0, Width 0, Height 0, Flags:  
Selection Video Capture: compose, Left 0, Top 0, Width 0, Height 0, Flags:  
Selection Video Capture: compose\_default, Left 0, Top 0, Width 3840, Height 2160, Flags:  
Selection Video Capture: compose\_bounds, Left 0, Top 0, Width 3840, Height 2160, Flags:  
Streaming Parameters Video Capture:  
Capabilities : timeperframe  
Frames per second: invalid (0/1)  
Read buffers : 0

User Controls

```
               viv_ext_ctrl 0x0098f901 (str) : min=0 max=65535 step=1 value='' flags=has-payload

```

error 22 getting ctrl sensor.resw  
error 22 getting ctrl sensor.resh

Am I missing something here?  
Any leads would be appriciated.

---

<div class="post-metadata">

**Author:** ![jnettlet](https://dub1.discourse-cdn.com/flex005/user_avatar/community.solid-run.com/jnettlet/32/62_2.png) [@jnettlet](https://community.solid-run.com/u/jnettlet)\
**Post date:** [February 14, 2024, 4:44am UTC](https://community.solid-run.com/t/basler-mipi-csi-not-detecting/194/14 "2024-02-14T04:44:23Z")

</div>

Which mipi CSI connector do you have the camera connected to? Also please include the output for `media-ctl -p`

---

<div class="post-metadata">

**Author:** ![meetgandhi-eic](https://avatars.discourse-cdn.com/v4/letter/m/e79b87/32.png) [@meetgandhi-eic](https://community.solid-run.com/u/meetgandhi-eic)\
**Post date:** [February 14, 2024, 3:18pm UTC](https://community.solid-run.com/t/basler-mipi-csi-not-detecting/194/15 "2024-02-14T15:18:21Z")

</div>

The camera is connected on csi1 interface.

analog@aditof:~/isp-vvcam$ v4l2-ctl --list-devices  
():  
/dev/v4l-subdev0  
/dev/v4l-subdev4  
/dev/v4l-subdev5

():  
/dev/v4l-subdev1  
/dev/v4l-subdev6  
/dev/v4l-subdev7

**(csi1):**  
\*\* /dev/v4l-subdev2\*\*

mxc-isi-cap (platform:32e00000.isi:cap\_devic):  
/dev/video0

FSL Capture Media Device (platform:mxc-md):  
/dev/media0

VIV (platform:viv0):  
/dev/video1

VIV (platform:viv1):  
/dev/video2

**viv\_media (platform:vvcam-video):**  
\*\* /dev/media1\*\*

Here’s the required dump of `media-ctl -p`

```auto

analog@aditof:~/$ media-ctl -p
Media controller API version 5.10.72

Media device information
------------------------
driver mxc-md
model FSL Capture Media Device
serial          
bus info        
hw revision 0x0
driver version 5.10.72

Device topology
- entity 1: mxc_isi.0 (16 pads, 2 links)
            type V4L2 subdev subtype Unknown flags 0
	pad0: Sink
		<- "mxc-mipi-csi2.0":4 [ENABLED]
	pad1: Sink
	pad2: Sink
	pad3: Sink
	pad4: Sink
	pad5: Sink
	pad6: Sink
	pad7: Sink
	pad8: Sink
	pad9: Sink
	pad10: Sink
	pad11: Sink
	pad12: Source
		-> "mxc_isi.0.capture":0 [ENABLED]
	pad13: Source
	pad14: Source
	pad15: Sink

- entity 18: mxc_isi.0.capture (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video0
	pad0: Sink
		<- "mxc_isi.0":12 [ENABLED]

- entity 22: mxc-mipi-csi2.0 (8 pads, 2 links)
             type Node subtype V4L flags 0
             device node name /dev/v4l-subdev0
	pad0: Sink
		<- "adsd3500 1-0038":0 [ENABLED,IMMUTABLE]
	pad1: Sink
	pad2: Sink
	pad3: Sink
	pad4: Source
		-> "mxc_isi.0":0 [ENABLED]
	pad5: Source
	pad6: Source
	pad7: Source

- entity 31: mxc-mipi-csi2.1 (8 pads, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/v4l-subdev1
	pad0: Sink
		<- "basler-camera-vvcam 3-0036":0 [ENABLED,IMMUTABLE]
	pad1: Sink
	pad2: Sink
	pad3: Sink
	pad4: Source
	pad5: Source
	pad6: Source
	pad7: Source

- entity 40: basler-camera-vvcam 3-0036 (1 pad, 1 link)
             type V4L2 subdev subtype Sensor flags 0
             device node name /dev/v4l-subdev2
	pad0: Source
		-> "mxc-mipi-csi2.1":0 [ENABLED,IMMUTABLE]

- entity 42: adsd3500 1-0038 (1 pad, 1 link)
             type V4L2 subdev subtype Sensor flags 0
             device node name /dev/v4l-subdev3
	pad0: Source
		[fmt:SBGGR8_1X8/512x512@1/10 field:none colorspace:raw
		 crop:(0,0)/512x512]
		-> "mxc-mipi-csi2.0":0 [ENABLED,IMMUTABLE]

```

Let me know if you need any additional information.
