For my project I need the wps functionality of the ESP8266, however it is not implemented yet into micropython.
When I implemented some basic wps functions myself into the esp8266/modnetwork.c file and tried to compile it, I got compilation errors:
Code: Select all
build/modnetwork.o:(.text.esp_wps_connect+0x14): undefined reference to `wifi_wps_enable'
build/modnetwork.o: In function `esp_wps_connect':
modnetwork.c:(.text.esp_wps_connect+0x41): undefined reference to `wifi_wps_enable'
Code: Select all
/home/thijs/Documents/renson/ventilator/test/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/sysroot/usr/lib/libwps.a(wps_common.o): In function `wps_fail_event':
(.irom0.text+0x4c0): undefined reference to `atoi'
Anybody who can point out what I'm doing wrong with the flags, ...?
Thanks in advance.
Code snippet:
Code: Select all
STATIC mp_obj_t esp_wps_connect(mp_obj_t self_in) {
require_if(self_in, STATION_IF);
if ((wifi_get_opmode() & STATION_MODE) == 0) {
nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError,
"STA must be active"));
}
// 1 = push button mode
if (!wifi_wps_enable(1))
nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError,
"Could not activate wps"));