wifi_join takes multiple tries to succeed

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

cross mob
agmi_3321141
Level 4
Level 4
5 likes given First like received First like given

I am trying to use the wifi_join() API, but I notice that it takes 2 or 3 tries for this call to successfully complete, and rarely completes successfully in the first try. I see the error:

Unable to obtain IP address via DHCP    

Join result 4: General error

On the other hand the wiced_network_up() call succeeds on the same network in one try. Is there something I need to keep in mind when calling the wifi_join() API?

I also noticed that the wifi_join API can be called only after the wiced_network_up() API has been called atleast once and has failed. Is there some initialization API that can be used instead of wiced_network_up() to initialize the network parameters?

0 Likes
1 Solution

Hi  :

     I have a test based on CYW94343WWCD1_EVB .  Actually , I met some failures in first time join,  but "no  Unable to obtain IP address via DHCP"  is not printed, most of the time the connection is successful on the first try.     “join” command will call wifi_join() API .

Did have a try to run APSTA app in our release?   if APSTA can join the AP in the first try , you can have a reference based on it for the init process.

Starting WICED vWiced_006.002.000.0072

Platform CYW94343WWCD1_EVB initialised

Started ThreadX v5.8

Initialising NetX_Duo v5.10_sp3

Creating Packet pools

WLAN MAC Address : 00:A0:50:11:0C:BF

WLAN Firmware    : wl0: Apr 30 2018 04:14:19 version 7.45.98.50 (r688715 CY) FWID 01-283fcdb9

WLAN CLM         : API: 12.2 Data: 9.10.39 Compiler: 1.29.4 ClmImport: 1.36.3 Creation: 2018-04-11 22:31:21

Console app

> join zhez_2g wpa2 abcd1234

Joining : zhez_2g

Successfully joined : zhez_2g

Obtaining IPv4 address via DHCP

DHCP CLIENT hostname WICED IP

IPv4 network ready IP: 10.0.0.6

Setting IPv6 link-local address

IPv6 network is not ready

View solution in original post

0 Likes
7 Replies
Zhengbao_Zhang
Moderator
Moderator
Moderator
250 sign-ins First comment on KBA 10 questions asked

Hi :

  which evb are you using now for the test?

0 Likes

Murata 1LD

0 Likes

Can you recreate the issue on a Cypress development board?  Our Applications Team does not have access to our partner's EVBs.

0 Likes

I dont have one from Cypress. If it helps, the nx_ip_status_check() API in wiced_ip_up() times out. I have a thread like the wifi_join_thread in the ble_wifi_introducer app. Do I need to reset or deinit something when a wifi_join() call fails.  May be this information will help in debugging?

0 Likes

Hi  :

     I have a test based on CYW94343WWCD1_EVB .  Actually , I met some failures in first time join,  but "no  Unable to obtain IP address via DHCP"  is not printed, most of the time the connection is successful on the first try.     “join” command will call wifi_join() API .

Did have a try to run APSTA app in our release?   if APSTA can join the AP in the first try , you can have a reference based on it for the init process.

Starting WICED vWiced_006.002.000.0072

Platform CYW94343WWCD1_EVB initialised

Started ThreadX v5.8

Initialising NetX_Duo v5.10_sp3

Creating Packet pools

WLAN MAC Address : 00:A0:50:11:0C:BF

WLAN Firmware    : wl0: Apr 30 2018 04:14:19 version 7.45.98.50 (r688715 CY) FWID 01-283fcdb9

WLAN CLM         : API: 12.2 Data: 9.10.39 Compiler: 1.29.4 ClmImport: 1.36.3 Creation: 2018-04-11 22:31:21

Console app

> join zhez_2g wpa2 abcd1234

Joining : zhez_2g

Successfully joined : zhez_2g

Obtaining IPv4 address via DHCP

DHCP CLIENT hostname WICED IP

IPv4 network ready IP: 10.0.0.6

Setting IPv6 link-local address

IPv6 network is not ready

0 Likes

zhez wrote:

Hi  :

     I have a test based on CYW94343WWCD1_EVB .  Actually , I met some failures in first time join,  but "no  Unable to obtain IP address via DHCP"  is not printed, most of the time the connection is successful on the first try.     “join” command will call wifi_join() API

Did you ever check the reason of "some failures in first time join"?

0 Likes

Hi Axel:

 

      Yes, I added some logs for the issue, but it never happened again after print added ,  will do the debug if met with big ratio.

by the way , I have no antenna connected with the evb , assume there has some packet Retransmissions  occasionally .  and  will do more verification.