Coding a Boron LTE without cellular

Hi there!
I have a Boron LTE - I’m in Australia so the built-in SIM doesn’t work, and I am waiting for a Telstra-network SIM from M2M. I have gone through the setup and update process using the Android app, but the Boron isn’t fully registered yet because it isn’t online.
In the meantime, I’m trying to write some firmware in Workbench. I have a very simple “hello world” program as follows:

SYSTEM_MODE(MANUAL);

int led1 = D6; 

void setup() {
  Serial.begin(115200);
  pinMode(led1, OUTPUT);
}

void loop() {
    Serial.println("Hello world");

    digitalWrite(led1, HIGH);
    delay(1000);
    digitalWrite(led1, LOW);
    delay(1000);
}

I’ve flashed this successfully to the board using the Particle: Compile application (local) and Particle: Flash application (local) commands. Both commands complete successfully, the Boron LED changes colour and goes into DFU mode etc. Everything seems to run smoothly.

However, it seems that the Boron just isn’t running my code. Despite setting system mode to manual, it still flashes green endlessly on boot. The voltage on D6 does not change, and no data is written to the serial port.

What am I doing wrong here?

What device OS version are you targeting?
Try adding SYSTEM_THREAD(ENABLED).
Please post the particle serial inspect (while in Listening Mode/blinking blue) output.

Your device is probably trying to update the device OS OTA since your application is most likely targeted at a higher version than you have on the device already.

When you run particle update -v in DFU Mode your device should be rolled forward to the most recent official release (currently 2.0.1). This way you can flash any application targeted at that or any version before.
Alternatively you can build/flash the device OS locally too.

Thanks for your help ScruffR, you hit the nail on the head.
Doing a Particle: Configure Project for Device and setting it to 2.0.1, then running particle update -v in the terminal, followed by a re-compile and a re-flash fixed it for me.
The Boron is now happily running my code.
Thanks heaps!

2 Likes