# Vision sensors not detected in VOXL2

Source: https://forum.modalai.com/topic/3688/vision-sensors-not-detected-in-voxl2
Category: ESCs, Sensors and Accessories (https://forum.modalai.com/category/15/escs-sensors-and-accessories)
Tags: image-sensor
Posted: 2024-07-30 02:52:48 UTC by Jetson Nano
Replies: 16 · Views: 2846

## Jetson Nano · 2024-07-30 02:52:48 UTC

Hey @modaltb @Alex-Kushleyev @James-Strawson 

I'm using a Starling drone setup on a custom airframe. The sensor suite is the same as in Starling drone. Recently, during ground test, every vision sensor on the drone worked fine. But during flight we noticed that Tracking Camera(ov9281 fisheye lens) was'nt detected and the error message of ```
CAM_INSTALLED_MISSING``` appeared on screen and ToF also stopped  publishing depth data.

![Screenshot 2024-07-29 at 8.02.09 PM.png](https://forum.modalai.com/assets/uploads/files/1722307385406-screenshot-2024-07-29-at-8.02.09-pm.png)

I tried reflashing the system with SDK 1.1.1 again. But concurrently the [ToF](https://www.modalai.com/products/voxl-dk-tof) now stopped from being detected by the ```VOXL-CAMERA_SERVER``` and ```VOXL_VISION_HUB```.  
Current SDK being used on the system is 1.1.1.

To troubleshoot, tried
1. removing the cable connectors and attaching again, but still particularly the ToF is'nt getting detetcted. 

2. tried adding only the individual sensors including tracking and checking if camera server and vision server detects and services are functioning, but still ToF dint show up on sensors being detected.

3. Is there any debugger command to check and troubleshoot ToF sensor in voxl-camera-server pipeline?

## Reply by Jetson Nano · 2024-07-30 14:15:54 UTC

I'm getting following output when running the command, voxl-camera-server -l

```
voxl2:/$ 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: 0x0020, Sensor Id: 0x0214
DEBUG:   Cam idx: 1, Cam slot: 3, Slave Address: 0x00C0, Sensor Id: 0x7750
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: 2

Stats for camera: 0:
ANDROID_SCALER_AVAILABLE_RAW_SIZES:
	4208x3120, 4096x2160, 2104x1560, 1920x1080, 1280x 720, 
ANDROID_SCALER_AVAILABLE_PROCESSED_SIZES:
	4208x3120, 4096x2160, 2104x1560, 1920x1080, 1280x 720, 
ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_OUTPUT:
	4208x3120, 4096x2160, 2104x1560, 1920x1080, 1280x 720, 
ANDROID_SCALER_AVAILABLE_JPEG_SIZES:
	4208x3120, 4096x2160, 2104x1560, 1920x1080, 1280x 720, 
ANDROID_SENSOR_INFO_SENSITIVITY_RANGE
	min = 54
	max = 431
ANDROID_SENSOR_MAX_ANALOG_SENSITIVITY
	431
ANDROID_SENSOR_INFO_EXPOSURE_TIME_RANGE
	min = 15723ns
	max = 683714540ns

Stats for camera: 1:
ANDROID_SCALER_AVAILABLE_RAW_SIZES:
	 640x 480,  640x 480,  640x 480, 
ANDROID_SCALER_AVAILABLE_PROCESSED_SIZES:
	 640x 480,  640x 480,  640x 480, 
ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_OUTPUT:
	 640x 480,  640x 480,  640x 480, 
ANDROID_SCALER_AVAILABLE_JPEG_SIZES:
	 640x 480,  640x 480,  640x 480, 
ANDROID_SENSOR_INFO_SENSITIVITY_RANGE
	min = 54
	max = 431
ANDROID_SENSOR_MAX_ANALOG_SENSITIVITY
	431
ANDROID_SENSOR_INFO_EXPOSURE_TIME_RANGE
	min = 0ns
	max = 17942880ns

```
ToF is not being detected here either. Even though High-res and Tracking ov7251 is detected, still there is no output stream which could be observed on voxl-portal.

## Reply by modaltb (ModalAI staff) · 2024-07-30 15:07:13 UTC (in reply to Jetson Nano)

@Jetson-Nano  If you've reverted back to original config, run voxl-configure-cameras and select the D0005 Starling option.

When you want to use ov9782, you need to copy the correct binary into /usr/lib/camera and also update config file?

A high level helper is here:
   https://gitlab.com/voxl-public/voxl-sdk/services/voxl-camera-server/-/blob/master/misc_files/usr/share/modalai/voxl-camera-server/custom_camera_config.txt?ref_type=heads

You can then use voxl-configure-cameras -c to use custom setup, after you've setup the above file into correct place (see top of the file for direction).

see this for logic of setting up proper bins:
   https://gitlab.com/voxl-public/voxl-sdk/services/voxl-camera-server/-/blob/master/scripts/qrb5165-configure-cameras

see https://docs.modalai.com/voxl2-image-sensors/ for more info, but since we support a lot of different configs and, because of I2C clashes if we have all binaries in /usr/lib/camera, we copy bins into place using camera-server wizard.

## Reply by Jetson Nano · 2024-07-30 15:28:34 UTC (in reply to modaltb)

@modaltb Thanks for reverting. I have a doubt. Generally I don'nt copy any binaries while setting up camera servers. Also, I'm following D0005 Starling camera config only. 

1. If binaries are to copied, from where do I get the binaries from?
2. How do I update the config file?

My h/w config is similar to this,

![pxl_20240522_074642441.mp.jpg](https://forum.modalai.com/assets/uploads/files/1722353567200-pxl_20240522_074642441.mp.jpg)

## Reply by Jetson Nano · 2024-07-31 12:47:11 UTC (in reply to Jetson Nano)

@modaltb , sorry there was a mistake in my first post. I am not using a different sensor, I am using the same sensor which I got with Starling which is ov7251 (fisheye lens). Initially when I was testing, everything was fine with SDK 1.1.1. And all of sudden with no hardware or software changes, the voxl-camera-server was not running. If I run using 
```
voxl-camera-server -d 0
``` 
all the camera runs and I can see them in the portal, but it'll abort after some time (Approx 5 sec). I tried disabling and enabling, restarting, rebooting but it was the same.

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

DEBUG:   Cam idx: 0, Cam slot: 0, Slave Address: 0x007A, Sensor Id: 0x003D
DEBUG:   Cam idx: 1, Cam slot: 2, Slave Address: 0x0020, Sensor Id: 0x0214
DEBUG:   Cam idx: 2, Cam slot: 3, Slave Address: 0x00E2, Sensor Id: 0x7750
DEBUG:   Cam idx: 3, Cam slot: 4, Slave Address: 0x00E2, Sensor Id: 0x7750
DEBUG:   Cam idx: 4, Cam slot: 5, Slave Address: 0x00E4, Sensor Id: 0x7750
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: 5

====================================
Stats for camera: 0

ANDROID_SCALER_AVAILABLE_RAW_SIZES:
These are likely supported by the sensor
 224 x 1557

ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS:
These are NOT necessarily supported by the sensor
 176 x  144 HAL_PIXEL_FORMAT_YCbCr_420_888
 176 x  144 HAL_PIXEL_FORMAT_BLOB
 224 x 1557 HAL_PIXEL_FORMAT_RAW10
 224 x 1557 HAL_PIXEL_FORMAT_RAW12
 224 x 1557 HAL_PIXEL_FORMAT_RAW16
 224 x 1557 HAL_PIXEL_FORMAT_RAW_OPAQUE

ANDROID_SENSOR_INFO_SENSITIVITY_RANGE
	min = 54
	max = 0

ANDROID_SENSOR_MAX_ANALOG_SENSITIVITY
	0

ANDROID_SENSOR_INFO_EXPOSURE_TIME_RANGE
	min = 0ns
	max = 0ns

====================================
Stats for camera: 1

ANDROID_SCALER_AVAILABLE_RAW_SIZES:
These are likely supported by the sensor
4208 x 3120
3840 x 2160
1920 x 1080
1920 x 1080

ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS:
These are NOT necessarily supported by the sensor
4208 x 3120 HAL_PIXEL_FORMAT_YCbCr_420_888
4208 x 3120 HAL_PIXEL_FORMAT_BLOB
4160 x 3120 HAL_PIXEL_FORMAT_YCbCr_420_888
4160 x 3120 HAL_PIXEL_FORMAT_BLOB
4096 x 2304 HAL_PIXEL_FORMAT_YCbCr_420_888
4096 x 2304 HAL_PIXEL_FORMAT_BLOB
4096 x 2160 HAL_PIXEL_FORMAT_YCbCr_420_888
4096 x 2160 HAL_PIXEL_FORMAT_BLOB
4056 x 3040 HAL_PIXEL_FORMAT_YCbCr_420_888
4056 x 3040 HAL_PIXEL_FORMAT_BLOB
4000 x 3000 HAL_PIXEL_FORMAT_YCbCr_420_888
4000 x 3000 HAL_PIXEL_FORMAT_BLOB
3840 x 2160 HAL_PIXEL_FORMAT_YCbCr_420_888
3840 x 2160 HAL_PIXEL_FORMAT_BLOB
3264 x 2448 HAL_PIXEL_FORMAT_YCbCr_420_888
3264 x 2448 HAL_PIXEL_FORMAT_BLOB
3200 x 2400 HAL_PIXEL_FORMAT_YCbCr_420_888
3200 x 2400 HAL_PIXEL_FORMAT_BLOB
2976 x 2976 HAL_PIXEL_FORMAT_YCbCr_420_888
2976 x 2976 HAL_PIXEL_FORMAT_BLOB
2688 x 1512 HAL_PIXEL_FORMAT_YCbCr_420_888
2688 x 1512 HAL_PIXEL_FORMAT_BLOB
2592 x 1944 HAL_PIXEL_FORMAT_YCbCr_420_888
2592 x 1944 HAL_PIXEL_FORMAT_BLOB
2048 x 1536 HAL_PIXEL_FORMAT_YCbCr_420_888
2048 x 1536 HAL_PIXEL_FORMAT_BLOB
1920 x 1440 HAL_PIXEL_FORMAT_YCbCr_420_888
1920 x 1440 HAL_PIXEL_FORMAT_BLOB
1928 x 1208 HAL_PIXEL_FORMAT_YCbCr_420_888
1928 x 1208 HAL_PIXEL_FORMAT_BLOB
1920 x 1080 HAL_PIXEL_FORMAT_YCbCr_420_888
1920 x 1080 HAL_PIXEL_FORMAT_BLOB
1600 x 1200 HAL_PIXEL_FORMAT_YCbCr_420_888
1600 x 1200 HAL_PIXEL_FORMAT_BLOB
1440 x 1080 HAL_PIXEL_FORMAT_YCbCr_420_888
1440 x 1080 HAL_PIXEL_FORMAT_BLOB
1280 x  960 HAL_PIXEL_FORMAT_YCbCr_420_888
1280 x  960 HAL_PIXEL_FORMAT_BLOB
1280 x  800 HAL_PIXEL_FORMAT_YCbCr_420_888
1280 x  800 HAL_PIXEL_FORMAT_BLOB
1280 x  768 HAL_PIXEL_FORMAT_YCbCr_420_888
1280 x  768 HAL_PIXEL_FORMAT_BLOB
1280 x  720 HAL_PIXEL_FORMAT_YCbCr_420_888
1280 x  720 HAL_PIXEL_FORMAT_BLOB
1080 x 1080 HAL_PIXEL_FORMAT_YCbCr_420_888
1080 x 1080 HAL_PIXEL_FORMAT_BLOB
1024 x  738 HAL_PIXEL_FORMAT_YCbCr_420_888
1024 x  738 HAL_PIXEL_FORMAT_BLOB
1024 x  768 HAL_PIXEL_FORMAT_YCbCr_420_888
1024 x  768 HAL_PIXEL_FORMAT_BLOB
 864 x  480 HAL_PIXEL_FORMAT_YCbCr_420_888
 864 x  480 HAL_PIXEL_FORMAT_BLOB
 800 x  600 HAL_PIXEL_FORMAT_YCbCr_420_888
 800 x  600 HAL_PIXEL_FORMAT_BLOB
 800 x  480 HAL_PIXEL_FORMAT_YCbCr_420_888
 800 x  480 HAL_PIXEL_FORMAT_BLOB
 720 x 1280 HAL_PIXEL_FORMAT_YCbCr_420_888
 720 x 1280 HAL_PIXEL_FORMAT_BLOB
 720 x  480 HAL_PIXEL_FORMAT_YCbCr_420_888
 720 x  480 HAL_PIXEL_FORMAT_BLOB
 640 x  480 HAL_PIXEL_FORMAT_YCbCr_420_888
 640 x  480 HAL_PIXEL_FORMAT_BLOB
 640 x  400 HAL_PIXEL_FORMAT_YCbCr_420_888
 640 x  400 HAL_PIXEL_FORMAT_BLOB
 640 x  360 HAL_PIXEL_FORMAT_YCbCr_420_888
 640 x  360 HAL_PIXEL_FORMAT_BLOB
 352 x  288 HAL_PIXEL_FORMAT_YCbCr_420_888
 352 x  288 HAL_PIXEL_FORMAT_BLOB
 320 x  240 HAL_PIXEL_FORMAT_YCbCr_420_888
 320 x  240 HAL_PIXEL_FORMAT_BLOB
 240 x  320 HAL_PIXEL_FORMAT_YCbCr_420_888
 240 x  320 HAL_PIXEL_FORMAT_BLOB
 176 x  144 HAL_PIXEL_FORMAT_YCbCr_420_888
 176 x  144 HAL_PIXEL_FORMAT_BLOB
4208 x 3120 HAL_PIXEL_FORMAT_RAW10
4208 x 3120 HAL_PIXEL_FORMAT_RAW12
4208 x 3120 HAL_PIXEL_FORMAT_RAW16
4208 x 3120 HAL_PIXEL_FORMAT_RAW_OPAQUE

ANDROID_SENSOR_INFO_SENSITIVITY_RANGE
	min = 54
	max = 431

ANDROID_SENSOR_MAX_ANALOG_SENSITIVITY
	431

ANDROID_SENSOR_INFO_EXPOSURE_TIME_RANGE
	min = 10449ns
	max = 683714540ns

====================================
Stats for camera: 2

ANDROID_SCALER_AVAILABLE_RAW_SIZES:
These are likely supported by the sensor
 640 x  480
 640 x  480
 640 x  480

ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS:
These are NOT necessarily supported by the sensor
 640 x  480 HAL_PIXEL_FORMAT_YCbCr_420_888
 640 x  480 HAL_PIXEL_FORMAT_BLOB
 640 x  400 HAL_PIXEL_FORMAT_YCbCr_420_888
 640 x  400 HAL_PIXEL_FORMAT_BLOB
 640 x  360 HAL_PIXEL_FORMAT_YCbCr_420_888
 640 x  360 HAL_PIXEL_FORMAT_BLOB
 352 x  288 HAL_PIXEL_FORMAT_YCbCr_420_888
 352 x  288 HAL_PIXEL_FORMAT_BLOB
 320 x  240 HAL_PIXEL_FORMAT_YCbCr_420_888
 320 x  240 HAL_PIXEL_FORMAT_BLOB
 240 x  320 HAL_PIXEL_FORMAT_YCbCr_420_888
 240 x  320 HAL_PIXEL_FORMAT_BLOB
 176 x  144 HAL_PIXEL_FORMAT_YCbCr_420_888
 176 x  144 HAL_PIXEL_FORMAT_BLOB
 640 x  480 HAL_PIXEL_FORMAT_RAW10
 640 x  480 HAL_PIXEL_FORMAT_RAW12
 640 x  480 HAL_PIXEL_FORMAT_RAW16
 640 x  480 HAL_PIXEL_FORMAT_RAW_OPAQUE

ANDROID_SENSOR_INFO_SENSITIVITY_RANGE
	min = 54
	max = 3451

ANDROID_SENSOR_MAX_ANALOG_SENSITIVITY
	3451

ANDROID_SENSOR_INFO_EXPOSURE_TIME_RANGE
	min = 0ns
	max = 1266732525ns

====================================
Stats for camera: 3

ANDROID_SCALER_AVAILABLE_RAW_SIZES:
These are likely supported by the sensor
 640 x  480

ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS:
These are NOT necessarily supported by the sensor
 640 x  480 HAL_PIXEL_FORMAT_YCbCr_420_888
 640 x  480 HAL_PIXEL_FORMAT_BLOB
 640 x  400 HAL_PIXEL_FORMAT_YCbCr_420_888
 640 x  400 HAL_PIXEL_FORMAT_BLOB
 640 x  360 HAL_PIXEL_FORMAT_YCbCr_420_888
 640 x  360 HAL_PIXEL_FORMAT_BLOB
 352 x  288 HAL_PIXEL_FORMAT_YCbCr_420_888
 352 x  288 HAL_PIXEL_FORMAT_BLOB
 320 x  240 HAL_PIXEL_FORMAT_YCbCr_420_888
 320 x  240 HAL_PIXEL_FORMAT_BLOB
 240 x  320 HAL_PIXEL_FORMAT_YCbCr_420_888
 240 x  320 HAL_PIXEL_FORMAT_BLOB
 176 x  144 HAL_PIXEL_FORMAT_YCbCr_420_888
 176 x  144 HAL_PIXEL_FORMAT_BLOB
 640 x  480 HAL_PIXEL_FORMAT_RAW10
 640 x  480 HAL_PIXEL_FORMAT_RAW12
 640 x  480 HAL_PIXEL_FORMAT_RAW16
 640 x  480 HAL_PIXEL_FORMAT_RAW_OPAQUE

ANDROID_SENSOR_INFO_SENSITIVITY_RANGE
	min = 54
	max = 3451

ANDROID_SENSOR_MAX_ANALOG_SENSITIVITY
	3451

ANDROID_SENSOR_INFO_EXPOSURE_TIME_RANGE
	min = 0ns
	max = 1266732525ns

====================================
Stats for camera: 4

ANDROID_SCALER_AVAILABLE_RAW_SIZES:
These are likely supported by the sensor
 640 x  480

ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS:
These are NOT necessarily supported by the sensor
 640 x  480 HAL_PIXEL_FORMAT_YCbCr_420_888
 640 x  480 HAL_PIXEL_FORMAT_BLOB
 640 x  400 HAL_PIXEL_FORMAT_YCbCr_420_888
 640 x  400 HAL_PIXEL_FORMAT_BLOB
 640 x  360 HAL_PIXEL_FORMAT_YCbCr_420_888
 640 x  360 HAL_PIXEL_FORMAT_BLOB
 352 x  288 HAL_PIXEL_FORMAT_YCbCr_420_888
 352 x  288 HAL_PIXEL_FORMAT_BLOB
 320 x  240 HAL_PIXEL_FORMAT_YCbCr_420_888
 320 x  240 HAL_PIXEL_FORMAT_BLOB
 240 x  320 HAL_PIXEL_FORMAT_YCbCr_420_888
 240 x  320 HAL_PIXEL_FORMAT_BLOB
 176 x  144 HAL_PIXEL_FORMAT_YCbCr_420_888
 176 x  144 HAL_PIXEL_FORMAT_BLOB
 640 x  480 HAL_PIXEL_FORMAT_RAW10
 640 x  480 HAL_PIXEL_FORMAT_RAW12
 640 x  480 HAL_PIXEL_FORMAT_RAW16
 640 x  480 HAL_PIXEL_FORMAT_RAW_OPAQUE

ANDROID_SENSOR_INFO_SENSITIVITY_RANGE
	min = 54
	max = 3451

ANDROID_SENSOR_MAX_ANALOG_SENSITIVITY
	3451

ANDROID_SENSOR_INFO_EXPOSURE_TIME_RANGE
	min = 0ns
	max = 1266732525ns

====================================
Number of cameras detected: 5
====================================
```

```
voxl2:~$ voxl-camera-server -s
Assuming type: PMD_TOF for camera 0
Assuming type: IMX214 for camera 1
detected system image 1.7.6
using new imx214 defaults
Assuming type: OV7251 for camera 2
Assuming type: OV7251 for camera 3
Assuming type: OV7251 for camera 4
connected to GPS mavlink pipe
Starting Camera: cam0 (id #0)
Using gain limits min: 54 max: 8000
Connected to cpu-monitor
gbm_create_device(156): Info: backend name is: msm_drm
Starting Camera: cam1 (id #1)
Using gain limits min: 54 max: 431
WARNING: Port Def 0:
	Count Min: 8
	Count Actual: 16
	Size: 0x180000
	Buffers Contiguous: Yes
	Buffer Alignment: 0
WARNING: Port Def 1:
	Count Min: 4
	Count Actual: 16
	Size: 0x5a0000
	Buffers Contiguous: No
	Buffer Alignment: 0
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
WARNING: Port Def 0:
	Count Min: 8
	Count Actual: 16
	Size: 0x17a0000
	Buffers Contiguous: Yes
	Buffer Alignment: 0
WARNING: Port Def 1:
	Count Min: 4
	Count Actual: 16
	Size: 0x5ec000
	Buffers Contiguous: No
	Buffer Alignment: 0
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
Starting Camera: cam2 (id #2)
Using gain limits min: 54 max: 3451
setting ov7251 BLC register for cam id 2
Starting Camera: cam3 (id #3)
Using gain limits min: 54 max: 3451
ERROR:   Royale startCapture! 1024
setting ov7251 BLC register for cam id 3
Starting Camera: cam4 (id #4)
Using gain limits min: 54 max: 3451
setting ov7251 BLC register for cam id 4

------ voxl-camera-server: Started 5 of 5 cameras

------ voxl-camera-server: Camera server is now running
Aborted
```

```
voxl2:~$ voxl-camera-server -s
Assuming type: PMD_TOF for camera 0
Assuming type: IMX214 for camera 1
detected system image 1.7.6
using new imx214 defaults
Assuming type: OV7251 for camera 2
Assuming type: OV7251 for camera 3
Assuming type: OV7251 for camera 4
connected to GPS mavlink pipe
Starting Camera: cam0 (id #0)
Using gain limits min: 54 max: 8000
Connected to cpu-monitor
gbm_create_device(156): Info: backend name is: msm_drm
Starting Camera: cam1 (id #1)
Using gain limits min: 54 max: 431
WARNING: Port Def 0:
	Count Min: 8
	Count Actual: 16
	Size: 0x180000
	Buffers Contiguous: Yes
	Buffer Alignment: 0
WARNING: Port Def 1:
	Count Min: 4
	Count Actual: 16
	Size: 0x5a0000
	Buffers Contiguous: No
	Buffer Alignment: 0
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
WARNING: Port Def 0:
	Count Min: 8
	Count Actual: 16
	Size: 0x17a0000
	Buffers Contiguous: Yes
	Buffer Alignment: 0
WARNING: Port Def 1:
	Count Min: 4
	Count Actual: 16
	Size: 0x5ec000
	Buffers Contiguous: No
	Buffer Alignment: 0
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
Starting Camera: cam2 (id #2)
Using gain limits min: 54 max: 3451
setting ov7251 BLC register for cam id 2
Starting Camera: cam3 (id #3)
Using gain limits min: 54 max: 3451
setting ov7251 BLC register for cam id 3
Starting Camera: cam4 (id #4)
Using gain limits min: 54 max: 3451
setting ov7251 BLC register for cam id 4

------ voxl-camera-server: Started 5 of 5 cameras

------ voxl-camera-server: Camera server is now running
ERROR:   [ERROR] in _sensor_ioctl, ioctl failed: Connection timed out
ERROR:   [ERROR] in voxl_cci_write_word_array, Failed ioctl call
ERROR:   Failed CCI read
Aborted
```

Later when we changed SDK and checked, the cameras weren't working. I have another starling drone, from which I checked the files in /usr/lib/camera and it was the same, and also I tried copying the files from starling's /camera directory and pasted it to the setup I am using and still it is not working. When I tried with different SDK (1.1.0), TOF works, but the tracking and high res doesn't. I tried changing the ports of the cameras also, but it is still the same.

In 1.1.1 the tracking is working fine, the TOF is not being detected and the highres is being detected but not sending any video feed in portal.

I tried configuring individual cameras one after another and still it is the same. I tried custom config and still the issue remains.

```
voxl2:~$ voxl-camera-server -l
existing instance of voxl-camera-server found, attempting to stop it
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: 0x0020, Sensor Id: 0x0214
DEBUG:   Cam idx: 1, Cam slot: 3, Slave Address: 0x00E2, Sensor Id: 0x7750
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: 2

====================================
Stats for camera: 0

ANDROID_SCALER_AVAILABLE_RAW_SIZES:
These are likely supported by the sensor
4208 x 3120
3840 x 2160
1920 x 1080
1920 x 1080

ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS:
These are NOT necessarily supported by the sensor
4208 x 3120 HAL_PIXEL_FORMAT_YCbCr_420_888
4208 x 3120 HAL_PIXEL_FORMAT_BLOB
4160 x 3120 HAL_PIXEL_FORMAT_YCbCr_420_888
4160 x 3120 HAL_PIXEL_FORMAT_BLOB
4096 x 2304 HAL_PIXEL_FORMAT_YCbCr_420_888
4096 x 2304 HAL_PIXEL_FORMAT_BLOB
4096 x 2160 HAL_PIXEL_FORMAT_YCbCr_420_888
4096 x 2160 HAL_PIXEL_FORMAT_BLOB
4056 x 3040 HAL_PIXEL_FORMAT_YCbCr_420_888
4056 x 3040 HAL_PIXEL_FORMAT_BLOB
4000 x 3000 HAL_PIXEL_FORMAT_YCbCr_420_888
4000 x 3000 HAL_PIXEL_FORMAT_BLOB
3840 x 2160 HAL_PIXEL_FORMAT_YCbCr_420_888
3840 x 2160 HAL_PIXEL_FORMAT_BLOB
3264 x 2448 HAL_PIXEL_FORMAT_YCbCr_420_888
3264 x 2448 HAL_PIXEL_FORMAT_BLOB
3200 x 2400 HAL_PIXEL_FORMAT_YCbCr_420_888
3200 x 2400 HAL_PIXEL_FORMAT_BLOB
2976 x 2976 HAL_PIXEL_FORMAT_YCbCr_420_888
2976 x 2976 HAL_PIXEL_FORMAT_BLOB
2688 x 1512 HAL_PIXEL_FORMAT_YCbCr_420_888
2688 x 1512 HAL_PIXEL_FORMAT_BLOB
2592 x 1944 HAL_PIXEL_FORMAT_YCbCr_420_888
2592 x 1944 HAL_PIXEL_FORMAT_BLOB
2048 x 1536 HAL_PIXEL_FORMAT_YCbCr_420_888
2048 x 1536 HAL_PIXEL_FORMAT_BLOB
1920 x 1440 HAL_PIXEL_FORMAT_YCbCr_420_888
1920 x 1440 HAL_PIXEL_FORMAT_BLOB
1928 x 1208 HAL_PIXEL_FORMAT_YCbCr_420_888
1928 x 1208 HAL_PIXEL_FORMAT_BLOB
1920 x 1080 HAL_PIXEL_FORMAT_YCbCr_420_888
1920 x 1080 HAL_PIXEL_FORMAT_BLOB
1600 x 1200 HAL_PIXEL_FORMAT_YCbCr_420_888
1600 x 1200 HAL_PIXEL_FORMAT_BLOB
1440 x 1080 HAL_PIXEL_FORMAT_YCbCr_420_888
1440 x 1080 HAL_PIXEL_FORMAT_BLOB
1280 x  960 HAL_PIXEL_FORMAT_YCbCr_420_888
1280 x  960 HAL_PIXEL_FORMAT_BLOB
1280 x  800 HAL_PIXEL_FORMAT_YCbCr_420_888
1280 x  800 HAL_PIXEL_FORMAT_BLOB
1280 x  768 HAL_PIXEL_FORMAT_YCbCr_420_888
1280 x  768 HAL_PIXEL_FORMAT_BLOB
1280 x  720 HAL_PIXEL_FORMAT_YCbCr_420_888
1280 x  720 HAL_PIXEL_FORMAT_BLOB
1080 x 1080 HAL_PIXEL_FORMAT_YCbCr_420_888
1080 x 1080 HAL_PIXEL_FORMAT_BLOB
1024 x  738 HAL_PIXEL_FORMAT_YCbCr_420_888
1024 x  738 HAL_PIXEL_FORMAT_BLOB
1024 x  768 HAL_PIXEL_FORMAT_YCbCr_420_888
1024 x  768 HAL_PIXEL_FORMAT_BLOB
 864 x  480 HAL_PIXEL_FORMAT_YCbCr_420_888
 864 x  480 HAL_PIXEL_FORMAT_BLOB
 800 x  600 HAL_PIXEL_FORMAT_YCbCr_420_888
 800 x  600 HAL_PIXEL_FORMAT_BLOB
 800 x  480 HAL_PIXEL_FORMAT_YCbCr_420_888
 800 x  480 HAL_PIXEL_FORMAT_BLOB
 720 x 1280 HAL_PIXEL_FORMAT_YCbCr_420_888
 720 x 1280 HAL_PIXEL_FORMAT_BLOB
 720 x  480 HAL_PIXEL_FORMAT_YCbCr_420_888
 720 x  480 HAL_PIXEL_FORMAT_BLOB
 640 x  480 HAL_PIXEL_FORMAT_YCbCr_420_888
 640 x  480 HAL_PIXEL_FORMAT_BLOB
 640 x  400 HAL_PIXEL_FORMAT_YCbCr_420_888
 640 x  400 HAL_PIXEL_FORMAT_BLOB
 640 x  360 HAL_PIXEL_FORMAT_YCbCr_420_888
 640 x  360 HAL_PIXEL_FORMAT_BLOB
 352 x  288 HAL_PIXEL_FORMAT_YCbCr_420_888
 352 x  288 HAL_PIXEL_FORMAT_BLOB
 320 x  240 HAL_PIXEL_FORMAT_YCbCr_420_888
 320 x  240 HAL_PIXEL_FORMAT_BLOB
 240 x  320 HAL_PIXEL_FORMAT_YCbCr_420_888
 240 x  320 HAL_PIXEL_FORMAT_BLOB
 176 x  144 HAL_PIXEL_FORMAT_YCbCr_420_888
 176 x  144 HAL_PIXEL_FORMAT_BLOB
4208 x 3120 HAL_PIXEL_FORMAT_RAW10
4208 x 3120 HAL_PIXEL_FORMAT_RAW12
4208 x 3120 HAL_PIXEL_FORMAT_RAW16
4208 x 3120 HAL_PIXEL_FORMAT_RAW_OPAQUE

ANDROID_SENSOR_INFO_SENSITIVITY_RANGE
	min = 54
	max = 431

ANDROID_SENSOR_MAX_ANALOG_SENSITIVITY
	431

ANDROID_SENSOR_INFO_EXPOSURE_TIME_RANGE
	min = 10449ns
	max = 683714540ns

====================================
Stats for camera: 1

ANDROID_SCALER_AVAILABLE_RAW_SIZES:
These are likely supported by the sensor
 640 x  480
 640 x  480
 640 x  480

ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS:
These are NOT necessarily supported by the sensor
 640 x  480 HAL_PIXEL_FORMAT_YCbCr_420_888
 640 x  480 HAL_PIXEL_FORMAT_BLOB
 640 x  400 HAL_PIXEL_FORMAT_YCbCr_420_888
 640 x  400 HAL_PIXEL_FORMAT_BLOB
 640 x  360 HAL_PIXEL_FORMAT_YCbCr_420_888
 640 x  360 HAL_PIXEL_FORMAT_BLOB
 352 x  288 HAL_PIXEL_FORMAT_YCbCr_420_888
 352 x  288 HAL_PIXEL_FORMAT_BLOB
 320 x  240 HAL_PIXEL_FORMAT_YCbCr_420_888
 320 x  240 HAL_PIXEL_FORMAT_BLOB
 240 x  320 HAL_PIXEL_FORMAT_YCbCr_420_888
 240 x  320 HAL_PIXEL_FORMAT_BLOB
 176 x  144 HAL_PIXEL_FORMAT_YCbCr_420_888
 176 x  144 HAL_PIXEL_FORMAT_BLOB
 640 x  480 HAL_PIXEL_FORMAT_RAW10
 640 x  480 HAL_PIXEL_FORMAT_RAW12
 640 x  480 HAL_PIXEL_FORMAT_RAW16
 640 x  480 HAL_PIXEL_FORMAT_RAW_OPAQUE

ANDROID_SENSOR_INFO_SENSITIVITY_RANGE
	min = 54
	max = 3451

ANDROID_SENSOR_MAX_ANALOG_SENSITIVITY
	3451

ANDROID_SENSOR_INFO_EXPOSURE_TIME_RANGE
	min = 0ns
	max = 1266732525ns

====================================
Number of cameras detected: 2
====================================
```

```
voxl2:~$ voxl-camera-server 
detected system image 1.7.8
using new imx214 defaults
=================================================================
configuration for 3 cameras:

cam #0
    name:                tof
    sensor type:         pmd-tof
    isEnabled:           1
    camId:               0
    camId2:              -1
    fps:                 5
    en_rotate:           1
    en_rotate2:          0

    en_preview:          1
    pre_width:           224
    pre_height:          1557
    en_raw_preview:      1

    en_small_video:      0
    small_video_width:   -1
    small_video_height:  -1

    en_large_video:      0
    large_video_width:   -1
    large_video_height:  -1

    en_snapshot:         0
    snap_width:          -1
    snap_height:         -1

    ae_mode:             off
    msv_exposure_min_us: 20
    msv_exposure_max_us: 33000
    standby_enabled:     0
    decimator:           5
    independent_exposure:0

cam #1
    name:                hires
    sensor type:         imx214
    isEnabled:           1
    camId:               1
    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:   4208
    large_video_height:  3120

    en_snapshot:         1
    snap_width:          4208
    snap_height:         3120

    ae_mode:             isp
    msv_exposure_min_us: 20
    msv_exposure_max_us: 33000
    standby_enabled:     0
    decimator:           1
    independent_exposure:0

cam #2
    name:                tracking
    sensor type:         ov7251
    isEnabled:           1
    camId:               2
    camId2:              -1
    fps:                 30
    en_rotate:           0
    en_rotate2:          0

    en_preview:          1
    pre_width:           640
    pre_height:          480
    en_raw_preview:      1

    en_small_video:      0
    small_video_width:   -1
    small_video_height:  -1

    en_large_video:      0
    large_video_width:   -1
    large_video_height:  -1

    en_snapshot:         0
    snap_width:          -1
    snap_height:         -1

    ae_mode:             lme_msv
    msv_exposure_min_us: 20
    msv_exposure_max_us: 33000
    standby_enabled:     0
    decimator:           1
    independent_exposure:0

fsync_en:            0
fsync_gpio:          109
=================================================================
connected to GPS mavlink pipe
Starting Camera: tof (id #0)
Connected to cpu-monitor
ERROR:   Camera 0 failed to find supported preview config: 224x1557
WARNING: Failed to start cam tof due to invalid resolution
WARNING: assuming cam is missing and trying to compensate
Starting Camera: hires (originally id #1) with id offset: 1
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
Starting Camera: tracking (originally id #2) with id offset: 1
setting ov7251 BLC register for cam id 1

------ voxl-camera-server: Started 2 of 3 cameras

------ voxl-camera-server: Camera server is now running
```

## Reply by Jetson Nano · 2024-08-02 04:51:09 UTC (in reply to Jetson Nano)

@modaltb @Alex-Kushleyev @Chad-Sweet Some help in this would be really appreciated.

Thanks!

## Reply by Alex Kushleyev (ModalAI staff) · 2024-08-06 16:07:11 UTC (in reply to Jetson Nano)

@Jetson-Nano , sorry for the delay. 

I have noticed that you are running the hires camera (IMX214) at full resolution 4208x3120@30fps (large video). We recently found that in some cases, this can cause the camera server to abort. Just to test the theory, can you please try reducing the FPS of hires camera from 30 to 25 and see if the issue goes away. If it does not go away, please try to disable the cameras one by one in `voxl-camera-server.conf` to try to isolate which one is causing the issue.

Alex

## Reply by Jetson Nano · 2024-08-07 04:11:57 UTC (in reply to Alex Kushleyev)

@Alex-Kushleyev I'll test the solution what you told for High res and get back, what about the ToF?

## Reply by Alex Kushleyev (ModalAI staff) · 2024-08-07 19:10:08 UTC (in reply to Jetson Nano)

@Jetson-Nano , I guess I am a little confused whether you have one or more issues right now. 

Let's focus on the TOF sensor. if you simply unplug all the sensors except for TOF and set up your `voxl-camera-server.conf` to only have TOF streaming enabled, does TOF work? If not, do you have more than one TOF sensor to check?

Alex

## Reply by Jetson Nano · 2024-08-08 03:21:03 UTC (in reply to Alex Kushleyev)

@Alex-Kushleyev In my current system I have a Tracking(ov7251), Highres(imx214) and a pmd-tof. I have removed and tracking and highres and had only only ToF connected. 

I setup the camera config for ToF only. The ToF was connected to J6 Lower through interposer to Voxl2. Using the command 
```
voxl-inspect-cam -a
``` 

I'm not able to see the details of ToF connected.

In the same setup I use another ToF sensor and check, initially it doesn't get detected but upon running the camera config config couple of times and after few mins post starting the ```voxl-camera-server```  through terminal, I get the ToF feed in VOXL portal.

## Reply by Alex Kushleyev (ModalAI staff) · 2024-08-08 18:50:50 UTC (in reply to Jetson Nano)

@Jetson-Nano , please note that when you attach a new TOF V1 sensor to VOXL2, the first time you run `voxl-camera-server`, it will try to see if there is a calibration file downloaded from the TOF sensor and stored on VOXL2. This calibration file contains device-specific information (lens calibration, etc) that is used by the TOF software library to process the raw data and create the point clouds. If the calibration file is not present on VOXL2 (it is checked by the serial number of the TOF device), the calibration file will be downloaded from the TOF sensor by `voxl-camera-server`. This download process takes about 1 minute to complete and it may seem like the camera server / TOF is not working at that time (it will just sit quietly, unless you run `voxl-camera-server -d 0` to enable the debug messages). 

I believe that this may be an issue you saw then you used "another ToF sensor" - perhaps you did not initially wait long enough for the calibration file to be downloaded by voxl-camera-server. But after the calibration file has been downloaded, the TOF sensor started working.

Alex

## Reply by Jetson Nano · 2024-08-09 17:31:26 UTC (in reply to Alex Kushleyev)

@Alex-Kushleyev Thanks for reverting. Where is the calibration file saved in VOXL2?

## Reply by Moderator (ModalAI staff) · 2024-08-20 17:49:23 UTC (in reply to Jetson Nano)

@Jetson-Nano you can see in the docs the calibration is stored in /data/modalai https://docs.modalai.com/calibrate-cameras/

## Reply by Jetson Nano · 2024-08-20 18:54:04 UTC (in reply to Moderator)

@Moderator I meant to ask, where are calibration files of ToF is located?

## Reply by Alex Kushleyev (ModalAI staff) · 2024-08-21 05:39:19 UTC (in reply to Jetson Nano)

@Jetson-Nano , for TOF V1, the calibration should be downloaded from the sensor when the camera server sees it for the very first time. The location should be `/data/misc/camera/<sensor_serial_number>`. 

TOF V2 does not store the data on VOXL2, instead the calibration data is downloaded every time and is used by the TOF processing library to generate the point clouds.

Alex

## Reply by Jetson Nano · 2024-08-21 05:45:47 UTC (in reply to Alex Kushleyev)

@Alex-Kushleyev Thanks for reverting. But not always I have compute compute connected to internet in ```station``` mode, rather it stays in ```softap```. In the case of latter, when I reconfigure the ```voxl-camera-server``` how will calib files be downloaded?

## Reply by Alex Kushleyev (ModalAI staff) · 2024-08-21 05:49:16 UTC (in reply to Jetson Nano)

@Jetson-Nano , the ToF V1 calibration file is downloaded from the sensor itself via i2c . No internet connection is required.
