"Wireless Made Easy!" - Microchip MiWi P2P and Star Stack Opened for MRF24J40 and MRF89XA transceivers running on MPLAB X IDE
Devices: | MRF24J40 | MRF89XA
Supported Host MCU: | PIC18F46J50 | PIC18F4620 | PIC18F87J11 | PIC24FJ128GA010 | PIC16F1947
THE SOFTWARE ARE PROVIDED "AS IS" AND GIVE A PATH FOR SELF-SUPPORT AND SELF-MAINTENANCE.
This repository contains unsupported example code intended to help accelerate client product development. It is not validated for production nor audited for security best-practices. This software was designed and released without modern security practices in mind and has known potential security vulnerabilities. Users of this codebase are advised to use this in non-security-critical applications, and are responsible for ensuring that it is used appropriately. Note that while this repository is unsupported, Microchip welcome community contributions, and all pull-requests will be considered for inclusion into the repository.
MRF-MiWi is not compatible with MiWi protocol supporting SAMR21 and SAMR30 SoC devices.
MRF MiWi supports only MRF24J40 and MRF89XA tranceiver IC based devices. MRF MiWi supports PIC16F1947, PIC18F46J50, PIC18F4620, PIC18F87J11 and PIC24FJ128GA010 as host MCUs.
Security Vulnerability Fixes are provided for MRF MiWi in miwi_p2p.c. The file with fixes can be found in ..\MRF-MiWi\VulnerabilityFix
folder in cloned MRF-MiWi directory. You can replace original miwi_p2p.c in ..\MRF-MiWi\MRF_MiWi_v5_0_0\framework\miwi\src\
folder with the new miwi_p2p.c file to invoke the fixes.
- Microchip MPLAB X IED IDE
- 8-Bit Wireless Development Kit User's guide
- MRF24J40MA module device page
- MRF24J40 Related materials
- MRF89XAM8A module device page
- MRF89XAM9A module device page
- MRF89XA Related materials
- MPLAB® Development Ecosystem Downloads Archive This is for XC8 compiler v.1.45 download required for MRF MiWi PIC18 device branch code build
The MiWi P2P protocol stack modifies the IEEE 802.15.4 specification MAC layer by adding commands that simplify the handshaking process. It simplifies link disconnection and channel hopping by providing supplementary MAC commands. However, application-specific decisions, such as when to perform an energy scan or when to jump channels, are not defined in the protocol. The implementation is left to the application developers to do in application layer.
The MiWi P2P Wireless Protocol has the following features:
- Supports Microchip PICand and PIC24 platforms through Microchip XC8, and XC16 compilers, respectively
- Supports MRF24J40 (IEEE 802.15.4 compliant radio transceiver) and MRF89XA (proprietary radio transceiver) through Microchip Application Libraries
- Functions as a state machine (not RTOS-dependent)
- Supports a sleeping device at the end as a communication node
- Enables Energy Detect (ED) scanning to operate on the least-noisy channel
- Provides active scan for detecting new and existing connections
- Supports frequency agility (channel hopping)
The MiWi P2P protocol is a variation of IEEE 802.15.4 and supports both peer-to-peer (P2P) and star topologies. It has no routing mechanism, hence the wireless communication coverage is defined by the radio range. The Guaranteed Time Slot (GTS) and Beacon networks by option are not supported, hence both the sides of the communication cannot simultaneously go to Sleep mode. If the application requires wireless networking and routing instead of P2P and Star type communication, MiWi Mesh is a suitable communication platform for proprietary standards. For interoperability type of requirements with wireless devices or nodes of other vendors, ZigBee® protocol based on IEEE802.15.4 will a good option.
Supported MCU families | Supported Transceivers | Supported boards |
---|---|---|
PIC18F87J11 | MRF24J40 | PICDEM™ PIC18 Explorer Demonstration Board |
MRF89XA | PICDEM™ PIC18 Explorer Demonstration Board | |
PIC24FJ128GA010 | MRF24J40 | Explorer 16 Development Board |
MRF89XA | Explorer 16 Development Board | |
PIC18F46J50 | MRF24J40 | 8-Bit Wireless Development Kit |
MRF89XA | 8-Bit Wireless Development Kit | |
MRF24J40 | MiWi™ Demo Kit | |
MRF89XA | MiWi™ Demo Kit | |
PIC18F4620 | MRF24J40 | PICDEM™ Z Demonstration Kit |
PIC16F1947 | MRF24J40 | PICDEM™ PIC18 Explorer Demonstration Board |
-
MPLAB® XC Compilers Install latest XC16 compliler
-
MPLAB® Development Ecosystem Downloads Archive This is for XC8 compiler v.1.45 download required for MRF MiWi PIC18 device branch code build
-
MRF MiWi package (Clone/Download the current repo to get the software)
Notes: The MRF MiWi protocol package is validated with MPLAB X IDE v5.45.
...
PIC16 and PIC18 project configurations in MRF MiWi package are not compatible with latest Microchip XC8 v2.xx compilers. You must install XC8 v1.45 from MPLAB® Development Ecosystem Downloads Archive to build PIC16 and PIC18 configurations in MRF MiWi package.
The latest DFPs are not compatible with XC8 v1.45 compiler. Earlier DFPs will need to be installed from Tools => Packs in MPLAB X IDE. The specific device pack can then be selected together with compiler version option in Project Properties.
Below 2 pictures show 8-Bit Wireless Development Kit PIC18F46J50 Project Properties and PICDEM™ PIC18 Explorer Demonstration Board PIC16F1947 Project Properties.
![](/54chenjq/MRF-MiWi/raw/main/resources/media/PIC18F46J50_project_property.png)
![](/54chenjq/MRF-MiWi/raw/main/resources/media/PIC16F1947_project_property.png)
Before a PIC16 or PIC18 configuration in MRF MiWi package is built, a good combination of compiler and DFP must be set so the project can be built successfully.
You can find 3 sample projects in ..\MRF-MiWi\MRF_MiWi_v5_0_0\apps\miwi\miwi_p2p
.
AFter the sample project is opened in MPLAB X IDE, you can select a build configuration in MPLAB X IDE by right-clicking on the sample project and select "set configuration".
![](/54chenjq/MRF-MiWi/raw/main/resources/media/Set_config.png)
Alternatively, the configuration can also be set by a pull down menu on MPLAB X IDE tool bar below file menu.
![](/54chenjq/MRF-MiWi/raw/main/resources/media/Set_config_toolbar.png)
-
This is a wireless UART application based upon MRF MiWi P2P. Two nodes are used in this application.
-
Supports 8-Bit Wireless Development Kit with PIC18F46J50 as host MCU
-
To test this application, open a terminal for both the nodes. On entering text in the terminal, the data is transmitted from one Node to another node.
-
A PC UART COM port terminal (19200 8 N 1) need to be connected to each of the 2 nodes.
This project demonstrates MRF MiWi P2P functions on various MCU EVBs.
- 8-Bit Wireless Development Kit with PIC18F46J50 as host MCU
- PICDEM™ PIC18 Explorer Demonstration Board with PIC16F1947 and PIC18F87J11 as host MCU
- Explorer 16 Development Board with PIC24FJ128GA010 as host MCU
- MiWi™ Demo Kit with PIC18F46J50 as host MCU
- PICDEM™ Z Demonstration Kit with PIC18F4620 as host MCU
This project demonstrates MRF MiWi Star functions on various MCU EVBs.
- 8-Bit Wireless Development Kit with PIC18F46J50 as host MCU
- PICDEM™ PIC18 Explorer Demonstration Board with PIC16F1947 and PIC18F87J11 as host MCU
- Explorer 16 Development Board with PIC24FJ128GA010 as host MCU
- MiWi™ Demo Kit with PIC18F46J50 as host MCU
- PICDEM™ Z Demonstration Kit with PIC18F4620 as host MCU