SYSTEM_MODE(MANUAL) not working

I tried to use a new boron with SYSTEM_MODE(MANUAL). I exited the listening mode with particle usb stop-listening --all but then it always starts blinking green and the user code is not executed. Any ideas on how to exit this green blinking mode?

What device OS version have you got on it?
Can you test with the most minimal code and show that too?

I am using 1.5.2. Below is my code:

SYSTEM_MODE(MANUAL);

void setup() {
  pinMode(D7, OUTPUT);
  digitalWrite(D7, HIGH);
}

void loop() {
}

It seems like the my code never starts running. Note: It is a totally new boron so no setup done. After I do particle usb stop-listening --all it starts blinking green.

I’m experiencing the same thing when trying to flash via the Visual Studio Code when I try to flash 3 different Argons locally via DFU.

I am able to compile via the cloud and flash aa Photon over Wifi just fine though.

The problem is the 3 Argon’s do not have the correct Wifi credentials so I can’t get them to program via Local flash and Cloud flashing is not possible without a wifi connection.

I tried putting the 3 Argon’s though the setup process to program the Wifi info but setup hangs on Android and iOS.

Maybe I need to update Visual Studio Code?

For an entirely fresh Gen3 device you’d need to have the Setup-Done-Flag set.
You can do that via particle usb setup-done (IIRC in DFU Mode)

Tried that, didn’t work. Said it couldn’t find it via USB was the error the CLI gave me.

Neither of the 3 Argon’s I had were new, they had already been claimed.

I’m updating Visual Studio Code now.

Did you just update deviceOS on the Argons? The Argons might be trying to download the bootloader from the cloud and since the Wi-Fi credentials are incorrect like you mentioned, they are unable to.

Have you tried manually placing the Argons into safe mode, then putting them into listening mode, and then configuring the wifi credentials through the CLI?

particle serial wifi

HA!

Particle serial wifi

is what I have been looking for over the last 24 hours but never saw it in the CLI help list of options.

I ended up finding one Argon that had the right Wifi info on it already but now I'm going to see if your trick works :grinning:

1 Like

It worked perfectly!

And that function is not listed in the list of available options in the CLI so that cost me tons of time!

Who should we reach out to to maybe get that commanded added to the list?

It is listed already, but not completely obvious I guess.

$ particle help serial

Simple serial interface to your devices
Usage: particle serial <command>
Help:  particle help serial <command>

Commands:
  list      Show devices connected via serial to your computer
  monitor   Connect and display messages from a device
  identify  Ask for and display device ID via serial
  wifi      Configure Wi-Fi credentials over serial
  mac       Ask for and display MAC address via serial
  inspect   Ask for and display device module information via serial
  flash     Flash firmware over serial using YMODEM protocol
  claim     Claim a device with the given claim code

Global Options:
  -v, --verbose  Increases how much logging to display                                                          [count]
  -q, --quiet    Decreases how much logging to display    

Are you sure?

particle --help
Welcome to the Particle Command Line Interface!
Version 2.7.2
https://github.com/particle-iot/particle-cli

Usage: particle <command>
Help:  particle help <command>

Commands:
  binary      Inspect binaries
  call        Call a particular function on a device
  cloud       Access Particle cloud functionality
  compile     Compile a source file, or directory using the cloud compiler
  config      Configure and switch between multiple accounts
  device      Manipulate a device
  doctor      Put your device back into a healthy state
  flash       Send firmware to your device
  function    Call functions on your device
  get         Retrieve a value from your device
  identify    Ask for and display device ID via serial
  keys        Manage your device's key pair and server public key
  library     Manage firmware libraries
  list        Display a list of your devices, as well as their variables and functions
  login       Login to the cloud and store an access token locally
  logout      Log out of your session and clear your saved access token
  mesh        Manage mesh networks
  monitor     Connect and display messages from a device
  nyan        Make your device shout rainbows
  preprocess  Preprocess a Wiring file (ino) into a C++ file (cpp)
  product     Access Particle Product functionality [BETA]
  project     Manage application projects
  publish     Publish an event to the cloud
->serial      Simple serial interface to your devices
  setup       Do the initial setup & claiming of your device
  subscribe   Listen to device event stream
  token       Manage access tokens (require username/password)
  udp         Talk UDP to repair devices, run patches, check Wi-Fi, and more!
  update      Update the system firmware of a device via USB
  update-cli  Update the Particle CLI to the latest version
  usb         Control USB devices
  variable    Retrieve and monitor variables on your device
  webhook     Manage webhooks that react to device event streams
  whoami      prints signed-in username
>particle serial --help
Simple serial interface to your devices
Usage: particle serial <command>
Help:  particle help serial <command>

Commands:
  list      Show devices connected via serial to your computer
  monitor   Connect and display messages from a device
  identify  Ask for and display device ID via serial
->wifi      Configure Wi-Fi credentials over serial
  mac       Ask for and display MAC address via serial
  inspect   Ask for and display device module information via serial
  flash     Flash firmware over serial using YMODEM protocol
  claim     Claim a device with the given claim code

And tons of suggestions in this forum to use that
https://community.particle.io/search?q=particle%20serial%20wifi%20

1 Like

Not really when your using Windows + the latest Visual Studio.

When I open the CLI from inside Visual Studio it prints the text below with zero mention of the Serial Wifi command while it does list all the other commands.

Also in your screenshot it shows a arrow pointing towards Serial where it looks like you can drill down and see all other commands under serial but that arrow and the ability to drill down into other commands is not possible with my combo of OS and Software.

I didn’t know there were other commands available that were not shown on the first load of the CLI. Below is what comes up once I load the CLI.


1 Like

Most of the commands listed there have many subcommands, so it would be too long to list out.

To find any subcommands for a given command you can use:

$ particle help <command>

Good to know there are tons of sub commands if needed.

I searched the Docs and this option was not listed.

1 Like

As described this only solves half of the problem. My borons still doesn't execute the code. It starts to blink green (trying to connect to particle cloud?). It seems like the user code is never run. Any ideas?

You most likely have a missing system dependency, like a bootloader or SoftDevice that needs upgrading. Putting the device in listening mode (blinking dark blue) and doing

particle serial inspect

may show the missing part. The reason it’s going into blinking green is that the system cannot run user code until the missing dependency is corrected, and that requires going online to get it.

Or you could flash it over USB if you didn’t want to or can’t get the device online.

Thank you very much for this information! It really seems like I have an old radio stack module on the device:

  Bootloader module #0 - version 501, main location, 49152 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      System module #1 - version 1102
  System module #1 - version 1512, main location, 671744 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: FAIL
      Bootloader module #0 - version 501
      Radio stack module #0 - version 202
  User module #1 - version 6, main location, 131072 bytes max size
    UUID: 5B2BE897F1F2D0430C4613E9491AA3CC7E482484B871A51BB865CE8CBDACE07B
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      System module #1 - version 1512
  Radio stack module #0 - version 169, main location, 192512 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS

Do you know how to update it?

I fixed it with particle update. Thank you for your help!

I tried to use the command below to get a Argon out of blinking blue mode.

particle usb stop-listening

I’ve installed the latest Visual Studio & CLI but I still get this missing particle-usb dependency.

I think it’s missing DFutil, is there a simple self-installing package for Dfutil on Windows?

I’ve seen this bug on Linux and macOS, but it’s OS independent and more of an issue with npm.

On Windows, the dependencies for Workbench and particle-cli are kept in AppData\Local\particle\ inside your home folder, as you can see in the error message.

To force particle-cli to reinstall the dependencies delete the node_modules folder and then run particle again. This will cause the wrapper to attempt to download node_modules. Hopefully the particle usb commands work afterwards.

If that doesn’t work, you could try deleting the entire particle directory, with the caveat that Workbench will have to re-download everything and you’ll probably get signed out of particle-cli.


This error is unrelated to dfu-util. On Windows a copy of dfu-util is kept in ...\particle\toolchains\buildtools\bin.


Sorry for being lazy with the paths, I enjoy working on *nix where Particle stuff is kept in ~/.particle.