Post Go back to editing

failed to read firmware from eeprom

I am using the AD96 TOF board with Dragonboard 410c, I have connected a display and mouse+keyboard to the dragon board. I see the error Failed to read frirmware from eeprom in the terminal when I try to run the aditof-demo.sh

I have updated the sdk on the sd card following the build instructions here https://github.com/analogdevicesinc/aditof_sdk/blob/master/doc/dragonboard410c/build_instructions.md

Although I was able to run the aditof-demo.sh initially on the dragonboard, I then attempted to connect the dragon board over USB to PC and run the aditof-demo on a linux PC where the eeprom firmware error first showed up, Reverting to the dragon board setup I see the same issue while trying to run the aditof-demo on the dragonboard now. 

Please help me with any leads on how I can identify what is missing at my end which could be creating this issue?, I have tried running the eeprom tool which returns segmentation fault.

  

Parents
  • Can you try to read the contents of the eeprom using the eeprom tool?

    Firstly, make sure you build the tool by using the flag '-DWITH_TOOLS=1'. Ex: ''cmake -DDRAGONBOARD=1 -DWITH_TOOLS=1 ..'

    After building the project run the tool like this:

    ./eeprom-tool -m -r backup.bin

    If this runs ok please attach the bin here, else post here the output / error

  • Thanks for the suggestion.

    I did run it and it worked after adding sudo to the command, I see the below  messages,

    linaro@linaro-alip:~/workspace/github/aditof_sdk/build/tools/eeprom-tool$ sudo ./eeprom-tool -m -r backup.bin
    WARNING: Logging before InitGoogleLogging() is written to STDERR
    I0125 07:21:59.512212 4369 eeprom_tool.cpp:85] Setting connection via ON_TARGET
    I0125 07:21:59.512920 4369 sensor_enumerator_dragonboard.cpp:156] Looking for sensors on the target
    I0125 07:21:59.513767 4369 sensor_enumerator_dragonboard.cpp:176] Looking at: /dev/media1 for an eligible TOF camera
    I0125 07:21:59.619187 4369 sensor_enumerator_dragonboard.cpp:190] Considering: /dev/media1 an eligible TOF camera
    I0125 07:21:59.619457 4369 sensor_enumerator_dragonboard.cpp:176] Looking at: /dev/media0 for an eligible TOF camera
    I0125 07:21:59.650869 4369 addi9036_sensor.cpp:139] Opening device
    I0125 07:21:59.651070 4369 addi9036_sensor.cpp:157] Looking for the following cards:
    I0125 07:21:59.651150 4369 addi9036_sensor.cpp:159] Qualcomm Camera Subsystem
    I0125 07:21:59.682018 4369 eeprom_tool.cpp:147] Successfully created connection to EEPROM
    I0125 07:22:00.501250 4369 cam96tof1_eeprom.cpp:59] EEPROM calibration data size 64940 bytes
    E0125 07:22:06.512076 4369 cam96tof1_eeprom.cpp:74] Successfully read data from EEPROM
    I0125 07:22:06.514055 4369 eeprom_tool.cpp:242] Successfully wrote data to file
    I0125 07:22:06.514230 4369 eeprom_tool.cpp:207] Successfully wrote data to file from EEPROM
    I0125 07:22:06.514389 4369 eeprom_tool.cpp:251] Destroyed connection

    Attaching the bin file.

  • Yes, that message is expected, it's just an informative message (not a warning or error).

    I will add some more debug messages to the uvc-gadget and get back to you with some steps to run it manually.

  • Could you also add this line of code:

    LOG(INFO) << advertisedSensorData;

    right after this line:

    https://github.com/analogdevicesinc/aditof_sdk/blob/master/sdk/src/connections/usb/linux/usb_sensor_enumerator.cpp#L164

    and rebuild and re-run?

  • I did this, added this line to line number 165, the following message got printed on running the demo,

    santosh@santosh-Latitude-E7450:~/Documents/ccd_tof/aditof_sdk/build/examples/aditof-demo$ sudo ./aditof-demo
    I0128 11:31:51.989786  2562 system_impl.cpp:91] Could not create TargetSensorEnumerator because SDK is not running on target.
    I0128 11:31:51.990159  2562 usb_sensor_enumerator.cpp:85] Looking for USB connected sensors
    I0128 11:31:52.106590  2562 usb_sensor_enumerator.cpp:165] TEMP_SENSOR_NAME=AfeTemperature;TEMP_SENSOR_ID=0;TEMP_SENSOR_NAME=LaserTemperature;TEMP_SENSOR_ID=1;
    W0128 11:31:52.177353  2562 camera_96tof1.cpp:91] Could not find 24c1024 while looking for storage for camera AD-96TOF1-EBZ
    I0128 11:31:52.178059  2562 camera_96tof1.cpp:144] Initializing camera
    W0128 11:31:52.178105  2562 camera_96tof1.cpp:147] Failed to initialize! Not all sensors are available
    W0128 11:31:52.178287  2562 usb_depth_sensor_linux.cpp:205] Failed to set Pixel Format, error: 25(Inappropriate ioctl for device)
    W0128 11:31:52.178347  2562 camera_96tof1.cpp:371] Failed to set frame type
    I0128 11:31:52.297472  2562 camera_96tof1.cpp:231] Chosen mode: near
    I0128 11:31:52.297523  2562 camera_96tof1.cpp:273] Camera range for mode: near is: 250 mm and 800 mm
    W0128 11:31:52.297546  2562 camera_96tof1.cpp:280] Failed to read firmware from eeprom

  • On line 165, the expected string should have been:

    STORAGE_NAME=24c1024;STORAGE_ID=0;TEMP_SENSOR_NAME=AfeTemperature;TEMP_SENSOR_ID=0;TEMP_SENSOR_NAME=LaserTemperature;TEMP_SENSOR_ID=1;

    The information about storage is missing in your case and I'm not sure why. It's worth to check if uvc-gadget is sending the entire information.

    I've added some more logging to uvc-gadget so could you please go to the Dragonboard, get the latest master, rebuild then go to aditof_sdk/build/apps/uvc-app/

    Then, run:

    ./config_pipe.sh

    This should start the uvc-gadget. Then, please attach here a file with the entire log.

    Thanks!

  • I rebuilt and the uvc-gadget on the dragonboard with the updated db, the log shows it is finding the eeprom storage.

    linaro@linaro-alip:~/workspace/github/aditof_sdk/build/apps/uvc-app$ ./config_pipe.sh
    Opening media device /dev/media1
    Enumerating entities
    looking up device: 81:4
    looking up device: 81:5
    looking up device: 81:6
    looking up device: 81:7
    looking up device: 81:8
    looking up device: 81:9
    looking up device: 81:10
    looking up device: 81:0
    looking up device: 81:11
    looking up device: 81:1
    looking up device: 81:12
    looking up device: 81:2
    looking up device: 81:13
    looking up device: 81:3
    looking up device: 81:14
    Found 15 entities
    Enumerating pads and links
    Setting up link 4:1 -> 7:0 [1]
    Opening media device /dev/media1
    Setting up link 7:1 -> 13:0 [1]
    Opening media device /dev/media1
    Setting up link 13:1 -> 19:0 [1]
    Opening media device /dev/media1
    Opening media device /dev/media1
    Enumerating entities
    looking up device: 81:4
    looking up device: 81:5
    looking up device: 81:6
    looking up device: 81:7
    looking up device: 81:8
    looking up device: 81:9
    looking up device: 81:10
    looking up device: 81:0
    looking up device: 81:11
    looking up device: 81:1
    looking up device: 81:12
    looking up device: 81:2
    looking up device: 81:13
    looking up device: 81:3
    looking up device: 81:14
    Found 15 entities
    Enumerating pads and links
    Setting up format SBGGR12_1X12 640x960 on pad addi903x 1-0064/0
    Format set: SBGGR12_1X12 640x960
    Setting up format SBGGR12_1X12 640x960 on pad msm_csiphy1/0
    Format set: SBGGR12_1X12 640x960
    Setting up format SBGGR12_1X12 640x960 on pad msm_csid0/0
    Format set: SBGGR12_1X12 640x960
    Setting up format SBGGR12_1X12 640x960 on pad msm_ispif0/0
    Format set: SBGGR12_1X12 640x960
    Setting up format SBGGR12_1X12 640x960 on pad msm_vfe0_rdi0/0
    Format set: SBGGR12_1X12 640x960
    I0128 08:36:30.690810 4831 uvc-gadget.cpp:2001] ./uvc-gadget has started
    I0128 08:36:30.698033 4831 uvc-gadget.cpp:2029] This UVC instance is using aditof sdk version: 2.0.0
    I0128 08:36:30.698231 4831 sensor_enumerator_dragonboard.cpp:156] Looking for sensors on the target
    I0128 08:36:30.698694 4831 sensor_enumerator_dragonboard.cpp:176] Looking at: /dev/media1 for an eligible TOF camera
    I0128 08:36:30.775835 4831 sensor_enumerator_dragonboard.cpp:190] Considering: /dev/media1 an eligible TOF camera
    I0128 08:36:30.776178 4831 sensor_enumerator_dragonboard.cpp:176] Looking at: /dev/media0 for an eligible TOF camera
    I0128 08:36:30.812418 4831 uvc-gadget.cpp:2062] Storages found:
    I0128 08:36:30.812608 4831 uvc-gadget.cpp:2071] 24c1024
    I0128 08:36:30.812685 4831 uvc-gadget.cpp:2074] Temperature sensors found:
    I0128 08:36:30.812752 4831 uvc-gadget.cpp:2083] AfeTemperature
    I0128 08:36:30.812810 4831 uvc-gadget.cpp:2083] LaserTemperature
    I0128 08:36:30.812850 4831 uvc-gadget.cpp:2086] Message blob about available sensors to be sent to remote:
    I0128 08:36:30.812888 4831 uvc-gadget.cpp:2087] STORAGE_NAME=24c1024;STORAGE_ID=0;TEMP_SENSOR_NAME=AfeTemperature;TEMP_SENSOR_ID=0;TEMP_SENSOR_NAME=LaserTemperature;TEMP_SENSOR_ID=1;
    UVC: IO method requested is USER_PTR
    Number of buffers requested = 4
    I0128 08:36:30.813045 4831 addi9036_sensor.cpp:139] Opening device
    I0128 08:36:30.813135 4831 addi9036_sensor.cpp:157] Looking for the following cards:
    I0128 08:36:30.813179 4831 addi9036_sensor.cpp:159] Qualcomm Camera Subsystem
    uvc device is ci_hdrc_msm on bus gadget
    uvc open succeeded, file descriptor = 9
    Set parameters by user
    UVC: Setting format to: YUYV 640x960
    Set IO METHOD passed!
    I0128 08:36:30.842564 4831 addi9036_sensor.cpp:254] Starting device 0
    ^CI0128 08:36:51.346691 4831 uvc-gadget.cpp:2435] ./uvc-gadget is now closing gracefully
    I0128 08:36:51.347048 4831 addi9036_sensor.cpp:296] Stopping device

  • On the PC, could you print the bufferLength variable at this line?

    github.com/.../usb_sensor_enumerator.cpp

  • Also, if you happen to have another USB cable, could you try it?

  • I suspect there is some issue with the USB cable or the port on dragonboard, right now I see the below message on the PC, it shows that the storage is found, but couldnt read back data, however if I restart the board and the PC, the data read error goes away but the eeprom storage is not found in that case, at this point if I switch back to the dragonboard by removing the USB connection the eeprom is not found on the dragonboard too. Restarting the dragonboard it all works fine again on the dragonboard.

    I will check with a different cable and let you know

    santosh@santosh-Latitude-E7450:~/Documents/ccd_tof/aditof_sdk/build/examples/aditof-demo$ sudo ./aditof-demo
    I0128 14:56:57.010651  2297 system_impl.cpp:91] Could not create TargetSensorEnumerator because SDK is not running on target.
    I0128 14:56:57.011006  2297 usb_sensor_enumerator.cpp:85] Looking for USB connected sensors
    I0128 14:56:57.128046  2297 usb_sensor_enumerator.cpp:165] STORAGE_NAME=24c1024;STORAGE_ID=0;TEMP_SENSOR_NAME=AfeTemperature;TEMP_SENSOR_ID=0;TEMP_SENSOR_NAME=LaserTemperature;TEMP_SENSOR_ID=1;
    I0128 14:56:57.201766  2297 camera_96tof1.cpp:144] Initializing camera
    I0128 14:56:57.201841  2297 usb_depth_sensor_linux.cpp:112] Opening device
    W0128 14:56:57.203191  2297 usb_linux_utils.cpp:128] Error in reading data from device, error: 2(No such file or directory)
    W0128 14:56:57.203732  2297 usb_storage_linux.cpp:119] Failed to read a packet via UVC extension unit. Error: -1
    W0128 14:56:57.720146  2297 usb_linux_utils.cpp:128] Error in reading data from device, error: 110(Connection timed out)
    W0128 14:56:57.720253  2297 usb_linux_utils.cpp:170] Failed to read a packet via UVC extension unit
    W0128 14:56:57.720290  2297 usb_storage_linux.cpp:82] Failed to read buffer through UVC extension unit. Error: -1
    I0128 14:56:57.720335  2297 calibration_96tof1.cpp:164] EEPROM calibration data size 100 bytes
    I0128 14:56:57.995693  2297 camera_96tof1.cpp:200] Camera initialized
    W0128 14:56:57.995782  2297 calibration_96tof1.cpp:346] No intrinsics found in the device memory for key 6.000000
    I0128 14:56:58.113998  2297 camera_96tof1.cpp:231] Chosen mode: near
    I0128 14:56:58.114048  2297 camera_96tof1.cpp:273] Camera range for mode: near is: 250 mm and 800 mm

  • The issue has resolved after re flashing the SD card with a new image. I am able to run the demo on the PC now.

    Thanks for the help

  • Glad to hear that things work now.

Reply Children
No Data