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

cross mob

Switching from WiFi Client To AP Mode

lock attach
Attachments are accessible only for community members.

Switching from WiFi Client To AP Mode

SeyhanA_31
Employee
Employee
250 replies posted 100 replies posted 50 replies posted

After successfully associating the IoT device as a client to a known network, the device connects to the associated network after each reset. This works fine for the most part, but if the known network credentials are changed, the device needs to be reconfigured with the new network.


The following application switches the device from client mode to access point (AP) mode for future configurations so that the device can be associated with a new network to communicate.

 

 

Press and hold the push button switch (SW1) on the evaluation board which initiates switching from client mode to AP mode. This is the same as using the webpage hosted by the evaluation board.

 

 

1. Right-click on the project and using "Team -> Apply Patch" apply the attached patch to the SDK.

The client2ap demo application is added to .../Apps/demo/client2ap.

The client2ap resource file is added to .../Resources/apps/client2ap.

    pastedImage_6.png

    pastedImage_8.png

 

2. Build and download the client2ap application by adding the following to Make Target.

    demo.client2ap-<Your Platform> download run

 

For example if you are using a BCM943362WCD4 platform:

    demo.client2ap-BCM943362WCD4 download run

 

 

3. Next you need to connect the WICED device to your network. 

The console output will show you the IP address of where the configuration page is being hosted.  In this case: 192.168.0.1

pastedImage_10.jpg

Navigate to this page from any browser (obviously connected to same AP.)

Follow the browser instructions to associate and pass your credentials to the WICED device:

pastedImage_9.jpg

pastedImage_11.jpg

pastedImage_12.jpg

 

Here is WicedSerial output after connecting to the selected network.

pastedImage_17.png

 

4. Once the device is associated to your network, it will always try to connect to the same network after resets,  however; in the background your WICED device is hosting a Webpage. At anytime you can navigate to this webpage from a device on the same subnet.

 

5. If you would like to get back into AP mode (to pass new credentials for example), use your browser to navigate to the IP address, in this case 10.16.100.229, and click on "Switch To AP Mode" to restart the configure AP mode.

pastedImage_19.jpg

 

6. Alternatively; you can press and hold the SW1 on the WICED eval board for 3 seconds to switch to AP mode.

 

pastedImage_21.jpg

 

7. After switching to AP mode the WICED device reboots. Here is the console output after switching to AP mode.  Now are are back at Step 3:

pastedImage_22.jpg

 

Attachments
1416 Views