2025-07-29 10:45 PM
Hi,
I'm curious to see if it is possible to connect more than one STEVAL-EVK-U0I boards to a computer and read images of all of them? The SDK has an init function that allows you give a board id, but it is unclear what the board id means or if it will give the desired effect. Any help is appreciated.
Thanks
Solved! Go to Solution.
2025-07-30 3:18 AM
Hi @oaa3wf ,
It is indeed possible to use simultaneously more than one STEVAL-EVK-U0I boards. An id (starting from 0) is automatically attributed when more than one board is detected. You just have to define two sensor_dll object in the python script:
# # Init the board
first_sensor_dll = SensorDll(LIB_NAME, decode_frame)
first_sensor_dll.init_board(board_id=0)
second_sensor_dll = SensorDll(LIB_NAME, decode_frame)
second_sensor_dll.init_board(board_id=1)
Best regards,
Jean
2025-07-30 3:18 AM
Hi @oaa3wf ,
It is indeed possible to use simultaneously more than one STEVAL-EVK-U0I boards. An id (starting from 0) is automatically attributed when more than one board is detected. You just have to define two sensor_dll object in the python script:
# # Init the board
first_sensor_dll = SensorDll(LIB_NAME, decode_frame)
first_sensor_dll.init_board(board_id=0)
second_sensor_dll = SensorDll(LIB_NAME, decode_frame)
second_sensor_dll.init_board(board_id=1)
Best regards,
Jean
2025-07-30 10:45 AM
Thanks @Jean_Poire . I'll give it a try.
2025-07-30 4:06 PM
So I gave this a try and got the following:
Loading st_brightsense_sdk_vdx6gx.dll
IMG platform version 305 loaded :)
Boards connected: (0,P4405C-00A#0306) (1,P4405C-00A#0310)
Board ID selected : 0
Initiating CCI communication at address 32
Sensor detected on interface 0
Loading st_brightsense_sdk_vdx6gx.dll
IMG platform version 305 loaded :)
Boards connected: (0,P4405C-00A#0306) (1,P4405C-00A#0310)
Board ID selected : 1
Initiating CCI communication at address 32
Sensor detected on interface 0
IMG_PLAT error (1): Error: Wait8, could not reach value 0 for register 513 last read: 1;(Failed to acknowledge command)
Still debugging, but going to but it up here in case someone has run into this before.
2025-07-30 7:42 PM
That is already a good progress as the two boards are well detected!
If you need further assistance for debugging, please provide your script so I can check it on my side.
Best Regards,
Jean
2025-08-04 12:52 PM - edited 2025-08-04 12:53 PM
Thanks @Jean_Poire , unfortunately, I wasn't able to figure out the issue. I notice that LED D6 goes red for a second when the problem occurs. I think it should be reproducible with the code below (and the SDK):
import os
from vdx6gx_constants import *
from vdx6gx_frame_decoding import decode_frame
from image_sensor_python_sdk import *
from smart_imshow import SmartImshow
import threading
import time
bits_per_pixel = BITS_8
x_start = 2
x_end = 1105
y_start = 2
y_end = 1361
# height = 640
# width = 480
# x_end = x_start + width - 1
# y_end = y_start + height - 1
width = x_end - x_start + 1
height = y_end - y_start + 1
data_rate_mbps = 1500
def getSensorDll(i2c_address: int = 32, boardId: int = 0):
# Init the board
sensor_dll = SensorDll(LIB_NAME, decode_frame)
sensor_dll.init_board(i2c_address, board_id=boardId)
sensor_dll.Write16(VDx6Gx_REG_STATICS_FORMAT_CTRL, bits_per_pixel)
# Slave mode
slave_mode = 2
# Set the sensor configuration (VD55G1 specific)
sensor_dll.Write16(VDx6Gx_REG_STATUS_FRAME_RATE, 30)
sensor_dll.Write8(VDx6Gx_REG_STREAM_STATICS_ORIENTATION, 0)
sensor_dll.Write16(VDx6Gx_REG_STREAM_CTX0_FRAME_LENGTH,4200)
sensor_dll.Write16(VDx6Gx_REG_CONTEXTS_OUT_ROI_X_START, x_start)
sensor_dll.Write16(VDx6Gx_REG_CONTEXTS_OUT_ROI_X_END, x_end)
sensor_dll.Write16(VDx6Gx_REG_CONTEXTS_OUT_ROI_Y_START, y_start)
sensor_dll.Write16(VDx6Gx_REG_CONTEXTS_OUT_ROI_Y_END, y_end)
sensor_dll.reconfigure_csi_receiver(2, data_rate_mbps, 1116, 1356, bits_per_pixel, 160800000)
# sensor_dll.reconfigure_csi_receiver(2, data_rate_mbps, 480, 642, bits_per_pixel, 160800000)
sensor_dll.Write8(VDx6Gx_REG_STATUS_VT_CTRL, slave_mode)
return sensor_dll
sensor_dll_0 = getSensorDll(32, 0)
sensor_dll_1 = getSensorDll(32, 1)
print("----------------------------------- done setting up", flush=True)
print("----------------------------------- starting streams", flush=True)
time.sleep(5.0)
sensor_dll_0.start_stream()
print("------started stream 0")
time.sleep(5.0)
sensor_dll_1.start_stream()
print("------started stream 1")
# sleep for 10 seconds and shutdown
time.sleep(10.0)
sensor_dll_0.stop_stream()
sensor_dll_1.stop_stream()
sensor_dll_0.deinit_board()
sensor_dll_1.deinit_board()
Thanks
2025-08-04 8:52 PM
Hi @oaa3wf ,
There is indeed a small issue with the management of the dll. As you are trying to stream with 2 vdx6gx you are using the same dll. When you are initializing your second board you are overwriting the sensor_dll object and now both sensor_dll_0 and sensor_dll_1 are talking to the same board. That is why the second start_stream() raise an error as the sensor is already streaming. A workaround is to create a copy of the dll and make two call to two different dll:
In my folder I have now 4 files :
st_brightsense_sdk_vdx6gx_0.dll
st_brightsense_sdk_vdx6gx_0.h
st_brightsense_sdk_vdx6gx_1.dll
st_brightsense_sdk_vdx6gx_1.h
Inside vdx6gx_constants.py:
SENSOR_DLL_NAME_0 = "st_brightsense_sdk_vdx6gx_0"
SENSOR_DLL_NAME_1 = "st_brightsense_sdk_vdx6gx_1"
LIB_NAME_0 = get_lib_name(SENSOR_DLL_NAME_0)
LIB_NAME_1 = get_lib_name(SENSOR_DLL_NAME_1)
Inside your script:
sensor_dll = SensorDll([LIB_NAME_0, LIB_NAME_1][boardId], decode_frame)
I was able to make it work on my side using this workaround. I will search for the root cause and better solution when I have the bandwidth.
Sorry for the troubles,
Best regards,
Jean
2025-08-05 10:08 AM
Thanks @Jean_Poire , your suggestion works!!