Frequency Hopping#

API and callbacks for frequency hopping configuration.

See network-management.h for source code.

Callbacks#

void

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. See emberFrequencyHoppingStartClient() for details.

Functions#

emberFrequencyHoppingSetChannelMask(uint8_t channelMaskLength, uint8_t *channelMask)

Set the channel mask for frequency hopping. This API can only be invoked when the node is not frequency hopping.

Start the device operating as a frequency hopping server. This API can only be invoked when the node is joined to a network. Notice that the server upon starting hopping shall perform an initial advertisement across the entire channel hopping sequence. This is done to resynchronize clients in case the server was started as result of a reboot.

emberFrequencyHoppingStartClient(EmberNodeId serverNodeId, EmberPanId serverPanId)

Start 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. After the client is synced 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 synced to the server. The application may elect to attempt a new synchronization process by invoking this API again.

Stop frequency hopping. This API can only be invoked when the node is frequency hopping. Applicable for both server and client.

Callbacks Documentation#

emberFrequencyHoppingStartClientCompleteHandler#

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. See emberFrequencyHoppingStartClient() for details.

Parameters
[in]status

An EmberStatus value indicating whether the synchronization process with the server was completed successfully or the reason for failure.


Definition at line 733 of file /mnt/raid/workspaces/ws.Iq463TQni/overlay/gsdk/protocol/flex/stack/include/network-management.h

Function Documentation#

emberFrequencyHoppingSetChannelMask#

EmberStatus emberFrequencyHoppingSetChannelMask (uint8_t channelMaskLength, uint8_t * channelMask)

Set the channel mask for frequency hopping. This API can only be invoked when the node is not frequency hopping.

Parameters
[in]channelMaskLength

Length of the bitmap in bytes

[in]channelMask

A pointer to a bitmap representing allowed channels for frequency hopping.

Note

  • The application is responsible for applying this setting to both the server and clients.

Note

  • The bitmap size needs to be at least (EMBER_FREQUENCY_HOPPING_END_CHANNEL + 8) >> 3 or an error is thrown.

  • The bitmap needs to be set again after stopping frequency hopping.

Returns


Definition at line 661 of file /mnt/raid/workspaces/ws.Iq463TQni/overlay/gsdk/protocol/flex/stack/include/network-management.h

emberFrequencyHoppingStartServer#

EmberStatus emberFrequencyHoppingStartServer (void )

Start the device operating as a frequency hopping server. This API can only be invoked when the node is joined to a network. Notice that the server upon starting hopping shall perform an initial advertisement across the entire channel hopping sequence. This is done to resynchronize clients in case the server was started as result of a reboot.

Parameters
N/A

Returns


Definition at line 675 of file /mnt/raid/workspaces/ws.Iq463TQni/overlay/gsdk/protocol/flex/stack/include/network-management.h

emberFrequencyHoppingStartClient#

EmberStatus emberFrequencyHoppingStartClient (EmberNodeId serverNodeId, EmberPanId serverPanId)

Start 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. After the client is synced 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 synced to the server. The application may elect to attempt a new synchronization process by invoking this API again.

Parameters
[in]serverNodeId

An EmberNodeId value indicating the node ID of the server to synchronize with.

[in]serverPanId

An 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.


Definition at line 708 of file /mnt/raid/workspaces/ws.Iq463TQni/overlay/gsdk/protocol/flex/stack/include/network-management.h

emberFrequencyHoppingStop#

EmberStatus emberFrequencyHoppingStop (void )

Stop frequency hopping. This API can only be invoked when the node is frequency hopping. Applicable for both server and client.

Parameters
N/A

Returns


Definition at line 718 of file /mnt/raid/workspaces/ws.Iq463TQni/overlay/gsdk/protocol/flex/stack/include/network-management.h