cancel
Showing results for 
Search instead for 
Did you mean: 

AIROC™ Wi-Fi and Wi-Fi Bluetooth Combos

nima
New Contributor

Hi,

We are testing WHD with Sterling-LWB5+ (CY4373E) and we have the following issue. In whd_wifi_on() country code setting fails and we get "Could not set Country code" error.

Tracing shows that whd_thread_func() puts the device to sleep (KSO disable) and takes the transceiver semaphore with timeout CY_RTOS_NEVER_TIMEOUT. After this point,  the card interrupts are missed and there is no activity on the wifi task.

To test that the issue is with card interrupts when KSO is off, we have tested the following case. We used whd_ensure_wlan_bus_is_up() in the main task loop and set CY_RTOS_NEVER_TIMEOUT to, for example, 10ms so that we are periodically waking up the device. Then, the card interrupts are received and the country code setting succeeds. Also, whd_wifi_on() completes successfully. We have tested with WHD v2.0.0 and v1.94.0.

What could be the root cause for this issue and how could we mitigate it?

Thanks,

Nima

0 Likes
2 Replies
Rakesh_BG
Moderator
Moderator

Hi @nima ,

"Could not set Country code" implies that the country code that you are trying to set doesn't exist in the .clm_blob that you are using. Could you try with one of the country code which is present in clm_blob and check if the issue gets resolved?

Thanks

 

0 Likes
nima
New Contributor

I have tried with the following country codes:

  • WHD_COUNTRY_UNITED_STATES
  • WHD_COUNTRY_UNITED_KINGDOM
  • WHD_COUNTRY_AUSTRALIA
  • WHD_COUNTRY_SWEDEN
and I got the same error.
 
How could I confirm that the country code exists in the clm_blob?
 
While the error for all of the above country codes is the same, the trace looks different. In case of US, there is 5 seconds (WHD_IOCTL_TIMEOUT_MS) silence before the error message, but for Sweden the error is returned immediately. It seems that even for supported country codes, we get the same error when the card interrupts are missed.
0 Likes