Hello everyone,
I'm trying to set up the Wifi stack on the nRF7002 and use it with MicroPython, but encountering a lot of difficulty with it. I cropped up a network_wlan.c file and added it to the build. I configured the CMakeLists.txt, prj.conf and nrf7002dk_nrf5340_cpuapp_ns.conf to the best of my knowledge (based on the given wifi samples) but I've hit a roadblock.
Since I've got no prior experience with this board or Zephyr, I decided to start by just enabling the Wifi_scan functionality.
Right now I can "choose" which error I'd like to see:
1). Given this "main_scan()" function which I'm calling via REPL to use in microPy:
When I try to invoke it via these commands, I get a Secure Fault:
Which lead me to the suspicion that the network interface is not initialized and "net_if_get_default()" (line 19 in the above function) is returning NULL.
2). So I decided to see if I can do a "net_if_set_default()" via the "active" function:
But this brings its own predicaments since the project won't build with this function; giving the error:
Where network_wlan.c:169: undefined reference to `__device_dts_ord_135' points to this line of code inside the "wlan_active()" function:
A bit of digging (github.com/.../41677) leads to the hypothesis that a few lines above, the definition of the Wifi interface doesn't actually work/ isn't instantiated and returns NULL:
Not sure if it makes a difference but: I'm using an Apple M1 MacBook.
I can provide any of the above files (or others) if needed, to be able to solve this mistery. I'm sure it's something trivial, but can't figure out what. -.-
Does anyone have any idea what might be causing these issues and what's the correct way of moving forward to be able to do a correct "wifi scan"? Thank you in advance and I hope you have a wonderful day!