Robot App Store Developer Program

robots-app-store-developer-program

Knowledge Base

How to program AR.Drone remotely over WIFI

  By Anna Sandler

What is a command

The communication with AR.Drone is done through AT commands.
Commands are sent to the AR.Drone as UDP or TCP packets;
A single UDP packet must contain at least one complete command or more;
In case the packet contains more than one command, the new line byte \r 0x0A is used to separate the commands.
Strings are encoded as 8-bit ASCII characters;
The maximum length of the command is 1024 characters;
30 MS delay must be passed between the commands;

Syntax

The command consists from AT*[command name]=[sequence number decimal as string][,argument1, argument 2…]<LF>

Explanation

  • Command name- see explanation below;
  • Sequence number: a positive number represents the last command to execute.
    When a port connection is established, AR.Drone firmware is ordered to wait for a command sequence number 1 or bigger.
    Each time a command is received; AR.Drone firmware remembers the sequence of that command.
    The next command will be accepted only if its sequence number is bigger than the number of the last command.
    Special case is the number 1 that resents the counting system.
    Therefore, first command should contain the value 1 as a sequence number, and each command’s sequence number should be increased;
  • Arguments will be discussed below;
The following are the types of command arguments:
  • Signed integer;
  • String value;
  • Float value IEEE-754;

Command names

  • AT*REF- gets an input as an argument.
    This command is used for takeoff, landing, reset and emergency stop;
  • AT*PCMD- gets a flag, roll, pitch, gaz and yaw as arguments.
    This command is used to control AR.Drone motion;
  • AT*FTRIM- not arguments.
    This command sets the reference for the horizontal plane;
  • AT*CONFIG- gets key and value as arguments.
    This command configures the AR.Drone;
  • AT*CONFIG_IDS- gets session, user and application id as arguments.
    This command is used as identifiers for AT*CONFIG commands;
  • AT*LED- gets animation, frequency and duration as arguments.
    This command sets a led animation on AR.Drone;
  • AT*ANIM- gets animation and duration as arguments.
    This command sets a flight animation on the AR.Drone;
  • AT*COMWDG- no arguments.
    This command resets the communication watchdog;
  • And more…
The following ports are available for communication:
  • Port 5556- UDP packets with regular commands;
  • Port 5554- Reply UDP data packets from AR.Drone;
  • Port 5555- Reply video stream packets from AR.Drone;
  • Port 5559- TCP packets for critical data that cannot be lost usually for configuration;
The client is disconnected from the UDP port after a delay of 2 seconds after sending the last command;








Related Robot-Apps™

Comments