AT commands, UDP ports and Video format

Added by MAPGPS . 1650 days ago

Although I can figure out most of the AR.Drone protocol by looking into the source code of the ARDrone API, but it’s really great if Parrot would publish a detail document for:
1) AT commands
2) UDP ports (5554, 5555, 5556, 5557 etc.)
3) Video format (JPEG? MPEG? or others)

So developers can easy write apps using any programming languages on any platforms (as long as they support Socket based network programming and Image processing).

This way could help Parrot to get rid of the current bad situation of ARDrone API support.

MAPGPS


Replies

RE: AT commands, UDP ports and Video format - Added by MAPGPS . 1648 days ago

I just wrote a simple Java app to control AR.Drone directly via AT commands. It can run on Windows XP (DOS prompt) or any other platforms with Java installed.

Setings:
altitude max2m: java ARDrone 192.168.1.1 AT*CONFIG=1,\"control:altitude_max\",\"2000\"

Basic controls:
Takeoff: java ARDrone 192.168.1.1 AT*REF=101,290718208
Landing: java ARDrone 192.168.1.1 AT*REF=102,290717696
Hovering: java ARDrone 192.168.1.1 AT*PCMD=201,1,0,0,0,0

Controls:
gaz 0.1: java ARDrone 192.168.1.1 AT*PCMD=301,1,0,0,1036831949,0
gaz -0.1: java ARDrone 192.168.1.1 AT*PCMD=302,1,0,0,-1110651699,0
pitch 0.1: java ARDrone 192.168.1.1 AT*PCMD=303,1,1036831949,0,0,0
pitch -0.1: java ARDrone 192.168.1.1 AT*PCMD=304,1,-1110651699,0,0,0
yaw 0.1: java ARDrone 192.168.1.1 AT*PCMD=305,1,0,0,0,1036831949
yaw -0.1: java ARDrone 192.168.1.1 AT*PCMD=306,1,0,0,0,-1110651699
roll 0.1: java ARDrone 192.168.1.1 AT*PCMD=307,1,0,1036831949,0,0
roll -0.1: java ARDrone 192.168.1.1 AT*PCMD=308,1,0,-1110651699,0,0

Animations:
pitch -30 deg: java ARDrone 192.168.1.1 AT*ANIM=401,0,1000
pitch 30 deg: java ARDrone 192.168.1.1 AT*ANIM=402,1,1000

My AR.Drone is still on the way, but I have to get the initial app ready for testing once I received it (since I do not have iPhone or any other Apple devices. I bought AR.Drone because of its Linux and open platform for development).

MAPGPS

ARDrone.java - Java app to control AR.Drone via AT commands (3.2 KB)

RE: AT commands, UDP ports and Video format - Added by Martin Rosinski 1647 days ago

That's awesome - Thanks! I'm planning on writing a simple clean ObjC library to control the Drone. Unlike the iPhone code in the SDK, this will consist of a few neatly-coded classes, with no dependancies on ARDroneLib. Your Java example will save a lot of time figuring out the AT commands :)

RE: AT commands, UDP ports and Video format - Added by MAPGPS . 1647 days ago

Just received my AR.Drone. I can't wait to test it with my Java app.
It works fine after a minor change to the Java code.

At the first, I tried the Takeoff AT command, but the AR.Drone had no actions! Later I realized that I missed "\r" at the end of the AT command. Also I noticed the receive() timeout, that means AR.Drone does not send back ack message (like "OK"). I modified my Java app to match the behavior of AR.Drone.

After takeoff, the AR.Drone hovering at about 1m height, very stable.
I also tried other commands, all works fine.

MAPGPS

RE: AT commands, UDP ports and Video format - Added by MAPGPS . 1647 days ago

Attached is the modified Java app mentioned in my previous post.

The next is to display the video stream received from UDP port 5555.
Looking into the SDK C source code, I feel it's too complex to understand the video format.

How is the stream compressed? H.263?
How is the sampling colour format? YUV420P?

I noticed from the SDK source that UDP port 5557 is for raw video format, is it in YUV420P?

Really need help from Parrot for the video stream decoding.
A neatly-coded C lib as Martin planned is better (so I can compile it as DLL and invoked by Java app via JNI).

MAPGPS

ARDrone.java - Modified Java app to control AR.Drone via AT commands (3.3 KB)

RE: AT commands, UDP ports and Video format - Added by Stephane P 1646 days ago

Hi everyone,

To make your Java code correct, you must either make sure the sequence number is always increasing in time, or always use 1 as a sequence number (this resets the drone internal counter). Otherwise only the first command you send will be actually executed, unless you wait two seconds before sending the next command.
The next step in your code would be sending the AT*PCMD continuously to make it fly smoothly and make sure nothing bad happens if a UDP packet is lost.

Concerning UDP port 5557, it is disabled.

As for the video stream, it uses a custom video format very close to H.263 and is indeed encoded using YUV420. The 1.0.4 SDK needs a few modifications to run compile under Windows, which will be included in the next release.

Stéphane
A.R.Drone Software Engineer

RE: AT commands, UDP ports and Video format - Added by MAPGPS . 1644 days ago

New updates:
The Java app can support keyboad control now (see attachment).

Keyboad layout:

PgUp key: Takeoff
PgDn key: Landing
SpaceBar key: Hovering

Arrow keys:
Go Forward
^ |
Go Left <---+---> Go Right |
v
Go Backward

Arrow keys with Shift key pressed:
Go Up
^ |
Rotate Left <---+---> Rotate Right |
v
Go Down

Digital keys 1~9 + Arrow keys or Digital keys 1~9 + Shift + Arrow keys:
Change speed, 1 is min and 9 is max, release the Digital key will reset to default speed (10%).

MAPGPS

ARDrone.java - Java app to control AR.Drone with keyboad (8.7 KB)

RE: AT commands, UDP ports and Video format - Added by Frenkys . 1644 days ago

Hi MAPGPS,
Can you say more about how to use your java application with Windows XP?
Thanks,
Frenkys

RE: AT commands, UDP ports and Video format - Added by MAPGPS . 1644 days ago

Frenkys,

For Java programming, you need to download JDK5 or JDK6 from:
http://www.oracle.com/technetwork/java/javase/downloads/index.html

After the installation, open a DOS prompt and goto the directory where ARDrone.java located, and compile it:
javac ARDrone.java

Then run it:
java ARDrone

And a small window will popup, keep this window focus when you play the keyboard.

MAPGPS

RE: AT commands, UDP ports and Video format - Added by Frenkys . 1643 days ago

MAPGPS,
thanks very much;
what do you mean by "Digital key 1~9"?
Frenkys

RE: AT commands, UDP ports and Video format - Added by MAPGPS . 1643 days ago

Digital keys 1~9: Change speed (rudder rate 5%~99%), 1 is min and 9 is max.

Press key "1" ---> rudder rate 5%
Press key "2" ---> rudder rate 10%
Press key "3" ---> rudder rate 15%
Press key "4" ---> rudder rate 25%
...
Press key "9" ---> rudder rate 99%

Attahced is the updated Java app.

MAPGPS

ARDrone.java - (Updated) Java app to control AR.Drone with keyboad (10.1 KB)

RE: AT commands, UDP ports and Video format - Added by claudio croccolino 1643 days ago

realy thanks for good information about ARDRONE programming!!
..i have little question:
how is the roule to calcolate that 0.1 is 1036831949 or -0.1 is,-1110651699 or 0.2 is 1045220557

thanks
regards
claudio

RE: AT commands, UDP ports and Video format - Added by claudio croccolino 1643 days ago

about the question before: I have implemented the AT commands to take off and landing in Visual Basic and landing and take off
work good !!! thanks alot!! but i miss these information to implemented for move the ARdone !
regards
Clauido

RE: AT commands, UDP ports and Video format - Added by MAPGPS . 1643 days ago

claudio croccolino wrote:

realy thanks for good information about ARDRONE programming!! ..i have little question: how is the roule to calcolate that 0.1 is 1036831949 or -0.1 is,-1110651699 or 0.2 is 1045220557

Need to understand how a Float is represented in memory as 4 bytes Binary:
http://tfinley.net/notes/cps104/floating.html
Then convert these 4 bytes Binary into Integer.

You can Google “float int VB” for Visual Basic examples for how to represent a Float as Integer.

BTW, could you post your Visual Basic executable file? So others on the forum can easy to demo Takeoff/Landing on their Windows XP.

MAPGPS

RE: AT commands, UDP ports and Video format - Added by dicht dichter 1643 days ago

Hi all,

yesterday I started also on writing an little App for Windows in C++ and Visual Studio. At the moment it's just a Window with Debug output and you can control the drone by Keyboard, like MAPGS Java App (thanks for that App MAPGS). First thing is that I like to get all AT Cmds correct and then I will start on Video and Navdata. I have a little problem the Take Off and Landing Cmd. works just fine, but moving the drone in any direction is not working. So for now I have the following commands that work out.

//take off
AT*CONFIG=\"general:navdata_demo\",\"TRUE\"\r //boot_drone
AT*CONFIG=iSeq,\"control:altitude_max\",\"2000\"\r
AT*FTRIM\r
AT*REF=%d,290718208\r

//land
AT*REF=%d,290717696\r

but none of the other cmds. is working, or let's say the drone is not doing anything on the other cmds, I find in the java app.

I would like to know the following AT cmds.:
-move forward
-move backwards
-move right
-move left
-roll right,left
-go up,down
-send emergency
-reset emergency (as debugging in my living room seems to crash quite often the drone, and having the cmd. for reset emergency would be great)
-which command I need to send sequential (so every second) when no other command is send, to let the drone know I am still here

I have the SDK and it's really a pain in the a* jumping through all header and c files to find some Information, so it would be great to just get the AT commands.
Would be great if a Parrot developers can post some commands (or give us a pdf with all commands) I just can send to make the flight module nice in my app, then I can start working on the navdata and video stuff (maybe with DirectX or OpenGL I will see and Gamepad Implementation). At the moment it takes a lot of time writing sth. testing and not knowing if it's really the right command/syntax I am using. And as I am working a lot for another company the day, it would be great to get more documents from parrot or parrot developers should tell us which *.h or *.c files are really important.

Thanks to all, best regards
dicht

RE: AT commands, UDP ports and Video format - Added by Corrado Tisi 1642 days ago

hi,
Could you post or email your Visual Basic executable file ?

Thanks a lot

Corrado

RE: AT commands, UDP ports and Video format - Added by claudio croccolino 1642 days ago

hi all,I post the executable software to landing and take off in Visual Basic,
ATTENTION
it's very prototype and I don't garanty you that work correctly!!!
regards

Claudio

Packets.exe (32 KB)

RE: AT commands, UDP ports and Video format - Added by jan heuer 1642 days ago

https://projects.ardrone.org/boards/1/topics/show/886
my little keyboard controller for linux

RE: AT commands, UDP ports and Video format - Added by Corrado Tisi 1642 days ago

Hi, can you also post the source files ?

thanks
Corrado

RE: AT commands, UDP ports and Video format - Added by claudio croccolino 1641 days ago

Hi all,
this is my source code.
regards
Claudio

Packets.frm (13.5 KB)

RE: AT commands, UDP ports and Video format - Added by M. McKay 1640 days ago

MAPGPS,
Great work with your little Java app!
just wondering if you are also working a video stream/record Java app?

RE: AT commands, UDP ports and Video format - Added by Christian Stewart 1607 days ago

Hello,

Quite cool work! Althought this is great, I am still going to continue using the URBI driver - "Google ArDrone URBI" and goastai lab. The man who created the library shows how to use it and demonstrates the powerful capability of using URBI. For example, his library is so simple you can do this (in URBI, which is like any other simple programming language)

ARDrone drone = ARDrone();
drone.load=1;

drone.takeoff();

drone.speedY = 1;
drone.speedY = 0;

drone.cameraVal;
drone.cameraMode += 1;
Much like that. Its quite simple. Using goastai lab you can attach to the console you used to start this and quickly create a user interface showing the camera view etc. and viewing/controlling the movement using sliders.

However URBI can easily be attached to any programming language, such as Java, which opens up possibilities for wiimote and other PC compatable controller use. I am currently finishing up work on a Wiimote control system with URBI and Java for the ardrone.

Controls:

Holding the trigger and tilting = fly (directional control)
Using the buttons on the front (up down, left right) controls the yaw and speed z (up).
Pressing 1 causes the drone to take off
Pressing 2 makes it land.

With a computer monitor (Goastai lab) I can control the ARDrone using a wiimote and view it on the computer, and of course, with a powerful wifi chip, it extends the range greatly. H

One question though. Would it be possible to reconfigure the ARDrone to use a existing wireless network? This way I could fly it all over my school, which has wifi bases about every 20 meters. This would make an environment (combined with computer) where I could fly the drone all the way across the school, pick up a pen, and be back, without loosing connection.

Ideas folks :)

Christian Stewart

RE: AT commands, UDP ports and Video format - Added by MAPGPS . 1607 days ago

Christian,

Regarding your last question: the answer is "Yes", and you can do what you want since AR.Drone is Linux based (if you familiar with Linux).
But it is not allowed to discuss details here per responses from Parrot supporters in other posts.

You can get some hints from a post made by Stephane(Parrot developer, I saw his name around the *GPL*ed kernel source code):
https://projects.ardrone.org/boards/1/topics/show/673#message-719

MAPGPS

RE: AT commands, UDP ports and Video format - Added by Bob Meyers 1606 days ago

MAPGPS I want to thank you big time for posting that java app. I'm not even a java coder but I could follow what you did and it makes it so clear and easy to understand. Well documented code too! Thanks!

RE: AT commands, UDP ports and Video format - Added by Tuxette - 1604 days ago

Hello, MAPGPS :)

We were wondering whether or not you have an emergency reset AT command for your application. Our ar.drone kind of got stuck during a routine using the command line version of your program and we don't know what happened, or if it needs the emergency reset all command at the end of the routine :(

...thanks in advance. Your program does work beautifully anyways :)

RE: AT commands, UDP ports and Video format - Added by MAPGPS . 1604 days ago

Here is the command line to send AT command for emergency reset:

Toggle Emergency: java ARDrone 192.168.1.1 AT*REF=1,290717952

MAPGPS

RE: AT commands, UDP ports and Video format - Added by Thomas LESTRIEZ 1600 days ago

Hello MAPGPS,
You say:

Really need help from Parrot for the video stream decoding. A neatly-coded C lib as Martin planned is better (so I can compile it as DLL and invoked by Java app via JNI).

Did you already make this dll or not? If yes, could you share it?

Thank you for all your precedently work about the drone and java.

ThomasL

RE: AT commands, UDP ports and Video format - Added by MAPGPS . 1600 days ago

Thomas LESTRIEZ wrote:

Hello MAPGPS, Did you already make this dll or not? If yes, could you share it?

Thank you for all your precedently work about the drone and java.

ThomasL

Not yet. No enough time to understand the complex video decoding inside SDK1.5.

Wilke Jansoone knows video decoding well, and we may JNI to his DLL:
https://projects.ardrone.org/boards/1/topics/show/264

MAPGPS

RE: AT commands, UDP ports and Video format - Added by Tuxette - 1599 days ago

Are AT commands only for sending instructions, or can we receive feedback from the drone, like the low battery alert? :)

RE: AT commands, UDP ports and Video format - Added by MAPGPS . 1599 days ago

Tuxette - wrote:

Are AT commands only for sending instructions, or can we receive feedback from the drone, like the low battery alert? :)

Yes.
The feedback/flight-state(including battery state) from AR.Drone is in the NavData received from UDP port 5554.

MAPGPS

RE: AT commands, UDP ports and Video format - Added by Christian Stewart 1574 days ago

Hey guys,

Thanks so much for this. I was very excited to see that MapGPS had posted a page with a java class containing information on commanding the ARDrone from Java through AT commands. However, I was disappointed that his class only contained a simple command line element and a keyboard control element, and that it could only be run from the command line, as I wanted to program the ARDrone myself :)

So, I wrote my own java class based on his example, so that now you can program your drone from Java easily.

That class allows something like this:

ARDrone drone = new ARDrone("My Drone", "ip address", 5));
drone.takeoff();
drone.hover();
drone.setPitch(0.5);
drone.setYaw(0.5);
drone.setFlightVars(pitch, yaw, etc);
drone.land();

As you can see this just simplifies things for the sake of programming the robot from Java. Once again I wrote my own class for this, however, I did use the connection code and send at command code, as well as the AT commands. Basically, I rearranged MapGPS's work to be more straightforward for programming's sake.

I posted it here: https://projects.ardrone.org/boards/1/topics/show/1819

Thanks so much MapGPS! By the way, can someone please test it? I haven't gotten my drone yet (in the mail) but I am almost completely sure that this will work. All you need to do is run it from the command line and a simple demo program will run.

Christian Stewart (kidovate)

RE: AT commands, UDP ports and Video format - Added by Tuxette - 1573 days ago

I have another question about the AT commands: how are their float numbers (0.1, 0.2) passed on to their int values? We need bigger values and can't exactly find how to obtain them.

Thanks for all the help :)

RE: AT commands, UDP ports and Video format - Added by Tuxette - 1573 days ago

OK, I got the float/int numbers... No worries.

But what I cannot make work is the forward/backward and left/right movements. It spins properly to the left/right, but doesn't move when requested. It also moves up/down, but not forward/backward.

...what could be happening with it?

Thanks for all the help in advance :)

RE: AT commands, UDP ports and Video format - Added by dicht dichter 1573 days ago

Hi,

as you are not doing a navdata thread (like me in my C++ app at the moment) you will not get when the drone sends a Watchdog and when you need to reset the watchdog that's why your drone is not moving. So let's say when nothing is send about 250ms the drone hangs in watchdog. As you can see in my little app drone2fixed.rar https://projects.ardrone.org/boards/1/topics/show/943 down at the bottom of the post you will see in drone.cpp I am using a timer where I reset watchdog and send a hovering command , so when doing this your drone will move. Also I have the Emergency and reset Emergency command in my app, still need to play on navdata and video when i find time maybe next year.

Just take a look into drone.cpp and take a lokk into the following functions MessageHandler(WPARAM wParam) and search for case TIMER_HOVERING:

regards
dicht

RE: AT commands, UDP ports and Video format - Added by Cheung Clifford 1567 days ago

Hi MAPGPS,

I m actually trying the sdk on the Linux, would like to check with you if I can directly use your java app that you post for using the keyboard for controlling the AR Drone? If yes, do i need to change anything on the .c or .h files given as the gamepad is being specify somewhere in the code. Thanks for your advice.

Regards,
Clifford

RE: AT commands, UDP ports and Video format - Added by Armel BRUNO 1563 days ago

claudio croccolino wrote:

hi all,I post the executable software to landing and take off in Visual Basic, ATTENTION it's very prototype and I don't garanty you that work correctly!!! regards

Claudio

Hi,
I am trying to use AT Commands directly throw UDPSockets under C++ Builder.... I can see correct UDP sockets under wireshark, but the drone does not move. Is there any thing to do before sending Udp Sockets on port 5556?

I tried to get the information throw Claudio's Basic programm. I can see frames, but the drone doesn't work too... Is it due to logon that i don't know? I think that i have some thing to initialize or another socket to implement other that that the one on Port : 5556

thanks for your help. It seems very simple but nothing happen in my case.

Armel

RE: AT commands, UDP ports and Video format - Added by Armel BRUNO 1562 days ago

Hi,
I did a mistake. so everything is OK.
Regards

Armel

RE: AT commands, UDP ports and Video format - Added by code coder 1561 days ago

Hi can someone provide sample code for connecting to the video port 5555 and accessing the video stream. I am trying to get images from the ar.drone camera. thanks.

RE: AT commands, UDP ports and Video format - Added by Tuxette - 1537 days ago

Hello! :)

Well, I got some code to listen to port 5554, supposedly the one that sends me the status of the drone, and I'm seriously not getting anything out of it :/ (and I'd like to, considering it has been behaving strangely at takeoff)

The code is in Java, to keep with the theme of this app MAPGPS developed at first. Please, help if you can :(

[also, @MAPGPS: does your drone move left/right, forward/backward? I can't make your code work for that yet]

class DroneListener implements Runnable {
public void run() {
try {
int port = 5554;
DatagramSocket dsocket = new DatagramSocket(port);
byte[] buffer = new byte2048;
DatagramPacket packet = new DatagramPacket(buffer, buffer.length);
while (true) {
dsocket.receive(packet);
String msg = new String(buffer, 0, packet.getLength());
System.out.println(packet.getAddress().getHostName() + ": " + msg);
packet.setLength(buffer.length);
}
} catch (Exception e) {
System.err.println(e);
}
}
}

RE: AT commands, UDP ports and Video format - Added by Isak T 1536 days ago

Hi!

@Tuxette:
Any progress on this? I'm very interested in getting the navdata into a Java program.
How is your drone behaving on takeoff? Mine is also acting strange.

Thanks

RE: AT commands, UDP ports and Video format - Added by Tuxette - 1536 days ago

Sorry, but no progress :(

And I think it was a battery issue. It'd go crazy, and takeoff only to slam itself against a wall, completely off-balance.

RE: AT commands, UDP ports and Video format - Added by MAPGPS . 1536 days ago

To receive Video/NavData from AR.Drone, you need to send the triggering flag/bytes to those UDP ports first:

class NavData extends Thread { 
    DatagramSocket socket_nav;
    InetAddress inet_addr;
    ARDrone ardrone;

    public NavData(ARDrone ardrone, InetAddress inet_addr) throws Exception {
        this.ardrone = ardrone;
    this.inet_addr = inet_addr;

    socket_nav = new DatagramSocket(ARDrone.NAVDATA_PORT);
    socket_nav.setSoTimeout(3000);
    }

    public void run() {
        int cnt = 0;

    try {
        byte[] buf_snd = {0x01, 0x00, 0x00, 0x00};
        DatagramPacket packet_snd = new DatagramPacket(buf_snd, buf_snd.length, inet_addr, ARDrone.NAVDATA_PORT);
        socket_nav.send(packet_snd);
            System.out.println("Sent trigger flag to UDP port " + ARDrone.NAVDATA_PORT);        

        ardrone.send_at_cmd("AT*CONFIG=" + ardrone.get_seq() + ",\"general:navdata_demo\",\"TRUE\"");

         byte[] buf_rcv = new byte[10240];
        DatagramPacket packet_rcv = new DatagramPacket(buf_rcv, buf_rcv.length);            

        while(true) {
        try {
            socket_nav.receive(packet_rcv);

            cnt++;
            if (cnt >= 5) {
                cnt = 0;
                System.out.println("NavData Received: " + packet_rcv.getLength() + " bytes"); 
                //System.out.println(ARDrone.byte2hex(buf_rcv, 0, packet_rcv.getLength()));
                System.out.println("Battery: " + ARDrone.get_int(buf_rcv, ARDrone.NAVDATA_BATTERY)
                        + "%, Altitude: " + ((float)ARDrone.get_int(buf_rcv, ARDrone.NAVDATA_ALTITUDE)/1000) + "m");
            }
        } catch(SocketTimeoutException ex3) {
                System.out.println("socket_nav.receive(): Timeout");
        } catch(Exception ex1) { 
            ex1.printStackTrace(); 
        }
        }
    } catch(Exception ex2) {
        ex2.printStackTrace(); 
    }
    }
}

class Video extends Thread { 
    DatagramSocket socket_video;
    InetAddress inet_addr;
    ARDrone ardrone;

    public Video(ARDrone ardrone, InetAddress inet_addr) throws Exception {
        this.ardrone = ardrone;
    this.inet_addr = inet_addr;

    socket_video = new DatagramSocket(ARDrone.VIDEO_PORT);
    socket_video.setSoTimeout(3000);
    }

    public void run() { 
    try {
        byte[] buf_snd = {0x01, 0x00, 0x00, 0x00};
        DatagramPacket packet_snd = new DatagramPacket(buf_snd, buf_snd.length, inet_addr, ARDrone.VIDEO_PORT);
        socket_video.send(packet_snd);
            System.out.println("Sent trigger flag to UDP port " + ARDrone.VIDEO_PORT);        

        ardrone.send_at_cmd("AT*CONFIG=" + ardrone.get_seq() + ",\"general:video_enable\",\"TRUE\"");

         byte[] buf_rcv = new byte[64000];
        DatagramPacket packet_rcv = new DatagramPacket(buf_rcv, buf_rcv.length);           

        while(true) {
        try {
            socket_video.receive(packet_rcv);
            System.out.println("Video Received: " + packet_rcv.getLength() + " bytes"); 
            //System.out.println(ARDrone.byte2hex(buf_rcv, 0, packet_rcv.getLength()));  
        } catch(SocketTimeoutException ex3) {
                System.out.println("socket_video.receive(): Timeout");
                socket_video.send(packet_snd);
        } catch(Exception ex1) { 
            ex1.printStackTrace(); 
        }
        }
    } catch(Exception ex2) {
        ex2.printStackTrace(); 
    }
    }
}

class ARDrone extends Frame implements KeyListener {
    static final int NAVDATA_PORT = 5554;
    static final int VIDEO_PORT   = 5555;
    static final int AT_PORT       = 5556;

    //NavData offset
    static final int NAVDATA_STATE    =  4;
    static final int NAVDATA_BATTERY  = 24;
    static final int NAVDATA_ALTITUDE = 40;
...
}

RE: AT commands, UDP ports and Video format - Added by MAPGPS . 1536 days ago

Attached is the full ARDrone.java for your reference.

ARDrone.java (15.9 KB)

RE: AT commands, UDP ports and Video format - Added by code coder 1536 days ago

Hi MAPGPS,

I see you have another variation of send_pcmd that is commented out. Is that variation working? I can't get pitch and roll to work using your previous code. The drone can only turn and go up or down.

Also, are you possibly working on a way to decode packets from the video feed? I am trying to get still picture frames from the video feed? Thanks a lot for your work.

RE: AT commands, UDP ports and Video format - Added by Cheung Clifford 1536 days ago

Hi MAPGPS,

Thanks for the good work. But i m just wondering do you also do the coding in Linux as well? actually i m trying to capture the picture frames from the video feed as well, but i m trying in implementing it in the Linux environment.

so side question, for your ardrone.java, is it i just need to compile and then just run either on a Linux or Window machine? or I need to install the library or others before using your program? or put it more simple, I have a new computer, how to use your java program. Please help. thanks.

Regards,
Clifford

RE: AT commands, UDP ports and Video format - Added by Isak T 1536 days ago

Thanks alot for that code MAPGPS, I appreciate it!

RE: AT commands, UDP ports and Video format - Added by MAPGPS . 1535 days ago

It's pure Java, no other lib needed.

My Java code does not have image display part.
To display an image frame received from AR.Drone into a window, refer to Daniel's Java code:
https://projects.ardrone.org/boards/1/topics/show/1724

RE: AT commands, UDP ports and Video format - Added by Tuxette - 1535 days ago

@Cheung: If you have never used Java before, then let me tell you a little bit more,
For compiling and running a Java program, you need the Java Development Kit, JDK, which you can get here: http://www.oracle.com/technetwork/java/javase/downloads/index.html
Instructions for installing it in Linux are here: http://www.oracle.com/technetwork/java/javase/index-137561.html#linux
Hope it's helpful!

@MAPGPS: Does moving right/left and forward/backward work for you? It doesn't seem to work for me, or code coder up there (assuming pitch and gaz are that; the terms are confusing)

RE: AT commands, UDP ports and Video format - Added by Armel BRUNO 1535 days ago

Hi guys,

Like most of you, I obtained rapidly Yaw and Gaz movments but no pitch and roll... I read and tried a lot of things... So scanning an iphone communication with the drone was the only issue I founded... I compute the same sequences, then it works well. I know what is working but not really why. So I send continuously AT*PCMD and AT*REF following many initialisation commands... If someone can explain exactly the role of each command and the things to do, it should be helpfull...

Right now I try to develop a software under Borland and Embarcadero. I drive the drone, I get navdata, but I can't get the images. The flow is present, but my UDP Socket receives something with a length equal to -1. Do I need TCP socket to get the fragments? Is some one has ideas?

Thanks for your helps. Regards

RE: AT commands, UDP ports and Video format - Added by Ian Hartney 1535 days ago

Hi all,

To get the pitch and roll to work I just added a thread that sends the watchdog reset command every 30 ms (probably don't need it that often) but you only have 250 ms (i think) between commands before the watchdog kicks in and disables pitch and roll.

I have attached the source code, its based on the early version of the ARDrone.java code, but you'll get the idea.

By the way, thanks for this thread, it really helped me out on my little project to get a native Mac app to fly the drone using the ps3 controller.

ARDrone.java (9.2 KB)

RE: AT commands, UDP ports and Video format - Added by Cheung Clifford 1535 days ago

Hi Hartney,

How can I incoporate your code with the original code? thanks..

Regards,
Clifford

RE: AT commands, UDP ports and Video format - Added by Ian Hartney 1535 days ago

The attached file has the new thread code,

But basically I just changed the class signature to this;

class ARDrone extends Frame implements KeyListener,Runnable {

adding the "Runnable" interface.

added this code to the constructor to start the thread.

Thread wdg = new Thread(this);
wdg.start();

and this method to the class

public void run() {
while(true){
String at_cmd = "AT*COMWDG=" + (seq++);
try{
send_at_cmd(at_cmd);
}catch(Exception ex){
}
try{
Thread.sleep(30);
}
}catch(InterruptedException iex){
}
}

I believe I had to switch some of the mappings around between the key presses and the location of the value in the PCMD commands, as some wernt in the right place, i think roll left and right were switched.

RE: AT commands, UDP ports and Video format - Added by Ian Hartney 1535 days ago

Sorry about that terrible formatting.

RE: AT commands, UDP ports and Video format - Added by Cheung Clifford 1535 days ago

Hi Hartney,

Thanks for the explanation, I m very new in java and therefore i can't really understand and hope will be able to pick up faster and can contribute to the forum.. =)

Regards,
Clifford

RE: AT commands, UDP ports and Video format - Added by jaime c 1530 days ago

Hi,
I don't know why but the class recognize all te keys but the ARdrone only moves when I try take-off,landing,up and down and rotate, but if I try to move Fordward,Backward, right or left, the drone doesn't move. As I said before, the app recognizes the action I'm trying. Of course with an iphone/android it works perfect. Does anyone know where the problem could be?

Thanks for all

RE: AT commands, UDP ports and Video format - Added by Tuxette - 1530 days ago

Hi, jaime c! :D

I had the same problem as you, but I solved it with adding this thread and having it run on the background of my application. I hope it helps you!

class DroneReset implements Runnable {
public void run() {
while(true){
String at_cmd = "AT*COMWDG=1";
try{
send(at_cmd);
}catch(Exception ex){
ex.printStackTrace();
}
try{
Thread.sleep(30);
}catch(InterruptedException iex){
iex.printStackTrace();
}
}
}
}

The send() method sends the datagram, basically; you should already have an implementation of some sort for it.

RE: AT commands, UDP ports and Video format - Added by jaime c 1530 days ago

Hi Tuxette!

Thanks for your reply.

I have started with that a few hours ago so I haven't any send() method. Should I use the send_at_cmd() method?

Then you have created a new class with it's .java and run an instance of that class and then run the instance of the ARDrone class?

Thanks for all.

RE: AT commands, UDP ports and Video format - Added by Tuxette - 1530 days ago

jaime c, the thing with the send() method is that it must send the datagram with the command. I don't know which of the Java samples here have you chosen to implement, but you could take the fragment where the datagram is made and sent, and copy that code into the thread instead of the send() method.

RE: AT commands, UDP ports and Video format - Added by jaime c 1530 days ago

Tuxette, I have tried to use the version "ARDrone.java - (Updated) Java app to control AR.Drone with keyboad (10.1 KB)" of this post. I'm a little confused, could you upload your class?

I have tried to the version "ARDrone.java (9.2 KB)" of Ian which seems to have this implemented yet, but the adrone doesn't do anything,and the connection it's ok because the other classes works.

Thanks for your help.

RE: AT commands, UDP ports and Video format - Added by jaime c 1530 days ago

I have modified my ARDrone java class and it doesn't respond to this modifications and the drone is very unstable, it crashes all the time.

BTW: is any way to reset the drone without disconecting the battery when it crashes? when it crashes it stop workin with the java class so I have to do that.

RE: AT commands, UDP ports and Video format - Added by Tuxette - 1530 days ago

My own program began being developed after the command line one, and now it doesn't resemble any of the codes here because I basically only kept the AT commands untouched. I'd recommend you to try the command line one first, not the one with the interface; it's a lot of code that can confuse you.

And your drone won't respond to the reset command that enables movement if you don't summon it properly:
Thread t = new Thread(new DroneReset());
t.start();

Also, try the emergency reset AT command, "AT*REF=1,290717952". It works to bring back our drone over here to life after a crash.

RE: AT commands, UDP ports and Video format - Added by jaime c 1529 days ago

Ok thanks. I will do some test this afternoon and post the results.

RE: AT commands, UDP ports and Video format - Added by jaime c 1529 days ago

I can't get the drone turn. All I get it's the drone gets crazy and then I have to reset the horizontal value with the iphone app. Only for clarify, if I add the new thread you say, when I press right,left,etc the drone should go right,left until I stop pressing the key or it will be going right,left for ever?

RE: AT commands, UDP ports and Video format - Added by jaime c 1528 days ago

Finally it works. I have some keys swapped and was doing something bad. Thanks Tuxette, it works in the way you said at first. I upload the two classes for anyone who has the same problem. I have added a reset Key (R) with the AT command Tuxette said.

ARDrone.java (9.2 KB)

DroneReset.java (1.4 KB)

RE: AT commands, UDP ports and Video format - Added by Isak T 1521 days ago

Hi,

@MAPGPS: In your code for receiving navData posted earlier in this thread, some integers (NAVDATA_STATE, NAVDATA_BATTERY and NAVDATA_ALTITUDE) are defined. Where did you find the values for these integers?
I would like to see other navData, such as angles, speed and so on.

Anyone else know where to find this? I have downloaded Parrots SDK 1.5 but I don't know which file to look in and how to interpret the information.

Thanks!

RE: AT commands, UDP ports and Video format - Added by John C 1521 days ago

I have been reading this forum fora bout a week now getting plenty of good information, I figure it is about time for me to add to that.
By looking at navData.c you can calculate the byte offsets yourself with basic math. You know from MAPGPS that the battery (vbat_flying_percentage) is an offset of 24, if you simply start there adding 4 for each 32 bit value, you can easily find the offsets for the rest of the data. For example, theta is the next value from vbat_flying_percentage in the navdata_demo struct, thus theta is an offset 28. phi is 32, psi is 36. After psi you reach altitude that was also defined by MAPGPS to be an offset of 40. Once you get a little further into the struct, and you find the matrix33 (contains 9 32 bit values) and vector31 (contains 3 32 bit values) values, you will need do do those calculations also. If you do get that far in, to check your work i can confirm that drone_camera_trans x (the drones calculated x position from take off using the bottom camera) is 152. Good luck.

RE: AT commands, UDP ports and Video format - Added by Tuxette - 1521 days ago

Hey, anyone knows how to work the AT*ANIM commands? How to make them not be pitch +/- 30 as in the first sample code, but also roll, gaz and yaw?

RE: AT commands, UDP ports and Video format - Added by Cheung Clifford 1515 days ago

Hi,

Would like to check if anyone doing anything on the keyboard control using the Linux example? because i would like to capture the video file and save as file, therefore i m still trying on modifying the sample code instead of using the java code, i m trying to control the ardrone using the keyboard and hope if anyone can help me on this. thanks..

Regards,
Clifford

RE: AT commands, UDP ports and Video format - Added by Ehouarn Perret 1506 days ago

I got some troubles to run my AR DRONE using your java programs.
Two of them works (takeoff and landing) but not entirely like go forward/backward/left/right and change the speed as well. I mean everything seems to be sent to the AR Drone, but this last one does not "react" whereas commands sent are right:
http://projects.ardrone.org/attachments/197/ARDrone.java
http://projects.ardrone.org/attachments/323/ARDrone.java

And the other sources code don't work at all
https://projects.ardrone.org/attachments/319/ARDrone.java
https://projects.ardrone.org/attachments/318/ARDrone.java

Probably due to the running watchdog a weird issue. Any ideas in order to have something functional? It is a pity because I would like to create a GUI using java codes =/

But maybe I do not compile well. Is there someone who can send an effective Eclipse project ?

Thanks in advance :)

RE: AT commands, UDP ports and Video format - Added by johnny worthy 1494 days ago

Hello,

Is there a way to control the behaviors of the individual rotors with these java programs, I am have been successful at using these for basic movements but was wondering if I could control each rotor separately with this java program, or any other programming language?

thanks

RE: AT commands, UDP ports and Video format - Added by Christoffer Martinsson 1492 days ago

Hi johnny,

Unfortunately I don't think you can. At least not yet.

There is some pwm commands described in the SDK user guide, but these commands is restricted for us "normal" users.

This is independent on any programming language (limited on the drone itself)

/Christoffer

RE: AT commands, UDP ports and Video format - Added by Jamie Hamilton 1484 days ago

I've been having a frustrating day trying to get this to work. I'm using a mac, and I've compiled various different versions of the .java files people have been kindly providing. The ones using the commands I can execute in Terminal/through the .jar file. It seems to send the information, but the drone is not responding to any of it. I have simply connected to the drone's ad hoc network, and am then loading the .jar file after that. Is there another step I am missing out on? It is as if I am not properly sending information to the Drone.

When trying the command line .java files, I can run them in terminal, but when I try to execute a command using the structure given I get an error
Exception in thread "main" java.lang.NoClassDefFoundError: ARDrone
Caused by: java.lang.ClassNotFoundException: ARDrone
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)

I am a real novice with Java and am basically just wanting to take-off and land the drones from the command line - no other navigation is required. Can anybody help me?

Jamie

RE: AT commands, UDP ports and Video format - Added by jaime c 1484 days ago

Hi! Have you disconected the mac from the router? usually the router takes the ip 192.168.1.1 which is the same ip the drone has so if you are connected to the router and the gateway is 192.168.1.1, the packets are sent to the router instead to the drone.If that doesn't solve your problem, send the code and I will take a look.

RE: AT commands, UDP ports and Video format - Added by MAPGPS . 1484 days ago

"Exception in thread "main" java.lang.NoClassDefFoundError: ARDrone"

Please note, Java class is case sensitive.
The inputed command line should be:
java ARDrone
instead of:
java ardrone

Also, you should be in the same directory to run it.

RE: AT commands, UDP ports and Video format - Added by Jamie Hamilton 1483 days ago

Hi guys. Thanks for your replies. I changed my MAC address, and it what I had previously been doing had seemed to work when it came to the keyboard-based command. The command line one still is giving the same errors, and it seems unusual as to why. This is part of something I want to do which I've realised is quite specific, so I will start a thread on the main forum. Thanks again.

RE: AT commands, UDP ports and Video format - Added by MAPGPS . 1460 days ago

My original ARDrone.java will no longer be updated, and has been replaced by my ARDroneME project ---
Java (J2ME) based AR.Drone Controller:
https://projects.ardrone.org/boards/1/topics/show/2818

And MYKONOS_COM_WATCHDOG_MASK state is handled in NavData.java with a "AT*COMWDG=1" to reset it.

MAPGPS

RE: AT commands, UDP ports and Video format - Added by Vadim Zaliva 1453 days ago

It would be nice to create a google code project for Java library to controll AR.Drone. Snippets of the code floating here
are very useful, but it would be nice to organize and improve them.

I do not mind helping to set up the project, but perhaps original Java code authors would rather do that themselves?

RE: AT commands, UDP ports and Video format - Added by Christian Stewart 1452 days ago

Hi!

I actually STARTED to do this with my WiiDrone and my JavaDrone projects. However, they were really buggy and I need to return and work on them to clean it up and add features which everyone here has been working hard on above, such as watchdog, bugfixes, hover mode, etc.

I'd say in a week I will have a clean library available, as a class which you would import, with commands like SetHoverMode() Takeoff() Land() SafeDisconnect() (sends landing command then disconnects) and of course keep my same method of creation and connection - ARDrone drone = new ARDrone(ip, port);

See you then.
Christian

RE: AT commands, UDP ports and Video format - Added by Vadim Zaliva 1452 days ago

Christian,

Looking forward to your library. I am particularly interested in it as Mac user. I will be glad to contribute code, assuming it would be open source.

ARDrone.java, how can I get other navigation data - Added by Innocent Okoloko 1321 days ago

Hi,
I am trying to use the ARDrone.java program listed on the forum. Apart from altitude which is returned from the program, I need to get all other navigation data.

x, y, vx, vy, roll, pitch, yaw, vroll, vpitch, vyaw

The NavData offsets in the program are given as

//NavData offset
static final int NAVDATA_STATE = 4;
static final int NAVDATA_BATTERY = 24;
static final int NAVDATA_ALTITUDE = 40;

Please can you tell me which of the offsets in the NavData buffer I can use to get the other navigation data. For example if I need set NAVDATA_PITCH = ?. Please any help will be appreciated.

Regards,
Inno.

RE: AT commands, UDP ports and Video format - Added by Innocent Okoloko 1321 days ago

Hi,
I made the following settings based on information provided by Mike Mogenson on https://projects.ardrone.org/boards/1/topics/show/2884

static final int NAVDATA_PITCH    = 28;
static final int NAVDATA_ROLL = 32;
static final int NAVDATA_YAW = 36;

The data I received makes some sense, but dont really look like angular data. For example, I tried to rotate the drone and display yaw data, the data was changing as I rotate, but I got some things like this: Yaw: -941820.44rad ... 1205963.1rad. Please can someone help explain how I can get angular data from this, such as 0 ... 2pi. Thanks in advance.

Regards,
Inno.

RE: AT commands, UDP ports and Video format - Added by MAPGPS . 1321 days ago

Innocent Okoloko wrote:

I got some things like this: Yaw: -941820.44rad ... 1205963.1rad. Please can someone help explain how I can get angular data from this, such as 0 ... 2pi. Thanks in advance.

It's in unit of 1/1000 degrees.
-941820 is -94.1820 degrees.

RE: AT commands, UDP ports and Video format - Added by MAPGPS . 1321 days ago

Typo:
-94182 is -94.182 degrees.

RE: AT commands, UDP ports and Video format - Added by Innocent Okoloko 1321 days ago

Many thanks MAPGPS :)

AT commands, how to reset from emergency mode - Added by Innocent Okoloko 1311 days ago

Hi,
Im trying to use the drone for an experiment where I have to force it to remain in one position fixed to a ball joint, so it can rotate in roll, pitch and yaw but it cannot fly. However it always gets into emergency mode because its not flying, so am trying to reset the drone from emergency state whenever it gets into emergency state. I read the state data and when it becomes negative, its in emergency mode. The SDK manual manual says to set AT*REF=1, when in emergency and AT*REF=0 when not in emergency. I have done this in the ARDrone.java code, dont seem to be working. Please can someone tell me the right command. Thanks.

RE: AT commands, UDP ports and Video format - Added by Tuxette - 1311 days ago

Hi :)

The command for emergency is changing a bit value from 0 (no emergency) to 1 (emergency case), not a literal AT*REF=0 or AT*REF=1.

It's a specific bit. The command itself is AT*REF=<sequence number>,290717952

Hope it helps!

RE: AT commands, UDP ports and Video format - Added by Innocent Okoloko 1310 days ago

Hi Tuxette :)
The command did work, many thanks :)

Inno.

RE: AT commands, UDP ports and Video format - Added by Matt Walker 1285 days ago

Hey guys, great work on this thread. The information here helped me write a C program that controls a drone and also receives data from it. However, after upgrading to firmware 1.5.1 and 1.7.4, it does not receive data. I have two drones and the one with firmware 1.3.3 sends back data just fine, but the other (back when it had 1.5.1 and after upgrading to 1.7.4) doesn't send data back at all.

So basically, I know it isn't a problem with my code, but rather something that changed between 1.3.3 and 1.5.1. Any information would be very helpful since I've been spending hours and hours debugging this and can't understand it.

Thanks
-matt

RE: AT commands, UDP ports and Video format - Added by Christian Taddey 1285 days ago

Check Issue 67, there were Navdata changes that your program will need to handle.

https://projects.ardrone.org/issues/show/67

RE: AT commands, UDP ports and Video format - Added by Jasmine Lawrence 1278 days ago

Firstly let me say thanks to everyone who has contributed to this thread thus far. You all have been very helpful. I am doing undergrad research and I am the first student to use the 6 new drones our lab have. I would rather program in java but the lab wants C.

@Matt Walker. If you get that C program working for 1.7.4 please let me know. I'd like to see your previous C example too for reference. Thanks

Jasmine

RE: AT commands, UDP ports and Video format - Added by Matt Walker 1278 days ago

Here is the previous code that worked for 1.3.3. Christian Taddey, I wrote this from scratch instead of using the drone libraries, so Issue 67 wasn't of much help. Does anybody have any other idea what was changed between firmware 1.3.3 and 1.5.1. thanks in advance.

-Matt

Final_Drone.c (19.5 KB)

RE: AT commands, UDP ports and Video format - Added by Matt Walker 1278 days ago

If it helps any, when I run the code with version 1.3.3 it starts receiving data and printing it out. Under any of the newer versions, it never receives any data and hangs on the recfrom() commmand. Even if they changed the format of that data, as long as it receives some kind of packet, it shouldn't be hanging there, unless I'm not understanding something.

-Matt

RE: AT commands, UDP ports and Video format - Added by Christian Taddey 1278 days ago

That sounds like the multicast issue.
At least in win32 sample, in previous versions navdata and video were initialized by sending the string "Init"
In newer version, you need to send bytes 01 00 00 00 , ie "\1\0\0\0" to tell the drone you dont want multicast.
Don't remember the issue number of this one.

RE: AT commands, UDP ports and Video format - Added by Matt Walker 1278 days ago

Christian, I found the issue that you are referring to. However, since day one, the byte of info that my computer has sent to the drone looks like this:

char buf[] = {0x01, 0x00, 0x00, 0x00};

I've also tried with:

char buf[] = "1\0\0\0";

and that works on 1.3.3 but not anything else. I am misunderstanding, or is the issue something else?

RE: AT commands, UDP ports and Video format - Added by Christian Taddey 1278 days ago

Yeah, that buf[] should do the trick. I did a quick search in your code for "\1\0\0\0" only, and of course didn't find it.

IDK what else could be preventing you form receiving the data.
Might want to try to use only socket for receiving and sending nadvadta.(even if 2 sockets worked with 1.3.3)

may not be the cause of your problem, but can't really think of something else at this time :D

RE: AT commands, UDP ports and Video format - Added by Benjamin Chan 1278 days ago

I don't think using strlen(buf) is a wise idea when sending the 4 bytes data :)

RE: AT commands, UDP ports and Video format - Added by Innocent Okoloko 1262 days ago

Hi, does any one knows which AT commands to get yaw velocity data and X,Y position data. I will be nice to know the AT commands to get all the raw navigation data, like listed in ardrone_navdata_file.c. Thanks in advance.

RE: AT commands, UDP ports and Video format - Added by Laura Vogelaar 1257 days ago

I am also having trouble receiving nav data. The program hangs on the recvfrom command in _drone_nav_update() as you said, Matt.

I have tried
char buf[] = "1\0\0\0";

with no success. I am running 1.7.6 though.

Can someone please post the issue number if possible for the multicasting issue.
Otherwise I will let you know if I get it sorted out.

- Laura

RE: AT commands, UDP ports and Video format - Added by Christian Taddey 1257 days ago

The string is "\1\0\0\0"
you could try this alternate declaration.
char buf[]={'\1','\0','\0','\0'}
also you can't use strlen on this you need to specify fixed size.

this is from the sdk: { int sizeinit = 5; navdata_write( (void*)&navdata_socket, (int8_t*)"\1\0\0\0", &sizeinit ); } //New firmware require for unicast

vp_com_write_socket(&cfg->socket,"\1\0\0\0",&sizeinit);//New firmware require for unicast

IDK why it specifies sizeinit=5 and not 4 but this way is working for me in 1.5 sdk

RE: AT commands, UDP ports and Video format - Added by Laura Vogelaar 1251 days ago

Christian,

Sorry was a typo in my last post. I tried all your suggestions, but to no success. I couldn't find the line you referred to from the SDK, but I was looking in version 1.8, so they must have changed things.

What version of firmware are people running and having success receiving data?

Thanks,
Laura

RE: AT commands, UDP ports and Video format - Added by Christian Taddey 1251 days ago

well I did a long reply but it was lost.

find "init in all your solution, you will find the entries in video_com_stage.c and navdata_client_ something.c

those I changed to "\1\0\0\0" (less the sizeof line)

If you still have problems you can try to downgrade your drone to 1.3.3 and start from there (no default multicast )

RE: AT commands, UDP ports and Video format - Added by Jason Merritt 1227 days ago

Good evening everyone,

I recently attempted to compile the ARDrone.java app. However, I keep receiving the following error:

'javac' is not recognized as an internal or external command, operable program or batch file.

Any suggestions. Thank you in advance.

Jason Merritt

RE: AT commands, UDP ports and Video format - Added by Evgeny Mikhaylov 1224 days ago

Jason, you need to add path "C:\Program Files (x86)\Java\jdk1.6.0_27\bin" to Windows Path.
It can be done in Computer -> Properties -> Advanced system settings -> Advanced -> Enviroment variables.
In the bottom find "path" and press button "edit", then add string like this "C:\Program Files (x86)\Java\jdk1.6.0_27\bin;" to the end.
Be carefully, don`t delete other paths from there.
"C:\Program Files (x86)\Java\jdk1.6.0_27\bin" - path to javac.exe in my computer, int your it can be other, but like this.

RE: AT commands, UDP ports and Video format - Added by Evgeny Mikhaylov 1224 days ago

My previous post was about windows 7, in other windows it can be done in another way, may be.

RE: AT commands, UDP ports and Video format - Added by Jason Merritt 1223 days ago

Ok thank you!

RE: AT commands, UDP ports and Video format - Added by Steven Lim 1175 days ago

does anyone has a program in borland C++ builder version ?

RE: AT commands, UDP ports and Video format - Added by Tuxette - 1171 days ago

Hello all :)

If I may ask, what is this "\1\0\0\0"?

And how do you put it in for a Java program that uses AT commands?

Thanks!

RE: AT commands, UDP ports and Video format - Added by Alex B 1163 days ago

Hi,
I'm trying to modify the ARDrone.java in order to get the offset for the accelerometers. I tried with 30 for Acceleration among z azis but it doesn't work.
In the 10240 byte of buffer, are all the data present?

Regards

Alessandro

RE: AT commands, UDP ports and Video format - Added by jorge santos 760 days ago

Hello :)

I'm new here, I'm new to programming in java, but I have to program the AR.Drone (school project).
With all the material posted here, I can control the AR.Drone well some stability issues but I think that is normal.

My big problem is in receiving "NAVDATA" I can not find the package that I received.

sorry but I can not understand

Appreciate the best help possible