A.R.Drone Developer Guide - Abstract
A.R.Drone Developer Guide - Abstract
A.R.Drone Developer Guide - Abstract
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
30<br />
6.1 AT Commands syntax<br />
Strings are encoded as 8-bit ASCII characters, with a Line Feed character (byte value 10(10)),<br />
noted hereafter, as a newline delimiter.<br />
One command consists in the three characters AT* (i.e. three 8-bit words with values 41(16),54(16),2a(16))<br />
followed by a command name, and equal sign, a sequence number, and optionally a list of<br />
comma-separated arguments whose meaning depends on the command.<br />
A single UDP packet can contain one or more commands, separated by newlines (byte value<br />
0A(16)). An AT command must reside in a single UDP packet. Splitting an AT command in two<br />
or more UDP packets is not possible.<br />
Example :<br />
AT*PCMD=21625,1,0,0,0,0AT*REF=21626,290717696<br />
The maximum length of the total command cannot exceed 1024 characters; otherwise the entire<br />
command line is rejected. This limit is hard coded in the drone software.<br />
Note : Incorrect AT commands should be ignored by the drone. Nevertheless, the client should<br />
always make sure it sends correctly formed UDP packets.<br />
Most commands will accept arguments, which can be of three different type :<br />
• A signed integer, stored in the command string with a decimal representation (ex: the<br />
sequence number)<br />
• A string value stored between double quotes (ex: the arguments of AT*CONFIG)<br />
• A single-precision IEEE-754 floating-point value (aka. float). Those are never directly<br />
stored in the command string. Instead, the 32-bit word containing the float will be considered<br />
as a 32-bit signed integer and printed in the AT command (an example is given<br />
below).<br />
6.2 Commands sequencing<br />
In order to avoid the drone from processing old commands, a sequence number is associated<br />
to each sent AT command, and is stored as the first number after the "equal" sign. The drone<br />
will not execute any command whose sequence number is less than the last valid received AT-<br />
Command sequence number. This sequence number is reset to 1 inside the drone every time<br />
a client disconnects from the AT-Command UDP port (currently this disconnection is done by<br />
not sending any command during more than 2 seconds), and when a command is received<br />
with a sequence number set to 1.<br />
A client MUST thus respect the following rule in order to successfully execute commands on<br />
the drone :