Network/Device management
Network management¶
This section describes the methods for setting the network up. Every node in a network need to know some things about the network;
- the network ID, a 16 bit ID that identifies this network.
- the AES key, a 128bit encryption key used for encryption and validation of network traffic.
There are basically two main approaches of getting these parameters in to the devices. Either you use our fantastic provisioning application that takes care of setting these parameters, and even more. Or you set them yourself through the API. This section cover the later option.
Set network credentials¶
Network credentials (network ID and AES key) is set using the SETTINGS_SET_CREDENTIALS
command.
Message class | Message type | Data length | Data |
---|---|---|---|
0x8 | 0x3 | 18 | Credentials |
The credentials data block is built up of the following parameters:
Parameter | Data type | Data size | Description |
---|---|---|---|
net_id | uint16_t | 1 | Network ID |
aes_key | uint8_t | 16 | AES key |
Becoming network root¶
One node in the network must be the network root. This is typically a central control node, or the gateway towards the Internet. To become the root node, send the SETTINGS_BECOME_ROOT
command.
Message class | Message type | Data length | Data |
---|---|---|---|
0x8 | 0x4 | 0 | n/a |
Commit settings¶
For the settings above to take effect, the SETTINGS_COMMIT
commands needs to be sent to the module.
Message class | Message type | Data length | Data |
---|---|---|---|
0x8 | 0xA | 0 | n/a |
Device management¶
Selecting antenna¶
Antenna selection is done using the SETTINGS_SET_ANTENNA
command.
Message class | Message type | Data length | Data |
---|---|---|---|
0x8 | 0x5 | 1 | Configuration |
The MiraOne module support two different antenna options;
- Internal chip antenna
- External antenna through a u.FL (IPEX) antenna connector
Parameter | Data type | Data size | Description |
---|---|---|---|
antenna | uint8_t | 1 | 0x00 - internal antenna |
0x01 - external antenna |