I copied /usr/share/modalai/chi-cdk/imx664/com.qti.sensormodule.imx664_1.bin
to /usr/lib/camera
here is what was there when I started:
voxl2-mini-test-fixture (TF-M0104):/$ ls /usr/lib/camera/ | grep imx66
com.qti.sensor.imx664.so
com.qti.sensormodule.imx664_3.bin
I noticed that the imx664_3.bin was there and thought that was odd but ended up being a tell to one of the problems I was having as you'll see later in this post. I then copied in the imx664_1.bin and then the voxl-camera-server -l
worked
Then I tried to do the camera setup via voxl-configure-cameras
voxl2-mini-test-fixture (TF-M0104):/$ voxl-configure-cameras
Available camera config IDs are as follows:
22 - M0188 Stinger Dual AR0144
33 - M0188 Stinger IMX664 + dual AR0144
34 - M0195 Stinger IMX664 + dual AR0144 + boson
35 - RESERVED for Future Stinger Config
38 - M0188 Sparrow IMX664 + Triple AR0144
50 - MVX-T0001 voxl2 mini hires imx664
51 - MVX-T0001 voxl2 mini hires imx664 + boson
52 - MVX-T0001 voxl2 mini dual hires imx664 + boson
C - use user-defined custom camera config in
(/data/modalai/custom_camera_config.txt)
q - Quit The Wizard
selection: 50
Selected numerical camera config
Camera Configuration: 50
camera server config helper list:
hires:imx664-fpv:0:
driver binary list:
/usr/share/modalai/chi-cdk/imx664/com.qti.sensormodule.imx664_3.bin
calling camera-server-config-helper hires:imx664-fpv:0:
MISP awb str: auto
Setting MISP AWB to Auto
MISP channels enabled in defaults : 3
ERROR: object missing misp_channels
misp channel 0: en=1, w=1280, h=720, fps=30.0, bitrate=2.00, npframes=2, venc_mode=h265, osd=0
misp channel 1: en=1, w=960, h=540, fps=30.0, bitrate=0.80, npframes=1, venc_mode=h265, osd=0
misp channel 2: en=1, w=960, h=540, fps=60.0, bitrate=1.50, npframes=29, venc_mode=h265, osd=0
WARNING: Limiting maximum exposure to 16466us due to desired FPS (60)
successfully wrote this camera config to disk:
=================================================================
configuration for 1 cameras:
cam #0
name: hires
sensor type: imx664-fpv
isEnabled: 1
camId: 0
camId2: -1
fps: 60
en_rotate: 0
en_rotate2: 0
en_preview: 1
pre_width: 2704
pre_height: 1540
en_raw_preview: 1
en_small_video: 0
small_video_width: 1024
small_video_height: 768
en_large_video: 0
large_video_width: 2704
large_video_height: 1540
en_misp: 1
misp_width: 1280
misp_height: 720
en_snapshot: 0
snap_width: 2704
snap_height: 1540
exif_focal_length: 3.100000
exif_focal_len_35mm_format:17
exif_fnumber: 1.240000
ae_mode: lme_msv
msv_exposure_min_us: 25
msv_exposure_max_us: 16466
gain_min : 54
gain_max : 30000
standby_enabled: 0
decimator: 1
independent_exposure:0
fsync_en: 0
fsync_gpio: 109
=================================================================
camera_server_config_helper is done
camera-server-config-helper succeeded on attempt 1
leaving fsync pin off
copying required camera drivers in place
/usr/share/modalai/chi-cdk/imx664/com.qti.sensormodule.imx664_3.bin
enabling voxl-camera-server
------------------------------------------------------------------
Done Configuring Cameras
Please power cycle VOXL to load new drivers
camera server will start on next reboot
------------------------------------------------------------------
I noticed from the output above:
driver binary list:
/usr/share/modalai/chi-cdk/imx664/com.qti.sensormodule.imx664_3.bin
Despite the default configuration setting camId: 0 which implies it should be using imx664_1.bin
and then suddenly voxl-camera-server -l
shows no cameras attached
voxl2-mini-test-fixture (TF-M0104):/$ 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: 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
it appears to wipe the imx664_1.bin out of the /usr/lib/cameras directory
voxl2-mini-test-fixture (TF-M0104):/$ ls /usr/lib/camera/ | grep imx66
com.qti.sensor.imx664.so
com.qti.sensormodule.imx664_3.bin
So the key to making it all work is when I
cp /usr/share/modalai/chi-cdk/imx664/com.qti.sensormodule.imx664_3.bin /usr/lib/camera/
Then manually started the server again with:
voxl-camera-server
now with success in detecting the camera.
It didn't appear to mind that the imx664_3.bin was there at the same time and then I was able to see video feed in the portal by
adb forward tcp:8080 tcp:80
then visit:
http://localhost:8080
Success! Saw video going to "Cameras -> Multiview (or any of the views really worked)"
Side note: when you plug camera into J1L and create that short, 1) the camera gets really hot (no surprise there) 2) the wifi kit doesn't work (presumably power drain from pulling a rail directly to ground)