IntelRealSense / RealSenseID

Intel® RealSense™ ID SDK
https://intelrealsense.com/facial-authentication/
Apache License 2.0
100 stars 58 forks source link

Failed connecting to port /dev/ttyACM0 and error during executable rsid-cli on Raspberry Pi 4 #146

Closed ZeosBios closed 2 years ago

ZeosBios commented 2 years ago

Hi,

I'm trying to set up RealSenseID F450 on a Raspberry Pi 4 (OS 10 buster). During configure in cmake I added flags with values: RSID_PREVIEW=1 RSID_SAMPLES=1 RSID_SECURE=1

When I perform a command:

pi@raspberrypi:~ $ dmesg | grep 'Intel F450' -A 5 | grep ttyACM
[   67.583235] cdc_acm 1-1.1:1.2: ttyACM0: USB ACM device

If I execute the commands individually. I have screen output:

pi@raspberrypi:~ $ dmesg | grep 'Intel F450' -A 5
[    2.741909] usb 1-1.1: Product: Intel F450
[    2.744120] usb 1-1.1: Manufacturer: Intel
[    2.746307] usb 1-1.1: SerialNumber: 00.00.01
[    2.770743] NET: Registered PF_INET6 protocol family
[    2.774708] Segment Routing with IPv6
[    2.776916] In-situ OAM (IOAM) with IPv6
--
[    6.970050] usb 1-1.1: Found UVC 1.10 device Intel F450 (2aad:6373)
[    6.977739] input: Intel F450 as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1:1.0/input/input1
[    6.979135] usb 1-1.2: Found UVC 1.00 device HD USB Camera (32e4:9530)
[    7.008920] input: HD USB Camera: HD USB Camera as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.2/1-1.2:1.0/input/input2
[    7.037650] checking generic (3e73a000 260000) vs hw (0 ffffffffffffffff)
[    7.037678] fb0: switching to vc4 from simple
[    7.050799] Console: switching to colour dummy device 80x30
--
[   67.562667] usb 1-1.1: Product: Intel F450
[   67.562684] usb 1-1.1: Manufacturer: Intel
[   67.562701] usb 1-1.1: SerialNumber: 00.00.01
[   67.567684] usb 1-1.1: Found UVC 1.10 device Intel F450 (2aad:6373)
[   67.570120] input: Intel F450 as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1:1.0/input/input4
[   67.583235] cdc_acm 1-1.1:1.2: ttyACM0: USB ACM device

and

pi@raspberrypi:~ $ dmesg | grep ttyACM
[    6.967718] cdc_acm 1-1.1:1.2: ttyACM0: USB ACM device
[   67.583235] cdc_acm 1-1.1:1.2: ttyACM0: USB ACM device

Also I get the following information:

pi@raspberrypi:~ $ ls -l /dev/serial/by-id
total 0
lrwxrwxrwx 1 root root 13 Jun 25 15:24 usb-Intel_Intel_F450_00.00.01-if02 -> ../../ttyACM0

pi@raspberrypi:~ $ ls -l /dev/ttyACM0
crw-rw---- 1 root dialout 166, 0 Jun 25 15:24 /dev/ttyACM0

pi@raspberrypi:~ $ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 006: ID 1a86:e5e3 QinHeng Electronics 
Bus 001 Device 005: ID 214b:7250  
Bus 001 Device 004: ID 32e4:9530  
Bus 001 Device 007: ID 2aad:6373  
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Tried to initiate launch rsid-cli, but seeing errors:

pi@raspberrypi:~ $ /usr/local/RealSenseID/build/bin/rsid-cli /dev/ttyACM0 usb
[2022-06-25 15:28:08.103] [debug] [LinuxSerial] Opening serial port /dev/ttyACM0 baudrate 115200
Connected to device
[2022-06-25 15:28:08.105] [debug] [SecureSession] Start session
[2022-06-25 15:28:08.114] [debug] [PacketSender] Sending packet 'c'
[2022-06-25 15:28:08.115] [debug] [PacketSender] Waiting packet..
[2022-06-25 15:28:08.127] [error] [PacketSender] Got invalid crc. Expected: 561. Actual: 20100
[2022-06-25 15:28:08.127] [error] [SecureSession] Failed to recv device key response
[2022-06-25 15:28:08.127] [error] [FaceAuthenticatorImpl] Session start failed with status 108
Status: CrcError

[2022-06-25 15:28:08.127] [debug] [SecureSession] Close session
Please select an option:

  'e' to enroll.
  'a' to authenticate.
  'd' to delete all users.
  'p' to pair with the device (enables secure communication).
  'i' to unpair with the device (disables secure communication).
  'c' to capture images from device.
  's' to set authentication settings.
  'g' to query authentication settings.
  'u' to query ids of users.
  'n' to query number of users.
  'b' to save device's database before standby.
  'v' to view additional information.
  'x' to ping the device.
  'q' to quit.

server mode options:
  'E' to enroll with faceprints.
  'A' to authenticate with faceprints.
  'U' to list enrolled users
  'D' to delete all users.

> v
[2022-06-25 15:28:10.153] [debug] [LinuxSerial] Opening serial port /dev/ttyACM0 baudrate 115200

Additional information:
 * S/N: 12056228170799A27FM10464-100
 * Firmware: OPFW:2.5.0.74|NNLED:2.22.21.0|NNLAS:2.12.21.0|DNET:4.5.20.0|RECOG:28.2.21.0|YOLO:25.4.21.0|AS2DLR:23.2.21.0
 * Host: 0.25.0

Please select an option:

  'e' to enroll.
  'a' to authenticate.
  'd' to delete all users.
  'p' to pair with the device (enables secure communication).
  'i' to unpair with the device (disables secure communication).
  'c' to capture images from device.
  's' to set authentication settings.
  'g' to query authentication settings.
  'u' to query ids of users.
  'n' to query number of users.
  'b' to save device's database before standby.
  'v' to view additional information.
  'x' to ping the device.
  'q' to quit.

server mode options:
  'E' to enroll with faceprints.
  'A' to authenticate with faceprints.
  'U' to list enrolled users
  'D' to delete all users.

> c
/sys/class/video4linux/video4/device/*/*/id/vendor: No such file or directory
/sys/class/video4linux/video4/device/*/*/id/product: No such file or directory
/sys/class/video4linux/video5/device/*/*/id/vendor: No such file or directory
/sys/class/video4linux/video5/device/*/*/id/product: No such file or directory
/sys/class/video4linux/video6/device/*/*/id/vendor: No such file or directory
/sys/class/video4linux/video6/device/*/*/id/product: No such file or directory
/sys/class/video4linux/video7/device/*/*/id/vendor: No such file or directory
/sys/class/video4linux/video7/device/*/*/id/product: No such file or directory
/sys/class/video4linux/video8/device/*/*/id/vendor: No such file or directory
/sys/class/video4linux/video8/device/*/*/id/product: No such file or directory
/sys/class/video4linux/video9/device/*/*/id/vendor: No such file or directory
/sys/class/video4linux/video9/device/*/*/id/product: No such file or directory
/sys/class/video4linux/video10/device/*/*/id/vendor: No such file or directory
/sys/class/video4linux/video10/device/*/*/id/product: No such file or directory
/sys/class/video4linux/video11/device/*/*/id/vendor: No such file or directory
/sys/class/video4linux/video11/device/*/*/id/product: No such file or directory
/sys/class/video4linux/video12/device/*/*/id/vendor: No such file or directory
/sys/class/video4linux/video12/device/*/*/id/product: No such file or directory
/sys/class/video4linux/video13/device/*/*/id/vendor: No such file or directory
/sys/class/video4linux/video13/device/*/*/id/product: No such file or directory
/sys/class/video4linux/video14/device/*/*/id/vendor: No such file or directory
/sys/class/video4linux/video14/device/*/*/id/product: No such file or directory
/sys/class/video4linux/video15/device/*/*/id/vendor: No such file or directory
/sys/class/video4linux/video15/device/*/*/id/product: No such file or directory
/sys/class/video4linux/video16/device/*/*/id/vendor: No such file or directory
/sys/class/video4linux/video16/device/*/*/id/product: No such file or directory
/sys/class/video4linux/video17/device/*/*/id/vendor: No such file or directory
/sys/class/video4linux/video17/device/*/*/id/product: No such file or directory
[2022-06-25 15:28:12.016] [debug] [Utilities] capture devices 1
starting preview for 3 seconds [2022-06-25 15:28:12.033] [debug] [Preview] Preview started!
terminate called after throwing an instance of 'std::runtime_error'
  what():  jpeg error: Not a JPEG file: starts with 0x2a 0x7a
Aborted

When was the firmware updated:

pi@raspberrypi:/usr/local/RealSenseID/build/bin $ sudo ./rsid-fw-update --file F450_4.3.0.8200_SKU1_SIGNED.bin --port /dev/ttyACM0
Using manual device selection...

[2022-06-25 15:29:26.267] [debug] [LinuxSerial] Opening serial port /dev/ttyACM0 baudrate 115200
[2022-06-25 15:29:26.823] [info] [FwUpdater] Extract modules from "F450_4.3.0.8200_SKU1_SIGNED.bin"
[2022-06-25 15:29:26.824] [debug] [FwUpdater] [    OPFW] 2.76 MB,  6 blocks
[2022-06-25 15:29:26.955] [debug] [FwUpdater] [   NNLED] 2.64 MB,  6 blocks
[2022-06-25 15:29:27.050] [debug] [FwUpdater] [   NNLAS] 2.28 MB,  5 blocks
[2022-06-25 15:29:27.132] [debug] [FwUpdater] [    DNET] 2.95 MB,  6 blocks
[2022-06-25 15:29:27.232] [debug] [FwUpdater] [    YOLO] 1.04 MB,  3 blocks
[2022-06-25 15:29:27.265] [debug] [FwUpdater] [   RECOG] 4.32 MB,  9 blocks
[2022-06-25 15:29:27.410] [debug] [FwUpdater] [  AS2DLR] 2.30 MB,  5 blocks
[2022-06-25 15:29:27.481] [info] [FwUpdater] Extracted 7 modules
[2022-06-25 15:29:27.482] [debug] [FwUpdater] 
Device does not support the encryption applied on the firmware. Replace firmware binary.
pi@raspberrypi:/usr/local/RealSenseID/build/bin $ ./rsid-fw-update --file F450_4.3.0.8200_SKU2_SIGNED.bin --port /dev/ttyACM0
Using manual device selection...

[2022-06-25 15:29:49.603] [debug] [LinuxSerial] Opening serial port /dev/ttyACM0 baudrate 115200
[2022-06-25 15:29:49.868] [info] [FwUpdater] Extract modules from "F450_4.3.0.8200_SKU2_SIGNED.bin"
[2022-06-25 15:29:49.871] [debug] [FwUpdater] [    OPFW] 2.76 MB,  6 blocks
[2022-06-25 15:29:49.989] [debug] [FwUpdater] [   NNLED] 2.64 MB,  6 blocks
[2022-06-25 15:29:50.080] [debug] [FwUpdater] [   NNLAS] 2.28 MB,  5 blocks
[2022-06-25 15:29:50.161] [debug] [FwUpdater] [    DNET] 2.95 MB,  6 blocks
[2022-06-25 15:29:50.262] [debug] [FwUpdater] [    YOLO] 1.04 MB,  3 blocks
[2022-06-25 15:29:50.294] [debug] [FwUpdater] [   RECOG] 4.32 MB,  9 blocks
[2022-06-25 15:29:50.436] [debug] [FwUpdater] [  AS2DLR] 2.30 MB,  5 blocks
[2022-06-25 15:29:50.508] [info] [FwUpdater] Extracted 7 modules
[2022-06-25 15:29:50.508] [debug] [FwUpdater] 

Summary:
 * Serial number: 12056228170799A27FM10464-100
 * Serial port: /dev/ttyACM0
 * Incompatible with current device firmware
 * Compatible with new device firmware
 * Firmware update path:
     * OPFW: 2.5.0.74 -> 4.3.0.8200
     * RECOG: 28.2.21.0 -> 1.6.21.0

[2022-06-25 15:29:50.510] [debug] [LinuxSerial] Opening serial port /dev/ttyACM0 baudrate 115200
[2022-06-25 15:29:50.967] [info] [FwUpdater] Extract modules from "F450_4.3.0.8200_SKU2_SIGNED.bin"
[2022-06-25 15:29:50.968] [debug] [FwUpdater] [    OPFW] 2.76 MB,  6 blocks
[2022-06-25 15:29:51.079] [debug] [FwUpdater] [   NNLED] 2.64 MB,  6 blocks
[2022-06-25 15:29:51.117] [debug] [FwUpdater] [   NNLAS] 2.28 MB,  5 blocks
[2022-06-25 15:29:51.151] [debug] [FwUpdater] [    DNET] 2.95 MB,  6 blocks
[2022-06-25 15:29:51.194] [debug] [FwUpdater] [    YOLO] 1.04 MB,  3 blocks
[2022-06-25 15:29:51.209] [debug] [FwUpdater] [   RECOG] 4.32 MB,  9 blocks
[2022-06-25 15:29:51.272] [debug] [FwUpdater] [  AS2DLR] 2.30 MB,  5 blocks
[2022-06-25 15:29:51.305] [info] [FwUpdater] Extracted 7 modules
[2022-06-25 15:29:51.305] [debug] [FwUpdater] 
Firmware cannot be updated directly to the chosen version.
Flash firmware version 3.1.#.# first.

Any idea what is the right configuration for the video format? I have not made any changes to the sample programs. All configurations are default. Appreciate any advise I can get.