How can I establish a connection with a WPS-discovered AP?

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

cross mob
Anonymous
Not applicable

[WICED-SDK-2.2.1]

We are attempting to connect with a router through WPS without having to modify the DCT, and thus are using the low-level wiced_wifi_join().

Our code uses wiced_wps_enrollee() to find APs and wiced_wifi_join() to join them.

join() returns WICED_SUCCESS, and wiced_network_is_up(WICED_STA_INTERFACE) returns TRUE immediately after joining.

Subsequent code that attempts to use this interface, however, fails at the link check stage.

For example, wiced_udp_create_socket() returns -4 (WICED_NOTUP).

When we instead hardcode this access points credentials and use wiced_network_up(), we do not run into any issues.

What steps do we need to take before/after wiced_wifi_join() to bring up our connection?

0 Likes
6 Replies
Anonymous
Not applicable
There are two parts to bring up the connection, the first is the Wi-Fi link and the second is the IP layer.

If you look at wiced_network_up() you will see the steps required after wiced_wifi_join().
0 Likes
Anonymous
Not applicable
Thanks. How can I perform this IP layer initialization without more

networking stack-dependent calls from my application?
0 Likes
Anonymous
Not applicable
The IP initialization is unique to each network stack and is the reason why we have created wiced_network_up().

In what way is wiced_network_up() not suitable for your needs?

Can we improve the API or do you have unique requirements?
0 Likes
Anonymous
Not applicable
Unfortunately, wiced_network_up() relies on wiced_join_ap(), which gets its

access point info from the DCT.

Im trying to join a WPS-identified access point without first placing that

access point in the DCT. I was hoping there would be a way to avoid this complexity.

If using the DCT is unavoidable with the current API, we will just use the

DCT. I dont think our use case is significant enough to warrant an API

addition.
0 Likes
Anonymous
Not applicable
You can easily create a copy of wiced_network_up() and then

customize it to provide the functionality you need.
0 Likes
Anonymous
Not applicable
0 Likes