Miromico Miro EdgeCard mioty® Management
Overview
mioty is a low-power wide-area network (LPWAN) radio protocol designed for IoT applications. It uses the telegram splitting technology, which divides the message into multiple sub-packets. These sub-packets are sent using error-correcting codes in a set time and frequency pattern, making the transmission resistant to interference and packet collisions. Its main use case is large-scale, high-density deployments, such as those in smart cities.
RAKwireless aims to simplify IoT by making connectivity solutions, including mioty, easily accessible. Consequently, RAKwireless has recently become a member of the Mioty Alliance.
The WisGate Connect for mioty is RAKwireless' first mioty-enabled product, built on the Miromico Miro EdgeCard for mioty and the WisGate Connect platform. Designed for system integrators, it is the ideal platform to get started with mioty and deploy multi-protocol solutions, supporting a variety of IoT protocols on a single device.
Figure 1: WisGate Connect for miotySolution Features
The WisGate Connect for mioty is a CM4-based device with three (3) Mini PCIe slots and one (1) M.2 slot to support multiple radio protocols. All available slots have USB 2.0/3.0 connectivity, SPI bus (Mini PCIe slots #1 and #2), and PCIe (Mini PCIe slot #3 and M.2 slot). This enables many different IoT connectivity solutions, including both LoRaWAN and mioty coverage with a 4G or 5G backhaul.
With three external USB 2.0/3.0 ports, HDMI output, a 2.5 Gb Ethernet port, and a 1 Gb Ethernet port (supporting PoE), the WisGate Connect enables seamless connectivity to multiple peripherals. Additionally, it features two slots for WisBlock modules, allowing connection to industrial devices via RS485, Modbus, CAN bus, and both analog and digital ports.
Furthermore, the power of the CM4 module is more than enough to deploy edge solutions, providing robust processing capabilities for demanding IoT applications, making the WisGate Connect an ideal solution for advanced edge computing and connectivity needs.
Focusing on the mioty compatibility, the WisGate Connect for mioty includes a Miromico Miro EdgeCard for mioty. This is a mini PCIe form factor System-on-Module (SoM), running a full Linux distro with the embedded and licensed mioty base station software.
In order to use the Miro EdgeCard for mioty with the WisGate Connect, some configuration is required on the host. Fortunately, the mioty-cli tool is available to help with the configuration. This tool is included in the latest versions of RAKPiOS but it is also available as a standalone solution. It handles the following setup, which we will be explored in more detail throughout this document:
- Connection configuration
- Firewall settings to enable routing
- mioty base station configuration
Install and Update the mioty-cli
One of the tools included with the latest versions of RAKPiOS (version 0.9.1 and above) is the mioty command line interface or mioty-cli. This tool allows you to easily configure the OS to route the packets from the Miro EdgeCard to the mioty backend, configure the base station and also retrieve basic information about the status of the card.
The mioty-cli tool is available to anyone, you can check the code and submit issues and fixes to the public repository: https://github.com/RAKWireless/mioty-cli.
- To check if you have the mioty-cli tool installed, run this command:
rak@rakpios:~$ mioty-cli version
The current version you are using will be displayed.
mioty CLI utility v0.2.3
- If you have the mioty-cli tool installed, skip step 2.
- If you get an error instead, it mean that you have install the tool.
- Install the
mioty-cliusing this command:
rak@rakpios:~$ curl https://raw.githubusercontent.com/RAKWireless/mioty-cli/master/mioty-cli -sSf | bash -s -- install
It will download and install the latest version.
Installing mioty CLI v0.2.3
To update your tool to the latest version, run this command:
rak@rakpios:~$ mioty-cli update
You will then be informed that it's already in the latest version.
mioty CLI is up to date
Use mioty-cli
The mioty-cli tools will let you easily set up and configure your device and the Miro EdgeCard to connect to the mioty backend with ease. When you run mioty-cli, it will show you the various commands available:
rak@rakpios:~$ mioty-cli
Expected outcome (mioty-cli command list):
mioty CLI
Utility to configure and manage Miromico's Miro EdgeCard for mioty board.
Host configuration:
mioty-cli setup --> setups connection and firewall rules
mioty-cli remove --> deletes connection
mioty-cli up --> brings up connection to edge card
mioty-cli down --> brings down connection to edge card
Edge card configuration:
mioty-cli start --> starts base station
mioty-cli stop --> stops base station
mioty-cli restart --> restarts base station
mioty-cli enable --> enables base station on boot by default
mioty-cli disable --> disables base station on boot by default
mioty-cli getall --> gets params from builtin base station
mioty-cli set <param> <value> --> sets a param of the builtin base station
mioty-cli cert <file> --> pushes a certificate file to card
mioty-cli reset --> resets base station params to factory values
mioty-cli ssh --> ssh to the EdgeCard
mioty-cli dashboard --> create tunnel to access EdgCard dashboard
mioty-cli credentials --> shows default credentials based on...
Tool management:
mioty-cli version --> show the currest script version
mioty-cli install --> installs tool to user path
mioty-cli update --> updates tool to the latest version
You will be able to see that the various commands are split into three (3) groups:
- Host configuration
- Edge card configuration
- Tool management (for more details, refer to Install and Update the
mioty-cli)
The next sections will focus on the first two groups—Host configuration and Edge card configuration.
Create and Bring Up the Network Connection
The Host configuration commands in the mioty-cli tool enable you to configure the connection to the Miro EdgeCard, manage firewall settings, and set up routing, ensuring seamless communication with the remote mioty backend. Use this command:
rak@rakpios:~$ mioty-cli setup
The outcome may vary slightly from the example, as the connection ID generated will be unique. Additionally, it may prompt you for the sudo password, as root privileges are required to establish the connection.
Setting up connection and firewall rules
[sudo] password for rak: *****
Connection 'mioty' (a205f647-9df9-486c-9444-b340d567df7b) successfully added.
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/8)
The mioty-cli tool uses a Network Manager in the background to manage connections. The default network management service it uses in Debian. You can find the connection with this command:
rak@rakpios:~$ nmcli c
You will be able to see the active connections, one of them being your newly created mioty connection.
NAME UUID TYPE DEVICE
Wired connection 1 631c4c05-fef2-3ed1-b2c7-72c52ab32bca ethernet eth0
lo 5d01c541-459b-47bb-b18d-90154fadbc42 loopback lo
mioty a205f647-9df9-486c-9444-b340d567df7b ethernet eth2
Wired connection 3 def4ec7f-f26c-3827-81e0-e5b972619c14 ethernet eth3
docker0 21d17c70-5b59-4640-aa0d-d062d9b92c7d bridge docker0
Wired connection 2 e9f8466f-2c2a-3135-b522-4764946f5ad0 ethernet --