# IMX412 for camera configuration 11 on SDK 1.1.2

Source: https://forum.modalai.com/topic/3054/imx412-for-camera-configuration-11-on-sdk-1-1-2
Category: VOXL 2 and VOXL 2 Mini (https://forum.modalai.com/category/26/voxl-2-and-voxl-2-mini)
Tags: voxl-2
Posted: 2024-01-26 14:11:12 UTC by Chase Riley
Replies: 7 · Views: 1642

## Chase Riley · 2024-01-26 14:11:12 UTC

I am trying to get the VOXL2 running SDK 1.1.2 and camera configuration 11 to use the IMX412 instead of the IMX214. I had this functioning in SDK 1.0, however when I try to run the command ```voxl-configure-cameras 11 --imx412``` like I did in SDK 1.0 it tells me that it is and invalid command.  I can run ```voxl-configure-cameras 11``` with no issues. 

When I pull up ```voxl-portal``` in my web browser it does not show the option to view the hires camera. I have the modified the ```voxl-camera-server.conf``` to set the resolution of the IMX412 to 1920x1080 and I also tried to change imx214 to imx412 and that yielded the same results. 

When running ```voxl-camera-server``` I see a error that say failure to find hires stream at 1920x1080.

## Reply by Alex Kushleyev (ModalAI staff) · 2024-01-26 16:45:01 UTC

@Chase-Riley, how are you connecting IMX412 to VOXL 2?
- which camera port on VOXL2
- what flex / adapter are you using
- which part of flex are you connecting IMX412 to (if it is a dual flex)

Does your configuration look like this ? https://docs.modalai.com/voxl2-camera-configs/#c-17-tof-tracking-stereo0v9782-and-hiresimx412 (you can ignore other cameras, mainly asking about imx412 location)

## Reply by Chase Riley · 2024-01-26 16:50:55 UTC (in reply to Alex Kushleyev)

@Alex-Kushleyev I followed the connection diagram for C-11. Which shows a different configuration than the C-17 you sent here. I am connecting the longest part of the dual flex to the hires camera. This configuration worked in SDK 1.0.

## Reply by Alex Kushleyev (ModalAI staff) · 2024-01-26 17:44:21 UTC (in reply to Chase Riley)

@Chase-Riley , C11 uses a different camera (IMX214), so you did this setup and instead of 214 connected imx412? just wanted to confirm : https://docs.modalai.com/voxl2-camera-configs/#c-11-front-stereo-rear-stereo-hires-and-tracking-d0006-sentinel

## Reply by Chase Riley · 2024-01-26 17:49:51 UTC (in reply to Alex Kushleyev)

@Alex-Kushleyev yes. Exactly. My configuration is c11 just with s 412 instead of the 214.

## Reply by Alex Kushleyev (ModalAI staff) · 2024-01-26 17:53:53 UTC (in reply to Alex Kushleyev)

OK, here is a trick..

i connected tracking cam and IMX412 as shown in C11 (IMX412 instead of IMX214).

Then, 

```
voxl-configure-cameras
(select 11)
```

Then you see the following:
```
copying required camera drivers in place
/usr/share/modalai/chi-cdk/ov7251-combo/com.qti.sensormodule.ov7251_combo_0.bin
/usr/share/modalai/chi-cdk/ov7251-combo/com.qti.sensormodule.ov7251_combo_1.bin
/usr/share/modalai/chi-cdk/ov7251/com.qti.sensormodule.ov7251_2.bin
/usr/share/modalai/chi-cdk/imx214/com.qti.sensormodule.imx214_3.bin
/usr/share/modalai/chi-cdk/ov7251-combo/com.qti.sensormodule.ov7251_combo_4.bin
/usr/share/modalai/chi-cdk/ov7251-combo/com.qti.sensormodule.ov7251_combo_5.bin
```

This means that the original C11 configuration is expecting IMX214 in slot `3`. Now, since we don't have imx214, go too `/usr/lib/camera`, remove `com.qti.sensormodule.imx214_3.bin` and copy IMX412 sensormodule:

```
cp /usr/share/modalai/chi-cdk/imx412/com.qti.sensormodule.imx412_3.bin /usr/lib/camera/
```

then...
```
voxl-camera-server -l
DEBUG:   Attempting to open the hal module
DEBUG:   SUCCESS: Camera module opened on attempt 0
DEBUG:   ----------- Number of cameras: 2

DEBUG:   Cam idx: 0, Cam slot: 2, Slave Address: 0x00E2, Sensor Id: 0x7750
DEBUG:   Cam idx: 1, Cam slot: 3, Slave Address: 0x0034, Sensor Id: 0x0577
```

Remember, i only have two cameras plugged in.. tracking and imx412

sensor ID `0x0577` is for IMX412, also you will see supported resolutions.

Then you have to go to `/etc/modalai/voxl-camera-server.conf` and change the hires camera resolution. IMX412 does not support the same max resolution as IMX412.  IMX214 : 4208x3120, IMX412 : 4056x3040. However you can choose a standard resolution `4k (3840x2160)` or `1080p (1920x1080)` which are supported by all hires cams

save the config and start `voxl-camera-server` in foreground to see the ouput / debug prints

voila!

## Reply by Chase Riley · 2024-01-26 18:22:54 UTC (in reply to Alex Kushleyev)

@Alex-Kushleyev Awesome! That got it working. Now one last thing on this. How can I flip the image of the imx412? Would it still be a driver that said ```flip``` after it?

## Reply by Alex Kushleyev (ModalAI staff) · 2024-01-26 22:24:14 UTC (in reply to Chase Riley)

@Chase-Riley, i think so! You would need to delete the sensormodule for the non flipped one from /usr/lib/camera
