Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Particle.publish() hangs on Photon when called in listening mode with SYSTEM_THREAD(ENABLED) #761

dfukumori opened this issue Dec 9, 2015 · 2 comments


Copy link

commented Dec 9, 2015

I'm using the following to test:

#include "application.h"


#define PUBLISH_PERIOD_MS 2000

int last_publish_attempt_ms;

void setup() {
  Particle.connect(); // Should be run without credentials present.
  last_publish_attempt_ms = 0;

 void loop() {
   if (millis() - last_publish_attempt_ms >= PUBLISH_PERIOD_MS) {
     last_publish_attempt_ms = millis();

When monitoring the serial output over USB, a single "pre-publish" message is printed, but "post-publish" is never printed. Furthermore, the blinking blue light of listening mode becomes very slow after ~10 seconds. This issue is present in MANUAL, SEMI_AUTOMATIC, and AUTOMATIC modes.


This comment has been minimized.

Copy link

commented Dec 10, 2015

Particle.publish() should check for Particle.connected() (or any privat flags for that reason) and just return false if there is no connection.


This comment has been minimized.

Copy link

commented Dec 14, 2015

Sure. for now I agree that Publish should fail if in listening mode or the cloud is not connected. In future, we may use different strategies, such as queuing the publish until the cloud is connected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.