Cannot run edge-impulse-linux-runner on RPi4


upon following the instructions from:, I’ve launched the “edge-impulse-linux”, I got the following error:

root@raspberrypi:~# edge-impulse-linux --api-key ei_<xyz>
Edge Impulse Linux client v1.3.0

? Select a microphone (or run this command with --disable-microphone to skip selection) bcm2835_headpho - bcm2835 Headphones
[SER] Using microphone hw:0,0
Failed to initialize linux tool Error code was not 0: Probing devices...

[15:20:57.457126108] [5257]  INFO Camera camera_manager.cpp:293 libcamera v0.0.0+3156-f4070274
Failed to start device monitor!

My setup is:
RPi4, with a USB camera, running RaspberryPi OS Lite (Raspbian GNU/Linux 11 (bullseye)) (Linux raspberrypi 5.10.63-v7l+ #1459 SMP Wed Oct 6 16:41:57 BST 2021 armv7l GNU/Linux), and I have v1.3.0 of edge-impulse-linux

I confirm I can see the camera:
root@raspberrypi:~# lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 046d:0826 Logitech, Inc. HD Webcam C525
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

And I also confirm “gst-device-monitor-1.0” cannot! So this libcamera dependency is somehow causing the problem. In debug mode, I see the following snippet:

0:00:00.805322294  3249   0xfc0200 DEBUG                GST_BUS gstbus.c:340:gst_bus_post:<bus0> [msg 0xfc1728] posting on bus device-added message: 0xfc1728, time 99:99:99.999999999, seq-num 1, element 'libcameraprovider0', GstMessageDeviceAdded, device=(GstDevice)"\(GstLibcameraDevice\)\ \(null\)";
0:00:00.805348998  3249   0xfc0200 DEBUG                GST_BUS gstbus.c:383:gst_bus_post:<bus0> [msg 0xfc1728] pushing on async queue
0:00:00.805373238  3249   0xfc0200 LOG                 GST_POLL gstpoll.c:290:raise_wakeup: 0xfb6888: raise
0:00:00.805408757  3249   0xfc0200 DEBUG                GST_BUS gstbus.c:386:gst_bus_post:<bus0> [msg 0xfc1728] pushed on async queue
0:00:00.805435331  3249   0xfc0200 TRACE        GST_REFCOUNTING gstminiobject.c:647:gst_mini_object_unref: 0xfc1728 unref 3->2
0:00:00.805461830  3249   0xfc0200 DEBUG                GST_BUS gstbus.c:383:gst_bus_post:<bus1> [msg 0xfc1728] pushing on async queue
0:00:00.805485441  3249   0xfc0200 LOG                 GST_POLL gstpoll.c:290:raise_wakeup: 0xfb68c8: raise
0:00:00.805514034  3249   0xfc0200 DEBUG                GST_BUS gstbus.c:386:gst_bus_post:<bus1> [msg 0xfc1728] pushed on async queue
0:00:00.805541219  3249   0xfc0200 TRACE        GST_REFCOUNTING gstobject.c:264:gst_object_unref:<GstLibcameraDevice@0x1084cd8> 0x1084cd8 unref 4->3
0:00:00.805570385  3249   0xfc0200 DEBUG                GST_BUS gstbus.c:498:gst_bus_set_flushing:<bus2> unset bus flushing
0:00:00.806436656  3249   0xfc0200 DEBUG                  pulse pulsedeviceprovider.c:534:gst_pulse_device_provider_start:<pulsedeviceprovider0> connect to server (NULL)
0:00:00.806822004  3249   0xfc0200 ERROR                  pulse pulsedeviceprovider.c:537:gst_pulse_device_provider_start:<pulsedeviceprovider0> Failed to connect: Connection refused

Hope you can help
Thanks in advance

Hi @cristovao.cordeiro,

You’ve used the same camera to collect data?
Can you try with the flag --clean to verify the camera is correctly selected?


Hi @aurel,

sorry, I was switching between hardware. The “edge-impulse-linux” command also fails, with the same error. This is related with the gst+libcamera dependencies

(I’ve edited the op)

just pinging to reactivate this thread. any help would be highly appreciated

Hi @cristovao.cordeiro,

I’m wondering if it’s related to using the OS Lite version, I have a Logitech camera too and don’t run into this issue. You could give it a try with the default OS version, I’ll also look into testing the Lite one.