Particle CLI can't read firmware version on Electron

Hi,

Using Particle CLI version 1.12.0…

If I issue the command: ‘sudo particle identify’ then I get back the Device ID, IMEI and ICCID, then I get an error about being unable to open /dev/ttyACM0 and it quits.
However, if I open /dev/ttyACM0 using screen, then I can issue the ‘v’ command and get the firmware version.

Is this a bug?

This is an Electron G350, firmware version 0.5.0 using a Virtual Box VM running Ubuntu 14.04.3 hosted on a Mac host for the CLI tools.

When you use screen to open the serial port, is this on the VM or on the mac terminal?

Try sudo particle serial inspect instead

identify is to identify the hardware your’ve plugged in, and inspect looks a bit closer to find out what this hardware “does”.

on the VM

Are you still having issues?

Yes, now I can’t get electron or spark core to be recognised, even though they are flashing yellow (DFU) and mapped through to the VM. But have just upgraded to a Ubuntu 16.04 LTS VM on the latest Virtual Box version. Will try it tonight.

Thanks for checking.

Make sure they devices are listed in the ubuntu usb list and they should work.

Nope… if the space core is in normal running mode then it gets recognised, and /tty/ACM0 assigned, but if I put it into DFU mode then no tty is assigned. This is in a VM, using virtualbox, on OSX. Particle CLI won’t install natively on the OSX host.

In DFU mode (blinking yellow) there sure is no /tty/ACM0, you’d need to put your device into Listening/Setup mode (blinking blue) if you want to run any of the CLI serial commands or use v to request the version via a serial monitor.

Hmmm… flashing blue and no luck:

[ 149.271298] usb 2-2: new full-speed USB device number 3 using ohci-pci
[ 149.581499] usb 2-2: New USB device found, idVendor=1d50, idProduct=607d
[ 149.581503] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 149.581505] usb 2-2: Product: Spark Core with WiFi
[ 149.581506] usb 2-2: Manufacturer: Particle
[ 149.581507] usb 2-2: SerialNumber: 8D9515755349
[ 149.699444] cdc_acm 2-2:1.0: ttyACM0: USB ACM device
[ 149.709768] usbcore: registered new interface driver cdc_acm
[ 149.709772] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
will@will-VirtualBox:~$ ls /dev/ttyACM0
/dev/ttyACM0
will@will-VirtualBox:~$ ls -l /dev/ttyACM0
crw-rw-rw- 1 root dialout 166, 0 May 16 22:07 /dev/ttyACM0
will@will-VirtualBox:~$ sudo particle identify

Your device id is 55ff6f064989495320162587
Serial err: Error: Cannot open /dev/ttyACM0
Serial problems, please reconnect the device.
Unable to determine system firmware version
will@will-VirtualBox:~$

@ScruffR, how do you translate the version from the particle serial inspect command.

What is version 103 for the firmware?

System module #2 - version 103, main location, 131072 bytes max size
Integrity: PASS
Address Range: PASS
Platform: PASS
Dependencies: PASS
System module #1 - version 103

I don’t really have a recipe to translate this version number into the commonly known “x.y.z” form.
I usually do it by comparing the number to a known piece.

You can build a version targeted binary and find out what number this got via particle binary inspect firmware.bin tho’

But maybe @mdma can shed some light on that - I’d be interested too (and maybe CLI can be convinced to be less cryptic in future ;-))

Also having this problem where I can’t seem to identify the firmware version using Particle CLI.

Anyone gave any luck with this yet?

Here is what I get at my terminal (Windows 10):

C:\WINDOWS\system32>particle serial identify

Your device id is xxxxxxxxxxxxxxxxxxxxxxxx
Your IMEI is xxxxxxxxxxxxxxx
Your ICCID is xxxxxxxxxxxxxxxxxxxx
Serial err: Error: Opening COM6: Access denied
Serial problems, please reconnect the device.
Unable to determine system firmware version

C:\WINDOWS\system32>particle serial inspect
Platform: 10 - Electron
Modules
  Bootloader module #0 - version 11, main location, 16384 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
  System module #1 - version 105, main location, 131072 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      System module #3 - version 105
  System module #2 - version 105, main location, 131072 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      System module #1 - version 105
  System module #3 - version 105, main location, 131072 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
  User module #1 - version 4, main location, 131072 bytes max size
    UUID: 695AD009B2B5AC3B3335B24327EC8446818C856BC3756B778C9A0C3B263EAA67
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      System module #2 - version 105
  empty - factory location, 131072 bytes max size

With an Electron you can just do

particle identify

Or even with a mere serial terminal and Listening Mode, via the v command.

Here is what I get with particle identify:

C:\Users\Boompy>particle identify

Your device id is my device ID… would’t you like to know
Your IMEI is my IMEI, i bet you would like to know
Your ICCID is my ICCID, yea that’s right
Serial err: Error: Opening COM6: Access denied
Serial problems, please reconnect the device.
Unable to determine system firmware version

Update: uninstalled and re-installed node.js and particle-cli and still getting the same result where

particle identify

is returning

Serial err: Error: Opening COM4: Access denied
Serial problems, please reconnect the device.
Unable to determine system firmware version

I have tried opening cmd with administrator privilege so I know that isn’t the issue. Help!

Update:

I was able to use my work computer to identify the firmware version using the older version of Particle CLI that I was running on that machine (I didn’t check what version it was running, otherwise I would have posted it here… d’oh!)

I then updated Particle-CLI on that machine and subsequent attempts to use particle serial identify resulted in tons of errors being thrown.

So, it looks like this is an issue related to some changes that have been made to Particle CLI over the last few months.

As of right now, a fresh install of node js, with a fresh version of particle cli, with a fresh install of the Electron USB driver (i.e. I uninstalled all previously installed devices in Device Manager, even hidden ones) results in the following:

Serial err: Error: Opening COM4: Access denied
Serial problems, please reconnect the device.
Unable to determine system firmware version

Just a double check–your device is in listening mode right? Blinking blue?

None of the serial commands work in any other mode.

1 Like

Indeed!

1 Like

Update:

Using PuTTY while device is in listening mode and typing “v” results in system firmware version being displayed… so looks like its definitely a Particle CLI issue