Xenon as standalone unit

Can the Xenon be used as a standalone control unit? I know it can’t be used as a gateway without an ethernet shield, I’m looking to use a Xenon, by itself, offline, and no mesh network. Similar to using a photon as a standalone unit, but the xenon would be better with its built in battery management. I did a forum search, it looks like most topics have been interested in using xenons in a standalone mesh network.

While it’s not officially supported you can use a Xenon with SYSTEM_MODE(MANUAL) but will have to update the device via USB.
You just need to activate the device once and from then on you can use it standalone.

4 Likes

I am flashing the below written code to my Xenon which has been successfully flashed several time with multiple way using VS code but led is not blinking… I have tried it on two xenons… same code is working with Argon and photon…

int LED = D7;

SYSTEM_THREAD(ENABLED);
SYSTEM_MODE(MANUAL);

void setup() {
  pinMode(LED, OUTPUT);    // sets pin as output
}

void loop()
{
  digitalWrite(LED, HIGH); // sets the LED on
  delay(500);              // waits for 500mS
  digitalWrite(LED, LOW);  // sets the LED off
  delay(500);              // waits for 500mS
}

What is the RGB LED doing?

Its in listening mode…blinking blue

What device OS version have you got on that device?

Have you had that device ever joined to a mesh?
It should not be required, but you could try flashing this code, run it once and then flash your own code again

#include "Particle.h"
#include "dct.h"

SYSTEM_MODE(SEMI_AUTOMATIC);

void setup() {
    const uint8_t val = 0x01;
    dct_write_app_data(&val, DCT_SETUP_DONE_OFFSET, 1);
    pinMode(D7, OUTPUT);
    digitalWrite(D7, HIGH);
}
1 Like

I was configuring with the latest device OS version as I thought that the OS was being flashed through particle app so must be latest one… but when you asked I checked and found that it has OS 1.1.0 so after configuring for this os, code is working fine… Thanks for your prompt reply…
But I am still confused with the idea of flashing firmware (which is old one) using the mobile app. App should flash a latest firmware.

AFAICT the mobile app is not flashing the latest version available online at the time of execution but which was the latest version when the app was released as it has the binaries packaged internally to also be able to update the device when the mobile device itself has no internet connection.

1 Like

Probably a bit late, but you can do it easily enough as long as your comfortable with the CLI.

Here is a good guide. https://steemit.com/particle/@orangeflash81/using-a-particle-xenon-offline

1 Like

Got it. Thanks

Yaa… I was following the same link… I was just chosing the wrong OS version while configuring… After choosing right one it was working fine… bdw thnx

Toolchain 1.5.1-rc.1 causes Xenon to never exit OS firmware, causing the application firmware setup() and loop() to never execute, even with .SYSTEM_THREAD(ENABLED); and SYSTEM_MODE(MANUAL); employed in the application code.

Toolchain 1.5.0 works without issue.

I am using Particle Workbench (Visual Studio Code) to flash application and OS to Xenon via USB.

// Problem with deviceOS@1.5.1-rc.1 (but not 1.5.0).  
// The system firmware never exits, causing the application firmware to 
// never execute.  Flash this code, and the built-in blue LED will never
// turn on.  

#include "Particle.h"
SYSTEM_THREAD(ENABLED);
SYSTEM_MODE(MANUAL);

void setup() {
  pinMode(D7, OUTPUT);
} // setup()

void loop() {
  digitalWrite(D7, LOW);
  delay(200);
  digitalWrite(D7, HIGH);
  delay(200);
} // loop()
1 Like