TLDR: I can flash my Xenon, but can’t get it to execute my user firmware, it appears to remain in listening mode (flashing blue).
How can I configure the Xenon to run my user firmware instead?
Background:
Hello, I previously used a RedBear Duo as a standalone BLE central device, reading advertisements from sensors of interest. As the RedBear devices lose support, Particle staff suggested that a Xenon would be a suitable replacement.
I currently have a Xenon device, and I’m able to compile and flash my custom firmware to it using Workbench or Particle CLI. I am able to put the Xenon into DFU mode and the firmware flash reports successful completion. Unfortunately, the Xenon does not appear to be executing my firmware. It continues flashing the blue LED (indicating listening mode?) and if I connect to it over USB serial at 9600 baud, it will respond with the Device ID, etc if I send “i” to it.
I do not have any other Particle devices besides the Xenon, so I was not able to set it up as part of a mesh network. I don’t want or need the mesh capability, I just want to scan BLE advertisements and send the data out from the serial port.
Relevant steps I’ve taken to try to resolve this:
- I suspected that perhaps it was staying in listening mode because the mesh network setup was never executed, so I used DFU to mark setup done:
echo -n -e \\x01 > dummy.bin
dfu-util -d 2b04:d00e -a 1 -s 0x1fc6:leave -D dummy.bin
- My code has the following at the top (per this post):
SYSTEM_THREAD(ENABLED);
SYSTEM_MODE(MANUAL);
-
I tried using Particle CLI to send “particle usb stop-listening” which reports Done, but doesn’t change the Xenon’s behavior
-
I used the Workbench command palette to configure the project for the device, including the specific device ID.
-
I’m using just a simple blinking LED test code:
#include "Particle.h"
int LED = D7;
SYSTEM_THREAD(ENABLED);
SYSTEM_MODE(MANUAL);
// setup() runs once, when the device is first turned on.
void setup() {
// Put initialization like pinMode and begin functions here.
pinMode(LED, OUTPUT); // sets pin as output
}
void loop()
{
digitalWrite(LED, HIGH); // sets the LED on
delay(200); // waits for 200mS
digitalWrite(LED, LOW); // sets the LED off
delay(200); // waits for 200mS
}
If anyone has any suggestions I would really appreciate it! This seems like it should be very simple but I’ve researched and tried to get it working and now I need to ask the community for help. Thank you in advance!
Dominic