- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The only function I have found to do this would be the following:
uint32_t whd_wifi_get_rssi(whd_interface_t ifp, int32_t *rssi) on /MTB/libraries/wifi-host-driver/WiFi_Host_driver/inc/whd_wifi_api.c
However, I do not see a way within the whd_wifi_api.c to retrieve an already initialized or existing whd_interface_t on the upper level. Meaning, the interface that has been initialized from iot_wifi.c on boot.
Solved! Go to Solution.
- Labels:
-
Wireless
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Pls look at this low_power AFR example here
https://github.com/cypresssemiconductorco/afr-example-wlan-lowpower/blob/master/lowpower_task.c
You can see in function void RunApplicationTask(void *pArgument) you can see cy_lwip_get_interface(); is used t0 Obtain the reference to the lwIP network interface. This will be used to access the Wi-Fi driver interface to configure the WLAN.
In function configure_wlan_powersave(struct netif *wifi, enum wlan_powersave_mode_t mode) you can see the whd_wifi_get_ap_info is used to get AP info. from the struct whd_bss_info_t you can obtain RSSI or use whd_wifi_get_rssi (ifp, int32_t * rssi ); to get RSSI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm not sure if there's a way of getting the interface names that are already initialized using any WHD level api's. But there is this API cy_lwip_get_interface() which'll get the interface under question.
But ultimately when an interface is added, it's done using the netif_add() API that is part of LwIP. So you could try to find if an interface is already initialized by using the netif_find() API.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Pls look at this low_power AFR example here
https://github.com/cypresssemiconductorco/afr-example-wlan-lowpower/blob/master/lowpower_task.c
You can see in function void RunApplicationTask(void *pArgument) you can see cy_lwip_get_interface(); is used t0 Obtain the reference to the lwIP network interface. This will be used to access the Wi-Fi driver interface to configure the WLAN.
In function configure_wlan_powersave(struct netif *wifi, enum wlan_powersave_mode_t mode) you can see the whd_wifi_get_ap_info is used to get AP info. from the struct whd_bss_info_t you can obtain RSSI or use whd_wifi_get_rssi (ifp, int32_t * rssi ); to get RSSI