# voxl-camera-server not finding IMX678

Source: https://forum.modalai.com/topic/3223/voxl-camera-server-not-finding-imx678
Category: General Questions (https://forum.modalai.com/category/2/general-questions)
Posted: 2024-03-15 17:56:20 UTC by wetherbeej
Replies: 4 · Views: 1295

## wetherbeej · 2024-03-15 17:56:20 UTC

I have a new VOXL2 with voxl-suite 1.1.3-1:

```
--------------------------------------------------------------------------------
system-image: 1.7.4-M0054-14.1a-perf
kernel:       #1 SMP PREEMPT Fri Feb 9 22:38:25 UTC 2024 4.19.125
--------------------------------------------------------------------------------
hw platform:  M0054
mach.var:     1.2
--------------------------------------------------------------------------------
voxl-suite:   1.1.3-1
--------------------------------------------------------------------------------
no current network connection
--------------------------------------------------------------------------------
```

I have an MDK-M0061-2-06 IMX678 hires camera connected via M0084 Dual Camera Adapter JU to VOXL2 Camera Group 1 J7.

When I first have voxl-camera-server list connected cameras it of course doesn't find the camera until I copy over the .bin for that camera.  Once I copy the .bin to `/usr/lib/camera` then it seems to find the camera, but yet it also thinks it doesn't find it.

Excerpt:
```
DEBUG:   Cam idx: 0, Cam slot: 3, Slave Address: 0x0034, Sensor Id: 0xA602
DEBUG:   Number of cameras: 0
```

I have also used the configuration file helper script: ` camera-server-config-helper hires:imx678:0`

Rebooting doesn't help.

What step am I missing to get the IMX678 to be used by voxl-camera-server?

### Reference:

Showing no camera, then copying the .bin file, then pseudo-finding the camera:
```
voxl2:/$ voxl-camera-server -l
DEBUG:   Attempting to open the hal module
DEBUG:   SUCCESS: Camera module opened on attempt 0
DEBUG:   ----------- Number of cameras: 0

DEBUG:   Note: This list comes from the HAL module and may not be indicative
DEBUG:          of configurations that have full pipelines

DEBUG:   Number of cameras: 0

voxl2:/$ cp /usr/share/modalai/chi-cdk/imx678/com.qti.sensormodule.imx678_3.bin /usr/lib/camera/

voxl2:/$ voxl-camera-server -l
DEBUG:   Attempting to open the hal module
DEBUG:   SUCCESS: Camera module opened on attempt 0
DEBUG:   ----------- Number of cameras: 0

DEBUG:   Cam idx: 0, Cam slot: 3, Slave Address: 0x0034, Sensor Id: 0xA602
DEBUG:   Note: This list comes from the HAL module and may not be indicative
DEBUG:          of configurations that have full pipelines

DEBUG:   Number of cameras: 0
```

I configured the camera as:

```
voxl2:/$ camera-server-config-helper hires:imx678:0
successfully wrote this camera config to disk:
=================================================================
configuration for 1 cameras:

cam #0
    name:                hires
    sensor type:         imx678
    isEnabled:           1
    camId:               0
    camId2:              -1
    fps:                 30
    en_rotate:           0
    en_rotate2:          0

    en_preview:          0
    pre_width:           640
    pre_height:          480
    en_raw_preview:      0

    en_small_video:      1
    small_video_width:   1024
    small_video_height:  768

    en_large_video:      1
    large_video_width:   2048
    large_video_height:  1536

    en_snapshot:         1
    snap_width:          3840
    snap_height:         2160

    ae_mode:             isp
    standby_enabled:     0
    decimator:           1
    independent_exposure:0

=================================================================
camera_server_config_helper is done
```

Trying to just run the camera-server:

```
voxl2:/$ voxl-camera-server
=================================================================
configuration for 1 cameras:

cam #0
    name:                hires
    sensor type:         imx678
    isEnabled:           1
    camId:               0
    camId2:              -1
    fps:                 30
    en_rotate:           0
    en_rotate2:          0

    en_preview:          0
    pre_width:           640
    pre_height:          480
    en_raw_preview:      0

    en_small_video:      1
    small_video_width:   1024
    small_video_height:  768

    en_large_video:      1
    large_video_width:   2048
    large_video_height:  1536

    en_snapshot:         1
    snap_width:          3840
    snap_height:         2160

    ae_mode:             isp
    standby_enabled:     0
    decimator:           1
    independent_exposure:0

=================================================================
ERROR:   Found zero cameras connected, need at least one.
```

## Reply by Alex Kushleyev (ModalAI staff) · 2024-03-15 20:37:32 UTC

@wetherbeej ,

can you please run `voxl-camera-server -d 0` (in debug mode)

## Reply by wetherbeej · 2024-03-15 20:39:10 UTC (in reply to Alex Kushleyev)

@Alex-Kushleyev 

```
voxl2:/$ voxl-camera-server -d 0
=================================================================
configuration for 1 cameras:

cam #0
    name:                hires
    sensor type:         imx678
    isEnabled:           1
    camId:               0
    camId2:              -1
    fps:                 30
    en_rotate:           0
    en_rotate2:          0

    en_preview:          0
    pre_width:           640
    pre_height:          480
    en_raw_preview:      0

    en_small_video:      1
    small_video_width:   1024
    small_video_height:  768

    en_large_video:      1
    large_video_width:   2048
    large_video_height:  1536

    en_snapshot:         1
    snap_width:          3840
    snap_height:         2160

    ae_mode:             isp
    standby_enabled:     0
    decimator:           1
    independent_exposure:0

=================================================================
DEBUG:   Attempting to open the hal module
DEBUG:   SUCCESS: Camera module opened on attempt 0
DEBUG:   ----------- Number of cameras: 0

DEBUG:   Cam idx: 0, Cam slot: 3, Slave Address: 0x0034, Sensor Id: 0xA602
ERROR:   Found zero cameras connected, need at least one.
```

## Reply by wetherbeej · 2024-03-15 20:42:53 UTC (in reply to Alex Kushleyev)

@Alex-Kushleyev 

Turns out I was missing: `/usr/lib/camera/com.qti.tuned.default.bin`

It appears to be working now.

## Reply by Alex Kushleyev (ModalAI staff) · 2024-03-15 20:46:30 UTC (in reply to wetherbeej)

@wetherbeej oh, yes.. that would do it. I was just going to ask about that.

By the way we are working on some camera-specific tuning tuning files, should be coming soon. The default may result in image colors appearing a bit off. However, we don't have a tuning file ready for IMX678 just yet.

If the current image quality is of a big concern, please let me know.
