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

System thread causes macAddress function call in setup routine to fault with an SOS #1858

Open
wvolz opened this issue Jul 16, 2019 · 0 comments · May be fixed by #1949

Comments

@wvolz
Copy link

@wvolz wvolz commented Jul 16, 2019

Bug Report

Calling Wifi.macAddress in the setup routine with the system thread enabled causes an instant SOS type 1 fault. If I move the function call below a waitUntil(Particle.connected); the fault goes away but I would like to obtain the MAC before the device is connected. I suspect there is a threading issue here. Maybe this is related to #1805?

Expected Behavior

Wifi.macAddress() should return the device MAC address when called in the setup routine.

Observed Behavior

Calling Wifi.macAddress() in the setup routine with the system thread enabled causes an SOS type 1.

Steps to Reproduce

Flash the test app below. Note: disabling the system_thread fixes the issue.

Test App

SYSTEM_THREAD(ENABLED);

byte mac[6];

void setup() {
    WiFi.macAddress(mac);
}

void loop() {

}

References

Maybe related to #1805

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.