The ATCommand class is used to query or set module parameters on the local device. More...

#include <atcommand.h>

Inheritance diagram for QtXBee::ATCommand:
QtXBee::XBeePacket QtXBee::ATCommandQueueParam QtXBee::RemoteATCommandRequest

Public Types

enum  ATCommandType {
  ATUndefined = 0, ATWR = 0x5752, ATRE = 0x5245, ATFR = 0x4652,
  ATDH = 0x4448, ATDL = 0x444C, ATMY = 0x4D59, ATMP = 0x4D50,
  ATNC = 0x4E43, ATSH = 0x5348, ATSL = 0x534C, ATNI = 0x4E49,
  ATSE = 0x5345, ATDE = 0x4445, ATCI = 0x4349, ATTO = 0x544F,
  ATNP = 0x4E50, ATDD = 0x4444, ATCR = 0x4352, ATCH = 0x4348,
  ATDA = 0x4441, ATID = 0x4944, ATFP = 0x4650, ATAS = 0x4153,
  ATED = 0x4544, ATOP = 0x4F50, ATRR = 0x5252, ATRN = 0x524E,
  ATMM = 0x4D4D, ATCE = 0x4345, ATNH = 0x4E48, ATBH = 0x4248,
  ATOI = 0x4F49, ATNT = 0x4E54, ATNO = 0x4E4F, ATSC = 0x5343,
  ATSD = 0x5344, ATZS = 0x5A53, ATNJ = 0x4E4A, ATJV = 0x4A56,
  ATNW = 0x4E57, ATJN = 0x4A4E, ATAR = 0x4152, ATA1 = 0x4131,
  ATA2 = 0x4132, ATEE = 0x4545, ATEO = 0x454F, ATNK = 0x4E4B,
  ATKY = 0x4B59, ATPL = 0x504C, ATCA = 0x4341, ATPM = 0x504D,
  ATDB = 0x4442, ATPP = 0x5050, ATAP = 0x4150, ATAO = 0x414F,
  ATBD = 0x4244, ATNB = 0x4E42, ATSB = 0x5342, ATRO = 0x524F,
  ATIR = 0x4952, ATIC = 0x4943, ATP0 = 0x5030, ATP1 = 0x5031,
  ATP2 = 0x5032, ATP3 = 0x5033, ATD0 = 0x4430, ATD1 = 0x4431,
  ATD2 = 0x4432, ATD3 = 0x4433, ATD4 = 0x4434, ATD5 = 0x4435,
  ATD6 = 0x4436, ATD7 = 0x4437, ATD8 = 0x4438, ATLT = 0x4C54,
  ATPR = 0x5052, ATRP = 0x5250, ATV = 0x2556, ATVP = 0x562B,
  ATTP = 0x5450, ATVR = 0x5652, ATHV = 0x4856, ATAI = 0x4149,
  ATCT = 0x4354, ATCN = 0x434E, ATGT = 0x4754, ATCC = 0x4343,
  ATSM = 0x534D, ATSN = 0x534E, ATSP = 0x5350, ATDP = 0x4450,
  ATST = 0x5354, ATSO = 0x534F, ATWH = 0x5748, ATSI = 0x5349,
  ATPO = 0x504F, ATAC = 0x4143, ATNR = 0x4E52, ATCB = 0x4342,
  ATND = 0x4E44, ATDN = 0x444E, ATIS = 0x4953, AT1S = 0x3153
}
 The ATCommand enum defines the AT commands codes. More...
 
- Public Types inherited from QtXBee::XBeePacket
enum  ApiId {
  TxRequest64Id = 0x00, TxRequest16Id = 0x01, ATCommandId = 0x08, ATCommandQueueId = 0x09,
  ZBTxRequestId = 0x10, ZBExplicitTxRequestId = 0x11, RemoteATCommandRequestId = 0x17, CreateSourceRouteId = 0x21,
  ZBRegisterJoiningDeviceId = 0x24, Rx64ResponseId = 0x80, Rx16ResponseId = 0x81, Rx64IOResponseId = 0x82,
  Rx16IOResponseId = 0x83, ATCommandResponseId = 0x88, TxStatusResponseId = 0x89, ModemStatusResponseId = 0x8A,
  ZBTxStatusResponseId = 0x8B, ZBRxResponseId = 0x90, ZBExplicitRxResponseId = 0x91, ZBIOSampleResponseId = 0x92,
  XBeeSensorReadIndicatorId = 0x94, ZBIONodeIdentificationId = 0x95, RemoteATCommandResponseId = 0x97, OverTheAirFirmwareUpdateId = 0xA0,
  RouteRecordIndicatorId = 0xA1, DeviceAuthenticatedIndicatorId = 0xA2, ManyToOneRouteRequestId = 0xA3, RegisterJoiningDeviceStatusId = 0xA4,
  JoinNotificationStatusId = 0xA5, UndefinedId = 0xFF
}
 The ApiId enum identifies sent/received frame's type. More...
 
enum  SpecialByte { StartDelimiter = 0x7E, Escape = 0x7D, XON = 0x11, XOFF = 0x13 }
 The SpecialByte enum defines the special bytes. More...
 

Public Member Functions

 ATCommand (QObject *parent=0)
 ATCommand's constructor. More...
 
virtual QString toString ()
 Returns a debug string containing all packet's informations. More...
 
virtual void assemblePacket ()
 Assembles the packet to be able to send it. More...
 
virtual void clear ()
 Clears the packet by reseting all attributes to their default value. More...
 
void setCommand (const ATCommandType command)
 Sets the AT Command. More...
 
void setCommand (const QByteArray &command)
 Sets the AT Command from the given QByteArray. More...
 
void setParameter (const QByteArray &param)
 Sets command's parameter. More...
 
ATCommandType command () const
 Returns the AT Command. More...
 
QByteArray parameter () const
 Returns the command's parameter. More...
 
- Public Member Functions inherited from QtXBee::XBeePacket
 XBeePacket (QObject *parent=0)
 XBeePacket's constructor. More...
 
void setStartDelimiter (unsigned sd)
 Sets the frame's start delimiter. By default the start delemiter is set to 0x7E. More...
 
void setLength (unsigned length)
 Sets the frame's length. More...
 
void setFrameType (ApiId type)
 Sets the frame's type. More...
 
void setFrameId (quint8 id)
 Sets the frame's id. More...
 
void setChecksum (unsigned cs)
 Sets the checksum. More...
 
bool setPacket (const QByteArray &packet)
 Sets the packet's raw data. More...
 
QByteArray packet () const
 Returns the frame's packet (raw data) More...
 
unsigned startDelimiter () const
 Returns the frame's start delimiter. More...
 
quint16 length () const
 Returns the frame-specific data length (Number of bytes between the length and the checksum) More...
 
ApiId frameType () const
 Returns the frame's type. More...
 
quint8 frameId () const
 Returns the frame's id. More...
 
unsigned checksum () const
 Returns the packet's checksum. More...
 
void escapePacket ()
 
bool unescapePacket ()
 

Static Public Member Functions

static QString atCommandToString (const ATCommandType command)
 Returns the given ATCommand::ATCommand into QString. More...
 
static QByteArray atCommandToByteArray (const ATCommandType command)
 Returns the given ATCommand::ATCommand into QByteArray. More...
 
static ATCommandType atCommandFromByteArray (const QByteArray &command)
 Returns the ATCommand::ATCommand corresponding to the given QByteArray. More...
 
- Static Public Member Functions inherited from QtXBee::XBeePacket
static QString frameTypeToString (const ApiId type)
 Returns the given frame type ApiId into a human readable string. More...
 

Additional Inherited Members

- Protected Member Functions inherited from QtXBee::XBeePacket
virtual bool parseApiSpecificData (const QByteArray &data)
 Parses the packet API specific data. More...
 
void createChecksum (QByteArray array)
 Computes the checksum of the given QByteArray, and set it. More...
 
- Protected Attributes inherited from QtXBee::XBeePacket
QByteArray m_packet
 

Detailed Description

The ATCommand class is used to query or set module parameters on the local device.

This API command applies changes after executing the command. (Changes made to module parameters take effect once changes are applied.)

API identifier value: 0x08

See Also
ATCommandResponse

Member Enumeration Documentation

The ATCommand enum defines the AT commands codes.

Note
This list may be uncomplete. If some AT commands are missing here, please let me know.
Some of theses AT commands are only for XBee S1 or XBee S2. Also there can be some differences about the commands parameters between the two modules series. Note also that there can be some differences between the firmware version. The QtXBee::ATCommand::ATCommandType documentation is made with the documentation I have from Digi, and the commands' explanation may be not valid in some cases. So if you have doudts, please check your module's datasheet.
Enumerator
ATUndefined 

Undefined AT Command. Invalid value

ATWR 

Write. Write parameter values to non-volatile memory so that parameter modifications persist through subsequent power-up or reset.

Note
Once WR is issued, no additional characters should be sent to the module until after the response "OK\r" is received.
ATRE 

Restore Defaults. Restore module parameters to factory defaults.

ATFR 

Software Reset. Responds immediately with an OK then performs a hard reset ~100ms later.

ATDH 

Destination Address High. Set/Get the upper 32 bits of the 64-bit destination address. When combined with DL, it defines the 64-bit destination address for data transmission. Special definitions for DH and DL include 0x000000000000FFFF (broadcast) and 0x0000000000000000 (coordinator).

Parameter range : 0 - 0xFFFFFFFF
Default : 0

ATDL 

Destination Address Low. Set/Get the lower 32 bits of the 64-bit destination address. When combined with DH, it defines the 64-bit destination address for data transmissions. Special definitions for DH and DL include 0x000000000000FFFF (broadcast) and 0x0000000000000000 (coordinator).

Parameter range : 0 - 0xFFFFFFFF
Default : 0xFFFF(Coordinator), 0 (Router/End Device)

ATMY 

16-bit Network Address. Read the 16-bit network address of the module. A value of 0xFFFE means the module has not joined a ZigBee network.

Parameter range : 0 - 0xFFFE [read-only]
Default : 0xFFFE

ATMP 

16-bit Parent Network Address. Read the 16-bit network address of the module's parent. A value of 0xFFFE means the module does not have a parent.

Parameter range : 0 - 0xFFFE [read-only]
Default : 0xFFFE

ATNC 

Number of Remaining Children. Read the number of end device children that can join the device. If NC returns 0, then the device cannot allow any more end device children to join.

Parameter range : 0 - MAX_CHILDREN (maximum varies)
Default : read-only

ATSH 

Serial Number High. Read the high 32 bits of the module's unique 64-bit address.

Parameter range : 0 - 0xFFFFFFFF [read-only]
Default : factory-set

ATSL 

Serial Number Low. Read the low 32 bits of the module's unique 64-bit address.

Parameter range : 0 - 0xFFFFFFFF [read-only]
Default : factory-set

ATNI 

Node Identifier. Set/read a string identifier. The register only accepts printable ASCII data. In AT Command Mode, a string cannot start with a space. A carriage return ends the command. A command will automatically end when maximum bytes for the string have been entered. This string is returned as part of the ND (Node Discover) command. This identifier is also used with the DN (Destination Node) command. In AT command mode, an ASCII comma (0x2C) cannot be used in the NI string

Parameter range : 20-Byte printable ASCII string
Default : ASCII space character (0x20)

ATSE 

Source Endpoint. Set/read the ZigBee application layer source endpoint value. This value will be used as the source endpoint for all data transmissions. SE is only supported in AT firmware. The default value 0xE8 (Data endpoint) is the Digi data endpoint

Parameter range : 0 - 0xFF
Default : 0xE8

ATDE 

Destination Endpoint. Set/read Zigbee application layer destination ID value. This value will be used as the destination endpoint all data transmissions. DE is only supported in AT firmware.The default value (0xE8) is the Digi data endpoint.

Parameter range : 0 - 0xFF
Default : 0xE8

ATCI 

Cluster Identifier. Set/read Zigbee application layer cluster ID value. This value will be used as the cluster ID for all data transmissions. CI is only supported in AT firmware. The default value0x11 (Transparent data cluster ID).

Parameter range : 0 - 0xFFFF
Default : 0x11

ATNP 

Maximum RF Payload Bytes. This value returns the maximum number of RF payload bytes that can be sent in a unicast transmission. If APS encryption is used (API transmit option bit enabled), the maximum payload size is reduced by 9 bytes. If source routing is used (AR < 0xFF), the maximum payload size is reduced further.

Note
NP returns a hexadecimal value. (e.g. if NP returns 0x54, this is equivalent to 84 bytes)
ATDD 

Device Type Identifier. Stores a device type value. This value can be used to differentiate different XBee-based devices. Digi reserves the range 0 - 0xFFFFFF. For example, Digi currently uses the following DD values to identify various ZigBee products :

  • 0x30001 - ConnectPort X8 Gateway
  • 0x30002 - ConnectPort X4 Gateway
  • 0x30003 - ConnectPort X2 Gateway
  • 0x30005 - RS-232 Adapter
  • 0x30006 - RS-485 Adapter
  • 0x30007 - XBee Sensor Adapter
  • 0x30008 - Wall Router
  • 0x3000A - Digital I/O Adapter
  • 0x3000B - Analog I/O Adapter
  • 0x3000C - XStick
  • 0x3000F - Smart Plug
  • 0x30011 - XBee Large Display
  • 0x30012 - XBee Small Display


Parameter range : 0 - 0xFFFFFFFF
Default : 0x30000

ATCH 

Operating Channel. Read the channel number used for transmitting and receiving between RF modules. Uses 802.15.4 channel numbers. A value of 0 means the device has not joined a PAN and is not operating on any channel.

Parameter range :

  • XBee 0, 0x0B - 0x1A (Channels 11-26)
  • XBee-PRO (S2) 0, 0x0B - 0x18 (Channels 11-24)
  • XBee-PRO (S2B) 0, 0x0B - 0x19 (Channels 11-25)
  • XBee (S1) 0x0B - 0x1A
  • XBee-PRO (S1) 0x0C - 0x17

Default : [read-only]

ATDA 

Force Disassociation. End device will immediately disassociate from a Coordinator (if associated) and reattempt to associate.

ATID 

Extended PAN ID. Set/read the 64-bit extended PAN ID. If set to 0, the coordinator will select a random extended PAN ID, and the router / end device will join any extended PAN ID. Changes to ID should be written to non-volatile memory using the WR command to preserve the ID setting if a power cycle occurs.

Parameter range : 0 - 0xFFFFFFFFFFFFFFFF
Default : 0

ATFP 

Force Poll. Request indirect messages being held by a coordinator.

ATAS 

Active Scan. Send Beacon Request to Broadcast Address (0xFFFF) and Broadcast PAN (0xFFFF) on every channel. The parameter determines the time the radio will listen for Beacons on each channel. A PanDescriptor is created and returned for every Beacon received from the scan. Each PanDescriptor contains the following information:
CoordAddress (SH, SL)<CR>
CoordPanID (ID)<CR>
CoordAddrMode <CR>

  • 0x02 = 16-bit Short Address
  • 0x03 = 64-bit Long Address

Channel (CH parameter) <CR>
SecurityUse<CR>
ACLEntry<CR>
SecurityFailure<CR>
SuperFrameSpec<CR> (2 bytes):

  • bit 15 - Association Permitted (MSB)
  • bit 14 - PAN Coordinator
  • bit 13 - Reserved
  • bit 12 - Battery Life Extension
  • bits 8-11 - Final CAP Slot
  • bits 4-7 - Superframe Order
  • bits 0-3 - Beacon Order

GtsPermit<CR>
RSSI<CR> (RSSI is returned as -dBm)
TimeStamp<CR> (3 bytes)
<CR>
A carriage return <CR> is sent at the end of the AS command. The Active Scan is capable of returning up to 5 PanDescriptors in a scan. The actual scan time on each channel is measured as Time = [(2 ^SD PARAM) * 15.36] ms. Note the total scan time is this time multiplied by the number of channels to be scanned (16 for the XBee and 13 for the XBee-PRO). Also refer to SD command description.

Parameter range: 0-6

ATED 

Energy Scan. Send an Energy Detect Scan. This parameter determines the length of scan on each channel. The maximal energy on each channel is returned & each value is followed by a carriage return. An additional carriage return is sent at the end of the command. The values returned represent the detected energy level in units of -dBm. The actual scan time on each channel is measured as Time = [(2 ^ED) * 15.36] ms. Note the total scan time is this time multiplied by the number of channels to be scanned (refer to SD parameter).

Parameter range: 0-6

ATOP 

0x4F50

ATRR 

XBee Retries. Set/Read the maximum number of retries the module will execute in addition to the 3 retries provided by the 802.15.4 MAC. For each XBee retry, the 802.15.4 MAC can execute up to 3 retries.

Parameter range : 0-6
Default : 0

ATRN 

Random Delay Slots. Set/Read the minimum value of the back-off exponent in the CSMA-CA algorithm that is used for collision avoidance. If RN = 0, collision avoidance is disabled during the first iteration of the algorithm (802.15.4 - macMinBE).

Parameter range : 0 - 3 [exponent]
Default : 0

ATMM 

MAC mode. Set/Read MAC Mode value. MAC Mode enables/disables the use of a Digi header in the 802.15.4 RF packet. When Modes 0 or 3 are enabled (MM=0,3), duplicate packet detection is enabled as well as certain AT commands. Please see the detailed MM description on page 47 for additional information.

Parameter range : 0-3

  • 0 = Digi Mode
  • 1 = 802.15.4 (no ACKs)
  • 2 = 802.15.4 (with ACKs)
  • 3 = Digi Mode (no ACKs)

Default : 0

ATCE 

Coordinator Enable. Set/Read the coordinator setting.

Parameter range : 0-1

  • 0 = End Device
  • 1 = Coordinator

Default : 0

ATNH 

0x4E48

ATBH 

0x4248

ATOI 

0x4F49

ATNT 

Node Discover Time. Set/Read the amount of time a node will wait for responses from other nodes when using the ND (Node Discover) command.

Parameter range : 0x01 - 0xFC [x 100 ms]
Default : 0x19

ATNO 

Node Discover Options. Enables node discover self-response on the module.

Paramerter range : 0-1
Default : 0

ATSC 

Scan Channels. Set/Read list of channels to scan for all Active and Energy Scans as a bitfield. This affects scans initiated in command mode (AS, ED) and during End Device Association and Coordinator startup:

bit 0 - 0x0Bbit 4 - 0x0Fbit 8 - 0x13bit12 - 0x17
bit 1 - 0x0Cbit 5 - 0x10bit 9 - 0x14bit13 - 0x18
bit 2 - 0x0Dbit 6 - 0x11bit 10 - 0x15bit14 - 0x19
bit 3 - 0x0Ebit 7 - 0x12bit 11 - 0x16bit 15 - 0x1A

Parameter range : 0 - 0xFFFF (bits 0, 14, 15 not allowed on the XBee-PRO)
Default : 0x1FFE (all XBee-PRO Channels)

ATSD 

Scan Duration. Set/Read the scan duration exponent. End Device - Duration of Active Scan during Association. Coordinator - If ‘ReassignPANID’ option is set on Coordinator [refer to A2 parameter], SD determines the length of time the Coordinator will scan channels to locate existing PANs. If ‘ReassignChannel’ option is set, SD determines how long the Coordinator will perform an Energy Scan to determine which channel it will operate on.

‘Scan Time’ is measured as (# of channels to scan] * (2 ^ SD) * 15.36ms). The number 0-0x0F [exponent] of channels to scan is set by the SC command. The XBee can scan up to 16 channels (SC = 0xFFFF). The XBee PRO can scan up to 13 channels (SC = 0x3FFE).

Example : The values below show results for a 13 channel scan :

SD = 0, time = 0.18 secSD = 8, time = 47.19 sec
SD = 2, time = 0.74 secSD = 10, time = 3.15 min
SD = 4, time = 2.95 secSD = 12, time = 12.58 min
SD = 6, time = 11.80 secSD = 14, time = 50.33 min
ATZS 

0x5A53

ATNJ 

0x4E4A

ATJV 

0x4A56

ATNW 

0x4E57

ATJN 

0x4A4E

ATAR 

0x4152

ATA1 

End Device Association. Set/Read End Device association options.

  • bit 0 - ReassignPanID
    • 0 : Will only associate with Coordinator operating on PAN ID that matches module ID
    • 1 : May associate with Coordinator operating on any PAN ID
  • bit 1 - ReassignChannel
    • 0 : Will only associate with Coordinator operating on matching CH Channel setting
    • 1 : May associate with Coordinator operating on any Channel
  • bit 2 - AutoAssociate
    • 0 : Device will not attempt Association
    • 1 : Device attempts Association until success
      Note
      This bit is used only for Non-Beacon systems. End Devices in Beacon-enabled system must always associate to a Coordinator
  • bit 3 - PollCoordOnPinWake
    • 0 : Pin Wake will not poll the Coordinator for indirect (pending) data
    • 1 : Pin Wake will send Poll Request to Coordinator to extract any pending data bits 4 - 7 are reserved

Parameter range : 0 - 0x0F
Default : 0

ATA2 

Coordinator Association. Set/Read Coordinator association options.

  • bit 0 - ReassignPanID
    • 0 : Coordinator will not perform Active Scan to locate available PAN ID. It will operate on ID (PAN ID).
    • 1 : Coordinator will perform Active Scan to determine an available ID (PAN ID). If a PAN ID conflict is found, the ID parameter will change.
  • bit 1 - ReassignChannel
    • 0 : Coordinator will not perform Energy Scan to determine free channel. It will operate on the channel determined by the CH parameter.
    • 1 : Coordinator will perform Energy Scan to find a free channel, then operate on that channel.
  • bit 2 - AutoAssociate
    • 0 : Coordinator will not allow any devices to associate to it.
    • 1 : Coordinator will allow devices to associate to it.
  • bits 3 - 7 - Reserved

Parameter range : 0 - 0x0F
Default : 0

ATEE 

AES Encryption Enable. Disable/Enable 128-bit AES encryption support. Use in conjunction with the KY command.

Parameter range: 0-1
Default: 0 (disabled)

ATEO 

0x454F

ATNK 

0x4E4B

ATKY 

AES Encryption Key. Set the 128-bit AES (Advanced Encryption Standard) key for encrypting/decrypting data. The KY register cannot be read.

Parameter range: 0 - (any 16-Byte value)

ATPL 

Power Level. Select/Read the power level at which the RF module transmits conducted power.

Parameter range: 0 - 4 (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:

  • PL=4: 10 dBm
  • PL=3: 8 dBm
  • PL=2: 2 dBm
  • PL=1: -3 dBm
  • PL=0: -3 dBm

Default: 4

ATCA 

CCA Threshold. Set/read the CCA (Clear Channel Assessment) threshold. Prior to transmitting a packet, a CCA is performed to detect energy on the channel. If the detected energy is above the CCA Threshold, the module will not transmit the packet.

Parameter range: 0x24 - 0x50 [-dBm]
Default: 0x2C (-44d dBm)

ATPM 

0x504D

ATDB 

0x4442

ATPP 

0x5050 Serial Interfacing (I/O)

ATAP 

API Enable. Disable/Enable API Mode.

Parameter range: 0-2

  • 0 : disabled
  • 1 : API enabled
  • 2 : API enabled (with escaped control characters)

Default: 0

ATAO 

0x414F

ATBD 

Interface Data Reate. Set/Read the serial interface data rate for communications between the RF module serial port and host. Request non-standard baud rates with values above 0x80 using a terminal window. Read the BD register to find actual baud rate achieved.

Parameter range: 0-7 (standard baud rates)

  • 0 = 1200 bps
  • 1 = 2400
  • 2 = 4800
  • 3 = 9600
  • 4 = 19200
  • 5 = 38400
  • 6 = 57600
  • 7 = 115200

0x80 - 0x3D090 (non-standard baud rates up to 250 Kbps)
Default: 3

ATNB 

Parity. Set/Read parity settings.

Parameter range: 0-4

  • 0 = 8-bit no parity
  • 1 = 8-bit even
  • 2 = 8-bit odd
  • 3 = 8-bit mark
  • 4 = 8-bit space

Default: 0

ATSB 

0x5342

ATRO 

Packetization Timeout. Set/Read number of character times of inter-character delay required before transmission. Set to zero to transmit characters as they arrive instead of buffering them into one RF packet.

Parameter range: 0 - 0xFF [x character times]
Default: 3

ATIR 

0x4952

ATIC 

0x4943

ATP0 

0x5030

ATP1 

0x5031

ATP2 

0x5032

ATP3 

0x5033

ATD0 

AD0/DIO0 Configuration. Select/Read settings for AD0/DIO0 (pin 20 for Serie 1) Options include: Analog-to-digital converter, Digital Input and Digital Output.

Parameter range: 0-5

  • 0 = Disabled
  • 1 = (n/a)
  • 2 = ADC
  • 3 = DI
  • 4 = DO low
  • 5 = DO high

Default: 0

ATD1 

AD1/DIO1 Configuration. Select/Read settings for AD1/DIO1 (pin 19 for Serie 1) Options include: Analog-to-digital converter, Digital Input and Digital Output.

Parameter range: 0-5

  • 0 = Disabled
  • 1 = (n/a)
  • 2 = ADC
  • 3 = DI
  • 4 = DO low
  • 5 = DO high

Default: 0

ATD2 

AD2/DIO2 Configuration. Select/Read settings for AD2/DIO2 (pin 18 for Serie 1) Options include: Analog-to-digital converter, Digital Input and Digital Output.

Parameter range: 0-5

  • 0 = Disabled
  • 1 = (n/a)
  • 2 = ADC
  • 3 = DI
  • 4 = DO low
  • 5 = DO high

Default: 0

ATD3 

AD3/DIO3 Configuration. Select/Read settings for AD3/DIO3 (pin 17 for Serie 1) Options include: Analog-to-digital converter, Digital Input and Digital Output.

Parameter range: 0-5

  • 0 = Disabled
  • 1 = (n/a)
  • 2 = ADC
  • 3 = DI
  • 4 = DO low
  • 5 = DO high

Default: 0

ATD4 

AD4/DIO4 Configuration. Select/Read settings for AD4/DIO4 (pin 11 for Serie 1) Options include: Analog-to-digital converter, Digital Input and Digital Output.

Parameter range: 0-5

  • 0 = Disabled
  • 1 = (n/a)
  • 2 = ADC
  • 3 = DI
  • 4 = DO low
  • 5 = DO high

Default: 0

ATD5 

DIO5 Configuration. Configure settings for the DIO5 line (pin 15 for Serie 1) of the RF module. Options include Associated LED indicator (blinks when associated) and I/O line settings.

Parameter range: 0-5

  • 0 = Disabled
  • 1 = Associated indicator
  • 2 = ADC
  • 3 = DI
  • 4 = DO low
  • 5 = DO high

Default: 0

ATD6 

0x4436 I/O

DIO6 Configuration. Select/Read settings for the DIO6 line (pin 16 for Serie 1) of the RF module. Options include RTS flow control and I/O line settings. Parameter range: 0-5

  • 0 = Disabled
  • 1 = RTS flow control
  • 2 = (n/a)
  • 3 = DI
  • 4 = DO low
  • 5 = DO high

Default: 0

ATD7 

0x4437

DIO7 Configuration. Select/Read settings for the DIO7 line (pin 12 for Serie 1) of the RF module. Options include CTS flow control and I/O line settings.

Parameter range: 0-7

  • 0 = Disabled
  • 1 = CTS Flow Control
  • 2 = (n/a)
  • 3 = DI
  • 4 = DO low
  • 5 = DO high
  • 6 = RS485 Tx Enable Low
  • 7 = RS485 Tx Enable High

Default: 1

ATD8 

DI8 Configuration. Select/Read options for the DI8 line (pin 9 for Serie 1) of the RF module.

Parameter range: 0-5

  • 0 = Disabled
  • 1 = N/A
  • 2 = N/A
  • 1 = N/A
  • 3 = DI
  • 4 = N/A
  • 5 = N/A

Default: 0

ATLT 

0x4C54

ATPR 
Todo:
Check XBee Serie2

Pull-up Resistor Enable. Set/Read bitfield to configure internal pull-up resistor status for I/O lines.

Bitfield map (XBee Serie1):

Bit Signification
bit0 AD4/DIO4 (pin11)
bit1 AD3 / DIO3 (pin17)
bit2 AD2/DIO2 (pin18)
bit3 AD1/DIO1 (pin19)
bit4 AD0 / DIO0 (pin20)
bit5 RTS / AD6 / DIO6 (pin16)
bit6 DTR / SLEEP_RQ / DI8 (pin9)
bit7 DIN/CONFIG (pin3)

Bit set to "1" specifies pull-up enabled; "0" specifies no pull-up.

Parameter range: 0-0xFF
Default: 0xFF

ATRP 

0x5250

ATV 

0x2556

ATVP 

0x562B

ATTP 

0x5450

ATVR 

0x5652

ATHV 

0x4856

ATAI 

Association Indication. Read errors with the last association request:

  • 0x00 - Successful Completion - Coordinator successfully started or End Device association complete
  • 0x01 - Active Scan Timeout
  • 0x02 - Active Scan found no PANs
  • 0x03 - Active Scan found PAN, but the CoordinatorAllowAssociation bit is not set
  • 0x04 - Active Scan found PAN, but Coordinator and End Device are not configured to support beacons
  • 0x05 - Active Scan found PAN, but the Coordinator ID parameter does not match the ID parameter of the End Device
  • 0x06 - Active Scan found PAN, but the Coordinator CH parameter does not match the CH parameter of the End Device
  • 0x07 - Energy Scan Timeout
  • 0x08 - Coordinator start request failed
  • 0x09 - Coordinator could not start due to invalid parameter
  • 0x0A - Coordinator Realignment is in progress
  • 0x0B - Association Request not sent
  • 0x0C - Association Request timed out - no reply was received
  • 0x0D - Association Request had an Invalid Parameter
  • 0x0E - Association Request Channel Access Failure. Request was not transmitted - CCA failure
  • 0x0F - Remote Coordinator did not send an ACK after Association Request was sent
  • 0x10 - Remote Coordinator did not reply to the Association Request, but an ACK was received after sending the request
  • 0x11 - [reserved]
  • 0x12 - Sync-Loss - Lost synchronization with a Beaconing Coordinator
  • 0x13 - Disassociated - No longer associated to Coordinator
  • 0xFF - RF Module is attempting to associate

Parameter range: 0 - 0x13 [read-only]

ATCT 

0x4354

ATCN 

0x434E

ATGT 

0x4754

ATCC 

0x4343

ATSM 

Sleep Mode. Set/Read Sleep Mode configurations.

Parameter range: 0-5

  • 0 = No Sleep
  • 1 = Pin Hibernate
  • 2 = Pin Doze
  • 3 = Reserved
  • 4 = Cyclic sleep remote
  • 5 = Cyclic sleep remote w/ pin wake-up
  • 6 = [Sleep Coordinator] for backwards compatibility w/ v1.x6 only; otherwise, use ATCommand::ATCE command.

Default: 0

ATSN 

0x534E

ATSP 

Cyclic Sleep Period. <NonBeacon firmware> Set/Read sleep period for cyclic sleeping remotes. Coordinator and End Device SP values should always be equal. To send Direct Messages, set SP = 0.

End Device - SP determines the sleep period for cyclic sleeping remotes. Maximum sleep period is 268 seconds (0x68B0).

Coordinator - If non-zero, SP determines the time to hold an indirect message before discarding it. A Coordinator will discard indirect messages after a period of (2.5 * SP).

Parameter range: 0 - 0x68B0 [x 10 ms]
Default: 0

ATDP 

Disassociated Cyclic Sleep Period. <NonBeacon firmware> End Device - Set/Read time period of sleep for cyclic sleeping remotes that are configured for Association but are not associated to a Coordinator. (i.e. If a device is configured to associate, configured as a Cyclic Sleep remote, but does not find a Coordinator, it will sleep for DP time before reattempting association.) Maximum sleep period is 268 seconds (0x68B0). DP should be > 0 for NonBeacon systems.

Paramerter range: 1 - 0x68B0 [x 10 ms]
Default: 0x3E8 (1000d)

ATST 

Time Before Sleep. <NonBeacon firmware> Set/Read time period of inactivity (no serial or RF data is sent or received) before activating Sleep Mode. ST parameter is only valid with Cyclic Sleep settings (SM = 4 - 5). Coordinator and End Device ST values must be equal.

Also note, the GT parameter value must always be less than the ST value. (If GT > ST, the configuration will render the module unable to enter into command mode.) If the ST parameter is modified, also modify the GT parameter accordingly.

Parameter range: 1 - 0xFFFF [x 1 ms]
Default: 0x1388 (5000d)

ATSO 

Sleep Options. Set/Read the sleep mode options.

  • Bit 0 - Poll wakeup disable
    • 0 - Normal operations. A module configured for cyclic sleep will poll for data on waking.
    • 1 - Disable wakeup poll. A module configured for cyclic sleep will not poll for data on waking.
  • Bit 1 - ADC/DIO wakeup sampling disable.
    • 0 - Normal operations. A module configured in a sleep mode with ADC/DIO sampling enabled will automatically perform a sampling on wakeup.
    • 1 - Suppress sample on wakeup. A module configured in a sleep mode with ADC/DIO sampling enabled will not automatically sample on wakeup.

Paramerter range: 0-4
Default: 0

ATWH 

0x5748

ATSI 

0x5349

ATPO 

0x504F

ATAC 

0x4143

ATNR 

0x4E52

ATCB 

0x4342

ATND 

Node Discover . Discovers and reports all RF modules found. The following information is reported for each module discovered (the example cites use of Transparent operation (AT command format) - refer to the long ND command description regarding differences between Transparent and API operation).

  • MY<CR>
  • SH<CR>
  • SL<CR>
  • DB<CR>
  • NI<CR><CR>

The amount of time the module allows for responses is determined by the NT parameter. In Transparent operation, command completion is designated by a <CR> (carriage return). ND also accepts a Node Identifier as a parameter. In this case, only a module matching the supplied identifier will respond. If ND self-response is enabled (NO=1) the module initiating the node discover will also output a response for itself.

Parameter range : optional 20-character NI value

ATDN 

Distination Node. Resolves an NI (Node Identifier) string to a physical address. The following events occur upon successful command execution:

  1. DL and DH are set to the address of the module with the matching Node Identifier.
  2. “OK” is returned.
  3. RF module automatically exits AT Command Mode If there is no response from a module within 200 msec or a parameter is not specified (left blank), the command is terminated and an “ERROR” message is returned.

Parameter range : 20-character ASCII string

ATIS 

0x4953

AT1S 

0x3153

Constructor & Destructor Documentation

QtXBee::ATCommand::ATCommand ( QObject *  parent = 0)
explicit

ATCommand's constructor.

Parameters
parent

Member Function Documentation

void QtXBee::ATCommand::assemblePacket ( )
virtual

Assembles the packet to be able to send it.

This function is called by the XBee class, when the packet in being sent.

Note
Overload this function to create your own packet.

Reimplemented from QtXBee::XBeePacket.

Reimplemented in QtXBee::RemoteATCommandRequest.

ATCommand::ATCommandType QtXBee::ATCommand::atCommandFromByteArray ( const QByteArray &  command)
static

Returns the ATCommand::ATCommand corresponding to the given QByteArray.

Parameters
command
Returns
the ATCommand::ATCommand corresponding to the given QByteArray.
QByteArray QtXBee::ATCommand::atCommandToByteArray ( const ATCommandType  command)
static

Returns the given ATCommand::ATCommand into QByteArray.

Parameters
commandthe ATCommand to be converted into QByteArray
Returns
the given ATCommand into QByteArray
QString QtXBee::ATCommand::atCommandToString ( const ATCommandType  command)
static

Returns the given ATCommand::ATCommand into QString.

Parameters
commandthe ATCommand to be converted into QString
Returns
the given ATCommand into QString
void QtXBee::ATCommand::clear ( )
virtual

Clears the packet by reseting all attributes to their default value.

Note
All subclass should reimplement this method.

Reimplemented from QtXBee::XBeePacket.

Reimplemented in QtXBee::RemoteATCommandRequest.

ATCommand::ATCommandType QtXBee::ATCommand::command ( ) const

Returns the AT Command.

Returns
the AT Command
QByteArray QtXBee::ATCommand::parameter ( ) const

Returns the command's parameter.

Returns
the command's parameter
void QtXBee::ATCommand::setCommand ( const ATCommandType  command)

Sets the AT Command.

Parameters
command
void QtXBee::ATCommand::setCommand ( const QByteArray &  command)

Sets the AT Command from the given QByteArray.

Parameters
command
void QtXBee::ATCommand::setParameter ( const QByteArray &  param)

Sets command's parameter.

Parameters
param
QString QtXBee::ATCommand::toString ( )
virtual

Returns a debug string containing all packet's informations.

Returns
a debug string containing all packet's informations.

Reimplemented from QtXBee::XBeePacket.

Reimplemented in QtXBee::RemoteATCommandRequest.


The documentation for this class was generated from the following files:
  • /home/thomas/Projects/QtXBee/src/qtxb/atcommand.h
  • /home/thomas/Projects/QtXBee/src/qtxb/atcommand.cpp
  • pages/atcommand.dox