[Solved] Particle Dev CLI Serial Confusion - Uncaught Error: Invalid port specified: undefined

On Windows 10, with latest Particle Dev and my shiny new Electron! I get this error (at the bottom of post) when I try to open up the serial monitor inside Particle Dev. I followed the [Particle Official] Windows Guide which I thought I aced, but can't seem to flash it locally or see what's going on via the serial monitor in Particle Dev or trying to flash it via the CLI.

How do I figure out where the monkey wrench is?

Thank you!

Jose

In Listening Mode (blue blinky)

In CMD, If I type dfu-util -l I get:

dfu-util 0.8

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.gnumonks.org

If I put the Electron in DFU mode (yellow blinky)

it'll add the following lines.

Found DFU: [2b04:d00a] ver=0200, devnum=2, cfg=1, intf=0, alt=1, name="@DCT Flash /0x00000000/01016Kg", serial="00000000010C"
Found DFU: [2b04:d00a] ver=0200, devnum=2, cfg=1, intf=0, alt=0, name="@Internal Flash /0x08000000/03
016Ka,01016Kg,01064Kg,07*128Kg", serial="00000000010C"

If I try particle flash --serial firmware.bin

I get:

C:\Users\joe\Downloads>particle flash --serial firmware.bin
! PROTIP: Hold the SETUP button on your device until it blinks blue!
? Press ENTER when your device is blinking BLUE

! serial: No devices available via serial

Error in Particle Dev:

Error: Invalid port specified: undefined    at new SerialPort (C:\Users\joe\AppData\Local\particle\app-1.5.1\resources\app.asar\node_modules\spark-dev\node_modules\serialport\serialport.js:134:13)    at SerialMonitorView.module.exports.SerialMonitorView.connect (C:\Users\joe\AppData\Local\particle\app-1.5.1\resources\app.asar\node_modules\spark-dev\lib\views\serial-monitor-view.js:224:19)    at SerialMonitorView.module.exports.SerialMonitorView.toggleConnect (C:\Users\joe\AppData\Local\particle\app-1.5.1\resources\app.asar\node_modules\spark-dev\lib\views\serial-monitor-view.js:208:21)    at HTMLButtonElement.<anonymous> (C:\Users\joe\AppData\Local\particle\app-1.5.1\resources\app.asar\node_modules\atom-space-pen-views\node_modules\space-pen\lib\space-pen.js:220:36)    at HTMLButtonElement.jQuery.event.dispatch (C:\Users\joe\AppData\Local\particle\app-1.5.1\resources\app.asar\node_modules\jquery\dist\jquery.js:4435:9)    at HTMLButtonElement.elemData.handle (C:\Users\joe\AppData\Local\particle\app-1.5.1\resources\app.asar\node_modules\jquery\dist\jquery.js:4121:28)

If you place it in DFU mode (blinking yellow), you need to use particle flash --usb firmware.bin

In other modes, particle flash --serial firmware.bin should work well.

Ack. Sorry. I realize I wasn’t very clear. There are a lot of parts to this so its a bit confusing to me on what does what. I guess I was trying to show how much I had tried to trouble shoot this my self (to no avail).

What I was trying to relay; Even in Listening Mode (blinky blue) and typing particle flash --serial firmware.bin I get the same error: ! serial: No devices available via serial I haven’t even seen the –usb switch before now. And I just tried that and it worked! Yippee! However, I’m still not able to view the serial monitor in Particle Dev.

When I do this I get the Uncaught Error: Invalid port specified: undefined

You might want to update Particle Dev to the latest version and try again

In the Serial Monitor, a port is not chosen probably due to the incomplete installation of Particle Dev. Upgrade and let us know how it goes :wink:

I apologize if I’m not ‘getting it’ and by distracting us with another issue regarding Particle Dev. From what I understand I should be able to do pretty much everything via the CLI and not use Particle Dev? What if I never installed Particle Dev. How should I go about confirming the drivers and the Particle CLI are installed correctly?

Again, thank you for your help.

Found a fix to both issues!

@anathan just posted this yesterday. Now I can Particle Serial all day long and Particle Dev 1.5.1 is happy when I open the Serial Monitor.

Continuing the discussion from [Particle Official] Windows 10 Full CLI and DFU Setup: