3.11 WINC1500 Bypass Mode Demo Applications

This example project demonstrates the WINC1500 applications of WiFi in Bypass Mode.

Description

This project has WiFi example applications of WINC1500 . The user can configure the WiFi parameters and select the required example application through command.

Downloading and building the application

To download or clone this application from Github, go to the top level of the repository

Path of the application within the repository is , wireless_apps_winc1500/apps/wifi_bypass_demos/firmware.

To build the application, refer to the following table and open the project using its IDE.

Project NameDescription
sam_e54_xpro_winc1500.XMPLABX project for SAME54 Xplained Pro Evaluation Kit and WINC1500 Xplained pro
sam_e54_xpro_winc1500_freertos.XMPLABX project for SAME54 Xplained Pro Evaluation Kit and WINC1500 Xplained pro using FreeRTOS
sam_a5d27_som1_winc1500.XMPLABX project for SAMA5D27-SOM1-EK1 Evaluation Kit and WINC1500 WiFi 7 Click board
pic32mz_ef_curiosity_v2_winc1500.XMPLABX project for PIC32MZ EF 2.0 curiosity board and WINC1500 Xplained pro

Setting up SAMXXX Xplained Pro board

  • Connect the Debug USB port on the SAMXXX Xplained Pro board to the computer using a micro USB cable

  • Connect the WINC1500 Xplained pro on the EXT1 header of SAMXXX Xplained Pro board

Setting up PIC32MZ EF 2.0 Curiosity board

  • Connect the Debug USB port on the PIC32MZ EF 2.0 Curiosity board to the computer using a micro USB cable

  • Connect the WINC1500 Xplained pro on the EXT1 header of PIC32MZ EF 2.0 Curiosity board

Setting up SAMA5D27-SOM1-EK1 Evaluation Kit

  • Connect the WINC1500 WiFi 7 Click board to the MBus1 connector.

  • Connect the USB port (J10) on SOM1-Ek1 board to the computer using micro USB cable.

Addtional hardware required

  • SD Card with FAT32 file system

Setting up the SD card

  • Copy the boot loader binary( boot.bin) from "firmware\at91bootstrap_sam_a5d27_som1_ek.X\binaries" onto the SD card

  • Copy the application (harmony.bin) from "firmware/sam_a5d27_som1_winc1500.X/dist/sam_a5d27_som1_winc1500/production" onto the SD card, available after a successful build of the application

Setting up the board

  • Insert the SD card into SDMMC slot (J12).

  • Connect the Debug USB port on the board to the computer using a micro USB cable.

Running the Application

  1. Build and program the application project using its respective IDE.

  2. Open the Terminal application (Ex.:Tera term) on the computer

  3. Connect to the "USB to UART" COM port and configure the serial settings as follows:

    • Baud : 115200

    • Data : 8 Bits

    • Parity : None

    • Stop : 1 Bit

    • Flow Control : None

  4. Use WiFi commands to configure WiFi parameters and use application commands to select the example application.

WiFi Commands Details

CommandDetailsExample
wifi helpWi-Fi Service help commandwifi help
wifi set <bootmode> <ssid_name> <auth_type> <pwd> <username/index>Set Wi-Fi Configuration for Station(STA) mode or Access Point (AP) modewifi set 2 DEMO_AP 2 12345678
wifi getGet Wi-Fi Configurationwifi get

Wi-Fi command parameters information

ParameterSub Parameter
bootmode1- Access point(AP) mode.2- Station(STA) mode.
ssid_nameSSID name
authtype(Security type)1 - OPEN Mode. 2 - WPAPSK mode. 3 - WEP mode. 5 - 802.1x authentication MSCHAPV2 mode.
pwd(password)Password/passphrase
username/indexUsername if authtype is 802.1x authentication MSCHAPV2 or Key Index if the authtype is WEP.

Application command parameters information

CommandDetailsExample
appdemo helpApplication Service help commandappdemo help
appdemo start <demo_id>Select and start an application demoappdemo start 1
appdemo getGet the ID of currently running application demoappdemo get
appdemo stopStop the currently running application demoappdemo stop

Application command parameters information

ParameterSub Parameter
demo_ID1 - WiFi station mode/Access point mode demo. 8 - SSL Demo. 9 - Ping Demo. 10 - Iperf demo. 11 - SNTP demo. 18 - MQTT Demo.

List of Applications

ApplicationDescription
WiFi station mode/Access point mode demoDemonstartes the Station Mode or Access Point(AP) mode of WINC1500
SSL DemoDemonstrates TCP SSL Client application
Ping DemoDemonstrates the Ping test
Iperf DemoDemonstrates the iperf application
SNTP DemoDemonstrates how to retrieve time information from the time server
MQTT DemoDemonstrates MQTT Application
WiFi Provisioning DemoDemonstartes the WiFi provisioning application

Steps to isolate/copy individual application(s) from the demo

If the user wants to isolate an application, follow the below mentioned steps

For example, the user wants to isolate SNTP demo,

  1. The SNTP demo uses the WiFi functionalities to get connected with the network. So copy the files " app_wifi.c" and " app_wifi.h " from the path "wireless_apps_winc1500/apps/wifi_bypass_demos/firmware/src " or "wireless_apps_winc1500/apps/wifi_socket_demos/firmware/src" to "src" folder of the new demo project. Then add these files to the project.

  2. Now user should copy and add the SNTP application files "app_sntp.c" and "app_sntp.h" from the path "wireless_apps_winc1500/apps/wifi_bypass_demos/firmware/src " or "wireless_apps_winc1500/apps/wifi_socket_demos/firmware/src" to the "src folder of the new demo project.

  3. The "app.c" and "app.h" files need to be copied by the user. These files integrate the SNTP application and WiFi functionalities. Copy and add these two files from the same "src" path to the "src" folder of the new demo project.

  4. In "app.c", within "APP_Initialize()" function, initialize the sntp application by calling " APP_SntpInitialize(APPWiFiCallback)".

  5. In "app.c" file, make sure that, " APP_WiFiTasks(wdrvHandle)" is getting called from the " APP_STATE_WDRV_OPEN " state of " APP_Tasks() " state machine.

  6. In the same state machine " APP_Tasks() ", within the state " APP_STATE_WDRV_APP_LOOP " , call the sntp application state machine "APP_SntpTasks(handle)".

  7. Now follow the steps mentioned in the SNTP demo document to run the SNTP demo using "wifi", "sntp" and "appdemo" commands.

Similarly, for any application demo, take the required application files along with WiFi files and "app" files to create the demo.

Note:

  1. User has to make sure the project path does not exceed windows path limit.

  2. User should reset the device before switching the application.