getModuleString() returns the value of first camera for all cameras in 5.1.3

Hello,

Continuing the discussion from Is there official distribution for libnvargus.so with fixed memory corruption?:

I see same wrong behavior in 5.1.3

despite the fact that nvargus_nvraw --lps returns correct values

nvargus_nvraw version 1.14.0
Number of supported sensor entries 8
Entry Source Mode Uniquename Resolution FR BitDepth Mode
Index Index Index CSI Dyn Type
0 0 0 dsboard_ornx_L1_P5V27C 4056x3040 29 10 10 Bayer
1 0 1 dsboard_ornx_L1_P5V27C 4032x3040 35 10 10 Bayer
2 1 0 dsboard_ornx_L2_P5V27C 4056x3040 29 10 10 Bayer
3 1 1 dsboard_ornx_L2_P5V27C 4032x3040 35 10 10 Bayer
4 2 0 dsboard_ornx_R1_P5V27C 4056x3040 29 10 10 Bayer
5 2 1 dsboard_ornx_R1_P5V27C 4032x3040 35 10 10 Bayer
6 3 0 dsboard_ornx_R2_P5V27C 4056x3040 29 10 10 Bayer
7 3 1 dsboard_ornx_R2_P5V27C 4032x3040 35 10 10 Bayer

hello vladimir.tchernitski,

JP-5.1.3 has such bug fix included, getmodulestring it should now contains the device’s name, position, and partial model number.

please check developer guide, Argus::ICameraProperties::getModuleString.
may I know what’s your reproduce steps.

Hello Jerry,

the output of nvargus_nvraw --lps I mentioned above was taken on 5.1.2 with patched libnvargus.so

I’ve just checked the same command on 5.1.3

R35 (release), REVISION: 5.0, GCID: 35550185, BOARD: t186ref, EABI: aarch64, DATE: Tue Feb 20 04:46:31 UTC 2024

the output is
nvargus_nvraw version 1.14.0
Number of supported sensor entries 8
Entry Source Mode Uniquename Resolution FR BitDepth Mode
Index Index Index CSI Dyn Type
0 0 0 dsboard_ornx_L1_P5V27C 4056x3040 29 10 10 Bayer
1 0 1 dsboard_ornx_L1_P5V27C 4032x3040 35 10 10 Bayer
2 1 0 dsboard_ornx_L1_P5V27C 4056x3040 29 10 10 Bayer
3 1 1 dsboard_ornx_L1_P5V27C 4032x3040 35 10 10 Bayer
4 2 0 dsboard_ornx_L1_P5V27C 4056x3040 29 10 10 Bayer
5 2 1 dsboard_ornx_L1_P5V27C 4032x3040 35 10 10 Bayer
6 3 0 dsboard_ornx_L1_P5V27C 4056x3040 29 10 10 Bayer
7 3 1 dsboard_ornx_L1_P5V27C 4032x3040 35 10 10 Bayer

The c++ code snipped I used:

_cameraProvider = UniqueObj<CameraProvider>(CameraProvider::create());
ICameraProvider *iCameraProvider = interface_cast<ICameraProvider>(_cameraProvider);

std::vector<CameraDevice*> availableCameraDevices;
iCameraProvider->getCameraDevices(&availableCameraDevices);

for(const auto& cameraDevice : availableCameraDevices) {
    ICameraProperties* iCamera = interface_cast<ICameraProperties>(cameraDevice);
    std::string cameraAlias = iCamera->getModuleString(); // dsboard_ornx_L1_P5V27C
    LOG_INFO("cameraAlias {}", cameraAlias);
}

the output is:
[2024-05-09 10:40:12.850] [xxx] [info] cameraAlias dsboard_ornx_L1_P5V27C
[2024-05-09 10:40:12.850] [xxx] [info] cameraAlias dsboard_ornx_L1_P5V27C
[2024-05-09 10:40:12.850] [xxx] [info] cameraAlias dsboard_ornx_L1_P5V27C
[2024-05-09 10:40:12.850] [xxx] [info] cameraAlias dsboard_ornx_L1_P5V27C

The dtsi:

modules {
module0 {
status = “okay”;
badge = “dsboard_ornx_L1_P5V27C”;
position = “bottomleft”;
orientation = “1”;
drivernode0 {
status = “okay”;
pcl_id = “v4l2_sensor”;
devname = “imx477 30-001a”;
proc-device-tree = “/proc/device-tree/i2c@3180000/pca9544a@70/i2c@0/imx477_a@1a”;
};
};
module1 {
status = “okay”;
badge = “dsboard_ornx_L2_P5V27C”;
position = “centerleft”;
orientation = “1”;
drivernode0 {
status = “okay”;
pcl_id = “v4l2_sensor”;
devname = “imx477 31-001a”;
proc-device-tree = “/proc/device-tree/i2c@3180000/pca9544a@70/i2c@1/imx477_b@1a”;
};
};
module2 {
status = “okay”;
badge = “dsboard_ornx_R1_P5V27C”;
position = “centerright”;
orientation = “1”;
drivernode0 {
status = “okay”;
pcl_id = “v4l2_sensor”;
devname = “imx477 32-001a”;
proc-device-tree = “/proc/device-tree/i2c@3180000/pca9544a@70/i2c@2/imx477_c@1a”;
};
};
module3 {
status = “okay”;
badge = “dsboard_ornx_R2_P5V27C”;
position = “topleft”;
orientation = “1”;
drivernode0 {
status = “okay”;
pcl_id = “v4l2_sensor”;
devname = “imx477 33-001a”;
proc-device-tree = “/proc/device-tree/i2c@3180000/pca9544a@70/i2c@3/imx477_d@1a”;
};
};
};

hello vladimir.tchernitski,

it does looks like a bug,
could you please give it another try by adding --c <ID> to dump sensor info for checking.
for instance, $ sudo nvargus_nvraw --c 0 --sensorinfo

besides,
please try updating this pre-built binary file and sharing the results.
for instance, Topic292219_May10.zip (434.2 KB)

for every call of sudo nvargus_nvraw --c X --sensorinfo whatever sensor_id is defined
it returned same first sensor alias:
nvargus_nvraw version 1.14.0
Number of sensors 4, Number of modes for selected sensor 2
Selected sensor: dsboard_ornx_L1_P5V27C ID 3 Mode 0
Number of exposures 1
Index Exposure time Range Sensor Gain Range
0 0.000013 - 0.500000 1.000000 - 22.250000
Warning: Maximum value of Exposure time 0.683709 secs is more than maximum Frame duration of 0.5 secs.
Changing
Maximum Exposure time to 0.5 secs.

With the new library the issue has gone - thank you!

thanks for confirmation, let me have code review for such bug fixes.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.