API  2.2
TSmarT Software Library
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
tsmart_xbee_dm_config_device_t Struct Reference

Configuration for XBee Digimesh. More...

#include <tsmart_xbee_dm.h>

Data Fields

tsmart_xbee_dm_flag_t api
 
tsmart_xbee_dm_kind_dev_t kind_dev
 
int8_t channel
 
uint16_t pan_id
 
uint8_t baud_rate
 
tsmart_xbee_dm_flow_control_t flow_control
 
uint8_t power_level
 
tsmart_xbee_dm_flag_t aes_enable
 
uint8_t aes_key [PR_TSMART_XBEE_DM_AES_KEY_SIZE]
 
uint8_t aes_key_size
 
uint32_t dest_addr_h
 
uint32_t dest_addr_l
 
uint8_t tx_broadcast_mac_retries
 
uint8_t tx_unicast_mac_retries
 
uint8_t mesh_network_retries
 
tsmart_xbee_dm_sleep_mode_t sleep
 
uint16_t sleep_opt
 
uint16_t sp
 
uint16_t st
 
uint16_t wh
 
uint8_t nhops
 
uint8_t network_delay_slots
 
uint8_t broadcast_radius
 

Detailed Description

Configuration for XBee Digimesh.

Examples:
cumulocity_nfc_wifi_xbee.c, digimesh_receiver.c, digimesh_sender.c, and xv_nfc_wifi_xbee.c.

Field Documentation

Configures AES encryption:

  • TSMART_XBEE_ENABLE
  • TSMART_XBEE_DISABLE

The default value for this parameter is: TSMART_XBEE_DM_DISABLE .

uint8_t aes_key[PR_TSMART_XBEE_DM_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: 16.

Configures API mode:

  • TSMART_XBEE_DM_ENABLE
  • TSMART_XBEE_DM_DISABLE

The default value for this parameter is: TSMART_XBEE_DM_ENABLE.

Examples:
digimesh_receiver.c, and digimesh_sender.c.
uint8_t baud_rate

Baud Rate:

  • 0 - 1200
  • 1 - 2400
  • 2 - 4800
  • 3 - 9600
  • 4 - 19200
  • 5 - 38400
  • 6 - 57600

The default value for this parameter is: 3.

uint8_t broadcast_radius

Indicates the transmission radius for broadcast data transmissions. Set to 0 for maximum radius.

The default value for this parameter is: 0x20.

int8_t channel

Channel. This value must be set in hexadecimal value:

  • Channel 1 - 0x0B
  • Channel 2 - 0x0C
  • Channel 3 - 0x0D
  • Channel 4 - 0x0E
  • Channel 5 - 0x0F
  • Channel 6 - 0x10
  • Channel 7 - 0x11
  • Channel 8 - 0x12
  • Channel 9 - 0x13
  • Channel 10 - 0x14
  • Channel 11 - 0x15
  • Channel 12 - 0x16
  • Channel 13 - 0x17
  • Channel 14 - 0x18
  • Channel 15 - 0x19
  • Channel 16 - 0x1A

The default value for this parameter is: 0x0c.

Examples:
cumulocity_nfc_wifi_xbee.c, digimesh_receiver.c, digimesh_sender.c, and xv_nfc_wifi_xbee.c.
uint32_t dest_addr_h

High destination address The default value for this parameter is: 0x00000000.

Examples:
cumulocity_nfc_wifi_xbee.c, and xv_nfc_wifi_xbee.c.
uint32_t dest_addr_l

Low destination address The default value for this parameter is: 0x00000000.

Examples:
cumulocity_nfc_wifi_xbee.c, and xv_nfc_wifi_xbee.c.

Specifies whether the hardware flow control mode is enabled or disabled. This parameter shall be selected amongst the following values:

  • TSMART_XBEE_DM_FLOW_CONTROL_DISABLE
  • TSMART_XBEE_DM_FLOW_CONTROL_CTS
  • TSMART_XBEE_DM_FLOW_CONTROL_RTS
  • TSMART_XBEE_DM_FLOW_CONTROL_RTS_CTS

The default value for this parameter is: TSMART_XBEE_DM_FLOW_CONTROL_DISABLE .

Define what kind of device it will be:

  • TSMART_XBEE_DM_ROUTER
  • TSMART_XBEE_DM_END_DEVICE

The default value for this parameter is: TSMART_XBEE_DM_END_DEVICE.

Examples:
cumulocity_nfc_wifi_xbee.c, digimesh_receiver.c, digimesh_sender.c, and xv_nfc_wifi_xbee.c.
uint8_t mesh_network_retries

The maximum number of network packet delivery attempts. If this parameter is non-zero, packets sent will request a network acknowledgement, and can be resent up to mesh_network_retries parameter + 1 times if no acknowledgements are received. Possibles values: 0 to 7 The default value for this parameter is: 1.

uint8_t network_delay_slots

Maximum random number of network delay slots before rebroadcasting a network packet. One network delay slot is approximately 13ms. Possible values: 0x00 to 0x0a

The default value for this parameter is: 3.

uint8_t nhops

Maximum number of hops expected to be seen in a network route. This value doesn't limit the number of hops allowed, but it is used to calculate timeouts waiting for network acknowledgements. Range: 1 to 0xFF

The default value for this parameter is: 7.

uint16_t pan_id

PAN ID [0x0000 -0xFFFF] The default value for this parameter is: 0x3332.

Examples:
cumulocity_nfc_wifi_xbee.c, digimesh_receiver.c, digimesh_sender.c, and xv_nfc_wifi_xbee.c.
uint8_t power_level

Power signal:

  • XBee / XBee-PRO
    • 0 = -10 / 10 dBm
    • 1 = -6 / 12 dBm
    • 2 = -4 / 14 dBm
    • 3 = -2 / 16 dBm
    • 4 = 0 / 18 dBm
  • XBee-PRO International variant:
    • 4: 10 dBm
    • 3: 8 dBm
    • 2: 2 dBm
    • 1: -3 dBm
    • 0: -3 dBm

The default value for this parameter is: 0.

Sleep mode. This parameter shall be selected amongst the following values:

  • TSMART_XBEE_DM_DISABLE
  • TSMART_XBEE_DM_PIN
  • TSMART_XBEE_DM_ACYCLIC
  • TSMART_XBEE_DM_ACYCLIC_PIN
  • TSMART_XBEE_DM_SUPPORT
  • TSMART_XBEE_DM_SCYCLIC

The default value for this parameter is: TSMART_XBEE_DM_OFF.

uint16_t sleep_opt

The sleep options of the module, this paramater is a bitmask:

  • bit 0 = Preferred sleep coordinator
  • bit 1 = Non-sleep coordinator
  • bit 2 = Enable API sleep status messages
  • bit 3 = Disable early wake-up
  • bit 4 = Enable node type equality
  • bit 5 = Disable lone coordinator sync repeat
Note
For ansynchronous sleep modules, the following sleep options are defined:
  • bit 8 = Always wake for ST time
Use TSMART_XBEE_DM_MASKX to configure it. The default value for this parameter is: 0x02.
uint16_t sp

The sleep period of the module. Range:0x01-0x15f900 (4hrs) The default value for this parameter is: 0x00C8.

uint16_t st

The wake period of the module. Range: 0x45-0x36EE80 The default value for this parameter is: 0x07d0.

uint8_t tx_broadcast_mac_retries

The number of additional MAC-level broadcast transmissions. All broadcast packets are transmitted tx_broadcast_mac_retries + 1 times to ensure it is received (in this transmission mode there are not ACKs).

The default value for this parameter is: 0x03.

uint8_t tx_unicast_mac_retries

The maximum number of MAC level packet delivery attempts for unicasts. If this parameter is non-zero packets sent from the radio will request an acknowledgement, and can be resent up to tx_unicast_mac_retries times if no acknowledgements are received.

The default value for this parameter is: 0x0A.

uint16_t wh

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. Range: 0-0xFFFF (x 1ms)

The default value for this parameter is: 0x0000.