Value assignment to wwd_wifi_join function parameters

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

cross mob
HaTr_4568521
Level 2
Level 2
First like given

From the two modules that I have of CYW954907EVAL-1F, I want one of my boards configured as STA to connect to an AP. While referring to the API reference guide, I came across the function "wwd_wifi_join". The same is declared as follows:

wwd_result_t wwd_wifi_join ( const wiced_ssid_t ∗ ssid, wiced_security_t auth_type, const uint8_t ∗ security_key, uint8_t key_length, host_semaphore_type_t ∗ semaphore, wwd_interface_t interface )

I have defined following parameters in my AP:

    • SSID = 802.11ac_try1
    • Authentication type = WICED_SECURITY_WPA2_AES_PSK
    • Security key = 80211AC
    • Key Length = The length of the Security key in bytes

My questions are as follows:

  • How would I calculate the security key length in bytes?
  • What will be the interface in the function? Will it be WICED_AP_INTERFACE or WICED_STA_INTERFACE?
  • In the module that has been configured as STA, how would I pass these parameters to the variables defined in the function so that it can join the SSID 802.11ac_try1.
  • Not sure of how to use semaphore here? can anyone please throw some light?
0 Likes
1 Solution
Murali_R
Moderator
Moderator
Moderator
250 sign-ins 250 replies posted 100 solutions authored

Hello HaTr_4568521

How would I calculate the security key length in bytes?

--> This will be given by  "sizeof(your_passphrase) - 1". The -1 is to remove the "\0" at the end.

What will be the interface in the function? Will it be WICED_AP_INTERFACE or WICED_STA_INTERFACE?

-->  The WICED_AP_INTERFACE is used when you are trying to setup the device as an AP and are trying to connect to the AP from other devices(clients). The WICED_STA_INTERFACE is used when you want to configure the device to act as a station(client) and want it to connect to an access point. Now since you are using the wwd_wifi_join() which is a driver level API to join an access point, the interface would be WICED_STA_INTERFACE.

Not sure of how to use semaphore here? can anyone please throw some light?

--> Can you throw some insight as to why you are in need of a semaphore for a join operation? Anyway the API explanations are available at /43xxx_Wi-Fi/doc/API/group__semaphores.html

In the module that has been configured as STA, how would I pass these parameters to the variables defined in the function so that it can join the SSID 802.11ac_try1

In this case since you are using the driver level API's, please refer to /43xxx_Wi-Fi/apps/wwd/ping to learn how to pass parameters.

Also, if you are just starting out, it would be better to start with WICED API's, Please refer to /43xxx_Wi-Fi/apps/snip/apsta as a starting point.

Thanks

View solution in original post

0 Likes
1 Reply
Murali_R
Moderator
Moderator
Moderator
250 sign-ins 250 replies posted 100 solutions authored

Hello HaTr_4568521

How would I calculate the security key length in bytes?

--> This will be given by  "sizeof(your_passphrase) - 1". The -1 is to remove the "\0" at the end.

What will be the interface in the function? Will it be WICED_AP_INTERFACE or WICED_STA_INTERFACE?

-->  The WICED_AP_INTERFACE is used when you are trying to setup the device as an AP and are trying to connect to the AP from other devices(clients). The WICED_STA_INTERFACE is used when you want to configure the device to act as a station(client) and want it to connect to an access point. Now since you are using the wwd_wifi_join() which is a driver level API to join an access point, the interface would be WICED_STA_INTERFACE.

Not sure of how to use semaphore here? can anyone please throw some light?

--> Can you throw some insight as to why you are in need of a semaphore for a join operation? Anyway the API explanations are available at /43xxx_Wi-Fi/doc/API/group__semaphores.html

In the module that has been configured as STA, how would I pass these parameters to the variables defined in the function so that it can join the SSID 802.11ac_try1

In this case since you are using the driver level API's, please refer to /43xxx_Wi-Fi/apps/wwd/ping to learn how to pass parameters.

Also, if you are just starting out, it would be better to start with WICED API's, Please refer to /43xxx_Wi-Fi/apps/snip/apsta as a starting point.

Thanks

0 Likes