WSL (Windows Subsystem for Linux) edge impulse CLI

Trying to install Edge Impulse CLI to use Data forwarder for a not supported board??
Easy fix: buy a supported board and use the browser to acquire the data, if not then do this:

I made this small tutorial after 5 days of struggling with edge impulse CLI because I don’t have a supported board, but the platform is really nice and helpful (thanks to the developers) of edge impulse.
In my case, using windows was a pain. Not the first time ESP32 EDGE IMPULSE - YouTube as you can see on my video. The first time I had a successful execution, so try this first, or you can search a lot of help in the forum. But if nothing seems to work out with the installations, read along …
Another laptop later and it took my five days to finally get it working, so here it is what I learned:

It is better to use WSL (Windows Subsystem for Linux) in that way if you screw something just erase the virtual environment and be safe to start over

Install WSL Windows Subsystem for Linux How to Install Ubuntu on Windows 11 (WSL) - YouTube
Then install Ubuntu, the version stable on the Microsoft store
Then try to install Edge Impulse CLI Installation - Edge Impulse Documentation
If you run into any issues please comment below but first try to read:

If error : edge impulse NPM ERR! gyp ERR! stack Error: not found: make
sudo apt-get install build-essential

To be able to see the serial port in the WSL watch this USBIPD: Using serial ports in WSL2 - YouTube

to install USBip on WSL (Windows Subsystem for Linux)

sudo apt install linux-tools-5.15.0-25-generic hwdata
sudo update-alternatives --install /usr/local/bin/usbip usbip `ls /usr/lib/linux-tools

If error : You might need sudo or set up the right udev rules
sudo chown <username> /dev/ttyUSB0

If error : no instance of linux running
You need to know which version of linux WSL you have installed for example mine is 22.04 then attach the usbipd to that version
usbipd wsl attach -d Ubuntu-22.04 -b 2-3

If error : frequency is not detected then check how many time on delay(#) or vTaskDelay(#) and convert the period to frequency and overide it with:
edge-impulse-data-forwarder --frequency 1

//You need to upload a sketch (arduino) on the board that prints to the serial in the loop() function
but you need to do it with CSV Coma Separate Values format for example

Serial.print(accelerometer.x);
Serial.print(", ");
Serial.print(accelerometer.y);
Serial.print(", ");
Serial.println(accelerometer.z);

Thanks for all the help in the forum, specially to Shawn Hymel for all the broad amount of online tutorials without cost and detailed explanation. Sorry if some parts are not clear, but I tried to keep my documentation of the process. Have a good day :slight_smile:

3 Likes

Thanks for all the details @EduardoJoaquin, I’m sure it will be helpful for our users!

Aurelien

1 Like