Particle CLI front end runner program

I’m wondering if you could share some source code that I’m not been able to locate out on Github?

Some background: We’ve been doing beta testing with our iphone-based setup program for particle devices based heavily on your ios setup code, and unfortunately for our target market (homeowners and electrician dealer/installers) the softAP process is just too confusing and we’re likely to face a lot of support calls.

I’d like to put together a windows .net form-based front-end to the CLI node.js program so that at least the electrician/dealers who have a windows PC and a USB cable can do the network setup of our particle-based product without going through the softAP process. It would also handle the installation of node.js, the firmware update utility, etc. via a one-click installer.

I’ve taken a look at both edge.js and setting up a small web server within node.js as an API to call from a C# forms app, but then tried your cli program again and saw that it is initially a windows .exe. I went out to github and didn’t spot any released source code that was used to create this .exe. I’m wondering how you implemented the front end particle runner .exe program for CLI, and was hoping it was something I could modify/ tailor as part of my windows .net form front end?


-Steve Henry
Crafted Automation and Software Solutions, Inc.

While this is not an answer to the actual question;
You don’t need the CLI to configure credentials. Any serial terminal would do. If you can communicate with the device over serial, you’re good to go. Might make things a lot less complicated :slight_smile:

1 Like

Thanks for the reply-- I’m all for simple. In your recommendation, would you detect when someone sends a serial command in our running particle firmware and use the internal firmware commands to set wifi credentials? Otherwise not quite sure how to get serial to do the trick but I may be missing something in the particle documentation. I don’t see anything other than the CLI that allows configuration over the USB/serial port. That’s an option that might work although I was hoping to avoid having to pre-program the devices in advance, and I don’t think tinker has that function. I was intending to use the CLI command particle serial wifi which does just what I need-- but it needs node.js to run. The windows app would also enable some other diagnostics functions, firmware updates, etc. just as a friendly front-end to CLI. - read this and then the mention of setting up WiFi over serial is the first thing that comes up in the configure WiFi section below it, it just needs the preceding section to mean anything. So you don’t need any user code to handle that as long as you have an easy way for the engineer to put it in listening mode. Of course you might want to impelment something of your own to extend your GUIs capabilities to configuring other things in your device

1 Like

The easiest way to push the device into Listening Mode via USB is to set the USB COM baudrate to 28800.

In Windows you’d do that on the command line like this

mode COMx 28800

(x standing for the COM port number of your devices - iterating over the present COM ports should be straight forward in C#)

One handicap for this solution might be the need for Serial drivers on any Windows pre 10.


Excellent ideas-- I had missed the serial interface commands to set WiFi credentials and how they operate. I’ve done GUI front ends for serial interaction with devices several times and have the program install the necessary serial drivers, etc. based on the windows system. Thanks for the tips on the WIFI over serial as well as the right baudrate to use!