Devices: | PIC32 WFI32E | WFI32 | Trust&Go (ECC608) |
Features: | Secure Cloud Connectivity | Voice Control |
The WFI32-IoT board comes pre-programmed and configured for demonstrating the connectivity to the AWS Cloud IoT Core. The demo uses AWS C SDK version 4.0 to establish MQTT connection to AWS broker, subscribe to cloud topic/s and publish to the cloud.
The WFI32-IoT board layout can be seen below.
If you have an OLEDB Click board connected to the WFI32-IoT board's Click interface, the OLED board will:
- Show Wi-Fi icon/image once board is Wi-Fi connected.
- Show additionally Cloud icon/image once board is Cloud connected.
- SW1 held during boot-up: Enter Soft AP mode (indicated by Slow Blinking BLUE LED).
- SW1 & SW2 held during boot-up: Use factory default configuration. Default Wi-Fi credentials are {MCHP.IOT, microchip}.
- Connect the WFI32-IoT board to a PC using a standard micro-USB cable.
- The LED array will blink twice in the following order: BLUE --> GREEN --> YELLOW --> RED.
- The board will appear as a removable storage device on the host PC
- Double-click on the clickme.html file to go to the demo webpage.
- Scroll down the middle of the webpage. On the left, you will ses a Wireless Network Login panel.
- Enter your AP credentials and click the Download Configuration button.
- A file named WIFI.CFG (text) file is downloaded to the host PC.
- Drag and drop the file to the CURIOSITY drive to update the Wi-Fi credentials of the board.
- Reboot the device.
- Fast Blinking BLUE LED indicates connecting to local AP and solid BLUE LED indicates connection is successful.
Note: Any information entered in the SSID and password fields is not transmitted over the web or to the Microchip or AWS servers. Instead, the information is used locally (within the browser) to generate the WIFI.CFG file.
In AP mode, WFI32-IoT board can be provisioned using either a dedicated Mobile app or any socket client app on PC (i.e Python) or Mobile phone.
- Download Microchip Wi-Fi Provisioning Mobile phone application for Android or for iOS.
- To enter SoftAP mode, hold the SW1 push button for most of the power up time.
- Slow Blinking BLUE LED indicates Soft AP is available.
- Using the Mobile phone or tablet, connect to the WFI32-IoT AP.
- Open Microchip Wi-Fi Provisioning Mobile phone application and press CONNECT.
- Mobile app doesn't currently have native support for Wi-Fi provisioning for WPA3 enabled APs. If your AP security mode is WPA3, please jump to step 14.
- List of available APs is shown. You can press SCAN button to refresh.
Note: For iPhone/iPad, you have to provide your own AP credentials as SCAN function is not supported due to iOS limitation.
Note: Make sure you have location service in your phone enabled. Location service is needed by the application to be able to fetch Wi-Fi scan results (Android only), AP name and default Gateway.
- Choose one of the scanned APs or provide your own AP credentials. Data provided is sent to the WFI32-IoT board as you press SEND.
- Go back in the app and press YES when prompted so that the WFI32-IoT board applies the new credentials.
- Device should automatically reboot.
- Fast Blinking BLUE LED indicates connecting to local AP and solid BLUE LED indicates connection is successful.
- Navigate from Wi-Fi tab to OTHER tab and type in the following string without the double quotations: "apply,ssid,password,4". Please replace ssid with your AP name and password with your AP password. Press SEND when done.
- Go back in the app and press YES when prompted so that the WFI32-IoT board applies the new credentials.
Note: WFI32-IoT board will NOT apply/use provided credentials unless you go back in the app. This gives you the chance to keep sending new credentials or correct wrongly provided ones as long as you didn't go back in the app.
The Microchip Wi-Fi provisioning app shown above is actually using a TCP client behind the scenes. The TCP client connectes to WFI32-IoT TCP server and sends properly fomratted AP credentials.
- To enter SoftAP mode, hold the SW1 push button for most of the power up time.
- Slow Blinking BLUE LED indicates Soft AP is available.
- Using a PC, Mobile phone, tablet or any device that's Wi-Fi and TCP client capabale, connect to the WFI32-IoT AP.
- In the example we are showing below, a Python 2.7 based TCP client is used to connect to WFI32-IoT TCP server.
import socket
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
# WFI32-IoT board runs an AP interface with IP address 192.168.1.1 and a TCP server on port 80
server_address = ('192.168.1.1', 80)
# Connect to the TCP socket
sock.connect(server_address)
# Send AP credentials over the connected socket to the WFI32-IoT board
# Replace 'ssid' with your AP SSID and 'password' with your AP password
# Replace 'security' with proper value relevant to your AP security mode:
#0:Open | 1: WAP/WPA2 | 2:WEP | 3:WPA3 | 4:Enterprise
sock.sendall('apply,ssid,security,password,NULL')
# Send a 'finish' string over the socket to inform WFI32-IoT board to apply the passed credentials
sock.sendall('finish')
- After connecting to an access point, WFI32-IoT board will try to connect to Microchip AWS Sandbox account which is indicated by a blinking GREEN LED.
- Once connection to cloud is successful, GREEN LED will turn solid.
- Go to demo webpage (can always be reached out using the file clickme.html).
- The webpage will show a real-time graph of the data captured from the on-board light and temperature sensors.
- The on board YELLOW LED will blink for 300 ms for each message published successfully to the cloud.
Note: Take note of your Thing Name as it's going to be needed for registering the device for Alexa Voice Control in section 2.4.
Note: Temperature reported is the PCB temperature not ambient temperature. Accordingly, you may notice always a number that's above your room temperature.
- Scroll down to What's Next section in the webpage.
- Select Implement a Cloud-Controlled Actuator to demonstrate cloud performed behaviors.
- Click on See more then Scroll down the Control Your Device panel.
- Click on Send to device to send Toggle button value.
- The YELLOW LED will remain on/off for 2 seconds when Toggle button is selected/unselected, respectively. After the 2 seconds, the YELLOW LED will go back to its normal functionality; blinking on each successful message published to the cloud.
Note: Because Toggle manipulates the desired state, the state must be changed to observe the behavior.
Please note that supported browsers includes Google Chrome, Mozilla Firefox, Safari, and Microsoft Edge while Internet Explorer is not supported. Please also note that only devices registered to the Microchip Cloud account can be registered for voice control and controlled via the voice skills. In case of registration errors, please contact Microchip support
- Create an account and log-in to the device registration page. You can also reach out to this page using the file voice.html on the CURIOSITY drive.
- Enter your thing name and a friendly name and claim your device by registering it. Thing name can be found at the top of the demo web page just above the temperature and light graphs.
- Successfully claimed devices will show up in the device listing in the left side panel.
- Using Amazon Alexa® app, enable the skill ' Microchip IoT' and add the dev board as a smart home device.
- You can now control the on-board YELLOW LED with voice commands using the friendly name provided while claiming the device earlier:
Alexa, turn on the myCuriosity
- The YELLOW LED will remain on/off for 2 Seconds based on the voice command.
Note: You can find out more information about connecting a smart home device to Alexa from this link
Note: Supported browsers include Google Chrome, Mozilla Firefox, Safari, and Microsoft Edge while Internet Explorer is not supported.
Note: Only devices registered to the Microchip Cloud account can be registered for voice control and controlled via the voice skills. In case of registration errors, please contact Microchip support
When connecting WFI32-IoT board to a PC using a standard micro-USB cable, it enumerates as a USB MSD (Mass Storage Device) in addition to two other virtual COM ports reflecting UART1 and UART3 of the module where:
- UART1 is used for application debug logs.
- UART3 is used for Wi-Fi FW and AWS C SDK logs.
UART1 supports a set of user commands via command line as follows (more info about commands usage are available under Deep Dive Guide):
- "rssi": prints current connection RSSI value.
- "unixtime": prints current UNIX time.
- "debug <debug_level>": sets application debug level (accepted values are 0 through 4).
- "rtcc_freq <rtcc_freq>": sets RTCC frequency (check command help for accetped values).
- "power_mode <power_mode>": sets power save mode (accepted values are 0 to 5).
- "reboot": Execute a system reboot.
Note: UART1 and UART3 settings should be 115200 8N1.
Curious to learn more? ..
- Check out our Deep Dive Guide to dive behind the scenes, learn how Connectivity, Security and Cloud are tied together and experience how smooth it is to migrate the demo to your own cloud instance.
- We have gathered some FAQs and troubleshooting tips for you under the FAQ and Troubleshooting Page.
- Refer to WFI32-IoT board product page and HW user guide.
- Check out WFI32E01PC module Product page for tips, guides, knowledge base article, code examples and further more!
- Check out Curisoity Board; another evaluation board for WFI32E01PC module where you can have access to more module interfaces (i.e Ethernet) and more pins for prototyping.
- A very similar and exciting demo for Curiosity Board is available here.