Unable to connect to softAP

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

cross mob
DaHo_4332811
Level 2
Level 2
First like received

Hello,

I have both the test.console and AWS smart_device demos running on my board, an EMW3165 from MXCHIP.  With the WiFi in station mode I can connect to my router, get an IP address, and ping in both directions.  However, if I start the WiFi in softAP mode, running the internal DHCP server, I'm unable to connect to the board.  I can see the softAP from my laptop and my phone, but cannot successfully connect.  I've tried both open and WPA2 modes, tried configuring with a static IP address to eliminate DHCP from the equation, all to no avail.  If I'm using WPA2 I get a message on my iPhone that the password is incorrect, but I've verified it multiple times, and use very easy strings like "password" and "12345678".  If I disable security on the softAP, my iPhone simply says that it's "unable to join the network".

Are there any debug logs I can enable to see what's happening in the WICED v6.4 libraries?  Any other suggestions on how to resolve this?  Your help would be much appreciated!

Regards,

David

0 Likes
1 Solution

I found, and fixed the problem.  In the wwd_ap.c file for the 43362 chipset, there's code to change the MAC address of the softAP interface to set the "locally administered" bit.  But the EMW3165 module has a valid MAC address programmed in, so changing the MAC address results in the chipset ignoring packets being sent to it.  By putting an #if/#endif around this section of code, and setting the corresponding global define in the platform makefile, I have everything working correctly.

Is there a compelling reason to set the "locally administered" bit in the MAC address when using softAP mode? 

Regards,

David

View solution in original post

6 Replies
PriyaM_16
Moderator
Moderator
Moderator
250 replies posted 100 replies posted 50 replies posted

Hello,

Can you please mention the radio in the EMW3165 chip?

You can enable logs for checking the network info and for wwd driver related prints by enabling the MACRO in /43xxx_Wi-Fi/include/wiced_defaults.h

0 Likes

The MXCHIP EMW3165 uses the 43362 radio.  Thanks for the pointer to wiced_defaults.h - I'm trying those now and will post my results.

0 Likes

I turned on all the debug macros in wiced_defaults.h, and get very little additional output to the serial console, and nothing at all when I try to connect my mobile phone to the softAP.  On the phone I get a message "Incorrect password for network...".  Here is the entire serial output...

Starting WICED Wiced_006.004.000.0061

Platform EMW3165 initialised

Started FreeRTOS v9.0.0

WICED_core Initialized

Initialising LwIP v2.0.3

DHCP CLIENT hostname WICED IP

WWD SDIO interface initializing with US/0

WLAN MAC Address : C8:93:46:5B:3E:4E

WLAN Firmware    : wl0: May  3 2019 02:15:56 version 5.90.230.35 FWID 01-ffffffff

Init took ~1909 ms

Please wait, connecting to network...

(To return to SSID console screen, hold USER switch for 5 seconds during RESET to clear DCT configuration)

8016: Event (interface, type, status, reason): WWD_AP_INTERFACE Unknown WLC_E_STATUS_SUCCESS WLC_E_REASON_INITIAL_ASSOC

calling chanspec IOVAR with chanspec=2b01 channel=1

8182: Event (interface, type, status, reason): WWD_AP_INTERFACE WLC_E_LINK WLC_E_STATUS_SUCCESS WLC_E_REASON_INITIAL_ASSOC

Setting IPv6 link-local address

Waiting for IPv6 address validation

Waiting for IPv6 address validation

IPv6 Network ready IP: FE80::C893:46FF:FE5B:3E4E

IPv4 Network ready IP: 192.168.0.1

*******************************************************

Config SSID : BeerMKR2

Password    : 12345678

IP Address  : 192.168.0.1

*******************************************************

0 Likes

I get the same results if I build for ThreadX/NetX too.

How can I get output from the WWD driver to see events when the mobile phone tries to connect to the softAP?  This is what I need to debug.  I can connect the board to my WiFi router and then connect to external servers, so I know that the network functional is basically functional, it's just the softAP mode that I'm having issues with.

-David

0 Likes

An additional data point.  I installed WICED 5.0, and had no issues with connecting to a softAP and subsequently to the device-hosted configuration web page.

0 Likes

I found, and fixed the problem.  In the wwd_ap.c file for the 43362 chipset, there's code to change the MAC address of the softAP interface to set the "locally administered" bit.  But the EMW3165 module has a valid MAC address programmed in, so changing the MAC address results in the chipset ignoring packets being sent to it.  By putting an #if/#endif around this section of code, and setting the corresponding global define in the platform makefile, I have everything working correctly.

Is there a compelling reason to set the "locally administered" bit in the MAC address when using softAP mode? 

Regards,

David