[SOLVED] CLI, Particle Identify trouble using Ubuntu

Hello Particle community:

I am having trouble accessing Particle Identify on my new computer. A Dell XPS 13 running Ubuntu 16.04. I have my electon in listening mode, and am trying to connect using using the Particle CLI. However, I am getting a strange error.

Any suggestions? running particle setup says it “sees” a particle electron, so it can’t be that far off. I’d like to be able to read the SIM card ICCD from this device.

Thanks!

adam@adam-XPS-13-9370:~$ particle identify
Serial err: Error: Error: Permission denied, cannot open /dev/ttyACM0
Serial problems, please reconnect the device.

! serial: Serial problems, please reconnect the device.
adam@adam-XPS-13-9370:~$ 

Here’s a photo of the device connected to my computer. It is blinking blue in listening mode.

Make sure you’ve uninstalled modemmanager.

sudo apt purge modemmanager

Hi nrobinson2000,

same error after uninstalling modemmanger.

adam@adam-XPS-13-9370:~$ particle identify
Serial err: Error: Error: Permission denied, cannot open /dev/ttyACM0
Serial problems, please reconnect the device.

! serial: Serial problems, please reconnect the device.

I am going to check this problem is not electron specific. This particular unit is acting strangely (not holding listening mode)

Can you do:

sudo ls -la /dev/ttyACM0 

You might have to add yourself to the plugdev group.

The particle CLI installer should have installed a udev rule in /etc/udev/rules.d. “particle” should be in the filename. That’s what normally allows non-root users to access /dev/ttyACM0.

1 Like

Here’s the udev rule:

1 Like

Hi guys,

I attempted the latest recommendation from nrobinson2000 but still no luck.

adam@adam-XPS-13-9370:~$ sudo ls -la /dev/ttyACM0
[sudo] password for adam: 
crw-rw---- 1 root dialout 166, 0 May 26 17:32 /dev/ttyACM0
adam@adam-XPS-13-9370:~$ particle identify
Serial err: Error: Error: Permission denied, cannot open /dev/ttyACM0
Serial problems, please reconnect the device.

! serial: Serial problems, please reconnect the device.

I’m still getting used to Ubuntu, so may be I could get your help. It sounds like from rickkas7 there should be a udev rule added. What is a udev rule?

You can install the udev rule with these commands:

$ curl -fsSLO https://github.com/nrobinson2000/po/raw/master/depend/60-po-util.rules
$ sudo mv 60-po-util.rules /etc/udev/rules.d/60-po-util.rules

But I’d really recommend installing po-util which will install the udev rule and everything else required for local Particle development.

$ bash <(curl -sL get.po-util.com)

Hi Nrobinson2000,

Thank you for the recommendation. I see you’ve got a pretty cool contribution to the particle community.

I’m having trouble with the installation of po-util. I was hoping you could provide a recommendation.

adam@adam-XPS-13-9370:~$ bash <(curl -sL get.po-util.com)

Are you ready to install po-util?
Please be sure to follow any prompts or instructions
during the installation process.
ENTER / CTRL-C: 

Continuing installation...

[sudo] password for adam: 
curl: (23) Failed writing body (0 != 1919)
chmod: cannot access '/usr/local/bin/po': No such file or directory
/dev/fd/63: line 44: po: command not found
po-util has been installed on your system.
If you are unsure about how to start with po-util
please check out the quickstart guide:
https://docs.po-util.com/quick-start.html

What would cause it to not have access to ‘/usr/local/bin/po’?

Thanks!

Could you try it again? The GitHub download may have been down temporarily for you. I just tried running the installer and it works for me.

Hi there,

Just ran it again and same error as before.

Could it be a problem on my end? any recommendations?

> adam@adam-XPS-13-9370:~$ bash <(curl -sL get.po-util.com)
> 
> Are you ready to install po-util?
> Please be sure to follow any prompts or instructions
> during the installation process.
> ENTER / CTRL-C: 
> 
> Continuing installation...
> 
> [sudo] password for adam: 
> curl: (23) Failed writing body (0 != 1919)
> chmod: cannot access '/usr/local/bin/po': No such file or directory
> /dev/fd/63: line 44: po: command not found
> po-util has been installed on your system.
> If you are unsure about how to start with po-util
> please check out the quickstart guide:
> https://docs.po-util.com/quick-start.html
> 
> adam@adam-XPS-13-9370:~$

Try running these lines from the installer:

sudo curl -fsSLo /usr/local/share/po-common https://raw.githubusercontent.com/nrobinson2000/po/master/share/po-common
sudo curl -fsSLo /usr/local/share/po-linux https://raw.githubusercontent.com/nrobinson2000/po/master/share/po-linux
sudo curl -fsSLo /usr/local/bin/po https://raw.githubusercontent.com/nrobinson2000/po/master/bin/po
sudo chmod +x /usr/local/bin/po
po install

Hi Nrobinson2000

I get an error on the 3rd item in the list.

adam@adam-XPS-13-9370:~$ sudo curl -fsSLo /usr/local/bin/po https://raw.githubusercontent.com/nrobinson2000/po/master/bin/po
curl: (23) Failed writing body (0 != 1917)

And the 4th item. also causes an error.

adam@adam-XPS-13-9370:~$ sudo chmod +x /usr/local/bin/po
chmod: cannot access '/usr/local/bin/po': No such file or directory

Last line, also has an error.

adam@adam-XPS-13-9370:~$ po install
po: command not found

Is there something you can recommend to check its not my machine? I’m running Ubuntu 16.04.

Thank you for your help on this!

It looks like it’s failing to download.

Can you check to make sure the /usr/local/bin folder exists?

ls /usr/local/bin

It does not exist.

Should I create it?

There is a folder called “sbin” in this location is that useful?

Update: I created /usr/local/bin the install is working now.

Successfully installed!

However, when I run particle identify I get the following error.

> adam@adam-XPS-13-9370:~$ particle identify
> 
> Your device id is undefined
> Your system firmware version is undefined
1 Like

The electron’s in listening mode right?

Hi nrobinson2000,

Yes, it is in listening mode. But… The software on the device was running SystemThread enabled which can cause problems. See this post. Electron entering listening mode when not able to connect

I put the device into “Safe” Listening mode. Going “Safe Mode” -> “Listening Mode”

After that I re-ran particle identify and got the information I was looking for.

Thank you @nrobinson2000 and @rickkas7 for your help!

1 Like

Great!

1 Like

I hope you enjoy po-util. It’s got a lot of features.

Hi there, I am running Ubuntu 18.04.2 LTS. I have installed po utils and receive this error when I try to login…

les@les-RV411-RV511-E3511-S3511:~/bin$ particle login
module.js:549
throw err;
^

Error: Cannot find module ‘core-js/modules/es.array.index-of’
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object. (/usr/local/lib/node_modules/particle-cli/dist/app/cli.js:3:1)
at Module._compile (module.js:652:30)
at Object.Module._extensions…js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)

Can you point out where I’m going wrong please