Getting RSSI data in PSoC6/43012 Amazon FreeRTOS SDK

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
KevinR_91
Employee
Employee
25 replies posted 10 likes received 10 replies posted

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.

0 Likes
1 Solution
SKUK
Employee
Employee
10 sign-ins 10 questions asked 5 questions asked

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

View solution in original post

0 Likes
2 Replies
Murali_R
Moderator
Moderator
Moderator
250 sign-ins 250 replies posted 100 solutions authored

@KevinR_91 

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.

0 Likes
SKUK
Employee
Employee
10 sign-ins 10 questions asked 5 questions asked

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

0 Likes