# Tips to increase cable length of Time of flight camera

Source: https://forum.modalai.com/topic/3122/tips-to-increase-cable-length-of-time-of-flight-camera
Category: ESCs, Sensors and Accessories (https://forum.modalai.com/category/15/escs-sensors-and-accessories)
Tags: image-sensor
Posted: 2024-02-15 15:10:22 UTC by Aaky
Replies: 9 · Views: 1762

## Aaky · 2024-02-15 15:10:22 UTC

Hello community,
 I am using VOXL2 with latest SDK 1.1.2. In mu UAV, due to size restrictions I want to extend tracking and TOF camera cable lengths atleast near to 20 cms. I am aware of this [Y flex cable](https://www.modalai.com/collections/accessories/products/msu-m0084) which can extend both these cameras. Can [this cable](https://www.modalai.com/collections/accessories/products/m0036) also be used to extend TOF camera cable length further?

Second query, Is this [new tracking camera](https://www.modalai.com/collections/image-sensors/products/msu-m0149-1) fully compatible and supported on SDK 1.1.2 for QVIO purpose? Any hurdles please let me know.

## Reply by Moderator (ModalAI staff) · 2024-02-15 16:26:27 UTC

@Aaky 20cm is starting to push on the maximum length for MIPI. You can use the M0036 extension flex, but at some point it will not work any longer.

Yes, the new M0149 tracking sensor can be used for VIO. You will need to calibrate the intrinsics though

## Reply by Vinny (ModalAI staff) · 2024-02-15 21:42:10 UTC

Hi @Aaky 
ToF is also a very high current sensor, so using lengths beyond what we support may lead to failure, or severely reduced image quality.
20cms is VERY long for MIPI and most often will fail at those lengths without a re-driver/Re-timer circuit you will need to add in your system.

Hope this helps.

## Reply by Aaky · 2024-02-16 07:07:58 UTC (in reply to Vinny)

@Vinny @Moderator Thanks for the input. 

So, Will M0084 support new tracking camera MSU-M0149-1 and TOF camera together in new SDK 1.1.2?

I connected M0084 to J7 over VOXL2, on JU of M0084 I have connected TOF and over JL tracking camera (OV7251) is connected as per your defined configuration [over here](https://docs.modalai.com/voxl2-camera-configs/#162-supported-sensor-hardware-ids). But this isn't spawning up TOF camera. Following are the logs with Verbosity enabled on voxl-camera-server.

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

cam #0
    name:                tof
    sensor type:         pmd-tof
    isEnabled:           1
    camId:               0
    camId2:              -1
    fps:                 5
    en_rotate:           0
    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
    standby_enabled:     0
    decimator:           5
    independent_exposure:0

cam #1
    name:                tracking
    sensor type:         ov7251
    isEnabled:           1
    camId:               1
    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
    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: 1

DEBUG:   Cam idx: 0, Cam slot: 2, Slave Address: 0x00E2, Sensor Id: 0x7750
GPS server Connected 
DEBUG:   Connected to cpu-monitor
DEBUG:   ------ voxl-camera-server: Starting 2 cameras
Starting Camera: tof (id #0)
DEBUG:   Checking Gain limits for Camera: tof
Using gain limits min: 54 max: 3451
DEBUG:   cam ID 0 checking for fmt:   38  w:  224 h: 1557 o:   0
DEBUG:   i:  0 fmt: 34 w: 640 h: 480 o:0
DEBUG:   i:  4 fmt: 34 w: 640 h: 480 o:1
DEBUG:   i:  8 fmt: 35 w: 640 h: 480 o:0
DEBUG:   i: 12 fmt: 35 w: 640 h: 480 o:1
DEBUG:   i: 16 fmt: 33 w: 640 h: 480 o:0
DEBUG:   i: 20 fmt: 34 w: 640 h: 400 o:0
DEBUG:   i: 24 fmt: 34 w: 640 h: 400 o:1
DEBUG:   i: 28 fmt: 35 w: 640 h: 400 o:0
DEBUG:   i: 32 fmt: 35 w: 640 h: 400 o:1
DEBUG:   i: 36 fmt: 33 w: 640 h: 400 o:0
DEBUG:   i: 40 fmt: 34 w: 640 h: 360 o:0
DEBUG:   i: 44 fmt: 34 w: 640 h: 360 o:1
DEBUG:   i: 48 fmt: 35 w: 640 h: 360 o:0
DEBUG:   i: 52 fmt: 35 w: 640 h: 360 o:1
DEBUG:   i: 56 fmt: 33 w: 640 h: 360 o:0
DEBUG:   i: 60 fmt: 34 w: 352 h: 288 o:0
DEBUG:   i: 64 fmt: 34 w: 352 h: 288 o:1
DEBUG:   i: 68 fmt: 35 w: 352 h: 288 o:0
DEBUG:   i: 72 fmt: 35 w: 352 h: 288 o:1
DEBUG:   i: 76 fmt: 33 w: 352 h: 288 o:0
DEBUG:   i: 80 fmt: 34 w: 320 h: 240 o:0
DEBUG:   i: 84 fmt: 34 w: 320 h: 240 o:1
DEBUG:   i: 88 fmt: 35 w: 320 h: 240 o:0
DEBUG:   i: 92 fmt: 35 w: 320 h: 240 o:1
DEBUG:   i: 96 fmt: 33 w: 320 h: 240 o:0
DEBUG:   i:100 fmt: 34 w: 240 h: 320 o:0
DEBUG:   i:104 fmt: 34 w: 240 h: 320 o:1
DEBUG:   i:108 fmt: 35 w: 240 h: 320 o:0
DEBUG:   i:112 fmt: 35 w: 240 h: 320 o:1
DEBUG:   i:116 fmt: 33 w: 240 h: 320 o:0
DEBUG:   i:120 fmt: 34 w: 176 h: 144 o:0
DEBUG:   i:124 fmt: 34 w: 176 h: 144 o:1
DEBUG:   i:128 fmt: 35 w: 176 h: 144 o:0
DEBUG:   i:132 fmt: 35 w: 176 h: 144 o:1
DEBUG:   i:136 fmt: 33 w: 176 h: 144 o:0
DEBUG:   i:140 fmt: 37 w: 640 h: 480 o:0
DEBUG:   i:144 fmt: 38 w: 640 h: 480 o:0
DEBUG:   i:148 fmt: 32 w: 640 h: 480 o:0
DEBUG:   i:152 fmt: 36 w: 640 h: 480 o:0
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: tracking (originally id #1) with id offset: 1
DEBUG:   Checking Gain limits for Camera: tracking
Using gain limits min: 54 max: 3451
DEBUG:   cam ID 0 checking for fmt:   37  w:  640 h:  480 o:   0
DEBUG:   i:  0 fmt: 34 w: 640 h: 480 o:0
DEBUG:   i:  4 fmt: 34 w: 640 h: 480 o:1
DEBUG:   i:  8 fmt: 35 w: 640 h: 480 o:0
DEBUG:   i: 12 fmt: 35 w: 640 h: 480 o:1
DEBUG:   i: 16 fmt: 33 w: 640 h: 480 o:0
DEBUG:   i: 20 fmt: 34 w: 640 h: 400 o:0
DEBUG:   i: 24 fmt: 34 w: 640 h: 400 o:1
DEBUG:   i: 28 fmt: 35 w: 640 h: 400 o:0
DEBUG:   i: 32 fmt: 35 w: 640 h: 400 o:1
DEBUG:   i: 36 fmt: 33 w: 640 h: 400 o:0
DEBUG:   i: 40 fmt: 34 w: 640 h: 360 o:0
DEBUG:   i: 44 fmt: 34 w: 640 h: 360 o:1
DEBUG:   i: 48 fmt: 35 w: 640 h: 360 o:0
DEBUG:   i: 52 fmt: 35 w: 640 h: 360 o:1
DEBUG:   i: 56 fmt: 33 w: 640 h: 360 o:0
DEBUG:   i: 60 fmt: 34 w: 352 h: 288 o:0
DEBUG:   i: 64 fmt: 34 w: 352 h: 288 o:1
DEBUG:   i: 68 fmt: 35 w: 352 h: 288 o:0
DEBUG:   i: 72 fmt: 35 w: 352 h: 288 o:1
DEBUG:   i: 76 fmt: 33 w: 352 h: 288 o:0
DEBUG:   i: 80 fmt: 34 w: 320 h: 240 o:0
DEBUG:   i: 84 fmt: 34 w: 320 h: 240 o:1
DEBUG:   i: 88 fmt: 35 w: 320 h: 240 o:0
DEBUG:   i: 92 fmt: 35 w: 320 h: 240 o:1
DEBUG:   i: 96 fmt: 33 w: 320 h: 240 o:0
DEBUG:   i:100 fmt: 34 w: 240 h: 320 o:0
DEBUG:   i:104 fmt: 34 w: 240 h: 320 o:1
DEBUG:   i:108 fmt: 35 w: 240 h: 320 o:0
DEBUG:   i:112 fmt: 35 w: 240 h: 320 o:1
DEBUG:   i:116 fmt: 33 w: 240 h: 320 o:0
DEBUG:   i:120 fmt: 34 w: 176 h: 144 o:0
DEBUG:   i:124 fmt: 34 w: 176 h: 144 o:1
DEBUG:   i:128 fmt: 35 w: 176 h: 144 o:0
DEBUG:   i:132 fmt: 35 w: 176 h: 144 o:1
DEBUG:   i:136 fmt: 33 w: 176 h: 144 o:0
DEBUG:   i:140 fmt: 37 w: 640 h: 480 o:0
DEBUG:   i:144 fmt: 38 w: 640 h: 480 o:0
DEBUG:   i:148 fmt: 32 w: 640 h: 480 o:0
DEBUG:   i:152 fmt: 36 w: 640 h: 480 o:0
VERBOSE: Successfully found configuration match for camera 0: 640x480
VERBOSE: Adding preview stream for camera: 0
DEBUG:   Converted gralloc flags 0x20900 to GBM flags 0x1400000
VERBOSE: Dumping GBM flags
DEBUG:   	Found flag GBM_BO_USAGE_CAMERA_WRITE_QTI	
DEBUG:   	Found flag GBM_BO_USAGE_HW_COMPOSER_QTI	
VERBOSE: Opened GBM fd
gbm_create_device(156): Info: backend name is: msm_drm
VERBOSE: Created GBM device
DEBUG:   Allocated BO with width=640 height=480 stride=640 aligned_w=800 aligned_h=480 size=385024 flags=0x20900 format=GBM_FORMAT_RAW10
DEBUG:   Converted gralloc flags 0x20900 to GBM flags 0x1400000
VERBOSE: Dumping GBM flags
DEBUG:   	Found flag GBM_BO_USAGE_CAMERA_WRITE_QTI	
DEBUG:   	Found flag GBM_BO_USAGE_HW_COMPOSER_QTI	
DEBUG:   Allocated BO with width=640 height=480 stride=640 aligned_w=800 aligned_h=480 size=385024 flags=0x20900 format=GBM_FORMAT_RAW10
DEBUG:   Converted gralloc flags 0x20900 to GBM flags 0x1400000
VERBOSE: Dumping GBM flags
DEBUG:   	Found flag GBM_BO_USAGE_CAMERA_WRITE_QTI	
DEBUG:   	Found flag GBM_BO_USAGE_HW_COMPOSER_QTI	
DEBUG:   Allocated BO with width=640 height=480 stride=640 aligned_w=800 aligned_h=480 size=385024 flags=0x20900 format=GBM_FORMAT_RAW10
DEBUG:   Converted gralloc flags 0x20900 to GBM flags 0x1400000
VERBOSE: Dumping GBM flags
DEBUG:   	Found flag GBM_BO_USAGE_CAMERA_WRITE_QTI	
DEBUG:   	Found flag GBM_BO_USAGE_HW_COMPOSER_QTI	
DEBUG:   Allocated BO with width=640 height=480 stride=640 aligned_w=800 aligned_h=480 size=385024 flags=0x20900 format=GBM_FORMAT_RAW10
DEBUG:   Converted gralloc flags 0x20900 to GBM flags 0x1400000
VERBOSE: Dumping GBM flags
DEBUG:   	Found flag GBM_BO_USAGE_CAMERA_WRITE_QTI	
DEBUG:   	Found flag GBM_BO_USAGE_HW_COMPOSER_QTI	
DEBUG:   Allocated BO with width=640 height=480 stride=640 aligned_w=800 aligned_h=480 size=385024 flags=0x20900 format=GBM_FORMAT_RAW10
DEBUG:   Converted gralloc flags 0x20900 to GBM flags 0x1400000
VERBOSE: Dumping GBM flags
DEBUG:   	Found flag GBM_BO_USAGE_CAMERA_WRITE_QTI	
DEBUG:   	Found flag GBM_BO_USAGE_HW_COMPOSER_QTI	
DEBUG:   Allocated BO with width=640 height=480 stride=640 aligned_w=800 aligned_h=480 size=385024 flags=0x20900 format=GBM_FORMAT_RAW10
DEBUG:   Converted gralloc flags 0x20900 to GBM flags 0x1400000
VERBOSE: Dumping GBM flags
DEBUG:   	Found flag GBM_BO_USAGE_CAMERA_WRITE_QTI	
DEBUG:   	Found flag GBM_BO_USAGE_HW_COMPOSER_QTI	
DEBUG:   Allocated BO with width=640 height=480 stride=640 aligned_w=800 aligned_h=480 size=385024 flags=0x20900 format=GBM_FORMAT_RAW10
DEBUG:   Converted gralloc flags 0x20900 to GBM flags 0x1400000
VERBOSE: Dumping GBM flags
DEBUG:   	Found flag GBM_BO_USAGE_CAMERA_WRITE_QTI	
DEBUG:   	Found flag GBM_BO_USAGE_HW_COMPOSER_QTI	
DEBUG:   Allocated BO with width=640 height=480 stride=640 aligned_w=800 aligned_h=480 size=385024 flags=0x20900 format=GBM_FORMAT_RAW10
DEBUG:   Converted gralloc flags 0x20900 to GBM flags 0x1400000
VERBOSE: Dumping GBM flags
DEBUG:   	Found flag GBM_BO_USAGE_CAMERA_WRITE_QTI	
DEBUG:   	Found flag GBM_BO_USAGE_HW_COMPOSER_QTI	
DEBUG:   Allocated BO with width=640 height=480 stride=640 aligned_w=800 aligned_h=480 size=385024 flags=0x20900 format=GBM_FORMAT_RAW10
DEBUG:   Converted gralloc flags 0x20900 to GBM flags 0x1400000
VERBOSE: Dumping GBM flags
DEBUG:   	Found flag GBM_BO_USAGE_CAMERA_WRITE_QTI	
DEBUG:   	Found flag GBM_BO_USAGE_HW_COMPOSER_QTI	
DEBUG:   Allocated BO with width=640 height=480 stride=640 aligned_w=800 aligned_h=480 size=385024 flags=0x20900 format=GBM_FORMAT_RAW10
DEBUG:   Converted gralloc flags 0x20900 to GBM flags 0x1400000
VERBOSE: Dumping GBM flags
DEBUG:   	Found flag GBM_BO_USAGE_CAMERA_WRITE_QTI	
DEBUG:   	Found flag GBM_BO_USAGE_HW_COMPOSER_QTI	
DEBUG:   Allocated BO with width=640 height=480 stride=640 aligned_w=800 aligned_h=480 size=385024 flags=0x20900 format=GBM_FORMAT_RAW10
DEBUG:   Converted gralloc flags 0x20900 to GBM flags 0x1400000
VERBOSE: Dumping GBM flags
DEBUG:   	Found flag GBM_BO_USAGE_CAMERA_WRITE_QTI	
DEBUG:   	Found flag GBM_BO_USAGE_HW_COMPOSER_QTI	
DEBUG:   Allocated BO with width=640 height=480 stride=640 aligned_w=800 aligned_h=480 size=385024 flags=0x20900 format=GBM_FORMAT_RAW10
DEBUG:   Converted gralloc flags 0x20900 to GBM flags 0x1400000
VERBOSE: Dumping GBM flags
DEBUG:   	Found flag GBM_BO_USAGE_CAMERA_WRITE_QTI	
DEBUG:   	Found flag GBM_BO_USAGE_HW_COMPOSER_QTI	
DEBUG:   Allocated BO with width=640 height=480 stride=640 aligned_w=800 aligned_h=480 size=385024 flags=0x20900 format=GBM_FORMAT_RAW10
DEBUG:   Converted gralloc flags 0x20900 to GBM flags 0x1400000
VERBOSE: Dumping GBM flags
DEBUG:   	Found flag GBM_BO_USAGE_CAMERA_WRITE_QTI	
DEBUG:   	Found flag GBM_BO_USAGE_HW_COMPOSER_QTI	
DEBUG:   Allocated BO with width=640 height=480 stride=640 aligned_w=800 aligned_h=480 size=385024 flags=0x20900 format=GBM_FORMAT_RAW10
DEBUG:   Converted gralloc flags 0x20900 to GBM flags 0x1400000
VERBOSE: Dumping GBM flags
DEBUG:   	Found flag GBM_BO_USAGE_CAMERA_WRITE_QTI	
DEBUG:   	Found flag GBM_BO_USAGE_HW_COMPOSER_QTI	
DEBUG:   Allocated BO with width=640 height=480 stride=640 aligned_w=800 aligned_h=480 size=385024 flags=0x20900 format=GBM_FORMAT_RAW10
DEBUG:   Converted gralloc flags 0x20900 to GBM flags 0x1400000
VERBOSE: Dumping GBM flags
DEBUG:   	Found flag GBM_BO_USAGE_CAMERA_WRITE_QTI	
DEBUG:   	Found flag GBM_BO_USAGE_HW_COMPOSER_QTI	
DEBUG:   Allocated BO with width=640 height=480 stride=640 aligned_w=800 aligned_h=480 size=385024 flags=0x20900 format=GBM_FORMAT_RAW10
DEBUG:   Successfully set up pipeline for stream: PREVIEW
setting ov7251 BLC register for cam id 0
VERBOSE: sid: 0x00E2, addr: 0x4005, data: 0x0002
VERBOSE: sid: 0x00E2, addr: 0x3820, data: 0x0000
VERBOSE: sid: 0x00E2, addr: 0x3821, data: 0x0000
VERBOSE: Entered thread: cam0-request(tid: 2370)
VERBOSE: Entered thread: cam0-result(tid: 2371)
DEBUG:   Started Camera: tracking

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

------ voxl-camera-server: Camera server is now running
VERBOSE: setting hal3 exposure for tracking     5259763   800
VERBOSE: added request for preview stream
VERBOSE: Sending request for frame 0 for camera tracking for 1 streams
VERBOSE: Received result from HAl3 for frame number 0
VERBOSE: Received 0 buffers from camera tracking, partial result:1
VERBOSE: finished sending request for frame 0 for camera tracking
VERBOSE: returning from SendOneCaptureRequest for frame 1 for camera tracking
VERBOSE: setting hal3 exposure for tracking     5259763   800
VERBOSE: added request for preview stream
VERBOSE: Sending request for frame 1 for camera tracking for 1 streams
VERBOSE: finished sending request for frame 1 for camera tracking
VERBOSE: returning from SendOneCaptureRequest for frame 2 for camera tracking
VERBOSE: setting hal3 exposure for tracking     5259763   800
VERBOSE: added request for preview stream
VERBOSE: Sending request for frame 2 for camera tracking for 1 streams
VERBOSE: finished sending request for frame 2 for camera tracking
VERBOSE: returning from SendOneCaptureRequest for frame 3 for camera tracking
VERBOSE: setting hal3 exposure for tracking     5259763   800
VERBOSE: added request for preview stream
VERBOSE: Received result from HAl3 for frame number 1
VERBOSE: Received 0 buffers from camera tracking, partial result:1
VERBOSE: Sending request for frame 3 for camera tracking for 1 streams
VERBOSE: Received result from HAl3 for frame number 2
VERBOSE: Received 0 buffers from camera tracking, partial result:1
VERBOSE: finished sending request for frame 3 for camera tracking
VERBOSE: returning from SendOneCaptureRequest for frame 4 for camera tracking
VERBOSE: setting hal3 exposure for tracking     5259763   800
VERBOSE: added request for preview stream
VERBOSE: Sending request for frame 4 for camera tracking for 1 streams
VERBOSE: finished sending request for frame 4 for camera tracking
VERBOSE: returning from SendOneCaptureRequest for frame 5 for camera tracking
VERBOSE: setting hal3 exposure for tracking     5259763   800
VERBOSE: added request for preview stream
VERBOSE: Sending request for frame 5 for camera tracking for 1 streams
VERBOSE: Received result from HAl3 for frame number 3
VERBOSE: Received 0 buffers from camera tracking, partial result:1
VERBOSE: Received result from HAl3 for frame number 4
VERBOSE: Received 0 buffers from camera tracking, partial result:1
VERBOSE: Received result from HAl3 for frame number 0
VERBOSE: Received 0 buffers from camera tracking, partial result:2
VERBOSE: Received metadata for frame 0 from camera tracking
VERBOSE: 	Timestamp: 96792200134
VERBOSE: 	Gain: 799
VERBOSE: 	Exposure: 5259763
VERBOSE: Received result from HAl3 for frame number 0
VERBOSE: Received 1 buffers from camera tracking, partial result:0
VERBOSE: Received output buffer 0 from camera tracking
VERBOSE: tracking procesing new buffer
VERBOSE: Camera: tracking processing preview frame
DEBUG:   setting thread affinity for cam tracking preview
VERBOSE: finished sending request for frame 5 for camera tracking
VERBOSE: returning from SendOneCaptureRequest for frame 6 for camera tracking
VERBOSE: setting hal3 exposure for tracking     5259763   800
VERBOSE: added request for preview stream
VERBOSE: Sending request for frame 6 for camera tracking for 1 streams
VERBOSE: publishing raw preview frame for mono camera tracking
VERBOSE: Received result from HAl3 for frame number 5
VERBOSE: Received 0 buffers from camera tracking, partial result:1
VERBOSE: Received result from HAl3 for frame number 1
VERBOSE: Received 0 buffers from camera tracking, partial result:2
VERBOSE: Received metadata for frame 1 from camera tracking
VERBOSE: 	Timestamp: 96858901957
VERBOSE: 	Gain: 799
VERBOSE: 	Exposure: 5259763
VERBOSE: Received result from HAl3 for frame number 1
VERBOSE: Received 1 buffers from camera tracking, partial result:0
VERBOSE: Received output buffer 1 from camera tracking
VERBOSE: finished sending request for frame 6 for camera tracking
VERBOSE: returning from SendOneCaptureRequest for frame 7 for camera tracking
VERBOSE: setting hal3 exposure for tracking    24503468   799
VERBOSE: added request for preview stream
VERBOSE: Sending request for frame 7 for camera tracking for 1 streams
VERBOSE: tracking procesing new buffer
VERBOSE: Camera: tracking processing preview frame
DEBUG:   tracking checking to see if it is raw8 or raw 10
DEBUG:   Frame was actually 8 bit, sending as is
VERBOSE: publishing raw preview frame for mono camera tracking
VERBOSE: Received result from HAl3 for frame number 6
VERBOSE: Received 0 buffers from camera tracking, partial result:1
VERBOSE: Received result from HAl3 for frame number 2
VERBOSE: Received 0 buffers from camera tracking, partial result:2
VERBOSE: Received metadata for frame 2 from camera tracking
VERBOSE: 	Timestamp: 96892174613
VERBOSE: 	Gain: 799
VERBOSE: 	Exposure: 5259763
VERBOSE: Received result from HAl3 for frame number 2
VERBOSE: Received 1 buffers from camera tracking, partial result:0
VERBOSE: Received output buffer 2 from camera tracking
VERBOSE: tracking procesing new buffer
VERBOSE: Camera: tracking processing preview frame
VERBOSE: publishing raw preview frame for mono camera tracking
VERBOSE: finished sending request for frame 7 for camera tracking
VERBOSE: returning from SendOneCaptureRequest for frame 8 for camera tracking
VERBOSE: setting hal3 exposure for tracking    26995516  1634
VERBOSE: added request for preview stream
VERBOSE: Sending request for frame 8 for camera tracking for 1 streams
VERBOSE: Received result from HAl3 for frame number 7
VERBOSE: Received 0 buffers from camera tracking, partial result:1
VERBOSE: Received result from HAl3 for frame number 3
VERBOSE: Received 0 buffers from camera tracking, partial result:2
VERBOSE: Received metadata for frame 3 from camera tracking
VERBOSE: 	Timestamp: 96925509613
VERBOSE: 	Gain: 799
VERBOSE: 	Exposure: 5259763
VERBOSE: Received result from HAl3 for frame number 3
VERBOSE: Received 1 buffers from camera tracking, partial result:0
VERBOSE: Received output buffer 3 from camera tracking
VERBOSE: finished sending request for frame 8 for camera tracking
VERBOSE: returning from SendOneCaptureRequest for frame 9 for camera tracking
VERBOSE: setting hal3 exposure for tracking    26995516  1634
VERBOSE: added request for preview stream
VERBOSE: Sending request for frame 9 for camera tracking for 1 streams
VERBOSE: tracking procesing new buffer
VERBOSE: Camera: tracking processing preview frame
VERBOSE: publishing raw preview frame for mono camera tracking
VERBOSE: Received result from HAl3 for frame number 8
VERBOSE: Received 0 buffers from camera tracking, partial result:1
VERBOSE: Received result from HAl3 for frame number 4
VERBOSE: Received 0 buffers from camera tracking, partial result:2
VERBOSE: Received metadata for frame 4 from camera tracking
VERBOSE: 	Timestamp: 96958834926
VERBOSE: 	Gain: 799
VERBOSE: 	Exposure: 5259763
VERBOSE: Received result from HAl3 for frame number 4
VERBOSE: Received 1 buffers from camera tracking, partial result:0
VERBOSE: Received output buffer 4 from camera tracking
VERBOSE: finished sending request for frame 9 for camera tracking
VERBOSE: returning from SendOneCaptureRequest for frame 10 for camera tracking
VERBOSE: setting hal3 exposure for tracking    27581204  1648
VERBOSE: added request for preview stream
VERBOSE: Sending request for frame 10 for camera tracking for 1 streams
VERBOSE: tracking procesing new buffer
VERBOSE: Camera: tracking processing preview frame
VERBOSE: publishing raw preview frame for mono camera tracking
VERBOSE: Received result from HAl3 for frame number 9
VERBOSE: Received 0 buffers from camera tracking, partial result:1
VERBOSE: Received result from HAl3 for frame number 5
VERBOSE: Received 0 buffers from camera tracking, partial result:2
VERBOSE: Received metadata for frame 5 from camera tracking
VERBOSE: 	Timestamp: 96992163051
VERBOSE: 	Gain: 799
VERBOSE: 	Exposure: 5259763
VERBOSE: Received result from HAl3 for frame number 5
VERBOSE: Received 1 buffers from camera tracking, partial result:0
VERBOSE: Received output buffer 5 from camera tracking
VERBOSE: finished sending request for frame 10 for camera tracking
VERBOSE: returning from SendOneCaptureRequest for frame 11 for camera tracking
VERBOSE: setting hal3 exposure for tracking    27892654  1655
VERBOSE: added request for preview stream
VERBOSE: Sending request for frame 11 for camera tracking for 1 streams
VERBOSE: tracking procesing new buffer
VERBOSE: Camera: tracking processing preview frame
VERBOSE: publishing raw preview frame for mono camera tracking
VERBOSE: Received result from HAl3 for frame number 10
VERBOSE: Received 0 buffers from camera tracking, partial result:1
VERBOSE: Received result from HAl3 for frame number 6
VERBOSE: Received 0 buffers from camera tracking, partial result:2
VERBOSE: Received metadata for frame 6 from camera tracking
VERBOSE: 	Timestamp: 97025491696
VERBOSE: 	Gain: 799
VERBOSE: 	Exposure: 5259763
VERBOSE: Received result from HAl3 for frame number 6
VERBOSE: Received 1 buffers from camera tracking, partial result:0
VERBOSE: Received output buffer 6 from camera tracking
VERBOSE: finished sending request for frame 11 for camera tracking
VERBOSE: returning from SendOneCaptureRequest for frame 12 for camera tracking
VERBOSE: setting hal3 exposure for tracking    28544998  1659
VERBOSE: added request for preview stream
VERBOSE: Sending request for frame 12 for camera tracking for 1 streams
VERBOSE: tracking procesing new buffer
VERBOSE: Camera: tracking processing preview frame
VERBOSE: publishing raw preview frame for mono camera tracking
VERBOSE: Received result from HAl3 for frame number 11
VERBOSE: Received 0 buffers from camera tracking, partial result:1
VERBOSE: Received result from HAl3 for frame number 7
VERBOSE: Received 0 buffers from camera tracking, partial result:2
VERBOSE: Received metadata for frame 7 from camera tracking
VERBOSE: 	Timestamp: 97039590700
VERBOSE: 	Gain: 799
VERBOSE: 	Exposure: 24503468
VERBOSE: Received result from HAl3 for frame number 7
VERBOSE: Received 1 buffers from camera tracking, partial result:0
VERBOSE: Received output buffer 7 from camera tracking
VERBOSE: finished sending request for frame 12 for camera tracking
VERBOSE: returning from SendOneCaptureRequest for frame 13 for camera tracking
VERBOSE: setting hal3 exposure for tracking    28519818  1667
VERBOSE: added request for preview stream
VERBOSE: Sending request for frame 13 for camera tracking for 1 streams
VERBOSE: tracking procesing new buffer
VERBOSE: Camera: tracking processing preview frame
VERBOSE: publishing raw preview frame for mono camera tracking
VERBOSE: Received result from HAl3 for frame number 12
VERBOSE: Received 0 buffers from camera tracking, partial result:1
VERBOSE: Received result from HAl3 for frame number 8
VERBOSE: Received 0 buffers from camera tracking, partial result:2
VERBOSE: Received metadata for frame 8 from camera tracking
VERBOSE: 	Timestamp: 97070415475
VERBOSE: 	Gain: 1632
VERBOSE: 	Exposure: 26995516
VERBOSE: Received result from HAl3 for frame number 8
VERBOSE: Received 1 buffers from camera tracking, partial result:0
VERBOSE: Received output buffer 8 from camera tracking
VERBOSE: finished sending request for frame 13 for camera tracking
VERBOSE: returning from SendOneCaptureRequest for frame 14 for camera tracking
VERBOSE: setting hal3 exposure for tracking    33000000  1666
VERBOSE: added request for preview stream
VERBOSE: Sending request for frame 14 for camera tracking for 1 streams
VERBOSE: tracking procesing new buffer
VERBOSE: Camera: tracking processing preview frame
```
It seems to be TOF camera resolution problem. But I dont know where exactly to look for to set appropriate resolution since voxl-camera-server.conf dosent have TOF camera resolution mentioned.
Please help on above both queries.

## Reply by Alex Kushleyev (ModalAI staff) · 2024-02-16 18:24:10 UTC (in reply to Aaky)

@Aaky , if you connected TOF to JU of M0084 and M0084 is connected to J7 of VOXL, then TOF will be in camera slot #3. This means that you need to place `com.qti.sensormodule.irs1645_3.bin` (note `3` at the end) in `/usr/lib/camera/` . You can find all `sensormodule` files in `/usr/share/modalai/chi-cdk/`

Your log shows that your OV7251 camera has been found in camera slot #2, which is correct because it is connected to M0084 JL . 

JL stands for `lower` and JU stands for `upper` camera slot.

## Reply by Aaky · 2024-02-17 06:23:07 UTC (in reply to Alex Kushleyev)

@Alex-Kushleyev Thanks for your input.
I followed your instructions to place "com.qti.sensormodule.irs1645_3.bin" in "/usr/lib/camera/". After this there was slight improvement I guess where voxl-camera-server was able to detect two cameras but still it fails to start TOF camera due to resolution problem. Please help ahead. I have connected JU of M0084 to TOF and JL to tracking camera.

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

cam #0
    name:                tof
    sensor type:         pmd-tof
    isEnabled:           1
    camId:               0
    camId2:              -1
    fps:                 5
    en_rotate:           0
    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
    standby_enabled:     0
    decimator:           5
    independent_exposure:0

cam #1
    name:                tracking
    sensor type:         ov7251
    isEnabled:           1
    camId:               1
    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
    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: 2

DEBUG:   Cam idx: 0, Cam slot: 2, Slave Address: 0x00E2, Sensor Id: 0x7750
DEBUG:   Cam idx: 1, Cam slot: 3, Slave Address: 0x007A, Sensor Id: 0x003D
GPS server Connected 
DEBUG:   Connected to cpu-monitor
DEBUG:   ------ voxl-camera-server: Starting 2 cameras
Starting Camera: tof (id #0)
DEBUG:   Checking Gain limits for Camera: tof
Using gain limits min: 54 max: 3451
DEBUG:   cam ID 0 checking for fmt:   38  w:  224 h: 1557 o:   0
DEBUG:   i:  0 fmt: 34 w: 640 h: 480 o:0
DEBUG:   i:  4 fmt: 34 w: 640 h: 480 o:1
DEBUG:   i:  8 fmt: 35 w: 640 h: 480 o:0
DEBUG:   i: 12 fmt: 35 w: 640 h: 480 o:1
DEBUG:   i: 16 fmt: 33 w: 640 h: 480 o:0
DEBUG:   i: 20 fmt: 34 w: 640 h: 400 o:0
DEBUG:   i: 24 fmt: 34 w: 640 h: 400 o:1
DEBUG:   i: 28 fmt: 35 w: 640 h: 400 o:0
DEBUG:   i: 32 fmt: 35 w: 640 h: 400 o:1
DEBUG:   i: 36 fmt: 33 w: 640 h: 400 o:0
DEBUG:   i: 40 fmt: 34 w: 640 h: 360 o:0
DEBUG:   i: 44 fmt: 34 w: 640 h: 360 o:1
DEBUG:   i: 48 fmt: 35 w: 640 h: 360 o:0
DEBUG:   i: 52 fmt: 35 w: 640 h: 360 o:1
DEBUG:   i: 56 fmt: 33 w: 640 h: 360 o:0
DEBUG:   i: 60 fmt: 34 w: 352 h: 288 o:0
DEBUG:   i: 64 fmt: 34 w: 352 h: 288 o:1
DEBUG:   i: 68 fmt: 35 w: 352 h: 288 o:0
DEBUG:   i: 72 fmt: 35 w: 352 h: 288 o:1
DEBUG:   i: 76 fmt: 33 w: 352 h: 288 o:0
DEBUG:   i: 80 fmt: 34 w: 320 h: 240 o:0
DEBUG:   i: 84 fmt: 34 w: 320 h: 240 o:1
DEBUG:   i: 88 fmt: 35 w: 320 h: 240 o:0
DEBUG:   i: 92 fmt: 35 w: 320 h: 240 o:1
DEBUG:   i: 96 fmt: 33 w: 320 h: 240 o:0
DEBUG:   i:100 fmt: 34 w: 240 h: 320 o:0
DEBUG:   i:104 fmt: 34 w: 240 h: 320 o:1
DEBUG:   i:108 fmt: 35 w: 240 h: 320 o:0
DEBUG:   i:112 fmt: 35 w: 240 h: 320 o:1
DEBUG:   i:116 fmt: 33 w: 240 h: 320 o:0
DEBUG:   i:120 fmt: 34 w: 176 h: 144 o:0
DEBUG:   i:124 fmt: 34 w: 176 h: 144 o:1
DEBUG:   i:128 fmt: 35 w: 176 h: 144 o:0
DEBUG:   i:132 fmt: 35 w: 176 h: 144 o:1
DEBUG:   i:136 fmt: 33 w: 176 h: 144 o:0
DEBUG:   i:140 fmt: 37 w: 640 h: 480 o:0
DEBUG:   i:144 fmt: 38 w: 640 h: 480 o:0
DEBUG:   i:148 fmt: 32 w: 640 h: 480 o:0
DEBUG:   i:152 fmt: 36 w: 640 h: 480 o:0
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: tracking (originally id #1) with id offset: 1
DEBUG:   Checking Gain limits for Camera: tracking
Using gain limits min: 54 max: 3451
DEBUG:   cam ID 0 checking for fmt:   37  w:  640 h:  480 o:   0
DEBUG:   i:  0 fmt: 34 w: 640 h: 480 o:0
DEBUG:   i:  4 fmt: 34 w: 640 h: 480 o:1
DEBUG:   i:  8 fmt: 35 w: 640 h: 480 o:0
DEBUG:   i: 12 fmt: 35 w: 640 h: 480 o:1
DEBUG:   i: 16 fmt: 33 w: 640 h: 480 o:0
DEBUG:   i: 20 fmt: 34 w: 640 h: 400 o:0
DEBUG:   i: 24 fmt: 34 w: 640 h: 400 o:1
DEBUG:   i: 28 fmt: 35 w: 640 h: 400 o:0
DEBUG:   i: 32 fmt: 35 w: 640 h: 400 o:1
DEBUG:   i: 36 fmt: 33 w: 640 h: 400 o:0
DEBUG:   i: 40 fmt: 34 w: 640 h: 360 o:0
DEBUG:   i: 44 fmt: 34 w: 640 h: 360 o:1
DEBUG:   i: 48 fmt: 35 w: 640 h: 360 o:0
DEBUG:   i: 52 fmt: 35 w: 640 h: 360 o:1
DEBUG:   i: 56 fmt: 33 w: 640 h: 360 o:0
DEBUG:   i: 60 fmt: 34 w: 352 h: 288 o:0
DEBUG:   i: 64 fmt: 34 w: 352 h: 288 o:1
DEBUG:   i: 68 fmt: 35 w: 352 h: 288 o:0
DEBUG:   i: 72 fmt: 35 w: 352 h: 288 o:1
DEBUG:   i: 76 fmt: 33 w: 352 h: 288 o:0
DEBUG:   i: 80 fmt: 34 w: 320 h: 240 o:0
DEBUG:   i: 84 fmt: 34 w: 320 h: 240 o:1
DEBUG:   i: 88 fmt: 35 w: 320 h: 240 o:0
DEBUG:   i: 92 fmt: 35 w: 320 h: 240 o:1
DEBUG:   i: 96 fmt: 33 w: 320 h: 240 o:0
DEBUG:   i:100 fmt: 34 w: 240 h: 320 o:0
DEBUG:   i:104 fmt: 34 w: 240 h: 320 o:1
DEBUG:   i:108 fmt: 35 w: 240 h: 320 o:0
DEBUG:   i:112 fmt: 35 w: 240 h: 320 o:1
DEBUG:   i:116 fmt: 33 w: 240 h: 320 o:0
DEBUG:   i:120 fmt: 34 w: 176 h: 144 o:0
DEBUG:   i:124 fmt: 34 w: 176 h: 144 o:1
DEBUG:   i:128 fmt: 35 w: 176 h: 144 o:0
DEBUG:   i:132 fmt: 35 w: 176 h: 144 o:1
DEBUG:   i:136 fmt: 33 w: 176 h: 144 o:0
DEBUG:   i:140 fmt: 37 w: 640 h: 480 o:0
DEBUG:   i:144 fmt: 38 w: 640 h: 480 o:0
DEBUG:   i:148 fmt: 32 w: 640 h: 480 o:0
DEBUG:   i:152 fmt: 36 w: 640 h: 480 o:0
VERBOSE: Successfully found configuration match for camera 0: 640x480
VERBOSE: Adding preview stream for camera: 0
DEBUG:   Converted gralloc flags 0x20900 to GBM flags 0x1400000
VERBOSE: Dumping GBM flags
DEBUG:   	Found flag GBM_BO_USAGE_CAMERA_WRITE_QTI	
DEBUG:   	Found flag GBM_BO_USAGE_HW_COMPOSER_QTI	
VERBOSE: Opened GBM fd
gbm_create_device(156): Info: backend name is: msm_drm
VERBOSE: Created GBM device
DEBUG:   Allocated BO with width=640 height=480 stride=640 aligned_w=800 aligned_h=480 size=385024 flags=0x20900 format=GBM_FORMAT_RAW10
DEBUG:   Converted gralloc flags 0x20900 to GBM flags 0x1400000
VERBOSE: Dumping GBM flags
DEBUG:   	Found flag GBM_BO_USAGE_CAMERA_WRITE_QTI	
DEBUG:   	Found flag GBM_BO_USAGE_HW_COMPOSER_QTI	
DEBUG:   Allocated BO with width=640 height=480 stride=640 aligned_w=800 aligned_h=480 size=385024 flags=0x20900 format=GBM_FORMAT_RAW10
DEBUG:   Converted gralloc flags 0x20900 to GBM flags 0x1400000
VERBOSE: Dumping GBM flags
DEBUG:   	Found flag GBM_BO_USAGE_CAMERA_WRITE_QTI	
DEBUG:   	Found flag GBM_BO_USAGE_HW_COMPOSER_QTI	
DEBUG:   Allocated BO with width=640 height=480 stride=640 aligned_w=800 aligned_h=480 size=385024 flags=0x20900 format=GBM_FORMAT_RAW10
DEBUG:   Converted gralloc flags 0x20900 to GBM flags 0x1400000
VERBOSE: Dumping GBM flags
DEBUG:   	Found flag GBM_BO_USAGE_CAMERA_WRITE_QTI	
DEBUG:   	Found flag GBM_BO_USAGE_HW_COMPOSER_QTI	
DEBUG:   Allocated BO with width=640 height=480 stride=640 aligned_w=800 aligned_h=480 size=385024 flags=0x20900 format=GBM_FORMAT_RAW10
DEBUG:   Converted gralloc flags 0x20900 to GBM flags 0x1400000
VERBOSE: Dumping GBM flags
DEBUG:   	Found flag GBM_BO_USAGE_CAMERA_WRITE_QTI	
DEBUG:   	Found flag GBM_BO_USAGE_HW_COMPOSER_QTI	
DEBUG:   Allocated BO with width=640 height=480 stride=640 aligned_w=800 aligned_h=480 size=385024 flags=0x20900 format=GBM_FORMAT_RAW10
DEBUG:   Converted gralloc flags 0x20900 to GBM flags 0x1400000
VERBOSE: Dumping GBM flags
DEBUG:   	Found flag GBM_BO_USAGE_CAMERA_WRITE_QTI	
DEBUG:   	Found flag GBM_BO_USAGE_HW_COMPOSER_QTI	
DEBUG:   Allocated BO with width=640 height=480 stride=640 aligned_w=800 aligned_h=480 size=385024 flags=0x20900 format=GBM_FORMAT_RAW10
DEBUG:   Converted gralloc flags 0x20900 to GBM flags 0x1400000
VERBOSE: Dumping GBM flags
DEBUG:   	Found flag GBM_BO_USAGE_CAMERA_WRITE_QTI	
DEBUG:   	Found flag GBM_BO_USAGE_HW_COMPOSER_QTI	
DEBUG:   Allocated BO with width=640 height=480 stride=640 aligned_w=800 aligned_h=480 size=385024 flags=0x20900 format=GBM_FORMAT_RAW10
DEBUG:   Converted gralloc flags 0x20900 to GBM flags 0x1400000
VERBOSE: Dumping GBM flags
DEBUG:   	Found flag GBM_BO_USAGE_CAMERA_WRITE_QTI	
DEBUG:   	Found flag GBM_BO_USAGE_HW_COMPOSER_QTI	
DEBUG:   Allocated BO with width=640 height=480 stride=640 aligned_w=800 aligned_h=480 size=385024 flags=0x20900 format=GBM_FORMAT_RAW10
DEBUG:   Converted gralloc flags 0x20900 to GBM flags 0x1400000
VERBOSE: Dumping GBM flags
DEBUG:   	Found flag GBM_BO_USAGE_CAMERA_WRITE_QTI	
DEBUG:   	Found flag GBM_BO_USAGE_HW_COMPOSER_QTI	
DEBUG:   Allocated BO with width=640 height=480 stride=640 aligned_w=800 aligned_h=480 size=385024 flags=0x20900 format=GBM_FORMAT_RAW10
DEBUG:   Converted gralloc flags 0x20900 to GBM flags 0x1400000
VERBOSE: Dumping GBM flags
DEBUG:   	Found flag GBM_BO_USAGE_CAMERA_WRITE_QTI	
DEBUG:   	Found flag GBM_BO_USAGE_HW_COMPOSER_QTI	
DEBUG:   Allocated BO with width=640 height=480 stride=640 aligned_w=800 aligned_h=480 size=385024 flags=0x20900 format=GBM_FORMAT_RAW10
DEBUG:   Converted gralloc flags 0x20900 to GBM flags 0x1400000
VERBOSE: Dumping GBM flags
DEBUG:   	Found flag GBM_BO_USAGE_CAMERA_WRITE_QTI	
DEBUG:   	Found flag GBM_BO_USAGE_HW_COMPOSER_QTI	
DEBUG:   Allocated BO with width=640 height=480 stride=640 aligned_w=800 aligned_h=480 size=385024 flags=0x20900 format=GBM_FORMAT_RAW10
DEBUG:   Converted gralloc flags 0x20900 to GBM flags 0x1400000
VERBOSE: Dumping GBM flags
DEBUG:   	Found flag GBM_BO_USAGE_CAMERA_WRITE_QTI	
DEBUG:   	Found flag GBM_BO_USAGE_HW_COMPOSER_QTI	
DEBUG:   Allocated BO with width=640 height=480 stride=640 aligned_w=800 aligned_h=480 size=385024 flags=0x20900 format=GBM_FORMAT_RAW10
DEBUG:   Converted gralloc flags 0x20900 to GBM flags 0x1400000
VERBOSE: Dumping GBM flags
DEBUG:   	Found flag GBM_BO_USAGE_CAMERA_WRITE_QTI	
DEBUG:   	Found flag GBM_BO_USAGE_HW_COMPOSER_QTI	
DEBUG:   Allocated BO with width=640 height=480 stride=640 aligned_w=800 aligned_h=480 size=385024 flags=0x20900 format=GBM_FORMAT_RAW10
DEBUG:   Converted gralloc flags 0x20900 to GBM flags 0x1400000
VERBOSE: Dumping GBM flags
DEBUG:   	Found flag GBM_BO_USAGE_CAMERA_WRITE_QTI	
DEBUG:   	Found flag GBM_BO_USAGE_HW_COMPOSER_QTI	
DEBUG:   Allocated BO with width=640 height=480 stride=640 aligned_w=800 aligned_h=480 size=385024 flags=0x20900 format=GBM_FORMAT_RAW10
DEBUG:   Converted gralloc flags 0x20900 to GBM flags 0x1400000
VERBOSE: Dumping GBM flags
DEBUG:   	Found flag GBM_BO_USAGE_CAMERA_WRITE_QTI	
DEBUG:   	Found flag GBM_BO_USAGE_HW_COMPOSER_QTI	
DEBUG:   Allocated BO with width=640 height=480 stride=640 aligned_w=800 aligned_h=480 size=385024 flags=0x20900 format=GBM_FORMAT_RAW10
DEBUG:   Converted gralloc flags 0x20900 to GBM flags 0x1400000
VERBOSE: Dumping GBM flags
DEBUG:   	Found flag GBM_BO_USAGE_CAMERA_WRITE_QTI	
DEBUG:   	Found flag GBM_BO_USAGE_HW_COMPOSER_QTI	
DEBUG:   Allocated BO with width=640 height=480 stride=640 aligned_w=800 aligned_h=480 size=385024 flags=0x20900 format=GBM_FORMAT_RAW10
DEBUG:   Successfully set up pipeline for stream: PREVIEW
setting ov7251 BLC register for cam id 0
VERBOSE: sid: 0x00E2, addr: 0x4005, data: 0x0002
VERBOSE: sid: 0x00E2, addr: 0x3820, data: 0x0000
VERBOSE: sid: 0x00E2, addr: 0x3821, data: 0x0000
VERBOSE: Entered thread: cam0-request(tid: 2236)
VERBOSE: Entered thread: cam0-result(tid: 2237)
DEBUG:   Started Camera: tracking

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

------ voxl-camera-server: Camera server is now running
VERBOSE: setting hal3 exposure for tracking     5259763   800
VERBOSE: added request for preview stream
VERBOSE: Sending request for frame 0 for camera tracking for 1 streams
VERBOSE: Received result from HAl3 for frame number 0
VERBOSE: Received 0 buffers from camera tracking, partial result:1
VERBOSE: finished sending request for frame 0 for camera tracking
VERBOSE: returning from SendOneCaptureRequest for frame 1 for camera tracking
VERBOSE: setting hal3 exposure for tracking     5259763   800
VERBOSE: added request for preview stream
VERBOSE: Sending request for frame 1 for camera tracking for 1 streams
VERBOSE: finished sending request for frame 1 for camera tracking
VERBOSE: returning from SendOneCaptureRequest for frame 2 for camera tracking
VERBOSE: setting hal3 exposure for tracking     5259763   800
VERBOSE: added request for preview stream
VERBOSE: Sending request for frame 2 for camera tracking for 1 streams
VERBOSE: finished sending request for frame 2 for camera tracking
VERBOSE: returning from SendOneCaptureRequest for frame 3 for camera tracking
VERBOSE: setting hal3 exposure for tracking     5259763   800
VERBOSE: added request for preview stream
VERBOSE: Sending request for frame 3 for camera tracking for 1 streams
VERBOSE: Received result from HAl3 for frame number 1
VERBOSE: Received 0 buffers from camera tracking, partial result:1
VERBOSE: Received result from HAl3 for frame number 2
VERBOSE: Received 0 buffers from camera tracking, partial result:1
VERBOSE: finished sending request for frame 3 for camera tracking
VERBOSE: returning from SendOneCaptureRequest for frame 4 for camera tracking
VERBOSE: setting hal3 exposure for tracking     5259763   800
VERBOSE: added request for preview stream
VERBOSE: Sending request for frame 4 for camera tracking for 1 streams
VERBOSE: finished sending request for frame 4 for camera tracking
VERBOSE: returning from SendOneCaptureRequest for frame 5 for camera tracking
VERBOSE: setting hal3 exposure for tracking     5259763   800
VERBOSE: added request for preview stream
VERBOSE: Sending request for frame 5 for camera tracking for 1 streams
VERBOSE: Received result from HAl3 for frame number 3
VERBOSE: Received 0 buffers from camera tracking, partial result:1
VERBOSE: Received result from HAl3 for frame number 4
VERBOSE: Received 0 buffers from camera tracking, partial result:1
VERBOSE: Received result from HAl3 for frame number 0
VERBOSE: Received 0 buffers from camera tracking, partial result:2
VERBOSE: Received metadata for frame 0 from camera tracking
VERBOSE: 	Timestamp: 63336924366
VERBOSE: 	Gain: 799
VERBOSE: 	Exposure: 5259763
VERBOSE: Received result from HAl3 for frame number 0
VERBOSE: Received 1 buffers from camera tracking, partial result:0
VERBOSE: Received output buffer 0 from camera tracking
VERBOSE: tracking procesing new buffer
VERBOSE: Camera: tracking processing preview frame
DEBUG:   setting thread affinity for cam tracking preview
VERBOSE: finished sending request for frame 5 for camera tracking
VERBOSE: returning from SendOneCaptureRequest for frame 6 for camera tracking
VERBOSE: setting hal3 exposure for tracking     5259763   800
VERBOSE: publishing raw preview frame for mono camera tracking
VERBOSE: added request for preview stream
VERBOSE: Sending request for frame 6 for camera tracking for 1 streams
VERBOSE: Received result from HAl3 for frame number 5
VERBOSE: Received 0 buffers from camera tracking, partial result:1
VERBOSE: Received result from HAl3 for frame number 1
VERBOSE: Received 0 buffers from camera tracking, partial result:2
VERBOSE: Received metadata for frame 1 from camera tracking
VERBOSE: 	Timestamp: 63403592491
VERBOSE: 	Gain: 799
VERBOSE: 	Exposure: 5259763
VERBOSE: Received result from HAl3 for frame number 1
VERBOSE: Received 1 buffers from camera tracking, partial result:0
VERBOSE: Received output buffer 1 from camera tracking
VERBOSE: finished sending request for frame 6 for camera tracking
VERBOSE: returning from SendOneCaptureRequest for frame 7 for camera tracking
VERBOSE: setting hal3 exposure for tracking    24428958   799
VERBOSE: tracking procesing new buffer
VERBOSE: Camera: tracking processing preview frame
DEBUG:   tracking checking to see if it is raw8 or raw 10
VERBOSE: added request for preview stream
VERBOSE: Sending request for frame 7 for camera tracking for 1 streams
DEBUG:   Frame was actually 8 bit, sending as is
VERBOSE: publishing raw preview frame for mono camera tracking
VERBOSE: Received result from HAl3 for frame number 6
VERBOSE: Received 0 buffers from camera tracking, partial result:1
VERBOSE: Received result from HAl3 for frame number 2
VERBOSE: Received 0 buffers from camera tracking, partial result:2
VERBOSE: Received metadata for frame 2 from camera tracking
VERBOSE: 	Timestamp: 63437223220
VERBOSE: 	Gain: 799
VERBOSE: 	Exposure: 5259763
VERBOSE: Received result from HAl3 for frame number 2
VERBOSE: Received 1 buffers from camera tracking, partial result:0
VERBOSE: Received output buffer 2 from camera tracking
VERBOSE: tracking procesing new buffer
VERBOSE: Camera: tracking processing preview frame

```

Setup pic : 
![IMG20240217115924 (1).jpg](https://forum.modalai.com/assets/uploads/files/1708151872046-img20240217115924-1-resized.jpg) 

Screenshot of /usr/lib/camera:

![Screenshot from 2024-02-17 12-01-37.png](https://forum.modalai.com/assets/uploads/files/1708151535222-screenshot-from-2024-02-17-12-01-37.png)

## Reply by Aaky · 2024-02-20 01:53:00 UTC (in reply to Aaky)

@Alex-Kushleyev Any update on how to solve this issue?

## Reply by Alex Kushleyev (ModalAI staff) · 2024-02-20 02:24:04 UTC (in reply to Aaky)

@Aaky , since your ov7251 camera has a lower slot id (2), it was mapped to canera id 0. And TOF was mapped to camera id 1. So you should swap the camera ids in your camera config file and it should work!

## Reply by Aaky · 2024-02-20 05:16:07 UTC (in reply to Alex Kushleyev)

@Alex-Kushleyev Thank you for the input. It works perfectly now. I hope if I plug in M0149 tracking sensor in JL port instead of OV7251 it would also work in similar fashion.

## Reply by Alex Kushleyev (ModalAI staff) · 2024-02-20 17:17:56 UTC (in reply to Aaky)

@Aaky, yes if you change the camera configuration, just follow the same process:
- copy correct sensorbin (with correct slot id) to /usr/lib/camera/ as previously discussed
- confirm the camera is detected using voxl-camera-server -l
- update camera config xml with correct camera ids - the camera id’s will start with zero and increment by 1 for each camera. The camera id assignment happens in order of the camera slot id. Slot id is mapped to the physical connector.

You may want to remove unused sensorbins from /usr/lib/camera just to avoid any confusion. You can always get them back from /usr/share/modalai/chi-cdk
