Local compiling : Deploying to device via Atom

So I am deploying my code via the Atom plug (so local compiling and using DFU whatever that is)

Now how can I see if its actually working, if I open a terminal to usbmodem14111 and screen it, I cant then deploy to it.

I would assume the Atom local compiler addon would show serial output somewhere?

4096 bytes
Download [=========================] 100% 6468 bytes
Download done.
File downloaded successfully

particle-offline-compiler.coffee:72 [compile] STDOUT: make: Nothing to be done for `program-dfu’.

particle-offline-compiler.coffee:74 [compile] Exited with 0

Something must not be working, the following should turn the blue light on

#include "application.h"

int led2 = D7;

void setup() {

 pinMode(led2, OUTPUT);
 digitalWrite(led2, HIGH);

}

void loop() {

}

Pretty stuck now, I have put it in DFU mode and updated the latest firmware with

make clean all PLATFORM=photon -s program-dfu PARTICLE_DEVELOP=1

I have then compiled using ATOM, light goes yellow etc, and still no blue light on

[compile] STDOUT: Deducing device DFU version from functional descriptor length
Opening DFU capable USB device...

particle-offline-compiler.coffee:72 [compile] STDOUT: ID 2b04:d006
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...

particle-offline-compiler.coffee:72 [compile] STDOUT: Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 4096
DfuSe interface name: "Internal Flash   "
Downloading to address = 0x080a0000, size = 2628

particle-offline-compiler.coffee:72 [compile] STDOUT: 
Download	[                         ]   0%            0 bytes
Download	[                         ]   0%            0 bytes
Download	[=========================] 100%         2628 bytes
Download done.
File downloaded successfully

particle-offline-compiler.coffee:72 [compile] STDOUT: make: Nothing to be done for `program-dfu'.

particle-offline-compiler.coffee:74 [compile] Exited with 0

Can you do a particle list?

I’m not sure if that make command does actually build your project and not the default app.

@ScruffR, the make will build the default Tinker app.

1 Like

There are some defiant unknowns / issues here. My device was claimed but due to the reflash and no internet access become unclaimed. However this raises some points.

Does a device have to be claimed (we planning to use them as just WIFI pingers, never actually going on the internet)?

Does a device need to be claimed to develop locally for?

Does a device execute code even if it cant connect on to the internet?

No, but it helps.

No

Yes, providing you are using the correct SYSTEM_MODE and possibly SYSTEM_THREAD(ENABLED) too.

But lack of internet connectivity or a locally flashed code should not cause any device to become unclaimed.

Thank you for helping, I really love how active the community is

What system Mode should I be in? Things just worked once my device was on the internet (deploying locally) however I spent hours before then when it was not on the internet.

If I had hundreds of these, I don’t want to have to manually put each one on the Internet, I want 1 script that runs and does it (which I have made)

1 Like

If you don’t need the Particle cloud at all or have a lot of time critical tasks, I’d go for SYSTEM_MODE(MANUAL) otherwise I’d use the more convenient SYSTEM_MODE(SEMI_AUTOMATIC)

1 Like