Related question to this one. I just want to get the Hardware Serial Number of an Electron 3G, without activating its SIM card (but having installed its SIM card, and having connected the antenna nonetheless)
The Electron I’m working with at this moment, is fresh out of the box. I’m using particle cli and po-util, and I just now did po-util.sh update followed by po-util.sh upgrade and all went fine so far as I can tell. I then compiled and loaded the following sketch by executing particle compile electron && po-util.sh dfu-open && particle flash --usb /dev/ttyACM0:
#include <Particle.h>
SYSTEM_MODE(MANUAL);
void setup() {
Serial.begin(115200);
Serial.println("Hello World");
pinMode(D0, INPUT_PULLUP);
}
// sample the sensor once a second
unsigned long sample_previousMillis = 0;
const long sample_interval = 1000;
void loop() {
// get the current time
unsigned long currentMillis = millis();
String deviceID = System.deviceID(); // we'll need this in the message we publish
if (currentMillis - sample_previousMillis >= sample_interval) {
sample_previousMillis = currentMillis;
Serial.println(deviceID);
}
}
… and again all seemed to go fine there. Now my impression was because of SYSTEM_MODE(MANUAL); my sketch should just start running without concern for its networking state. However, I get no output from a serial terminal (e.g. miniterm.py /dev/ttyACM0 115200), and the green LED is continuously blinking.
What might I be doing wrong here? Or are my expectations flawed in some fundamental way. I’m going to go to lunch and leave the unit powered on while I’m away. Maybe it will snap out of it?
Just a quick follow up, still blinking green after a couple of hours… random side note, @nrobinson2000 how do I know what version of system firmware po-util is putting on my electron when I tell it to do po-util.sh electron upgrade?
Installing particle-cli...
sudo: npm: command not found
Installing udev rule (requires sudo) ...
Installing po manpage...
Adding vic to plugdev group...
… then when I go to do po electron upgrade I get:
Switched to a new branch 'release/stable'
Connect your device and put into DFU mode. Press [ENTER] to continue...
sed: can't read /firmware/build/module-defaults.mk: No such file or directory
mv: cannot move 'temp.particle' to '/firmware/build/module-defaults.mk': No such file or directory
/home/vic/po-util.sh: line 1667: cd: /firmware/modules: No such file or directory
… things have gone from bad to worse …
… currently running npm install -g particle-cli manually
… starting over from the top, and also doing rm -rf ~/bin/gcc-arm-embedded for good measure.
po-util should be working now. I added support for Redbear Duo today with the help of @geert, and I made some structural changes and cleaned it up a bit.
@nrobinson2000 I just got this feedback on a support email sidebar. The default system firmware version changed yesterday to 0.6.1… not sure how / if po-util tracks that, but I think it might be related to my woes at the moment? As you were trying to tell me earlier, I probably shouldn’t be mixing po-util and particle compile…