The purpose of this application is to provide a Micrium OS example using multiple protocols to toggle LEDs on the development board.
BLE and Wi-Fi protocols are used in this example to communicate with the development kit. Note that, in this application, neither the Dynamic Multiprotocol feature (DMP) nor a coexistence mechanism are used. The BLE interface is used to send advertisements/beacons allowing to connect to the device and toggle the LEDs via the EFR Connect BLE Mobile App. A Wi-Fi SoftAP interface is also provided by the device. Users can connect and access to a Web Page, through which they will be able to toggle the LEDs on the board.
Note: In this guideline, "The development board, kit or device" terms will be used interchangeably and referred as a set of an EFR32 SoC radio board (host) + a wireles starter kit mainboard (baseboard) + a WFx Wi-Fi Transceiver (WF200), which provides a working application.
The multiprotocol example is supported by the platforms (EFR32 SoCs + Wireless starter kit mainboard + WF200 series) listed below:
- EFR32xG21 Wireless Gecko Starter Kit (SLWSTK6006A), EFR32™ Mighty Gecko Wireless Starter Kit (EFR32MG12 SoCs - SLWSTK6000B), or EFR32xG24 Radio Board
- WF200 Wi-Fi® Expansion Kit (SLEXP8022A) or WFM200S Wi-Fi® Expansion Kit (SLEXP8023A)
Additionally, this example requires:
- A PC to create, configure, compile the project on Simplicity Studio IDE and load the binary file to the board. The PC is also used to connect the board through Virtual COM port (UART) to visualize the logs.
- A Smartphone to interact with the BLE interface and access the Web Page
- The required software includes Simplicity Studio v5 IDE, the Gecko SDK Suite (v4.2.0 or newer) with 32-bit MCU, lwIP stack, Wi-Fi Full-MAC(FMAC) driver (v3.6.0 or newer) and the Bluetooth SDK.
- The example project hosted on wfx-fullMAC-tools repository which can be added to SSv5 IDE as the following procedure.
- The EFR Connect BLE Mobile App available on Google Play and App Store
- A serial terminal to communicate with the board. For examples, Tera Term, Putty or MobaXterm
- A Web browser. E.g: Google Chrome.
The designed main features of the application are:
- The device advertises BLE beacons and accepts one established connection at a time.
- The device starts Wi-Fi SoftAP and initializes a webserver.
- LEDs + Buttons are available. We can control LEDs state either through Buttons, the Webpage or the EFR Connect BLE Mobile App.
- LCD screen on the mainboard (BRD4001) is available for displaying Wi-Fi + BLE + LEDs states.
- VCOM is enabled to show application logs.
Due to the restrictions of HW design, e.g., either EFR32xG21/xG24 SoCs radio board's limited pins or mainboard's dedicated function pins might be occupied by other modules, and thus EFR32xG21 and EFR32xG24 Wireless Starter Kits can't directly connect to the WF200 module through expansion headers.
Note: For more details of these limitations, see this note.
For the reasons given above, we decided to have two connection modes between the WF200 expansion board and the development board:
- Plug-and-play mode: WF200 module directly connect to the development board via expansion headers.
- Jump/Flying-wires mode: WF200 module can't directly connect to the main board. Additional jump wires will be used for the connection.
The multiprotocol example can run on EFR32MG12, EF32xG21, EFR32xG24 platforms. Depending on the specific HW connection type listed above, some features could be unavailable/disabled on our kit.
The table below lists available and disabled features for each connection mode, depending on the used platform:
Platform | Supported Connection Type | Restricted | Features |
---|---|---|---|
EFR32MG12 | Plug-and-Play | No | Full features |
EFR32xG21 | Flying-wires only | Yes | Wi-Fi + BLE available. LCD screen and Buttons are disabled |
EFR32xG24 | Plug-and-Play (default) | Yes | Wi-Fi + BLE available. LCD screen and VCOM are disabled |
Flying-wires | No | Full features |
Simplicity Studio is the core development environment designed to support the Silicon Labs IoT portfolio of system-on-chips (SoCs) and modules. It provides access to target device-specific web and SDK resources; software and hardware configuration tools; an integrated development environment (IDE) featuring industry-standard code editors, compilers and debuggers; and advanced, value-added tools for network analysis and code-correlated energy profiling.
To install Simplicity Studio 5, please follow this procedure by selecting the options [Install by connecting device(s)] and [Auto]. For the first time, installing SSv5 IDE always download the latest Gecko SDK version.
In order to update the Gecko SDK, open Simpliticy Studio 5, click on Install button to open Installation Manager and sign-in with your account, choose Manage Installed Packages.
Under SDKs tab, select the Gecko SDK - 32 bit and Wireless MCUs version you aim to update.
Please follow the instructions related to the platform suiting your case:
- EFR32MG12 Mighty Gecko Wireless Starter Kit setup
- EFR32xG24 Wireless Gecko Pro Kit setup
-
Note: For plug-and-play default mode, you can skip this guideline and refer to the very similar EFR32MG12 setup.
-
- EFR32xG21 Wireless Gecko Starter Kit setup
-
Note: This setup supports flying-wires mode only, with Buttons and LCD screen disabled.
-
-
After generating the project on SSv5, under Simplicity IDE perspective, right click on the project and press Build. Make sure the build process is successful.
-
To download the built binary to the board, go to GNU ARM v10.2.1- Debug folder, select the .hex binary file. Right click to the binary file and select Flash to Device
Note: A similar step could be done with one right-click on the project then press Run As and select Silicon Labs ARM Program
- Connect the kit to the PC by a VCOM USB cable. Open a serial terminal (e.g., MobaXterm) on PC to see application logs.
-
The example starts sending BLE advertisements/beacons, launches a SoftAP interface named multiprotocol_softap and displays the LEDs and the interface connection states on the LCD screen of the board.
- Note: LCD screen has been disabled for
- EFR32xG21 boards
- EFR32xG24 boards in plug-and-play mode.
- Note: LCD screen has been disabled for
-
Enable the Bluetooth on your smartphone
-
Launch the EFR Connect BLE Mobile App and start the Connected Lighting Demo under the Demo view.
-
Select your BLE platform from the list of detected devices, it should be named MPxxxx where "xxxx" stands for the two last bytes of the BLE MAC address. If several devices are being displayed, the last two bytes of the BLE MAC address composing the BLE name, can be retrieved from the log traces displayed at the boot phase.
- Your smartphone is now connected to the device using the Bluetooth interface. Two dots are displayed on each side of the Bluetooth logo on the LCD screen to indicate this state of connection. For instance:
- On the smartphone screen, touch the light bulb displayed in the mobile app and watch the LEDs toggled on the board. The LEDs' state is also toggled on the LCD screen and an arrow appears shortly next to the Bluetooth logo to indicate the source of the light toggle. This arrow disappears after a second.
-
Enable the Wi-Fi on your smartphone
-
Connect to the Access Point multiprotocol_softap provided by the device, with a default password changeme.
-
Open a Web browser on your smartphone and go to http://10.10.0.1/. If a popup appears due to a lack of Internet connectivity on the Wi-Fi interface make sure to request to stay connected, otherwise the Web page may not be displayed in your browser.
-
The displayed Web page not only gives the possibility to toggle the LEDs as the EFR Connect BLE Mobile App but it also allows to:
- Shutdown an active BLE connection
- Enable/disable the BLE advertisements
- Shutdown active connections to the Wi-Fi Softap
- Disable the Wi-Fi Softap interface
- Scan and connect to Access Points surrounding the device
- Display various information about the BLE and Wi-Fi interfaces and their connections
-
LEDs can also be toggled from the push buttons PB0 and PB1 respectively on the board (except for EFR32xG21 devices)
This example is actually a combination of two already existing examples, for more information about the EFR Connect BLE Mobile App interactions, please refer to the DMP Light Demo and for more information about the Web page interactions, please refer to the Wi-Fi Commissioning Example.