Table of Contents
Having a working RCM connection (see Initializing and running the connection) allows us now to communicate with a RCM radio module and set it up for network operation. At this stage we usually need to configure the basic properties of the module that allow it to communicate across the RCM network. We will discuss them now.
The RCM protocol is based on IEEE 802.15.4 PHY and MAC layers, that define the addressing used to deliver messages across the network. Both of these standards relay on a concept of a 64-bit globally unique identifier (also called EUI-64) that unambiguously identifies a node. The RCM radio module hardware may have the EUI-64 built-in, however if it doesn't or if we want to enforce a different one, we can use the RCM_SetUID function to set it up. The complementary RCM_GetUID call can read the currently set UID from the device.
Each RCM network is identified by unique 64-bit identifier called Personal Area Network ID (PAN ID). A node that wants to join a network can choose the network identifier it want's to connect to. Each RCM device can be given one of three roles: coordinator, router or end device. The coordinator is the node that starts and maintains the network. Routers are nodes that can route (relay) packets, while end devices can only communicate with coordinators or routers and do not have the routing capability. In addition to role, every node in the network is given a short 16-bit network address. This address can be set manually or picked up randomly by the RCM communication stack.
The RCM_SetConfiguration function shall be used to deliver information about PAN ID, role and addressing mode to the RCM radio module. A complementary RCM_GetConfiguration function can be used to read back these settings.
In order to enable message encryption, the RCM_EnableSecurity function should be called, that also sets up a 128-bit network key that is used to cipher the messages. All nodes that wish to communicate within a secured network must provide the same network key. Security settings affect the maximum number of bytes that can fit into a single RCM message packet. In order to determinte how many bytes can fit into a single RCM packet with the current settings, the RCM_GetMaxPayloadSize function can be used.
The following example illustrates the concepts that we have learned so far:
Generated on Fri Aug 31 2018 09:37:14 for RCM API Library by 1.8.7