Hi,
I have followed the instructions in [1] to build the firmware for a Particle Photon and everything works correctly. I am then trying to write an application that uses the internal function wlan_scan_aps() to scan for networks. However, attempting to build this application throws a linker error:
undefined reference to `wlan_scan_aps(void (*)(void*, unsigned char const*, unsigned int, int), void*)'
Inspection of the compiled hal library shows that there is no wlan_scan_aps symbol being exported:
$ nm -gC firmware/build/target/hal-dynalib/platform-6-m/libhal-dynalib.a | grep wlan_scan_aps
[empty output]
On the other hand, if I build the application by passing PLATFORM=dev-photon instead of PLATFORM=photon to make, then the program compiles correctly (wlan_scan_aps is properly linked), but then the program does not seem to work when loaded onto the photon - the LED blinks with a very dim magenta light and the device appears to be unusable.
I have been looking at the hal code for the Photon, firmware/hal/src/photon/wlan_hal.cpp to be specific, and the module does use the wlan_scan_aps() function internally, so I wouldn’t know why I am not able to use it from the application code.
Could anyone shed some light into this? Is it possible to use wlan_scan_aps() from the application code and how?
Thanks,
Jeanne-Kamikaze