I tried to build this SDK on more variants of linux than I care to admit. It only works successfully out of the box on Ubuntu. Specifically, Ubuntu 12.04.5.  I compiled this for use with my AR Drone 2, but I don’t see why it couldn’t be used with the AR Drone as well. There’s nothing here that makes the SDK specific to either model.

  1. Download Ubuntu 12.04.5 32bit. It probably works with 64bit (although I didn’t test it), if you really must use 64bit.
  2. Either install Ubuntu 12.04.5 alongside (dual boot) with another operating system, or in a virtual machine. I installed it in a VMware Fusion virtual machine on macOS. The Ubuntu operating system is agnostic, so it doesn’t really matter how you choose to virtualise it, if you do.
    1. Don’t install Ubuntu 12.04.5 updates during the installation process (leave the option unticked).
    2. Don’t install updates or upgrade Ubuntu to the next release when asked after the first login.
  3. Download the SDK (or copy it from somewhere to the Desktop).
  4. Open a terminal and change to your Desktop directory.
    1. # cd Desktop
  5. Unzip the SDK.
    1. # unzip ARDrone_SDK_2_0_1.zip
  6. Change to the ARDrone_SDK_2_0_1 directory
    1. # cd ARDrone_SDL_2_0_1 directory
  7. Run the following command (using sudo) to compile and install dependencies.
    1. # sudo ARDroneLib/Soft/Build/check_dependencencies.sh
      1. You’ll be asked to confirm installation of some packages, be sure to say Yes (y).
  8. Run the following command (using sudo) to compile the linux binaries.
    1. # cd Examples\Linux
    2. # sudo make
      1. Wait for the SDK binaries to be compiled
  9. The binaries are built in /home/<username>/Desktop/ARDrone_SDL_2_0_1/Examples/Linux/Build/Release/. Move them to you desktop and make them accessible as follows.
    1. # sudo mv /home/<username>/Desktop/ARDrone_SDL_2_0_1/Examples/Linux/Build/Release/ /home/<username>/Desktop/ARDroneApps
    2. # sudo chown -R <username>:<username> /home/<username>/Desktop/ARDroneApps
  10. Run the apps! You’ll need to be connected to your AR Drone 2 WiFi network first of course. Make sure you don’t have the Free Flight app open on any smart phones or tablets at the same time, as this will interfere with communications between your computer and your drone.
    1. # cd /home/<username>/Desktop/ARDroneApps
    2. # ./ardrone_navigation
    3. # ./linux_sdk_demo
    4. # ./linux_video_demo
    5. # ./sym_ardrone_testing_tool

A little while ago I purchased a Nokia Lumia 920 with Windows Phone 8 (currently the Amber release). The phone itself is great, but I had a problem with the Windows Phone WordPress app, it wouldn’t upload or post any content that contained an image.

  • Phone: Nokia Lumia 920
  • OS: Windows Phone 8 (amber – Australia)
  • Connectivity: WiFi and 3G/4G
  • Problem: WordPress App won’t complete submission of a post or page that contains an image.
  • Server: Xen VDS hosted on Amazon AWS with Amazon Linux (Amazon’s version of CentOS 6)

In case it’s not obvious, the WordPress blog I was experiencing the problem with is a self hosted installation. We can assume I installed it and set it up correctly 😉

(for sake of this post, I have replaced all references to the host with ‘mokonamodoki.com’).

Whenever I attempted to submit a page or post that contained an image, I would get the follow error message:

Media Upload Error

The remote server returned an error: NotFound

Yes, extremely helpful. I knew what the solution was immediately. Thank you, Microsoft!

I tried all sorts of tricks. PHP settings,  Apache settings, and WordPress settings. Nothing worked. What frustrated me even more; was that the iOS app worked fine! Something I did notice, was that the iOS app uploads images separately, and not as part of the post content… this got me thinking.

Is the problem the Windows Phone WordPress app or is the problem the server?

Read More →

Having recently set up OpenVZ on Xen, I wanted to create a Debian 7 VPS for a friend. Unfortunately, after creation, the VPS would not start. I kept receiving the following error message:

FATAL: kernel too old

This is actually an error message from the VPS, not the OpenVZ node level. In short, the new Debian 7 VPS was expecting a kernel newer than 2.6.18 (the OpenVZ node level version). Remember: OpenVZ VPS’s don’t have their own kernel, they run on the OpenVZ node level kernel, but you can replace the version that is available 😉

Thanks to Nallappan TK at Linux by TK Nalla for the original post.

We need to replace the kernel version in ‘/proc/sys/kernel/virt_osrelease’ on the OpenVZ node level.

# cd /proc/sys/kernel/

# cat virt_osrelease
2.6.18-348.4.1.el5.028stab107.2xen

# echo 2.6.32 > virt_osrelease

Thats it! You should now be able to start the VPS. Generally speaking, you should be able to increase the kernel version to whatever version a VPS is expecting, whenever you get that error message. Now, how to find out what kernel version a VPS OS is expecting…

Update 14-09-2013: I received a tweet from _openvz_ earlier this week indicating you can set the expected kernel version for each OS template in the /etc/vz/osrelease.conf file. As per the above, I was trying to start a Debian 7 based VPS. My /etc/vz/osrelease.conf file did not contain an entry for Debian 7. I proceeded to revert the above change to the /proc/sys/kernel/virt_osrelease file and added an entry to the /etc/vz/osrelease.conf file instead:

# cd /proc/sys/kernel/

# cat virt_osrelease
2.6.32

echo 2.6.18-348.4.1.el5.028stab107.2xen > virt_osrelease

# cat virt_osrelease
2.6.18-348.4.1.el5.028stab107.2xen

# cd /etc/vz

# vi osrelease.conf

[press the insert button]

(I added the following line to the end)

debian-7.0      2.6.32

[press the escape button]

(type a colon)

(type: wq)

:wq

[Press the enter button]

I then created a new Debian 7.0 VPS that deployed and started successfully!

  1. Prepare a Xen VM with a minimal install of CentOS/RHEL 5 (64bit or 32bit).
    1. Make sure you have set your host name and IP Addressing etc. The VM should have internet access (obviously).
  2. Install HyperVM following these instructions.
    1. Be sure to append [–virtualization-type=openvz] (omit the square brackets) to the install command.
  3. At the end of the installer, don’t reboot!
    1. The default OpenVZ kernel installed by the HyperVM installer won’t work inside of a Xen VM (it will work on a normal bare metal server). Download the proper kernel for your architecture: 32bit (i686) or 64bit (x86_64). At the time of writing, the current OpenVZ kernel was 2.6.18-384.4.1.
    2. You are specifically looking to download and install the kernel that starts with: ‘ovzkernel-xen’ anything else will likely install, but will not boot!
    3. Install using this command [# rpm -ivh ovzkernel-xen-*.rpm] – Don’t use [# rpm -Uvh] you will upgrade the installed kernel instead and you will lose the ability to roll back to a known working kernel should things go wrong.
    4. Open your /boot/grub/grub.conf file (in vi or nano) and make sure you are able to differentiate between the existing kernel and the ovzkernel-xen kernel. Perhaps append something to the title line, like ‘OpenVZ-Xen’. I saw three kernels in mine, the original CentoS 5 kernel, the OpenVZ kernel (installed by the HyperVM installer) and the OpenVZ-Xen kernel.
  4. Now it’s time to reboot. How you perform this step will be dependant on a couple of things.
    1. If you have console access to your VM (it may be via an alternate SSH connection or applet if your hosting provider has one), I suggest not editing your grub.conf file just yet. Connect to the console and reboot the VM. You can then catch the grub boot loader and choose the OpenVZ-Xen kernel (not to be confused with the similar named OpenVZ kernel). If all goes well, you can edit the grub.conf file later and set grub to boot from the OpenVZ-Xen kernel by default. If things break, you’ll either be able to reboot and choose a different ‘known working’ kernel, or your VM won’t boot at all. In this case you’ll have to ask your hosting provider to switch your default kernel back to the original kernel. If you have Dom0 access (you’ll know what this if you do) you can edit grub.conf via pyGrub and try again.
    2. If you don’t have console access, you’ll need to edit the grub.conf file first and set the OpenVZ-Xen kernel as the default kernel and reboot, hoping all goes well. As above, if all does go well, you’ll be able to login via SSH and also to the HypeVM control panel. If things break and you lose access to your VM, you’ll have to contact your hosting provider and have them investigate for you. You can assist them be asking them to configure grub to boot from the standard normal CentOS kernel again. Afterwards, when you have access, you can try again 😉
  5. By default, HyperVM wants to use the ‘Xen driver’ as the virtualisation method. This won’t work, you can’t run xen VMs inside of a Xen VM. Why Xen is the default ‘driver’ when you chose OpenVZ at the very beginning? I have no idea.
    1. Use the following commands to switch the system from Xen to OpenVZ [#. /scripts/directory] [# lphp.exe ../bin/common/setdriver.php –server=localhost –class=vps –driver=openvz] (omit the square brackets of course). There are two commands, the first changes the current working directory, the second changes the virtualisation driver.
    2. After a few moments, you’ll see a confirmation message.
  6. You’re done! You can now login to the HyperVM control panel, add IP Addresses and create VMs!

Comments, Suggestions, Requests, all welcome 😉