Getting Started Guide for ATWINC3400 W-Fi using SAM D21 Xplained Pro [USER GUIDE]
Atmel-42640A-Getting-Started-Guide-for-ATWINC3400WiFi-using-SAMD21-Xplained-Pro_UserGuide_02/2016
1
5
15
6
Getting Started with ATWINC3400 IoT Examples
This chapter introduces ATWINC3400 IoT examples and describes how to run an example on the SAM D21
board.
6.1
Organization of ATWINC3400 IoT Examples
All these examples are included in the ASF package and there are various IoT examples using Wi-Fi module.
6.1.1
Basic Examples
These examples describe basic Wi-
Fi operation in ‘how-to’ manner:
How to read chip ID (to identify ATWINC3400 H/W revision)
How to set debug message level
How to get MAC address of the Wi-Fi module
How to start Wi-Fi in specific operation mode, such as:
–
STA Mode (Station Mode), and AP mode (Access Point mode)
How to switch mode among STA, and AP modes during the runtime
How to scan APs nearby
How to set deep sleep mode
How to connect to secure Wi-Fi with using WEP/WPA/WPA2 security
How to connect to enterprise security network
How to connect to security WPS
How to get RF signal status by reading RSSI value
How to set AP provision
How to set HTTP provision
6.1.2
Protocol Examples
After basic code examples, the user may be interested in how to send and receive network packets. Here are
protocol examples that can be extended for IoT application.
UDP protocol example
TCP protocol example
NTP Time client
– retrieve network time for IoT application
MQTT protocol client example
Send email
– send an email from SMTP server
Location client
– get the current location of the network provider using HTTP
6.1.3
Advanced Examples
These examples demonstrate more complex functions like:
Growl client
– demonstrates using RESTful API over SSL (essential for IoT application)
MQTT Chat client
– demonstrate how to send and receive IoT information using MQTT protocol
Time client
– get the current time information of the network provider
Wi-Fi serial - useful for chatting or controlling a remote device
OTA Firmware Upgrade
– ATWINC3400 Firmware upgrade via OTA server
SSL connection - Set up an SSL connection