![]() |
API
2.2
TSmarT Software Library
|
Configuration for XBee ZigBee device. More...
#include <tsmart_xbee_zb.h>
Data Fields | |
uint32_t | high_pan_id |
uint32_t | low_pan_id |
uint8_t | baud_rate |
tsmart_xbee_zb_flow_control_t | flow_control |
uint8_t | power_level |
uint8_t | unicast_nhops |
uint8_t | broadcast_nhops |
int16_t | n_scan_channels |
uint8_t | scan_channels_time |
uint8_t | profile |
uint8_t | time_to_join |
tsmart_xbee_zb_flag_t | ch_verification |
uint16_t | network_watchdog_timeout |
tsmart_xbee_zb_flag_t | aes_enable |
uint8_t | aes_key [PR_TSMART_XBEE_ZB_AES_KEY_SIZE] |
uint8_t | aes_key_size |
uint8_t | network_key [PR_TSMART_XBEE_ZB_NKEY_SIZE] |
uint8_t | network_key_size |
uint8_t | encryption_opt |
tsmart_xbee_zb_sleep_mode_t | sleep_mode |
uint8_t | n_sleep_periods |
uint16_t | sp |
uint16_t | st |
uint8_t | sleep_opt |
uint8_t | wake_host |
uint8_t | polling_rate |
tsmart_xbee_zb_kind_dev_t | kind_dev |
Configuration for XBee ZigBee device.
tsmart_xbee_zb_flag_t aes_enable |
Enables/Disables AES encryption:
The default value for this parameter is: TSMART_XBEE_ZB_DISABLE.
uint8_t aes_key[PR_TSMART_XBEE_ZB_AES_KEY_SIZE] |
AES key. The default value for this parameter is: 0x00.
uint8_t aes_key_size |
AES key size The default value for this parameter is: 0x00.
uint8_t baud_rate |
Baud rate:
The default value for this parameter is: 3
uint8_t broadcast_nhops |
The maximum number of hops for each broadcast data transmission. Setting this to 0 will use the maximum number of hops.
The default value for this parameter is: 0x00
tsmart_xbee_zb_flag_t ch_verification |
Set the channel verification parameter. If it is 1, a router will verify the coordinator is on its operating channel when joining or coming up from a power cycle. If a coordinator is not detected, the router will leave its current channel and attempt to join a new PAN. If it is 0, the router will continue operating on its current channel even if a coordinator is not detected. The default value for this parameter is: TSMART_XBEE_ZB_DISABLE.
uint8_t encryption_opt |
Configure options for encryption. Unused option bits should be set to 0. Options include:
The default value for this parameter is: 0x00.
tsmart_xbee_zb_flow_control_t flow_control |
Specifies whether the hardware flow control mode is enabled or disabled. This parameter shall be selected amongst the following values:
The default value for this parameter is: TSMART_XBEE_ZB_FLOW_CONTROL_DISABLE
uint32_t high_pan_id |
High extended PAN ID, range: 0-0xFFFFFFFF The default value for this parameter is: 0x00000000
tsmart_xbee_zb_kind_dev_t kind_dev |
Define what kind of device it will be:
Default value depends on the kind of default configuration function executed
uint32_t low_pan_id |
Low extended PAN ID, range: 0-0xFFFFFFFF The default value for this parameter is: 0x00003322
int16_t n_scan_channels |
Set the list of channels to scan. Depend on the module be:
The default value for this parameter is: 0x1FFE;
uint8_t n_sleep_periods |
Sets the number of sleep periods to not assert the On/Sleep pin on wakeup if no RF data is waiting for the end device. range: 1 - 0xFFFF
The default value for this parameter is: 0x01.
uint8_t network_key[PR_TSMART_XBEE_ZB_NKEY_SIZE] |
Set the 128-bit AES link key. The default value for this parameter is: 0x00.
uint8_t network_key_size |
AES link key size The default value for this parameter is: 0x00.
uint16_t network_watchdog_timeout |
Network watchdog timeout. Set/read the network watchdog timeout value. If it is set > 0, the router will monitor communication from the coordinator (or data collector) and leave the network if it cannot communicate with the coordinator for 3 "network_watchdog_timeout" periods. The timer is reset each time data is received from or sent to a coordinator, or if a many to one broadcast is received. Range: 0 - 0x64FF[x 1 minute](up to over 17 days).
The default value for this parameter is: 0x00.
uint8_t polling_rate |
Set the end device poll rate. Set to 0 (default value) enables polling at 100 ms (default rate). Adaptive polling may allow the end device to poll more rapidly for a short time when receiving RF data. Range: 0 - 0x3E8.
The default value for this parameter is: 0x00.
uint8_t power_level |
Power signal:
The default value for this parameter is: 0x04
uint8_t profile |
ZigBee stack profile. Set the ZigBee stack profile value. This must be set the same on all devices that should join the same network. Only "0" is supported, and it's default value.
The default value for this parameter is: 0x00.
uint8_t scan_channels_time |
Set the scan duration exponent. This parameter shall be defined in different way if the device is:
Scan time is measured as:(number of channels to scan) * (2 ^ "scan_channels_time") * 15.36ms - the number of channels to scan is determined by the "n_scan_channels" parameter. The XBee can scan up to 16 channels. Sample scan duration times (13 channel scan):
The default value for this parameter is: 0x03;
tsmart_xbee_zb_sleep_mode_t sleep_mode |
Sets the sleep mode on the RF module. An XBee loaded with router firmware can be configured as either a router (sleep mode set to 0) or an end device (sleep mode > 0):
The default value for this parameter is: end-dev: TSMART_XBEE_ZB_PIN and router: TSMART_XBEE_ZB_OFF
uint8_t sleep_opt |
Configure options for sleep. Unused option bits should be set to 0. Sleep options include:
Sleep options should not be used for most applications. See chapter 6 for more information. Range: 0 - 0xFF The default value for this parameter is: 0x00.
uint16_t sp |
Sleep Period. This value determines how long the end device will sleep at a time, up to 28 seconds. On the parent, this value determines how long the parent will buffer a message for the sleeping end device. It should be set at least equal to the longest sp time of any child end device. Range: 0x20 - 0xAF0 x 10ms. The default value for this parameter is: 0x076c.
uint16_t st |
Time Before Sleep Sets the time before sleep timer on an end device. The timer is reset each time serial or RF data is received. Once the timer expires, an end device may enter low power operation. Applicable for cyclic sleep end devices only. Range: 1 - 0xFFFE (x 1ms).
The default value for this parameter is: 0x1388.
uint8_t time_to_join |
Set the time that a coordinator/router allows nodes to join. For an end device to enable rejoining, time_to_join should be set less than 0xFF on the device that will join. If time_to_join < 0xFF, the device assumes the network is not allowing joining and first tries to join a network using rejoining. If multiple rejoining attempts fail, or if time_to_join = 0xFF, the device will attempt to join using association. Range: 0 - 0xFF[x 1 sec].
The default value for this parameter is: 0xFF.
uint8_t unicast_nhops |
Maximum Unicast Hops. Set the maximum hops limit. This limit sets the maximum broadcast hops value and determines the unicast timeout. The timeout is computed as (50 * unicast hops) + 100 ms. The default unicast timeout of 1.6 seconds (unicast hops =0x1E) is enough time for data and the acknowledgment to traverse about 8 hops. Range: 0-0xFF.
The default value for this parameter is: 0x1E
uint8_t wake_host |
Set the wake host timer value. If the wake host timer is set to a non zero value, this timer specifies a time (in millisecond units) that the device should allow after waking from sleep before sending data out the UART. If serial characters are received, the "wake_host" timer is stopped immediately. Range: 0 - 0xFFFF (x 1ms)
The default value for this parameter is: 0x00.