See Network Management for documentation. More...

Macros

#define EMBER_MAC_MAX_APP_BEACON_PAYLOAD_LENGTH   16
 The maximum length in bytes of the application beacon payload. More...
 
#define EMBER_MAC_MAX_BEACON_FIELDS_LENGTH   84
 The maximum length in bytes of the beacon fields (superframe, GTS, pending address) as per 802.15.4 specs. More...
 

Handlers

void emberIncomingBeaconHandler (EmberPanId panId, EmberNodeId nodeId, int8_t rssi, bool permitJoining, uint8_t payloadLength, uint8_t *payload)
 This stack handler is invoked if a beacon is received during the scanning procedure if this was initiated by the application with the emberStartActiveScan stack APIs. More...
 
void emberIncomingBeaconExtendedHandler (EmberPanId panId, EmberMacAddress *source, int8_t rssi, bool permitJoining, uint8_t beaconFieldsLength, uint8_t *beaconFields, uint8_t beaconPayloadLength, uint8_t *beaconPayload)
 This stack handler is invoked if a beacon is received during the scanning procedure if this was initiated by the application with the emberStartActiveScan stack APIs. More...
 
void emberActiveScanCompleteHandler (void)
 This stack handler is invoked after the application calls the emberStartActiveScan stack API to inform the application that the scanning procedure is complete. More...
 
void emberEnergyScanCompleteHandler (int8_t mean, int8_t min, int8_t max, uint16_t variance)
 This stack handler is invoked after the application calls the emberStartEnergyScan stack API to inform the application that the energy scan procedure is complete and to provide statistics. More...
 
void emberFrequencyHoppingStartClientCompleteHandler (EmberStatus status)
 This stack handler is invoked after the application calls the emberFrequencyHoppingStartClient stack API to inform the application that the synchronization process with the server is complete. After the client is synched to a server, it may seamlessly perform the resynchronization process if needed. Sleepy devices in particular periodically perform the resynchronization process. If the client fails a resynchronization process, it will inform the application by invoking the emberStackStatusHandler handler with EMBER_MAC_SYNC_TIMEOUT status. When this occurs, the client will be no longer synched to the server. More...
 

APIs

EmberStatus emberInit (void)
 Initializes the radio and the Ember stack. More...
 
void emberTick (void)
 A periodic tick routine that should be called: More...
 
EmberStatus emberNetworkInit (void)
 Resumes the network operation after a reboot. More...
 
EmberStatus emberStartActiveScan (uint8_t channel)
 Starts an active scan. EMBER_SUCCESS signals that the scan successfully started. Upon receiving a beacon, the emberIncomingBeaconHandler stack handler is called. At the end of the scanning procedure, the emberActiveScanCompleteHandler stack handler is called. Note that, while a scan can be initiated when the node is currently joined to a network, the node will generally be unable to communicate with its PAN during the scan period. In particular, time-sensitive network operations might be affected because a scan operation will prevent any network operation for the duration of the scan. More...
 
EmberStatus emberStartEnergyScan (uint8_t channel, uint8_t samples)
 Starts an energy scan. EMBER_SUCCESS signals that the scan successfully started. At the end of the scanning procedure the emberEnergyScanCompleteHandler stack handler is called. Note that, while a scan can be initiated when the node is currently joined to a network, the node is generally unable to communicate with its PAN during the scan period. In particular, time-sensitive network operations might be affected because a scan operation will prevent any network operation for the duration of the scan. More...
 
EmberStatus emberSetApplicationBeaconPayload (uint8_t payloadLength, uint8_t *payload)
 Allows the application to set the application portion of the beacon payload. It's by default set to the empty string. More...
 
EmberStatus emberFormNetwork (EmberNetworkParameters *parameters)
 Forms a new network by becoming the coordinator. More...
 
EmberStatus emberJoinNetworkExtended (EmberNodeType nodeType, EmberNodeId nodeId, EmberNetworkParameters *parameters)
 Causes the stack to associate with the network using the specified network parameters. It can take several seconds for the stack to associate with the local network. Do not send messages until a call to the emberStackStatusHandler() callback informs you that the stack is up. More...
 
EmberStatus emberJoinNetwork (EmberNodeType nodeType, EmberNetworkParameters *parameters)
 Causes the stack to associate with the network using the specified network parameters. The network ID is assigned by the network coordinator. It can take several seconds for the stack to associate with the local network. Do not send messages until a call to the emberStackStatusHandler() callback informs you that the stack is up. More...
 
EmberStatus emberPermitJoining (uint8_t duration)
 Tells the stack to allow other nodes to join the network with this node as their parent. Joining is initially disabled by default. This function may only be called after the node is part of a network and the stack is up. More...
 
EmberStatus emberJoinCommissioned (EmberNodeType nodeType, EmberNodeId nodeId, EmberNetworkParameters *parameters)
 Causes the stack to go up with the passed network parameters without performing any over-the-air message exchange. More...
 
EmberStatus emberSetSelectiveJoinPayload (uint8_t payloadLength, uint8_t *payload)
 When invoked at a EMBER_STAR_COORDINATOR or a EMBER_STAR_RANGE_EXTENDER it causes the stack to only accept subsequent joining nodes with matching joining payload. When invoked at a node that has not yet joined a network, it sets the joining payload that will be included in the joining process. Notice, the join payload is included in a non-standard 802.15.4 command, therefore this feature is not available for nodes operating as EMBER_MAC_MODE_DEVICE or EMBER_MAC_MODE_SLEEPY_DEVICE. More...
 
EmberStatus emberClearSelectiveJoinPayload (void)
 It clears the join payload previously set with the ::emberSetJoinPayload() API. When invoked at a EMBER_STAR_COORDINATOR or a EMBER_STAR_RANGE_EXTENDER it causes the stack to accept joining nodes with any join payload pattern. When invoked at a node that has not yet joined a network, it clears the join payload. Subsequent joining attempts will not include any join payload in the over-the-air joining handshake. More...
 
EmberStatus emberSetAuxiliaryAddressFilteringEntry (EmberNodeId nodeId, uint8_t entryIndex)
 Sets an entry in the auxiliary address filtering table at a given address. Nodes of EMBER_DIRECT_DEVICE device type can receive incoming messages destined to any of the node IDs in the auxiliary address filtering table (while also receiving messages destined to actual node ID). If the passed node ID is EMBER_NULL_NODE_ID, the entry is cleared. More...
 
EmberNodeId emberGetAuxiliaryAddressFilteringEntry (uint8_t entryIndex)
 Retrieves the content of the auxiliary address filtering table at a given address. More...
 
void emberResetNetworkState (void)
 Forgets the current network and reverts to a network status of EMBER_NO_NETWORK. More...
 
EmberStatus emberMacFormNetwork (EmberNetworkParameters *parameters)
 Forms a new network as a EMBER_MAC_MODE_DEVICE by becoming the coordinator. This API should be used to form a compliant 802.15.4 PAN and to interoperate with other 802.15.4 devices. More...
 
EmberStatus emberMacSetPanCoordinator (bool isCoordinator)
 Configures a EMBER_MAC_MODE_DEVICE node to be a PAN coordinator. Note, this only applies to nodes that have been commissioned as EMBER_MAC_MODE_DEVICE. More...
 
EmberStatus emberGetChildFlags (EmberMacAddress *address, EmberChildFlags *flags)
 Returns an EmberChildFlags bitmask indicating the child flags of the child corresponding to the passed MAC address. More...
 
EmberStatus emberRemoveChild (EmberMacAddress *address)
 Removes the node corresponding to the passed MAC address from the child table. More...
 
EmberStatus emberFrequencyHoppingStartServer (void)
 Starts operating as a frequency hopping server. This API can only be invoked when the node is joined to a network. More...
 
EmberStatus emberFrequencyHoppingStartClient (EmberNodeId serverNodeId, EmberPanId serverPanId)
 Starts operating as a frequency hopping client and synchronize with the specified server. This API can be invoked on nodes that are already joined to a network (with the exception of nodes started as EMBER_MAC_MODE_DEVICE or EMBER_MAC_MODE_SLEEPY_DEVICE) and nodes that are not joined to a network yet. If the node is already performing frequency hopping, this API returns EMBER_INVALID_CALL. If this API returns EMBER_SUCCESS, the emberFrequencyHoppingStartClientCompleteHandler is invoked asynchronously to inform the application whether the node successfully synchronized with the specified server or to inform the application of the reason of failure. Once the client is synched to a server, it may seamlessly perform the resynchronization process if needed. Sleepy devices in particular periodically perform the resynchronization process. If the client fails a resynchronization process, it informs the application by invoking the emberStackStatusHandler handler with EMBER_MAC_SYNC_TIMEOUT status. When this occurs, the client will no longer be synched to the server. The application may elect to attempt a new synchronization process by invoking this API again. More...
 
EmberStatus emberFrequencyHoppingStop (void)
 Stops frequency hopping. This API can only be invoked when the node is frequency hopping. More...
 
EmberStatus emberMacAddShortToLongAddressMapping (EmberNodeId shortId, EmberEUI64 longId)
 An API to populate the short-to-long address mapping table at the MAC layer. The table is meaningful only when running as EMBER_MAC_MODE_DEVICE or EMBER_MAC_MODE_SLEEPY_DEVICE. The standard 802.15.4 encryption and authentication process requires the security nonce to be populated with the source node long ID. A receiver must do the same in order to decrypt a secured incoming message. This short-to-long mapping table is used to decrypt a secured incoming packet from a node using short source addressing. If no entry is found in this table, the incoming message will be dropped. This table is also used to encrypt secured outgoing messages with short source addressing in case the node is sending out a secured message with a short source address other than its own. More...
 
EmberStatus emberMacClearShortToLongAddressMappings (void)
 An API to clear the short-to-long address mapping table at the MAC layer. More...
 
#define EMBER_MAX_SELECTIVE_JOIN_PAYLOAD_LENGTH   50
 The maximum length in bytes of the join payload. More...
 
#define EMBER_MAX_AUXILIARY_ADDRESS_FILTERING_TABLE_LENGTH   2
 The maximum number of entries the auxiliary address filtering table can hold. More...
 

Detailed Description

See Network Management for documentation.

License

Copyright 2018 Silicon Laboratories Inc. www.silabs.com

The licensor of this software is Silicon Laboratories Inc. Your use of this software is governed by the terms of Silicon Labs Master Software License Agreement (MSLA) available at www.silabs.com/about-us/legal/master-software-license-agreement. This software is distributed to you in Source Code format and is governed by the sections of the MSLA applicable to Source Code.

Ember Connect API for finding, forming, joining, and leaving Connect networks.

See network-management.h for source code.

Macro Definition Documentation

#define EMBER_MAC_MAX_APP_BEACON_PAYLOAD_LENGTH   16

The maximum length in bytes of the application beacon payload.

Definition at line 31 of file network-management.h.

#define EMBER_MAC_MAX_BEACON_FIELDS_LENGTH   84

The maximum length in bytes of the beacon fields (superframe, GTS, pending address) as per 802.15.4 specs.

Definition at line 36 of file network-management.h.

#define EMBER_MAX_AUXILIARY_ADDRESS_FILTERING_TABLE_LENGTH   2

The maximum number of entries the auxiliary address filtering table can hold.

Definition at line 405 of file network-management.h.

#define EMBER_MAX_SELECTIVE_JOIN_PAYLOAD_LENGTH   50

The maximum length in bytes of the join payload.

Definition at line 367 of file network-management.h.

Function Documentation

void emberActiveScanCompleteHandler ( void  )

This stack handler is invoked after the application calls the emberStartActiveScan stack API to inform the application that the scanning procedure is complete.

EmberStatus emberClearSelectiveJoinPayload ( void  )

It clears the join payload previously set with the ::emberSetJoinPayload() API. When invoked at a EMBER_STAR_COORDINATOR or a EMBER_STAR_RANGE_EXTENDER it causes the stack to accept joining nodes with any join payload pattern. When invoked at a node that has not yet joined a network, it clears the join payload. Subsequent joining attempts will not include any join payload in the over-the-air joining handshake.

Returns
An EmberStatus value that indicates either:
  • that the node successfully cleared the join payload.
  • the reason for failure.
void emberEnergyScanCompleteHandler ( int8_t  mean,
int8_t  min,
int8_t  max,
uint16_t  variance 
)

This stack handler is invoked after the application calls the emberStartEnergyScan stack API to inform the application that the energy scan procedure is complete and to provide statistics.

Parameters
[in]meanThe average energy detected in dBm.
[in]minThe minimum energy detected in dBm.
[in]maxThe maximum energy detected in dBm.
[in]varianceThe variance of the energy detected in dBm.
EmberStatus emberFormNetwork ( EmberNetworkParameters parameters)

Forms a new network by becoming the coordinator.

Parameters
[in]parametersAn EmberNetworkParameters value that specifies the network parameters of the network to be formed.
Returns
An EmberStatus value that indicates either the successful formation of the new network or the reason that the network formation failed.
EmberStatus emberFrequencyHoppingStartClient ( EmberNodeId  serverNodeId,
EmberPanId  serverPanId 
)

Starts operating as a frequency hopping client and synchronize with the specified server. This API can be invoked on nodes that are already joined to a network (with the exception of nodes started as EMBER_MAC_MODE_DEVICE or EMBER_MAC_MODE_SLEEPY_DEVICE) and nodes that are not joined to a network yet. If the node is already performing frequency hopping, this API returns EMBER_INVALID_CALL. If this API returns EMBER_SUCCESS, the emberFrequencyHoppingStartClientCompleteHandler is invoked asynchronously to inform the application whether the node successfully synchronized with the specified server or to inform the application of the reason of failure. Once the client is synched to a server, it may seamlessly perform the resynchronization process if needed. Sleepy devices in particular periodically perform the resynchronization process. If the client fails a resynchronization process, it informs the application by invoking the emberStackStatusHandler handler with EMBER_MAC_SYNC_TIMEOUT status. When this occurs, the client will no longer be synched to the server. The application may elect to attempt a new synchronization process by invoking this API again.

Parameters
[in]serverNodeIdAn EmberNodeId value indicating the node ID of the server to synchronize with.
[in]serverPanIdAn EmberPanId value indicating the PAN ID of the server to synchronize with. Note that this parameter is meaningful only if the node is not currently joined to any network.
Returns
An EmberStatus value of EMBER_SUCCESS indicating that the node successfully initiated the synchronization process with the server, otherwise an EmberStatus value indicating the reason of failure.
void emberFrequencyHoppingStartClientCompleteHandler ( EmberStatus  status)

This stack handler is invoked after the application calls the emberFrequencyHoppingStartClient stack API to inform the application that the synchronization process with the server is complete. After the client is synched to a server, it may seamlessly perform the resynchronization process if needed. Sleepy devices in particular periodically perform the resynchronization process. If the client fails a resynchronization process, it will inform the application by invoking the emberStackStatusHandler handler with EMBER_MAC_SYNC_TIMEOUT status. When this occurs, the client will be no longer synched to the server.

Parameters
[in]statusAn EmberStatus value indicating whether the synchronization process with the server was completed successfully or the reason for failure.
EmberStatus emberFrequencyHoppingStartServer ( void  )

Starts operating as a frequency hopping server. This API can only be invoked when the node is joined to a network.

Returns
An EmberStatus value of EMBER_SUCCESS if the node successfully initiated frequency hopping server operations. An EmberStatus value of EMBER_INVALID_CALL if the node is not currently joined to a network or if the node is already performing frequency hopping.
EmberStatus emberFrequencyHoppingStop ( void  )

Stops frequency hopping. This API can only be invoked when the node is frequency hopping.

Returns
An EmberStatus value of EMBER_SUCCESS indicating that the node successfully stopped frequency hopping. An EmberStatus value of EMBER_INVALID_CALL if the node is not currently frequency hopping.
EmberNodeId emberGetAuxiliaryAddressFilteringEntry ( uint8_t  entryIndex)

Retrieves the content of the auxiliary address filtering table at a given address.

Parameters
[in]entryIndexThe index in the auxiliary address filtering table entry to be retrieved.
Returns
An EmberNodeId value of EMBER_NULL_NODE_ID if the passed entry index is invalid or if the passed entry index refers to an unused entry. Otherwise, it returns the content of the auxiliary address filtering table entry corresponding to the passed entry index.
EmberStatus emberGetChildFlags ( EmberMacAddress address,
EmberChildFlags flags 
)

Returns an EmberChildFlags bitmask indicating the child flags of the child corresponding to the passed MAC address.

Parameters
[in]addressA pointer to an EmberMacAddress that specifies the MAC address of the child.
[out]flagsA pointer to an EmberChildFlags containing the child flags of the child corresponding to the passed MAC address.
Returns
An EmberStatus value of EMBER_SUCCESS if the child was found in the child table, or another EmberStatus value indicating the reason of failure.
void emberIncomingBeaconExtendedHandler ( EmberPanId  panId,
EmberMacAddress source,
int8_t  rssi,
bool  permitJoining,
uint8_t  beaconFieldsLength,
uint8_t *  beaconFields,
uint8_t  beaconPayloadLength,
uint8_t *  beaconPayload 
)

This stack handler is invoked if a beacon is received during the scanning procedure if this was initiated by the application with the emberStartActiveScan stack APIs.

Parameters
[in]panIdThe source pan ID of the received beacon.
[in]sourceThe source node address of the received beacon.
[in]rssiThe RSSI the beacon was received with.
[in]permitJoiningThe permit joining flag in the received beacon.
[in]beaconFieldsLengthThe length in bytes of the beacon fields defined as per 802.15.4 specs (superframe, GTS fields and pending address fields) of the received beacon.
[in]beaconFieldsA pointer to the the beacon fields defined as per 802.15.4 specs (superframe, GTS fields and pending address fields) of the received beacon.
[in]beaconPayloadLengthThe length in bytes of the application beacon payload of the received beacon.
[in]beaconPayloadA pointer to the application beacon payload of the received beacon.
void emberIncomingBeaconHandler ( EmberPanId  panId,
EmberNodeId  nodeId,
int8_t  rssi,
bool  permitJoining,
uint8_t  payloadLength,
uint8_t *  payload 
)

This stack handler is invoked if a beacon is received during the scanning procedure if this was initiated by the application with the emberStartActiveScan stack APIs.

Deprecated:
This stack handler has been deprecated and will be removed in a future release. The application should implement emberIncomingBeaconExtendedHandler instead.
Parameters
[in]panIdThe source pan ID of the received beacon.
[in]nodeIdThe source node ID of the received beacon.
[in]rssiThe RSSI the beacon was received with.
[in]permitJoiningThe permit joining flag in the received beacon.
[in]payloadLengthThe length in bytes of the application beacon payload of the received beacon.
[in]payloadA pointer to the application beacon payload of the received beacon.
EmberStatus emberInit ( void  )

Initializes the radio and the Ember stack.

Device configuration functions must be called before emberInit() is called.

Note
The application must check the return value of this function. If the initialization fails, normal messaging functions are not available. Some failure modes are not fatal, but the application must follow certain procedures to permit recovery. Ignoring the return code results in unpredictable radio and API behavior. (In particular, problems with association will occur.)
Returns
An EmberStatus value indicating successful initialization or the reason for failure.
EmberStatus emberJoinCommissioned ( EmberNodeType  nodeType,
EmberNodeId  nodeId,
EmberNetworkParameters parameters 
)

Causes the stack to go up with the passed network parameters without performing any over-the-air message exchange.

Parameters
[in]nodeTypeSpecifies the role that this node will have in the network. The only device types allowed in the commissioning API are EMBER_DIRECT_DEVICE, EMBER_MAC_MODE_DEVICE and EMBER_MAC_MODE_SLEEPY_DEVICE.
[in]nodeIdAn EmberNodeId value that specifies the short ID the node will have. The passed node ID must be a valid short address (any value other than EMBER_NULL_NODE_ID or EMBER_BROADCAST_ADDRESS). A value of EMBER_USE_LONG_ADDRESS is allowed only when commissioning the node as EMBER_MAC_MODE_DEVICE or EMBER_MAC_MODE_SLEEPY_DEVICE and will cause the node to send MAC level control messages such as data polls or beacons using long source addressing.
[in]parametersAn EmberNetworkParameters value that specifies the network parameters of the network the node should participate in.
Returns
An EmberStatus value that indicates either:
  • that the node successfully commissioned the passed network parameters
  • the reason for failure.
EmberStatus emberJoinNetwork ( EmberNodeType  nodeType,
EmberNetworkParameters parameters 
)

Causes the stack to associate with the network using the specified network parameters. The network ID is assigned by the network coordinator. It can take several seconds for the stack to associate with the local network. Do not send messages until a call to the emberStackStatusHandler() callback informs you that the stack is up.

Parameters
[in]nodeTypeSpecification of the role that this node will have in the network. This role can be EMBER_STAR_RANGE_EXTENDER, EMBER_STAR_END_DEVICE, EMBER_STAR_SLEEPY_END_DEVICE, EMBER_MAC_MODE_DEVICE or EMBER_MAC_MODE_SLEEPY_DEVICE. If the node is frequency hopping, the role can not be EMBER_STAR_RANGE_EXTENDER.
[in]parametersAn EmberNetworkParameters value that specifies the network parameters of the network with which the node should associate.
Returns
An EmberStatus value that indicates either:
  • that the association process began successfully or
  • the reason for failure.
EmberStatus emberJoinNetworkExtended ( EmberNodeType  nodeType,
EmberNodeId  nodeId,
EmberNetworkParameters parameters 
)

Causes the stack to associate with the network using the specified network parameters. It can take several seconds for the stack to associate with the local network. Do not send messages until a call to the emberStackStatusHandler() callback informs you that the stack is up.

Parameters
[in]nodeTypeSpecification of the role that this node will have in the network. This role can be EMBER_STAR_RANGE_EXTENDER, EMBER_STAR_END_DEVICE, EMBER_STAR_SLEEPY_END_DEVICE, EMBER_MAC_MODE_DEVICE or EMBER_MAC_MODE_SLEEPY_DEVICE. If the node is frequency hopping, the role can not be EMBER_STAR_RANGE_EXTENDER.
[in]nodeIdAn EmberNodeId value indicating the short ID the node intends to use for addressing purposes. If this value is EMBER_NULL_NODE_ID, the network coordinator will allocate a new short address. Addresses should be allocated by the coordinator unless there is a specific need to join a network with a specific ID. If a specific ID is used, uniqueness should be guaranteed across the entire network by the application, via some out of band means. Notice that nodes of EMBER_MAC_MODE_DEVICE or EMBER_MAC_MODE_SLEEPY_DEVICE require this parameter to be set to EMBER_NULL_NODE_ID.
[in]parametersAn EmberNetworkParameters value that specifies the network parameters of the network with which the node should associate.
Returns
An EmberStatus value that indicates either:
  • that the association process began successfully or
  • the reason for failure.
EmberStatus emberMacAddShortToLongAddressMapping ( EmberNodeId  shortId,
EmberEUI64  longId 
)

An API to populate the short-to-long address mapping table at the MAC layer. The table is meaningful only when running as EMBER_MAC_MODE_DEVICE or EMBER_MAC_MODE_SLEEPY_DEVICE. The standard 802.15.4 encryption and authentication process requires the security nonce to be populated with the source node long ID. A receiver must do the same in order to decrypt a secured incoming message. This short-to-long mapping table is used to decrypt a secured incoming packet from a node using short source addressing. If no entry is found in this table, the incoming message will be dropped. This table is also used to encrypt secured outgoing messages with short source addressing in case the node is sending out a secured message with a short source address other than its own.

Note
This table is stored in RAM, therefore the application should ensure it gets correctly re-populated upon reboot.
Adding a new entry will cause the removal of existing entries matching the passed short ID or long ID.
Parameters
[in]shortIdThe short address of the [short, long] entry to be added to the table.
[in]longIdThe long address of the [short, long] entry to be added to the table.
Returns
an EmberStatus value of:
EmberStatus emberMacClearShortToLongAddressMappings ( void  )

An API to clear the short-to-long address mapping table at the MAC layer.

Returns
an EmberStatus value of EMBER_SUCCESS if table was , or another EmberStatus value indicating the reason of failure.
EmberStatus emberMacFormNetwork ( EmberNetworkParameters parameters)

Forms a new network as a EMBER_MAC_MODE_DEVICE by becoming the coordinator. This API should be used to form a compliant 802.15.4 PAN and to interoperate with other 802.15.4 devices.

Parameters
[in]parametersAn EmberNetworkParameters value that specifies the network parameters of the network to be formed.
Returns
An EmberStatus value that indicates either the successful formation of the new network or the reason that the network formation failed.
EmberStatus emberMacSetPanCoordinator ( bool  isCoordinator)

Configures a EMBER_MAC_MODE_DEVICE node to be a PAN coordinator. Note, this only applies to nodes that have been commissioned as EMBER_MAC_MODE_DEVICE.

Parameters
[in]isCoordinatorIf set to true, the node will identify itself as the PAN coordinator.
Returns
An EmberStatus value of EMBER_SUCCESS if the coordinator flag was successfully set, or another EmberStatus value indicating the reason of failure.
EmberStatus emberNetworkInit ( void  )

Resumes the network operation after a reboot.

This API must be called on boot prior to ANY network operations. It initializes the networking system and attempts to resume the previous network identity and configuration. If the node was not previously joined, this routine should still be called.

If the node was previously joined to a network it will retain its original type (e.g., coordinator, router, end device, and so on.)

EMBER_NOT_JOINED is returned if the node is not part of a network.

Returns
An EmberStatus value that indicates one of the following:
  • successful initialization,
  • EMBER_NOT_JOINED if the node is not part of a network, or
  • the reason for failure.
EmberStatus emberPermitJoining ( uint8_t  duration)

Tells the stack to allow other nodes to join the network with this node as their parent. Joining is initially disabled by default. This function may only be called after the node is part of a network and the stack is up.

Parameters
[in]durationA value of 0x00 disables joining. A value of 0xFF enables joining indefinitely. Any other value enables joining for that number of seconds.
Returns
an EmberStatus value of EMBER_SUCCESS if the permit joining was successfully set, otherwise an EmberStatus value indicating the reason of failure.
EmberStatus emberRemoveChild ( EmberMacAddress address)

Removes the node corresponding to the passed MAC address from the child table.

Parameters
[in]addressA pointer to an EmberMacAddress that specifies the MAC address of the child to be removed.
Returns
An EmberStatus value of EMBER_SUCCESS if the node was successfully removed from the child table, or another EmberStatus value indicating the reason of failure.
void emberResetNetworkState ( void  )

Forgets the current network and reverts to a network status of EMBER_NO_NETWORK.

EmberStatus emberSetApplicationBeaconPayload ( uint8_t  payloadLength,
uint8_t *  payload 
)

Allows the application to set the application portion of the beacon payload. It's by default set to the empty string.

Parameters
[in]payloadLengthThe length in bytes of the application beacon payload to be set. This value can not exceed EMBER_MAC_MAX_APP_BEACON_PAYLOAD_LENGTH.
[out]payloadA pointer to the application beacon payload to be set.
Returns
an EmberStatus value of EMBER_SUCCESS if the application beacon payload was successfully set, otherwise an EmberStatus value indicating the reason of failure.
EmberStatus emberSetAuxiliaryAddressFilteringEntry ( EmberNodeId  nodeId,
uint8_t  entryIndex 
)

Sets an entry in the auxiliary address filtering table at a given address. Nodes of EMBER_DIRECT_DEVICE device type can receive incoming messages destined to any of the node IDs in the auxiliary address filtering table (while also receiving messages destined to actual node ID). If the passed node ID is EMBER_NULL_NODE_ID, the entry is cleared.

Parameters
[in]nodeIdAn EmberNodeId value to be added to the auxiliary address filtering table at the passed entry index.
[in]entryIndexThe index of the auxiliary address filtering table entry to be set.
Returns
An EmberStatus value of EMBER_SUCCESS if auxiliary address filtering table entry was successfully set. An EmberStatus value of EMBER_INVALID_CALL if the passed entry index is invalid.
EmberStatus emberSetSelectiveJoinPayload ( uint8_t  payloadLength,
uint8_t *  payload 
)

When invoked at a EMBER_STAR_COORDINATOR or a EMBER_STAR_RANGE_EXTENDER it causes the stack to only accept subsequent joining nodes with matching joining payload. When invoked at a node that has not yet joined a network, it sets the joining payload that will be included in the joining process. Notice, the join payload is included in a non-standard 802.15.4 command, therefore this feature is not available for nodes operating as EMBER_MAC_MODE_DEVICE or EMBER_MAC_MODE_SLEEPY_DEVICE.

Parameters
[in]payloadLengthThe length in bytes of the passed joining payload. This can not exceed ::EMBER_MAX_JOIN_PAYLOAD_LENGTH.
[in]payloadA pointer to the payload to be set.
Returns
An EmberStatus value that indicates either:
  • that the node successfully set the join payload.
  • the reason for failure.
EmberStatus emberStartActiveScan ( uint8_t  channel)

Starts an active scan. EMBER_SUCCESS signals that the scan successfully started. Upon receiving a beacon, the emberIncomingBeaconHandler stack handler is called. At the end of the scanning procedure, the emberActiveScanCompleteHandler stack handler is called. Note that, while a scan can be initiated when the node is currently joined to a network, the node will generally be unable to communicate with its PAN during the scan period. In particular, time-sensitive network operations might be affected because a scan operation will prevent any network operation for the duration of the scan.

Possible error responses and their meanings:

Parameters
[in]channelThe channel to scan.
EmberStatus emberStartEnergyScan ( uint8_t  channel,
uint8_t  samples 
)

Starts an energy scan. EMBER_SUCCESS signals that the scan successfully started. At the end of the scanning procedure the emberEnergyScanCompleteHandler stack handler is called. Note that, while a scan can be initiated when the node is currently joined to a network, the node is generally unable to communicate with its PAN during the scan period. In particular, time-sensitive network operations might be affected because a scan operation will prevent any network operation for the duration of the scan.

Possible error responses and their meanings:

Parameters
[in]channelThe channel to scan.
[in]samplesThe number of energy samples to be produced. Each sample is performed averaging the detected energy over X symbols time, whereas X depends on the selected PHY configuration and set by default to 8. The symbol time duration also depends on the selected PHY configuration.
void emberTick ( void  )

A periodic tick routine that should be called:

  • in the application's main event loop,
  • as soon as possible after any radio interrupts, and
  • after emberInit().