I’ve got a Raspberry pi that had previously worked with the CLI but it seems that upgrading to 3.9.0 it is no longer working. When no device is connected I get the expected “No devices found.” But if I connect a particle device I get a node issue that goes into "Assertion ‘(func) != nullptr’ failed. And then it aborts
It’s a dependency issue in node-usb. The best option is to roll back to 3.7.0 on the Raspberry Pi. The instructions are here.
I tried that but I am still getting the same issue. I am running node version 18.16.0 in case that makes a difference.
Node v18 doesn’t work because of a dependency with serialport. It looks like particle-cli 3.7.0 with node v16 is unfortunately the best choice at the moment.
I am guessing I still need to follow the build-essential libudev-dev and dfu-util install instruction for it to get the node-usb and node-serialport?
The easiest way is to use the Particle CLI installer to get the external dependencies, like dfu-util and the udev rule, installed. They an executable and a file, not node packages, so using nvm or a similar tool to manage your node version doesn’t require that you reinstall those parts again.
You can just do the
npm install -g email@example.com with the downgraded node if you’ve already installed the Particle CLI once.
Odd it half works. If I try just “particle usb list” I get a particle-usb missing and a “version GLIBC_2.34 not found” error but if I do “sudo particle usb list” it works.
That’s weird. Try:
particle usb configure
That should reinstall the udev rule.
Still same issue. My use for it works fine including the sudo in the command so I am not too worried about it.
Here’s a workaround for the GLIBC not found error on Raspberry Pi.
It requires recompiling the usb npm module with the version of GLIBC that is available on the Rapberry Pi so it will require development tools installed on the Pi.
sudo apt-get install build-essential libudev-dev
Next you’ll need yarn. If the following command gives a permission error, run it with
npm install --global yarn
Finally, go to the directory where the node usb module included with the particle-cli is installed and rebuild it. If you used the CLI install script, this will be
cd ~/.particle/node_modules/particle-cli/node_modules/usb/ && yarn rebuild
Let me know if that works for you.