AT Commands

From AR Drone Wiki

Jump to: navigation, search
ARDrone Developer Guide.png

AT commands are text strings sent to the drone to control its actions.

Those strings are generated by the ARDroneLib and ARDroneTool libraries, provided in the SDK. Most developers should not have to deal with them. Advanced developers who would like to rewrite their own A.R.Drone middle ware can nevertheless send directly those commands to the drone inside UDP packets on port UDP-5556, from their local UDP-port 5556 (using the same port numbers on both sides of the UDP/IP link is a requirement in the current SDK).

Note : According to tests, a satisfying control of the A.R.Drone is reached by sending the AT commands every 30 ms for smooth drone movements. To prevent the drone from considering the WIFI connection as lost, two consecutive commands must be sent within less than 2 seconds.

AT Command syntax

Strings are encoded as 8-bit ASCII characters, with a Line Feed character (byte value 10(10)), noted <LF>hereafter, as a newline delimiter.

One command consists in the three characters AT* (i.e. three 8-bit words with values 41(16),54(16),2a(16)) followed by a command name, and equal sign, a sequence number, and optionally a list of comma-separated arguments whose meaning depends on the command.

A single UDP packet can contain one or more commands, separated by newlines (byte value 0A(16)). An AT command must reside in a single UDP packet. Splitting an AT command in two or more UDP packets is not possible.

Example : AT*PCMD=21625,1,0,0,0,0<LF>AT*REF=21626,290717696<LF>

The maximum length of the total command cannot exceed 1024 characters; otherwise the entire command line is rejected. This limit is hard coded in the drone software.

Note : Incorrect AT commands should be ignored by the drone. Nevertheless, the client should always make sure it sends correctly formed UDP packets.

Most commands will accept arguments, which can be of three different type :

• A signed integer, stored in the command string with a decimal representation (ex: the sequence number)

• A string value stored between double quotes (ex: the arguments of AT*CONFIG)

• A single-precision IEEE-754 floating-point value (aka. float). Those are never directly stored in the command string. Instead, the 32-bit word containing the float will be considered as a 32-bit signed integer and printed in the AT command.

Personal tools