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

Official 0.4.4 Listening mode re-enters listening mode after credentials are given #558

Closed
LeoWW opened this issue Aug 21, 2015 · 4 comments

Comments

@LeoWW
Copy link

commented Aug 21, 2015

Steps to reproduce issue:

  • git pull from "develop" branch of spark/firmware
  • run any user app on photon
  • go into listening mode (I did this by calling wifi.listen() in user code, but it should probably work by pressing setup for 3 seconds as well) -- photon is now blinking blue
  • enter credentials using the particle app
  • observe issue -- photon will blink white and then proceed to blinking blue instead of blinking green (which is the expected behavior)

Above step indicates that the photon accepted the credentials but didn't try to connect to wifi and went back into listening mode instead

@LeoWW LeoWW changed the title 0.4.4 Listening mode re-enters listening mode after credentials are given Official 0.4.4 Listening mode re-enters listening mode after credentials are given Aug 21, 2015

@m-mcgowan

This comment has been minimized.

Copy link
Contributor

commented Aug 21, 2015

Does hitting reset help?

@LeoWW

This comment has been minimized.

Copy link
Author

commented Aug 21, 2015

If you hit reset after it has credentials it will connect.
If not, you enter listening mode again.
We want the photon to connect immediately after receiving credentials due to our use case.

Use Case:
-- Customer uses our app while the photon is in listening mode, enters credentials, and expects the device to connect to wifi. Customer has no knowledge of the photon device so the user won't be able to hit reset.

@m-mcgowan

This comment has been minimized.

Copy link
Contributor

commented Aug 21, 2015

I've found the fix, which requires a small change to system firmware, which will happen in the next scheduled release.

For now, there is a workaround you can add to your application:

void system_event_handler(system_event_t event, uint32_t value, void* data)
{
    if (event & wifi_listen_end) {
        WiFi.listen(false);
    }
}

void setup()
{
    System.on(all_events, system_event_handler);
}

This will prevent re-entry to listen mode.

@m-mcgowan

This comment has been minimized.

Copy link
Contributor

commented Aug 21, 2015

Confirmed fixed.

@m-mcgowan m-mcgowan closed this Aug 21, 2015

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