parent | title | has_children | has_toc | family | function |
---|---|---|---|---|---|
Harmony 3 Wireless application examples for PIC32MZ W1 family |
Web Socket Server |
false |
false |
PIC32MZW1 |
Web Socket Server |
This example application acts as a web socket server enabled enabled with wifi station mode.
This application demonstrates how a user can enable and utilize the Web Socket Server System service. The system shall run in freertos mode, and the application shall come up in STA mode.
To download or clone this application from Github, go to the top level of the repository
Path of the application within the repository is apps/wss_server/firmware .
To build the application, refer to the following table and open the project using its IDE.
Project Name | Description |
---|---|
pic32mz_w1_curiosity_freertos.X | MPLABX project for PIC32MZ W1 Curiosity Board |
- Connect the Debug USB port on the board to the computer using a micro USB cable
- On the GPIO Header (J207), connect U1RX (PIN 13) and U1TX (PIN 23) to TX and RX pin of any USB to UART converter
- Laptop (connect the ethernet cable between laptop and curiosity board)
- Mobile (wifi-interface)
-
Open the project and launch Harmony3 configurator.
-
Configure the SSID and the credential of the for AP to be connected.
-
Save configurations and generate code via MHC.
-
Build and program the generated code into the hardware using its IDE.
-
Open the Terminal application (Ex.:Tera term) on the computer.
-
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
-
The Board will come up in STA mode and it will get connected automatically to the configured AP:
-
Connect the computer also to the same AP as that of the device and run the python script wss_client/wss_client.py. The script will be used to send data to server. The server will act as a echo server and send the data back to the client.