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

wifi.startsmart() broken on master branch 310faf7 #2928

Closed
KT819GM opened this issue Sep 28, 2019 · 5 comments
Closed

wifi.startsmart() broken on master branch 310faf7 #2928

KT819GM opened this issue Sep 28, 2019 · 5 comments
Labels

Comments

@KT819GM
Copy link

KT819GM commented Sep 28, 2019

Expected behavior

Calling wifi.startsmart() will start auto configuration when #define WIFI_SMART_ENABLE is uncommented in user_config.h

Actual behavior

stdin:1: attempt to call field 'startsmart' (a nil value)

Test code

wifi.setmode(wifi.STATION)
wifi.startsmart(0,
    function(ssid, password)
        print(string.format("Success. SSID:%s ; PASSWORD:%s", ssid, password))
    end
)

NodeMCU version

commit 310faf7 (HEAD -> master, tag: 3.0-master_20190907, origin/master, origin/HEAD)

Hardware

Generic ESP-07S

@marcelstoer
Copy link
Member

Would be good to know when it last worked. As it looks we only added 4 commits to wifi.c by @TerryE and @jmattsson in the last release.

@KT819GM
Copy link
Author

KT819GM commented Sep 29, 2019

Seems error sit in wifi.c #include "smart/smartconfig.h"
smartconfig.h is included in sdk, not in smart folder so should be #include "smartconfig.h". Sadly, can't check today as esptouch does not work anymore with ios 13 (but I'm not getting error when starting smartconfig anymore).
What's more strange to me, that I can compile firmware with this file missing at my other pc (can't on current).

@KT819GM
Copy link
Author

KT819GM commented Sep 29, 2019

Okay, got other phone to test. With:

#ifdef WIFI_SMART_ENABLE
#include "smart/smart.h"
#include "smartconfig.h"

in wifi.c all works okay. Thank you for pointing out. Now left to find out how to deal with enduser rework.

@KT819GM
Copy link
Author

KT819GM commented Sep 29, 2019

And now I saw #2923 which would be same problem, but as I said I could compile it somehow on one of mine pc's (ubuntu, standard 'make -j8') with file missing.

marcelstoer added a commit that referenced this issue Sep 29, 2019
@marcelstoer
Copy link
Member

Great! Thanks for the analysis. I just checked the other modified #includes in #2842 for the same type of error. The rest seems sane.

The fix is now on dev.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants