"IoT Made Easy!"
Devices: | WFI32 | SAME54 | LAN867x |
Features: | Wi-Fi | 10BaseT1S |
THE SOFTWARE ARE PROVIDED "AS IS" AND GIVE A PATH FOR SELF-SUPPORT AND SELF-MAINTENANCE. This repository contains example code intended to help accelerate client product development.
For additional Microchip repos, see: https://github.com/Microchip-MPLAB-Harmony
Checkout the Technical support portal to access our knowledge base, community forums or submit support ticket requests.
- Introduction
- Bill of materials
- Software Setup
- Hardware Setup
- Harmony MCC Configuration
- Board Programming
- Run the demo
This application enables us to develop a Wi-Fi and 10BaseT1S bridge in WFI32 Curiosity board. Bridging function connects two separate networks as if they were a single network. In the OSI model, bridging is performed in the data link layer (layer 2).With one or more wireless segments in the bridged network, the device can be called a wireless bridge.
The L2 bridging implementation is according to the IEEE 802.1D - 2004 standard document. It is recommended to read the standard to understand the purpose and implementation of the software module. For more information please go through this application.
WFI32 Curiosity Board set as an AP can be used as a Wireless Bridge connecting multiple wireless and wired networks to form a single network. Here a Wi-Fi and 10BaseT1S bridge is created using L2 bridging.
| TOOLS | QUANTITY |
|---|---|
| PIC32 WFI32E Curiosity Board | 1 |
| EVB-LAN8670-RMII | 2 |
| SAM E54 CURIOSITY ULTRA DEVELOPMENT BOARD | 1 |
-
- Version: 6.15
- XC32 Compiler v4.10
- MPLAB® Code Configurator v5.4.1
- PIC32MZ-W_DFP v1.8.326
- MCC Harmony
- csp version: v3.18.0
- dev_packs: v3.18.0
- net_10base_t1s: vv1.3.0
- wireless_wifi: v3.9.1
- wireless_system_pic32mzw1_wfi32e01: v3.8.0
- wolfssl: v5.4.0
- net: v3.10.1
- crypto: v3.8.1
- CMSIS-FreeRTOS: v10.5.1
- core version: v3.13.1
-
Any Serial Terminal application like TERA TERM terminal application
- Computer connected to WFI32 Curiositiy board over USB POWER (J204)
- J202 = VBUS
- J301 = open
USB-to-UART cable between the computer and GPIO Header UART1 pins (Rx, GND, Tx) to observe the console logs.
- LAN867x PHY Daughter Board plugged in WFI32 Curiosity Board through J208.
- LAN867x PHY Daughter Board plugged in SAME54 Curiosity Ultra Board through J802.
- Establish a physical wiring between the two PN ports of the LAN867x 10BASE-T1S nodes. The P port of the LAN867x node in WFI32 board should be connected to the P port of the LAN867x node in SAME54 board and similarly for the N port.
| Tip | New users of MPLAB Code Configurator are recommended to go through the overview |
|---|
Step 1 - Connect the WFI32 Curiosity board setup to the device/system using a micro-USB cable.
Step 2 - Create a new MCC Harmony project.
Step 3 - The "MCC - Harmony Project Graph" below depicts the harmony components utilized in this project.
-
From Device resources, go to Wireless->System Services and select WIFI service. Accept all Dependencies or satisfiers, select "Yes".
-
Select WIFI service component and configure as shown below. Please note while unchecking the STA mode check box, select "No" to all deactivate the DHCP and DNS components pop up.
- In Application layer view, select TCP/IP Applicaion layer configurator and add SNTP and IPERF.
- In Network layer view, select ICMPv4 and configure as follows.
- In System Configuration view, select UART1 and configure as follows.
- In System Configuration view, select Netconfig and add second MAC instance. Right click on the "⬦" on Instance 1 MAC and select ETHMAC. Right click on the "⬦" on ETHMAC and select LAN867x. Right click on the "⬦" on LAN867x and add MIIM driver. The configurations are depicted as follows.
-
In System Configuration view, select wolfCrypt Library and right click on the "⬦" on LIB_WOLFCRYPT and add Cryptographic library.
-
In System Configuration view, select Netconfig Instance 0 MAC and configure as follows.
- In System Configuration view, select Netconfig Instance 1 MAC and configure as follows.
- In System Configuration view, select Netconfig and configure as follows.
- From project graph, go to Plugins->PIN configuration and configure as follows.
Step 4 - Generate the code.
Step 5 - Clean and build the project. To run the project, select "Make and program device" button.
- Open the 10BaseT1S application(freeRTOS) available in this link.
- Open MCC configurator. Go to Driver layer view and select Mac Instance 0 in Netconfig and make the changes as shown below.
- Select LAN867x component, expand PLCA settings and make sure the Node Id is set as 1.
- Generate the code.
- Clean and build the project. To run the project, select "Make and program device" button.
-
The application hex file can be found in the hex folder.
-
Follow the steps provided in the link to program the precompiled hex file using MPLABX IPE to program the pre-compiled hex image.
Follow the steps provided in the link to Build and program the application.
- Make sure that Node Id, IP Addresses and MAC Addresses of the two nodes are different.
- Press the Reset button on both the devices.
- Type netinfo in the terminal window and check your network information(Make sure the status is ready).
- Connect your Laptop to the WFI32 AP using the SSID and password displayed in the Terminal application.
- Open Command line in your laptop and enter "ipconfig /all"
- Type ping in the terminal window.
You should get a reply for your request if the Wi-Fi 10BaseT1S Bridge was established.
- Create an IPERF UDP server on one node; type "iperf -s" in the iperf application in your Laptop. Make sure you use Iperf v2 for this example.
- Create an IPERF UDP client on the SAME54 node; type "iperf -c -u -b 10M" in the terminal window.
- 9.328 Mbps throughput has been observed on the 10BASE-T1S Bridge and Wi-Fi application.

