Difference between revisions of "GettingTheGCSRunningonAGumstixBoard"

From PaparazziUAV
Jump to navigation Jump to search
 
(235 intermediate revisions by 2 users not shown)
Line 1: Line 1:
= Intro =
= Introduction =


Please take note that the page is in work at the moment and that I am doing my best to have it updated as soon as possible.
Would it not be great to have your small UAS in your backpack, throw it in the air and monitor and even adjust the flight via a small device in your pocket? If you think this would be awesome, read on, since that is what this page is all about. It is the first attempt and will not be about iPad, Android Phones, Amazon Kindles or the likes as a ground station. For this we have other wiki pages. No, we will use a trusted solution; A Gumstix board with Linux on it connected to a small screen.
 
Would it not be great to have your small UAS in your backpack, throw it in the air and monitor and even adjust the flight via a small device in your pocket? If you think this would be awesome, read on, since that is what this page is all about. It is the first attempt and will not be about iPad, Android Phones, Amazon Kindles or the likes as a ground station. For this we have other wiki pages. No, we will use a thrusted solution; A Gumstix with Linux on it.
[[Image:GumstixBoard_OpenUAS.jpg|right|Gumstix carrier board and touchscreen]]


= Outcome =
= Outcome =


Have the Paparazzi GCS monitoring and adjusting a UA via an small Gumstix based device.
The outcome of our efforts will be to:
 
#Have the Paparazzi GCS running on a small [https://www.gumstix.com Gumstix] computer board so we can monitoring and adjust the flight of our unmanned aircraft with just a small simple device.
#Have fully correct instructions on how to get it to work on this wiki page.
 
{TODO add screenshot of working setup}


= Hardware =
= Hardware =


What do you need to get this working:
What do you need to get your groundstation up and running:


# A gumstix board
# A [http://www.gumstix.com/ gumstix] board with a power supply
# Camera
# 8 GB or higher capacity micro SD card, the faster the better
#3.5" screen (such as the LCD panel with the Chestnut) or 4.3"
# USB to mini-USB cable
# Regular UTP network cable
# A small, or big screen, preferably with touch such as the 4.3" LCD panel that comes with the Chestnut board kit or this [https://www.gumstix.com/store/product_info.php?products_id=344 fully integrated Gumstix board]
# Micro-SD to USB adapter or card reader
# A computer that runs Linux OS


= Software =
= Software =


Needed softwares to run this application:
We will install the following on the micro SD card


#Paparazzi software
#Ubuntu OS for Gumstix
#Kivy library
#Support libraries
#Ubuntu kernel on your Gumstix
#Paparazzi main software
#Driver for the camera in order to be used with the Gumstix


= How to start =
==Conventions==
Note: You can just copy the line(s) in the box and paste them in your terminal.
'''But do not copy the $ or # sign at the beginning of a line'''. This symbol is just added on this page to show that the command is to be pasted at a terminal prompt as regular user($) or root user(#).
$  this is an example of how a regular user command for your terminal looks
 
= Get the Operating System =


Well, we have some tutorials on this wiki about how to install Paparazzi. If you need any help to install Kivy, please look at their website, you will find there a good tutorial about how to get started.
= Create an OS =
Pre-requisites
Pre-requisites


    4GB SD card or larger
Have the micro SD card at hand and download this custom OS with everything already installed for a gumstix board and Chestnut43 with touchscreen.
    Download the pre-built image from [[http://releases.linaro.org/12.07/android/images/vexpress-ics-gcc47-armlt-staging-alt-open/vexpress-ics-gcc47-armlt-staging-alt-open.img.gz vexpress-ics-gcc47-armlt-staging-alt-open.img.gz]]


Installation Steps
{TODO: provide an image with everything already fully installed}


    unzip the downloaded pre-build image
==Installation Steps==
    Insert SD card and note the assigned '/dev/sdX'


    $ dmesg
===I'm in ahurry===
    $ SDCARD=/dev/sdX  (sdcard found from dmesg above)
    $ sudo dd bs=64k if=vexpress-ics-gcc47-armlt-staging-alt-open.img of=$SDCARD   


    Continue with the instructions below to Configure your TC2 board to boot the image [link].
If you are eager to start and do not want to install everything thant download [this file] and follow the steps of how to copy it ont an microSD card


Once you have the image written on your sd card you can insert it in the Gumstix and boot up.
Unzip the downloaded OS via
Then type the following in the CuteCom command prompt:
    printenv
    setenv defaultdisplay lcd43
    saveenv
    run mmcboot
After that you can reboot your system.


= Connecting peripherals=
$ gunzip gcsStix.img.gz
When you have a Linux version running on your Gumstix, you can add a LCD, or a mouse, or a keyboard.


To set up your LCD you must follow these steps:
Insert micro SD card in an SD reader and plug it in a USB port of your PC, then on the terminal type:  


Connect trough CuteCom to the Gumstix
$ dmesg
Restart the board and hit a key within 5 seconds:
<nowiki>
[170074.104194] sd 7:0:0:0: [sdb] Write Protect is off
[170074.104199] sd 7:0:0:0: [sdb] Mode Sense: 0b 00 00 08
[170074.104999] sd 7:0:0:0: [sdb] No Caching mode page present
[170074.105005] sd 7:0:0:0: [sdb] Assuming drive cache: write through
[170074.107904] sd 7:0:0:0: [sdb] No Caching mode page present
[170074.107911] sd 7:0:0:0: [sdb] Assuming drive cache: write through
[170074.109282]  sdb: sdb1 sdb2
[170074.112159] sd 7:0:0:0: [sdb] No Caching mode page present
[170074.112165] sd 7:0:0:0: [sdb] Assuming drive cache: write through
[170074.112169] sd 7:0:0:0: [sdb] Attached SCSI removable disk
[170074.904553] kjournald starting.  Commit interval 5 seconds
[170074.916813] EXT3-fs (sdb2): using internal journal
[170074.916823] EXT3-fs (sdb2): recovery complete
[170074.916826] EXT3-fs (sdb2): mounted filesystem with ordered data mode
</nowiki>
Note: for my local machine the micro SD card was mounted on /dev/sdb as shown in the code above. Be aware of what you are doing at the next steps, as dd can completely overwrite your hard drive or other devices.
Where sdX is the SD reader device found with the command above, replace sdX with your specific device in the following commands and /path/to/file with the path to your previously downloaded Gumstix image file.


    Hit any key to stop autoboot: 5
$ SDCARD=/dev/sdX
$ sudo dd if=/path/to/file/gcsStix.img of=$SDCARD bs=64k


Then type the following in the CuteCom command prompt:
This will take several minutes depending on your configuration and when this is done, safely remove the micro SD card from your computer by right clicking on it and select eject. Then, insert the micro SD card into the Gumstix micro SD slot.


    setenv defaultdisplay lcd43
== Connecting peripherals==
When you have a Linux version running on your Gumstix, you can add a LCD, or a mouse, or a keyboard. First, install CuteCom on your local machine running on a terminal:


Or, if you are using a 3.5" screen (such as the LCD panel with the Palo35):
To set up your LCD you must follow these steps:
#Connect LCD flex cable to Gumstix connector
#Attach USB-to-mini-USB cable to both your local machine and Gumstix board.
#Power up Gumstix board
#Install and start cutecom
$ sudo apt-get install cutecom
$ cutecom
A window will pop up and you must adjust the pull-down menu settings as follows:
Device will usually be either /dev/ttyUSB0 or /dev/ttyUSB1 . You can figure this out by typing on your command prompt:
dmesg|tail
Note: This command lists the last connected devices.
Baud rate must be set to 115200, data bits to 8, stop bits to 1, parity to none, handshake none checked, open for both reading and writing checked, apply settings when opening checked, choose "CR,LF end line" and Char delay 1ms.


    setenv defaultdisplay lcd35
Click on Open device and your connection should start. If you encounter any problems, but you are sure you did everything right, check if your Gumstix board overheated or restart it.


Connect through CuteCom to the Gumstix, restart the board and hit a key within 5 seconds:
Hit any key to stop autoboot: 5
Then type the following in the CuteCom command prompt:
setenv defaultdisplay lcd43
Or, if you are using a 3.5" screen (such as the LCD panel with the Palo35):
setenv defaultdisplay lcd35
You can save this setting for future boots by saving it:
You can save this setting for future boots by saving it:
saveenv
Finally, continue with the boot process by typing in CuteCom command prompt:
boot
==Connect to the Gumstix through the network==


    saveenv
If you want to send files to the Gumstix, you can do it via a ssh connection. In order to do this, both devices, your computer and the Gumstix must be connected to the same network. Once you've done this, you can start setting up the connection.
In order to do so you need to know the IP address of the  Gumstix.


Finally, continue with the boot process by typing in CuteCom command prompt:
The first thing you need in order to get rid of the USB to mini-USB cable and its physical limitations is to create a user and set a password for it and install openssh.
Please feel free to replace "sergiu" with whatever username you choose, but keep in mind that you must replace it everywhere you encounter "sergiu".
useradd -c "Sergiu S" -m -s "/bin/bash" -G sudo sergiu
Note: -G option will add the user to the specified group.
$ passwd sergiu
You will be asked to enter a password and confirm it. Type your password, then hit CTRL + Enter key combination and then retype your password. If successful, you will get this message:
passwd: password updated successfully


    boot
$ sudo apt-get install openssh-server
Once you have accomplished this, you must discover the Gumstix ip address, typing on CuteCom:
$ ifconfig -a
Note: if you can't use this command for any reason you can get a list with all the IP addresses on the network using 'arp -a' on your machine.
Among the data returned, you will see something like this:
<nowiki>
eth0      Link encap:Ethernet  HWaddr 00:15:c9:28:c9:ff 
          inet addr:192.168.0.100  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::215:c9ff:fe28:c9ff/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3960 errors:0 dropped:0 overruns:0 frame:0
          TX packets:727 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:3734905 (3.7 MB)  TX bytes:63765 (63.7 KB)
          Interrupt:80
</nowiki>


Now you should be able to connect using:
$ ssh sergiu@192.168.0.100 {TODO USERNAME change}
You will be asked to type the password you previously set for the user.


=Connect to the Gumstix trought the network=
==Working With Gumstix==
Note: You may get some errors during this installation. This depends on how well you are cooling down your system, how much RAM you have on your platform and so on.  If you get errors when trying install a large number of packages/libraries at once, try to divide them into smaller groups.


1. Add a swap file
Due to lack of RAM memory it is possible to see errors like this:
==== ERROR [while installing ocamlfind.1.3.3] ====


If you want to send files to the Gumstix, you can do it via a ssh connection. In order to do this, both devices, your computer and the Gumstix must be connected to the same same network. Once you did this, you can start setting up the connection.
Internal error:
Fistly, you need to know the IP address of the  Gumstix. Start by opening CuteCom and connect to the device.
  # opam-version    1.0.1 (1.0.0-84-g9b3ff34)
When the system loaded, type into CuteCom command prompt:
# os              linux
opam: "fork" failed: Cannot allocate memory
'opam install ocamlfind' failed.
The solution to this problem is to create a swap file. For this case I created a 512 MB swap file, but you should adapt its size to the size of your SD card and the needed memory size.


  ifconfig -a (if you can't use this command from any reason you can get a list with all the ips on the network using 'arp -a')
Execute these commands to create and mount a swap file:
sudo dd if=/dev/zero of=/swapfile1 bs=1024 count=524288 (will create 512 MB swap file)
sudo mkswap /swapfile1
sudo chown root:root /swapfile1
sudo chmod 0600 /swapfile1
sudo swapon /swapfile1
Note: this will remove the swap file each time you shutdown. If you need the file, you have to repeat the swapon command after each boot. An alternative would be to have it mounted every time you boot the system.
For more explanations you can go to [http://www.cyberciti.biz/faq/linux-add-a-swap-file-howto/ this website]


Among the data returned, you will see something like this:
2. Autologin


    <nowiki>eth0     
Remove the login prompt
    Link encap:Ethernet  HWaddr 00:15:c9:28:c9:ff 
    inet addr:169.16.29.3</nowiki>


Now enter into the command prompt:
You may want to set your OS to auto-login. Why? Because there may be times you don't have a keyboard for the Gumstix around. You can find a good explanation of this [http://www.liberiangeek.net/2012/03/automatically-login-to-ubuntu-12-04-precise-pangolin/ here] .
    sudo dhclient eth1 169.16.29.3


When this is done, install on the Gumstix openssh write into the command prompt:
$ sudo locale-gen en_US.UTF-8
    sudo apt-get install openssh-server
$ sudo apt-get install vim nano # (or use your favorite editor)
Set a password:
    sudo passwd username
    password  (replace password with any string you want as password)
    password  (retype the password you chose)
To add the user to the sudoers group do:
sudo adduser username sudo


Now you should be able to connect using:
Note: if you get an error at this step, use the --fix-missing option as recommended.
    ssh root@169.16.29.3


= Remove the login prompt=
$ sudo vim /etc/lightdm/lightdm.conf
You may want to set your OS to auto-login. Why? Because you may not have at any time a keyboard for the Gumstix around. It is explained [http://www.liberiangeek.net/2012/03/automatically-login-to-ubuntu-12-04-precise-pangolin/ here] very well how to do it.
You have to write in your command prompt:


    sudo vi /etc/lightdm/lightdm.conf
Edit the autologin-user line by replacing the username with your own


and then modify the lines as indicated on the webpage above.
autologin-user=sergiu


There is a chance to get an error like this "Gtk-WARNING **: Locale not supported by C library.". To solve this write into your command prompt:
and add this line:


    sudo locale-gen en_US.UTF-8
autologin-user-timeout=0


or the right locale for your keyboard. If this didn't solve your problem, you may want to read [https://help.ubuntu.com/community/Locale here] more about it.
or the right locale for your keyboard. If this didn't solve your problem, you may want to read [https://help.ubuntu.com/community/Locale here] more about it.


= Remove the Lightdm GUI for freeing memory=
3. More Memory
 
Remove the Lightdm GUI manager in order to free memory
$ sudo apt-get remove lightdm
After this step you '''must''' reboot.
 
4. More speed
 
Remove processes not needed
$ sudo killall -9 NetworkManager  #(for faster system), {TODO in start the config? still needed?}
Because the size of the original image was 4.3 GB, you have to execute the following set of instructions to resize the partition to 8 GB:
 
 
5. Add more space
 
#Insert the micro SD card in your local machine´s card reader
#Use gparted to increase the size of the partition
$ sudo apt-get install gparted
$ sudo gparted
 
==Install the prerequsites==
Installing one package at a time is the best path to succes since it is likely during installation that you will be asked to re-run some of the commands with the "--fix-missing" option.
 
$ sudo apt-get install gtk2-engines-pixbuf
$ sudo apt-get install make #already latest
$ sudo apt-get install gcc #already latest
$ sudo apt-get install g++ #already latest
$ sudo apt-get install libgsl0-dev
$ sudo apt-get install gnuplot
$ sudo apt-get install libgnomecanvas2-dev
$ sudo apt-get install bzip2
$ sudo apt-get install git
$ sudo apt-get install libusb-dev
$ sudo apt-get install speech-dispatcher
$ sudo apt-get install glade
$ sudo apt-get install imagemagick
$ sudo apt-get install libpcre3-dev
$ sudo apt-get install git-core
$ sudo apt-get install python-usb
$ sudo apt-get install python-lxml
$ sudo apt-get install python-wxgtk2.8
$ sudo apt-get install m4
$ sudo apt-get install python-yaml
$ sudo apt-get install subversion
$ sudo apt-get install libglade2-dev libgnomeui-dev libgnomecanvas2-dev librsvg2-dev libgtkspell-dev libcanberra-gtk-dev --fix-missing
$ sudo apt-get install libsdl1.2-dev
Create a subdirectory where you will download and install all the libraries and other software tools needed. To keep your home dir tidy use a ''develop'' directory to store all the relevant downloads.
 
$ mkdir ~/develop
$ cd ~/develop/
 
==OCAML==
 
$ wget http://caml.inria.fr/pub/distrib/ocaml-4.00/ocaml-4.00.1.tar.gz
$ tar -xvzf ocaml-4.00.1.tar.gz
$ cd ocaml-4.00.1
$ ./configure
$ make world
$ make opt
$ make ocamldoc
$ make ocamlbuild.native
$ make ocamlbuild.byte
$ sudo make install
$ sudo make installopt
$ ocaml -version  #(make sure you have the right version, meaning 4.00.1)
$ cd ~/develop
 
==Opam tool==
#Install the OCAML '''Opam''' tool


    sudo apt-get remove lightdm
$ git clone https://github.com/OCamlPro/opam.git
After this step you must reboot.
$ cd opam
=Add swap memory=
$ ./configure
If you run out of RAM memory, add a swap file as sudo:
$ make (because of overheating you may get some errors, but keep doing 'make')
  dd if=/dev/zero of=/swapfile1 bs=1024 count=524288 (will create 512 MB swap file)
$ sudo make install
  mkswap /swapfile1
  $ cd ~/develop
  chown root:root /swapfile1
$ mkdir ~/.opam
  chmod 0600 /swapfile1
$ opam init
  swapon /swapfile1
$ eval `opam config env`
For more explanations you can go to [http://www.cyberciti.biz/faq/linux-add-a-swap-file-howto/ this website]
Please select yes.
$ sudo opam install ocamlfind
$ sudo opam install lablgtk
$ sudo opam install pcre-ocaml
$ sudo opam install ocamlnet
$ sudo opam install xml-light
 
=portability-support=
 
#Get paparazzi-portability-support related files
 
$ sudo apt-get install  debhelper devscripts fakeroot build-essential autoconf automake autotools-dev dh-make xutils lintian pbuilder dh-ocaml tcl-dev libxt-dev libXt-devel
  $ cd ~/develop
  $ <nowiki>git clone https://github.com/paparazzi/paparazzi-portability-support.git</nowiki>
  $ cd paparazzi-portability-support/linux/
  $ sudo ./develenv.sh
$ cd ivy/
$ svn checkout http://svn.tls.cena.fr/svn/ivy/ivy-c/trunk ivy-c
$ cd ivy-c/src/


= Install paparazzi on the gumstix=
Patchthe Makefile with :
#Install all libraries needed=
Patch content:
  sudo apt-get install ocaml-findlib libxml-light-ocaml-dev liblablgtk2-ocaml-dev liblablgtk2-gnome-ocaml-dev libocamlnet-ocaml-dev libsdl-ocaml-dev libpcre-ocaml-dev gtk2-engines-pixbuf make gcc g++ libgsl0-dev gnuplot libgnomecanvas2-dev bzip2 git libusb-dev speech-dispatcher glade imagemagick libpcre3-dev git-core python-usb python-lxml python-wxgtk2.8 speech-dispatcher libgnomecanvas2-dev m4 python-yaml
  --- Makefile.orig 2013-05-23 16:36:45.000000000 +0000
+++ Makefile 2013-05-23 16:32:22.000000000 +0000
@@ -28,6 +28,11 @@
FPIC=
endif
+MACHINE = $(shell uname -m)
+ifeq ("$(MACHINE)", "armv7l")
+ FPIC = -fPIC
+endif
+
  ifndef PREFIX
export PREFIX=/usr/local


#Install Ocaml 4.0
  $ make all
wget -O ocaml-4.00.0.tar.gz http://caml.inria.fr/pub/distrib/ocaml-4.00/ocaml-4.00.0.tar.gz
  $ sudo make install
tar -xvzf ocaml-4.00.0.tar.gz
cd ocaml-4.00.0
./configure
make world
  make opt
umask 022
  sudo make install
cd ..


#Install Opam
== IVY ==
  git clone https://github.com/OCamlPro/opam.git
cd opam
./configure
make (because of overheating you may get some errors, but keep doing 'make')
sudo make install


cd ~
IVY is a simple protocol and a set of open-source libraries and programs that allows applications to broadcast information through text messages, with a subscription mechanism based on regular expressions. The project can be found at: http://www2.tls.cena.fr/products/ivy/   
mkdir develop
cd develop/
wget https://bitbucket.org/mmottl/pcre-ocaml/downloads/pcre-ocaml-6.2.5.tar.gz
tar -xvzf pcre-ocaml-6.2.5.tar.gz
cd pcre-ocaml-6.2.5
./configure
make
sudo make install
cd ..
ocaml -version (make sure you have the right version)
sudo opam install -v lablgtk
sudo opam install  xml-light
sudo opam install pcre-ocaml
sudo opam install -v ocamlnet
cd ~
git clone https://github.com/paparazzi/paparazzi-portability-support.git
cd paparazzi-portability-support/
cd linux/
  sudo ./develenv.sh
sudo apt-get install libxt-dev tcl8.4-dev
cd ivy/ivy-vy-c
cd ivy/ivy-c/
  176 ll
dpkg-checkbuilddeps


In the paparazzi project, Ivy is used to send telemetry data to where ever you want.


  178  sudo apt-get install tcl-dev
NOTE: Do not confuse this IVY with the Apache Ivy project.
  179  dpkg-checkbuilddeps


  183  cd ~
== Ivy-OCAML ==
  184  fakeroot debian/rules get-orig-source
  185  locale -a
  186  cd paparazzi-portability-support/
  187  cd linux/ivy/ivy-c/
  188  ll
  189  fakeroot debian/rules get-orig-source
  190  ll
  191  tar -xvzf ivy-c_3.12.1.orig.tar.gz
  192  ll
  193  cd ivy-c-3.12.1/
  194  ll
  195  rm -rf debian/
  196  ll
  197  rm -rf debian/
  198  cp -r ../debian .
  199  dpkg-buildpackage -rfakeroot
  200  ll
  201  cd src/
  202  ll
  203  cat Makefile
  204  clear
  205  ll
  206  cd ..
  207  ll
  208  cd debian/
  209  ll
  210  cat rules
  211  ll
  212  nano rules
  213  sudo apt-get install nano
  214  nano rules
  215  cd ../../
  216  ll
  217  cat ivy-c*dsc
  218  debhelper --v
  219  debhelper -version
  220  debhelper
  221  sudo apt-get install debhelper
  222  which debhelper
  223  ls
  224  cd ivy-c-3.12.1/
  225  ls
  226  make clean
  227  make
  228  ls
  229  cd src
  230  ls
  231  make
  232  make clean
  233  make
  234  sudo make install
  235  cd ..
  236  ls
  237  vim debian/rules
  238  cd develop/
  239  ll
  240  git clone https://github.com/OCamlPro/opam.git
  241  opam remove pcre-ocaml
  242  cd ..
  243  ll
  244  cd ~
  245  ll
  246  cd /
  247  ll
  248  cd ~
  249  ll
  250  cd .opam/
  251  ll
  252  cd ..
  253  ll
  254  cd pcre-ocaml-6.2.5
  255  ll
  256  cd lib/
  257  ll
  258  cd ..
  259  ll
  260  cd ~/paparazzi-portability-support/linux/ivy/ivy-c
  261  ll
  262  dpkg-checkbuilddeps
  263  dpkg-checkbuilddeps -v
  264  dpkg-checkbuilddeps -B
  265  pkbuild
  266  apt-get install dpkg-dev debhelper devscripts fakeroot linda
  267  sudo apt-get install dpkg-dev debhelper devscripts fakeroot linda
  268  sudo apt-get install build-essential autoconf automake autotools-dev dh-make debhelper devscripts fakeroot xutils lintian pbuilder
  269  cd ivy-c_3.12.1
  270  ll
  271  cd ivy-c-3.12.1/
  272  ll
  273  debuild -i -us -uc -b
  274  ll
  275  cd ..
  276  ll
  277  cd ivy-c-3.12.1/
  278  ll
  279  cd develop/
  280  ls
  281  sudo apt-get install dh-ocaml
  282  svn co http://svn.tls.cena.fr/svn/ivy/ivy-ocaml/trunk
  283  mv trunk ivy-ocaml
  284  cd ivy-ocaml/
  285  ls
  286  cat README
  287  ls
  288  cat README
  289  ls
  290  make
  291  ocamlmklib -o ivy-ocaml ivy.cmo ivyLoop.cmo civy.o civyloop.o  -livy
  292  ls
  293  vim Makefile
  294  make
  295  vim Makefile
  296  make
  297  make clean
  298  make
  299  vim Makefile
  300  make
  301  vim Makefile
  302  make clean
  303  make
  304  sudo make install
  305  ls ~/paparazzi-portability-support/linux/ivy/ivy-python
  306  cd ..
  307  ls
  308  svn co http://svn.tls.cena.fr/svn/ivy/ivy-python/trunk
  309  mv trunk ivy-python
  310  cd ivy-python/
  311  ls
  312  sudo python setup.py
  313  sudo python setup.py install
  314  svn info
  315  cd ../..
  316  ls
  317  git clone git://github.com/paparazzi/paparazzi.git
  318  df -h
  319  ls
  320  du -hs /*
  321  df -h
  322  ls
  323  fdisk /dev/mmcblk0
  324  sudo fdisk /dev/mmcblk0
  325  sudo reboot
  326  sudo apt-get install subversion
  327  cd /usr/include/
  328  ll
  329  ll tc*
  330  ls
  331  git clone git://github.com/paparazzi/paparazzi.git
  332  git checkout -b master_sergiu origin/master
  333  cd paparazzi
  334  git checkout -b master_sergiu origin/master
  335  ls
  336  vim Makefile
  337  make ground_segment
  338  apt-cache search glibivy
  339  locate ivy-ocaml
  340  cd ../develop/
  341  ls
  342  ls ivy-ocaml/
  343  vim ivy-ocaml/META.glibivy
  344  vim ivy-ocaml/glibivy-ocaml.mli
  345  vim ivy-ocaml/glibivy-ocaml.a
  346  cd ivy-ocaml/
  347  svn info
  348  ls
  349  vim Makefile
  350  vim META.glibivy
  351  ls
  352  make clean
  353  make
  354  sudo make install
  355  vim Makefile
  356  sudo make uninstall
  357  sudo make install
  358  make
  359  make clean
  360  make
  361  sudo make install
  362  ls
  363  cd ..
  364  mv ivy-ocaml ivy-ocaml-old
  365  git clone git://github.com/flixr/ivy-ocaml.git
  366  cd ivy-ocaml
  367  ls
  368  sudo make uninstall
  369  make clean
  370  make
  371  vim Makefile
  372  make
  373  make clean
  374  make
  375  sudo make install
  376  ocamlc -where
  377  ls /usr/local/lib/ocaml/
  378  sudo make install
  379  vim META.glibivy
  380  git log
  381  sudo make install
  382  ls ..
  383  ls
  384  vim Makefile
  385  sudo make install
  386  ls
  387  cp META META.ivy
  388  make clean
  389  make
  390  sudo make install
  391  sudo make uninstall
  392  sudo make install
  393  cp META META.ivy
  394  vim Makefile
  395  sudo make uninstall
  396  ls /usr/local/lib/ocaml/
  397  rm /usr/local/lib/ocaml/glibIvy.cmi
  398  sudo rm /usr/local/lib/ocaml/glibIvy.cmi
  399  sudo rm /usr/local/lib/ocaml/glibivy-ocaml.*
  400  ls /usr/local/lib/ocaml/
  401  sudo make install
  402  ls
  403  ocamlfind
  404  ocamlfind query glibivy
  405  ocamlfind query glibIvy
  406  vim Makefile
  407  ocamlfind query glibIvy-ocaml
  408  ocamlfind query glibivy-ocaml
  409  vim Makefile
  410  ls
  411  cat META
  412  cat META.ivy
  413  cat METAgl
  414  cat META.glibivy
  415  rm MET
  416  rm META
  417  sudo make install
  418  ls /usr/local/lib/ocaml/
  419  find /usr/local/lib/ocaml/|grep glib
  420  ocamlfind query glibivy
  421  ocamlfind query glibIvy
  422  ocamlfind query glibivy-ocaml
  423  ocamlfind query libglibivy-ocaml
  424  sudo make install
  425  vim /usr/local/lib/ocaml/3.12.0/ivy/META
  426  vim /usr/local/lib/ocaml/3.12.0/glibivy/META
  427  ocamlfind
  428  ocamlfind  list
  429  vim Makefile
  430  sudo make uninstall
  431  sudo make install
  432  ls
  433  cp META META.ivy
  434  sudo make install
  435  ls
  436  cat META.
  437  cp META.glibivy META
  438  ocamlfind install  glibivy META glibIvy.mli glibIvy.cmi glibIvy.cmx glibivy-ocaml.cma glibivy-ocaml.cmxa libglibivy-ocaml.a glibivy-ocaml.a dllglibivy-ocaml.so
  439  ocamlfind query glibivy
  440  ocamlfind query glibIvy
  441  ocamlfind list
  442  ls /usr/local/lib/ocaml/3.12.0/
  443  ocamlfind list|grep pcre
  444  cp /usr/local/lib/ocaml/3.12.0/* /usr/local/lib/ocaml/ -r
  445  sudo cp /usr/local/lib/ocaml/3.12.0/* /usr/local/lib/ocaml/ -r
  446  ocamlfind list|grep pcre
  447  ls /usr/local/lib/ocaml/pcre/
  448  ocamlfind
  449  ocamlfind printconf
  450  vim /home/sergiu/.opam/system/lib/findlib.conf
  451  locate findlib
  452  locate findlib.conf
  453  find /etc -name findlib.conf
  454  find /usr/local/ -name findlib.conf
  455  find /usr/ -name findlib.conf
  456  find / -name findlib.conf
  457  vim /etc/ocamlfind.conf
  458  ocamlfind printconf
  459  sudo ocamlfind printconf
  460  ocamlfind printconf
  461  ocamlfind --hep
  462  ocamlfind --help
  463  man ocamlfind
  464  OCAMLFIND_CONF=/etc/ocamlfind.conf ocamlfind query
  465  export OCAMLFIND_CONF=/etc/ocamlfind.conf
  466  ocamlfind printconf
  467  cp /home/sergiu/.opam/system/lib/findlib.conf /home/sergiu/.opam/system/lib/findlib.conf.old
  468  cp /etc/ocamlfind.conf /home/sergiu/.opam/system/lib/findlib.conf
  469  ocamlfind printconf
  470  ocamlfind query
  471  ocamlfind list
  472  ocamlfind printconf
  473  ls /usr/local/lib/ocaml/3.12.0/
  474  sudo rm  /usr/local/lib/ocaml/pcre
  475  sudo rm  /usr/local/lib/ocaml/pcre -rf
  476  sudo rm  /usr/lib/ocaml/pcre -rf
  477  cd ..
  478  sudo apt-get install cvs
  479  cvs -d:pserver:anonymous@cvs.motion-twin.com:/cvsroot co ocaml/xml-light
  480  wget http://tech.motion-twin.com/zip/xml-light-2.2.zip
  481  unzip xml-light-2.2.zip
  482  cd xml-light
  483  ls
  484  cat README
  485  make
  486  make install
  487  sudo make install
  488  df -h
  489  cd ..
  490  wget https://forge.ocamlcore.org/frs/download.php/545/ocaml-http-0.1.5.tar.gz
  491  wget https://forge.ocamlcore.org/frs/download.php/545/ocaml-http-0.1.5.tar.gz --no-check-certificate
  492  tar -xzvf ocaml-http-0.1.5.tar.gz
  493  cd ocaml-http_0.1.5/
  494  ls
  495  make
  496  apt-cache search netstring
  497  ocamlobjinfo /usr/lib/ocaml/netstring/neturl.cmi
  498  find /usr/src -name neturl.*
  499  find /usr -name neturl.*
  500  ls
  501  vim INSTALL
  502  cd ..
  503  wget "http://downloads.sourceforge.net/project/ocamlnet/ocamlnet/2.2.9/ocamlnet-2.2.9.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Focamlnet%2F&ts=1365529051&use_mirror=ignum"
  504  tar -xzvf ocamlnet-2.2.9.tar.gz\?r\=http\:%2F%2Fsourceforge.net%2Fprojects%2Focamlnet%2F\&ts\=1365529051\&use_mirror\=ignum
  505  wget "http://downloads.sourceforge.net/project/ocamlnet/ocamlnet/2.2.9/ocamlnet-2.2.9.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Focamlnet%2F&ts=1365529051&use_mirror=ignum"
  506  htop
  507  killall -9 NetworkManager
  508  sudo killall -9 NetworkManager
  509  htop
  510  dmesg
  511  htop
  512  df -h
  513  htop
  514  df -h
  515  mv ocamlnet-2.2.9.tar.gz\?r\=http\:%2F%2Fsourceforge.net%2Fprojects%2Focamlnet%2F\&ts\=1365529051\&use_mirror\=ignum.1 ocamlnet-2.2.9.tar.gz
  516  tar -xzvf ocamlnet-2.2.9.tar.gz
  517  cd ocaml
  518  cd ocamlnet-2.2.9
  519  ls
  520  ./configure
  521  ./configure -enable-gtk2 -with-nethhtpd
  522  ./configure -enable-gtk2 -with-nethttpd
  523  make all
  524  ls -a ~/opam/
  525  ls -a ~/ocaml-4.00.0
  526  cd ../../ocaml-4.00.0
  527  ls
  528  ./configure  --help
  529  ./configure  -help
  530  ./configure
  531  vim README
  532  vim INSTALL
  533  grep -R toploop .
  534  exit
  535  cd ocaml-4.00.0
  536  vim Makefile
  537  make compilerlibs
  538  make compiler-libs
  539  make compilerlibs
  540  sudo make installopt
  541  sudo shutdown -h now
  542  cat .bash_history
  543  cd paparazzi
  544  make ground_segment
  545  vim sw/lib/ocaml/Makefile
  546  make ground_segment
  547  sudo apt-get install python-xml
  548  apt-cahce search python|grep xml
  549  apt-cache xml-light
  550  apt-cache search xml-light
  551  sudo apt-get install libxml-light-ocaml-dev libxmlm-ocaml-dev
  552  make ground_segment
  553  apt-cache search ocamlnet
  554  sudo apt-get install libocamlnet-ocaml libocamlnet-ocaml-dev
  555  apt-cache search ocaml |grep http
  556  sudo apt-get install libhttp-ocaml-dev
  557  make ground_segment
  558  ls https://forge.ocamlcore.org/frs/download.php/545/ocaml-http-0.1.5.tar.gz
  559  ls /usr/lib/ocaml/netclient/http_client.cmi
  560  ls /usr/lib/ocaml/netclient/http_client.cm*
  561  ls /usr/lib/ocaml/netclient/http_client.*
  562  ls /usr/lib/ocaml/netclient/
  563  vim /usr/lib/ocaml/netclient/http_client.mli
  564  apt-cache search ocamlnet
  565  sudo apt-get remove  libocamlnet-ocaml-bin libocamlnet-ocaml libocamlnet-ocaml-dev
  566  opam install ocamlnet
  567  make ground_segment
  568  opam install ocamlnet
  569  opam install netclient
  570  opam
  571  opam list | grep net
  572  opam remove  netclient
  573  opam remove ocamlnet
  574  sudo opam remove ocamlnet
  575  sudo opam install ocamlnet
  576  free -m
  577  df -h
  578  sudo opam install ocamlnet
  579  sudo apt-get install htop
  580  swapon /swapfile1
  581  sudo swapon /swapfile1
  582  sudo opam install ocamlnet
  583  apt-cache search liblgtk
  584  apt-cache search lablgtk
  585  apt-get remove liblablgtk2-ocaml
  586  sudo apt-get remove liblablgtk2-ocaml
  587  sudo opam install ocamlnet
  588  sudo opam install lablgtk2
  589  sudo opam list|grep gtk2
  590  sudo opam list|grep gt
  591  sudo opam install lablgtk
  592  sudo opam remove lablgtk
  593  sudo opam install lablgtk
  594  sudo opam install ocamlnet
  595  sudo opam install topfind
  596  sudo opam list|grep topfind
  597  sudo opam list|grep ocamlfind
  598  sudo opam install ocamlfind
  599  sudo opam remove ocamlfind
  600  cd ../develop/ocamlnet-2.2.9
  601  make
  602  history
  603  cd develop/
  604  ls
  605  cd ../paparazzi
  606  ls
  607  make
  608  git status
  609  ocamlfind list|grep net
  610  grep -R root ~sergiu/.opam/
  611  opam
  612  mv ~sergiu/.opam ~sergiu/.opam-old
  613  opam init --help
  614  opam init
  615  ocamlfind list
  616  ls /opt/


The Ivy-ocaml is a Library that make it possible to use Ivy via the Ocaml language.


  opam init
  $ cd ~/develop/paparazzi-portability-support/linux/ivy/
  . /home/sergiu/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true
  $ <nowiki>svn checkout http://svn.tls.cena.fr/svn/ivy/ivy-ocaml/trunk ivy-ocaml</nowiki>
  eval 'opam config env'
  $ cd ivy-ocaml/
  cd ..
  $ make
  opam install ocamlfind xml-light pcre-ocaml
  $ sudo PATH=$PATH make install


sudo opam install ocamlfind xml-light pcre-ocaml
If you will get an error when trying to install pcre-ocaml 7.0.2 please follow these steps:
wget https://bitbucket.org/mmottl/pcre-ocaml/downloads/pcre-ocaml-6.2.5.tar.gz
tar -xvzf pcre-ocaml-6.2.5.tar.gz
cd pcre-ocaml-6.2.5
make
sudo make install
Then continue the process:
sudo opam install -v lablgtk
sudo opam install -v ocamlnet
You need to install subversion to use svn commands:
sudo apt-get install subversion


=History=
=== Ivy-python ===
  130  history
  131  sudo shutdown -h now
  132  ll
  133  top
  134  ll
  135  tar -xvzf ll
  136  ll
  137  ocaml -version
  138  ocaml-4 -version
  139  ocaml4 -version
  140  which ocaml
  141  ulimit -s 65536
  142  ll
  143  cp -av ocaml-4.00.0 /tmp
  144  ll
  145  ll /tmp
  146  ll
  147  cd ocaml-4.00.0
  148  ll
  149  ./configure
  150  make world
  151  make opt
  152  make install
  153  cd /
  154  ll
  155  cd ~
  156  cd ocaml-4.00.0
  157  ll
  158  umask 022
  159  sudo make install
  160  ocaml -version
  161  which ocaml
  162  camlp4 -version
  163  sudo  ./build/install.sh
  164  ocaml -version
  165  which ocaml
  166  cd usr/local/bin
  167  cd /usr/local/bin
  168  ll oc*
  169  ./ocaml
  170  ocaml -version
  171  ll
  172  ./ocaml
  173  ocaml -version
  174  which ocaml
  175  su root
  176  exit
  177  ls
  178  cd develop
  179  ll
  180  cd paparazzi-portability-support/
  181  ll
  182  rm *.*
  183  ll
  184  rm darwin
  185  rm -r *
  186  ll
  187  rm *
  188  ll
  189  rm /*
  190  rm ~/develop/paparazzi-portability-support/*
  191  rm -r  ~/develop/paparazzi-portability-support/*
  192  ll
  193  rm -r  ~/develop/paparazzi-portability-support/linux/*
  194  yes
  195  ll
  196  rm -rf  ~/develop/paparazzi-portability-support/linux/*
  197  sudo rm -rf  ~/develop/paparazzi-portability-support/linux/*
  198  ll
  199  cd linux
  200  ll
  201  cd ..
  202  sudo rm -rf  ~/develop/paparazzi-portability-support/*
  203  ll
  204  sudo rm -rf  ~/develop/paparazzi-portability-support/*.*
  205  ll
  206  sudo rm -rf  ~/develop/paparazzi-portability-support/.*
  207  cd .git
  208  ocaml -version
  209  wget -O ocaml-4.00.0.tar.gz http://caml.inria.fr/pub/distrib/ocaml-4.00/ocaml-4.00.0.tar.gz
  210  $ cd ocaml-4.00.0
  211  cd ~
  212  $ cd ocaml-4.00.0
  213  cd ocaml-4.00.0
  214  wget -O ocaml-4.00.0.tar.gz http://caml.inria.fr/pub/distrib/ocaml-4.00/ocaml-4.00.0.tar.gz
  215  cd ocaml-4.00.0
  216  find -iname ocaml-4.*
  217  ll
  218  cd ocaml-4.00.0.tar.gz
  219  tar -xvwzf ocaml-4.00.0.tar.gz
  220  tar -xvwf ocaml-4.00.0.tar.gz
  221  tar -xvwz ocaml-4.00.0.tar.gz
  222  tar -xvzf ocaml-4.00.0.tar.gz
  223  cd ocaml-4.00.0
  224  ll
  225  ./configure --with-pthreads
  226  make world.opt
  227  ocaml -version
  228  cd ..
  229  sudo apt-get install ocaml
  230  cd ocaml-4.00.0
  231  ll
  232  make world.opt
  233  sudo apt-get update
  234  sudo apt-get upgrade
  235  ocaml -version
  236  sudo apt-get remove ocaml
  237  ocaml -version
  238  cd ..
  239  ll
  240  cd develop/
  241  cd opam/
  242  ./configure
  243  ll
  244  ./configure
  245  make clean
  246  make
  247  sudo make install
  248  opam init
  249  . /home/sergiu/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true
  250  eval `opam config env`
  251  eval 'opam config env'
  252  sudo apt-get install libglade2-dev libgnomeui-dev libgnomecanvas2-dev librsvg2-dev libgtkspell-dev libcanberra-gtk-dev
  253  opam install ocamlfind xml-light pcre-ocamlopam install ocamlfind xml-light pcre-ocaml
  254  opam  ocamlfind xml-light pcre-ocamlopam install ocamlfind xml-light pcre-ocaml
  255  opam --help
  256  opam install ocamlfind xml-light pcre-ocamlopam install ocamlfind xml-light pcre-ocaml
  257  opam
  258  opam install
  259  opam install ocamlfind
  260  top
  261  history
Due to overheating i got errors like
==== ERROR [while installing ocamlfind.1.3.3] ====
Internal error:
  # opam-version    1.0.1 (1.0.0-84-g9b3ff34)
# os              linux
opam: "fork" failed: Cannot allocate memory
'opam install ocamlfind' failed.


The ivy-python package makes it possible to use the IVY libraries from within the Python programming language. The ivy-python package is architecture independent, so it can be downloaded from the Ubuntu or Debian paparazzi repository. However since this is the from scratch page we will download it from the official source repository via


and I had to shutdown and wait for the system to cool down a little.
  $ cd ~/develop/paparazzi-portability-support/linux/ivy/
Because the problem persisted, I had to add a swap file doing as sudo:
  $ <nowiki>svn co http://svn.tls.cena.fr/svn/ivy/ivy-python/trunk ivy-python</nowiki>
  dd if=/dev/zero of=/swapfile1 bs=1024 count=524288 (will create 512 MB swap file)
$ cd ivy-python/
mkswap /swapfile1
$ sudo python setup.py install
chown root:root /swapfile1
chmod 0600 /swapfile1
  swapon /swapfile1
For more explanations you can go to [http://www.cyberciti.biz/faq/linux-add-a-swap-file-howto/ this website]


=Attempt 10=
== Main sourcecode ==
Now all the prequisites are installed, finally we can grab a copy of the full Paparazzi project


    sudo add-apt-repository ppa:paparazzi-uav/ppa
$ cd ~
    (press enter as you will be asked)
$ <nowiki>git clone https://github.com/paparazzi/paparazzi.git</nowiki>
    sudo apt-get install ocaml-findlib libxml-light-ocaml-dev liblablgtk2-ocaml-dev liblablgtk2-gnome-ocaml-dev libocamlnet-ocaml-dev libsdl-ocaml-dev libpcre-ocaml-dev gtk2-engines-pixbuf make gcc g++ libgsl0-dev gnuplot libgnomecanvas2-dev bzip2 git libusb-dev speech-dispatcher glade imagemagick libpcre3-dev
$ cd paparazzi
    sudo apt-get install bzip2 git-core make gcc g++ gnuplot glade imagemagick libpcre3-dev libusb-dev python-usb python-lxml python-wxgtk2.8 speech-dispatcher libgnomecanvas2-dev m4
$ export PPRZ_HOME=~/paparazzi/
    sudo apt-get install python-lxml, python-wxgtk2.8, python-usb, python-yaml
$ export PAPARAZZI_HOME=~/paparazzi/
    sudo apt-get update
  $ export PAPARAZZI_SRC=~/paparazzi/
  sudo apt-get install libocamlnet-ocaml
$ make ground_segment
  sudo apt-get install libocamlnet-ocaml-dev
  could not install  sudo apt-get install liblablgtk-extras-ocaml-dev


Note: because of an error that occured, I installed the packages one by one and the process was succesfully.
Calibrate your touchsreen
$ sudo apt-get install xinput_calibrate
$ X &
$ export DISPLAY=:0
$ xinput_calibrate
You will have to touch the center of the  four circles. When you will have touched all four points, you will get a similar message on your command prompt.


  git clone https://github.com/paparazzi/paparazzi-portability-support.git
  --> Making the calibration permanent <--
  cd paparazzi-portability-support/linux
  copy the snippet below into '/etc/X11/xorg.conf.d/99-calibration.conf'
sudo ./develenv.sh
  Section "InputClass"
  sudo apt-get install libxt-dev tcl8.4-dev
<nowiki> Identifier "calibration" </nowiki>
<nowiki> MatchProduct "ADS7846 Touchscreen" </nowiki>
<nowiki> Option "Calibration" "147 3917 3783 251" </nowiki>
  EndSection


Note: each time you reboot you will need to start X server. Now, because we already started it to calibrate the screen, you can skip the next two commands. Only this time!


 
Fine, now lets start the X server.
  75 sudo apt-get install libocamlnet-ocaml-dev
  $ X &


  83  git clone https://github.com/paparazzi/paparazzi-portability-support.git
And make a display setting
  84  cd paparazzi-portability-support/linux
  85  sudo ./develenv.sh
  86  sudo apt-get install libxt-dev tcl8.4-dev
  87  cd ~/paparazzi-portability-support/linux/ivy/ivy-c
  88  cd ../../
  89  mv paparazzi-portability-support/ ../
  90  cd ../paparazzi-portability-support/
  91  pwd
  92  cd linux
  93  cd ivy/ivy-c/
  94  fakeroot debian/rules get-orig-source


  97 sudo apt-get install subversion
  $ export DISPLAY=:0
  98  fakeroot debian/rules get-orig-source
  99  tar -xvzf ivy-c_3.12.1.orig.tar.gz
  100  cd ivy-c-3.12.1/
  101  rm -rf debian/
  102  cp -r ../debian .
  103  dpkg-buildpackage -rfakeroot -us -uc
  104  cd ..
  105  sudo dpkg -i ivy-c_3.12.1-1_armel.deb ivy-c-dev_3.12.1-1_armel.deb
  128  cd ~/paparazzi-portability-support/linux/ivy/ivy-c


  130  ivy-c-3.12.1/
Finally, it's time to party, let's run the Paparazzi center
  131  cd ivy-c-3.12.1/


  137  make install
  $ cd ~/paparazzi
  140 cd ~/paparazzi-portability-support/linux/ivy/ivy-ocaml
  $ ./paparazzi
  141  fakeroot debian/rules get-orig-source
  142 cd ivy-ocaml-1.1/
  143  cp -r ../debian .
  144  make
  145  svn checkout http://svn.tls.cena.fr/svn/ivy/ivy-ocaml/trunk/ ivy-ocaml


  156  mv ivy-ocaml/ _ivy-ocaml.old
Add this to the session
  157  svn checkout http://svn.tls.cena.fr/svn/ivy/ivy-ocaml/trunk/ ivy-ocaml
  158  cd ivy-ocaml/
  166  make
  170  make install
  171  dpkg-buildpackage -rfakeroot -us -uc


    1  dpkg-buildpackage -rfakeroot -us -uc
  $ sw/ground_segment/cockpit/gcs -b 192.168.1:2010
    2 ll
    3  cd src/
    4  ll
    5  cd ..
    6  cd ~
    7  ll
    8  mk develop
    9  mkdir develop
  10  cd develop/
  11  ll
  12  git clone https://github.com/paparazzi/paparazzi-portability-support.git
  13  cd paparazzi-portability-support/linux
  14  sudo ./develenv.sh
  15  sudo adduser test sudo
  16  sudo adduser sergiu sudo
  17  su root
  18  cd paparazzi-portability-support/linux
  19  sudo ./develenv.sh
  20  su root
  21  logout
  22  exit
  23  dpkg-buildpackage -rfakeroot -us -uc
  24  sudo dpkg-buildpackage -rfakeroot -us -uc
  25  login
  26  su login
  27  su root
  28  exit
  29  sudo dpkg -i ivy-c_3.12.1-1_arm**.deb ivy-c-dev_3.12.1-1_arm**.deb
  30  su root
  31  exit
  32  fakeroot debian/rules get-orig-source
  33  su root
  34  exit
  35  sudo cd rules
  36  ls
  37  su root
  38  exit
  39  fakeroot debian/rules get-orig-source
  40  ls
  41  cd debian
  42  ls
  43  cd rules
  44  sudo cd rules
  45  sudo passwd sergiu
  46  su root
  47  exit
  48  cd develop/
  49  ll
  50  cd paparazzi-portability-support/
  51  ll
  52  cd linux
  53  ll
  54  sudo develenv.sh
  55  ./develenv.sh
  56  sudo ./develenv.sh
  57  sudo apt-get install libxt-dev tcl8.4-dev
  58  cd ..
  59  cd linux/ivy/ivy-c
  60  ll
  61  fakeroot debian/rules get-orig-source
  62  tar -xvzf ivy-c_3.12.1.orig.tar.gz
  63  cd ivy-c-3.12.1/
  64  rm -rf debian/
  65  cp -r ../debian .
  66  dpkg-buildpackage -rfakeroot -us -uc
  67  find replace-mkdirhier.patch
  68  find -iname  replace-mkdirhier.patch
  69  ll
  70  cd debian/
  71  ll
  72  rm patches/
  73  rmdir patches/
  74  rm -rf patches/
  75  rmdir patches/
  76  ll
  77  dpkg-buildpackage -rfakeroot -us -uc
  78  touch changelog
  79  dpkg-buildpackage -rfakeroot -us -uc
  80  ll
  81  cd ..
  82  dpkg-buildpackage -rfakeroot -us -uc
  83  sudo dpkg-buildpackage -rfakeroot -us -uc
  84  history
  85  dpkg-buildpackage -rfakeroot -us -uc
  86  top
  87  dpkg-buildpackage -rfakeroot -us -uc
  88  sudo make clean
  89  cat Makefile
  90  ll
  91  cd ..
  92  ll
  93  cd ivy-c-3.12.1/
  94  ll
  95  cd src/
  96  ll
  97  ivy-c-3.12.1/make clean
  98  make
  99  sudo make install
  100  cd ..
  101  cd ../../
  102  cd ivy-ocaml/
  103  ll
  104  fakeroot debian/rules get-orig-source
  105  cd ivy-ocaml-1.1/
  106  ll
  107  make
  108  cd ../../ivy-c/
  109  ll
  110  cd ivy-c-3.12.1/
  111  ll
  112  cd src/
  113  ll
  114  cat Makefile
  115  grep -Ri fPIC Makefile
  116  cd ../../
  117  cd ../
  118  cd ivy-ocaml/
  119  ll
  120  cd ivy-ocaml-1.1/
  121  ll
  122  grep -Ri fPIC Makefile


= Testing =
= Telemetry =
Hardware list:
#Laptop with paparazzi softaware
#Gumstix board
#XBee module
#USB power hub
#UAV with RC transceiver and xbee module
#internet connection


= Experimental steps =
Note: from the tests made, the xbee module won't be seen by the Gumstix board if it is not connected before you power up the system.
For this tests, it was used this drone:


# Remove LightDM GUI to preserver Gumstix memory
{TODO provide pictures}
You can find here all the configuration files. Download them and copy them as it follows:
$ cd ~/paparazzi/conf/system/udev/rules/
$ sudo cp -av *rules /etc/udev/rules.d/
$ mkdir conf/radios/sergiu
$ cp conf/radios/sergiu ~Downloads/sergiu_mx22_pprz-ap.xml {TODO change the names with something more appropriate}
$ git remote -v
$ mkdir conf/airframes/sergiu
$ cp conf/airframes/sergiu ~/Downloads/orange.xml {TODO change file name}
$ cp conf/ ~/Downloads/conf.xml
$ cp conf/airframes/sergiu/ ~/Downloads/orange.xml
$ ./paparazzi


{TODO: Describe STEPS}
Download this tarball {TODO provide tarball} and extract it in /home/user/paparazzi/var/ . Inside you will find all the files needed to run paparazzi GCS with datalink.


{install python}
{TODO provide files orange.xml,radio...xml, udev rules, config.xml; set datalink properly and
{install ivy python}
explain how to build, upload, execute + print screens}
{install kivy}


Compile example
= Add a joystick =
{TODO add calibration steps}


Source of Example
$ cd ~/paparazzi/sw/ground_segment/joystick
$ make clean
$ make
In Paparazzi Center select Tool>>Joystick and make sure that the line looks like this:
/home/sergiu/paparazzi/sw/ground_segment/joystick/input2ivy -ac orange2 extreme_3d_pro.xml
where '/sergiu' must be replaced with your user, 'orange2' with the name of your A/C and 'extreme_3d_pro.xml' with the name of your joystick.


X11 server to display on LCD
Edited ~/paparazzi/conf/conf.xml .
= Installing =


<nowiki>opened tools:
server  /home/sergiu/paparazzi/sw/ground_segment/tmtc/server
gcs    /home/sergiu/paparazzi/sw/ground_segment/cockpit/gcs
data link  /home/sergiu/paparazzi/sw/ground_segment/tmtc/link  -udp
joystick  /home/sergiu/paparazzi/sw/ground_segment/joystick/input2ivy  -ac ardrone2_sdk  extreme_3d_pro.xml
messages  /home/sergiu/paparazzi/sw/ground_segment/tmtc/messages
real-time plotter  /home/sergiu/paparazzi/sw/logalizer/plotter
</nowiki>
Notes: wireless connection in between the drone and laptop is required for data link.


= Testing =
= Testing =
{TODO: Describe here a first run with Paparazzi Sim}


= Next =
=onboard video=


The next step will be to make onboard video work in the GCS.
System identification
$ cat /proc/bus/input/devices
output
I: Bus=0019 Vendor=0000 Product=0006 Version=0000
N: Name="Video Bus"
P: Phys=LNXVIDEO/video/input0
S: Sysfs=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/input4
U: Uniq=
H: Handlers=kbd event4
B: PROP=0
B: EV=3
B: KEY=3e000b 0 0 0 0 0 0 0
 
Install mplayer
$ sudo apt-get install mplayer2
to make sure that the program is working properly type
$ mplayer
and you are supposed to get a list of the options available.
 
Get image using mplayer, Terratec Grabby digitizer, 2.4GHz receiver, and a camera with 2.4 GHz transmitter:
$ dmesg
and look if your digitizer is registered as /dev/video0 which is the default or otherwise and replace bellow
$  mplayer tv:// -tv driver=v4l2:width=320:height=240:norm=NTSC:input=0:device=/dev/video0:noaudio
where
  inputs: 0 = Composite1; 1 = S-Video;
If 0 doesn't work for you, try with value 1.
{TODO: video receiver connect description }
{TODO: video digitizer a description }


= Links =
= Links =
Links to related information


* [[OMAP]]
* [[OMAP]]
* https://www.gumstix.com/
* https://www.gumstix.com/
* [[Dev/Caspa]]
* [[Dev/Caspa]]
* https://github.com/paparazzi/paparazzi-portability-support

Latest revision as of 10:24, 14 August 2013

Introduction

Would it not be great to have your small UAS in your backpack, throw it in the air and monitor and even adjust the flight via a small device in your pocket? If you think this would be awesome, read on, since that is what this page is all about. It is the first attempt and will not be about iPad, Android Phones, Amazon Kindles or the likes as a ground station. For this we have other wiki pages. No, we will use a trusted solution; A Gumstix board with Linux on it connected to a small screen.

Gumstix carrier board and touchscreen

Outcome

The outcome of our efforts will be to:

  1. Have the Paparazzi GCS running on a small Gumstix computer board so we can monitoring and adjust the flight of our unmanned aircraft with just a small simple device.
  2. Have fully correct instructions on how to get it to work on this wiki page.

{TODO add screenshot of working setup}

Hardware

What do you need to get your groundstation up and running:

  1. A gumstix board with a power supply
  2. 8 GB or higher capacity micro SD card, the faster the better
  3. USB to mini-USB cable
  4. Regular UTP network cable
  5. A small, or big screen, preferably with touch such as the 4.3" LCD panel that comes with the Chestnut board kit or this fully integrated Gumstix board
  6. Micro-SD to USB adapter or card reader
  7. A computer that runs Linux OS

Software

We will install the following on the micro SD card

  1. Ubuntu OS for Gumstix
  2. Support libraries
  3. Paparazzi main software

Conventions

Note: You can just copy the line(s) in the box and paste them in your terminal. But do not copy the $ or # sign at the beginning of a line. This symbol is just added on this page to show that the command is to be pasted at a terminal prompt as regular user($) or root user(#).

$  this is an example of how a regular user command for your terminal looks

Get the Operating System

Pre-requisites

Have the micro SD card at hand and download this custom OS with everything already installed for a gumstix board and Chestnut43 with touchscreen.

{TODO: provide an image with everything already fully installed}

Installation Steps

I'm in ahurry

If you are eager to start and do not want to install everything thant download [this file] and follow the steps of how to copy it ont an microSD card

Unzip the downloaded OS via

$ gunzip gcsStix.img.gz

Insert micro SD card in an SD reader and plug it in a USB port of your PC, then on the terminal type:

$ dmesg 

[170074.104194] sd 7:0:0:0: [sdb] Write Protect is off
[170074.104199] sd 7:0:0:0: [sdb] Mode Sense: 0b 00 00 08
[170074.104999] sd 7:0:0:0: [sdb] No Caching mode page present
[170074.105005] sd 7:0:0:0: [sdb] Assuming drive cache: write through
[170074.107904] sd 7:0:0:0: [sdb] No Caching mode page present
[170074.107911] sd 7:0:0:0: [sdb] Assuming drive cache: write through
[170074.109282]  sdb: sdb1 sdb2
[170074.112159] sd 7:0:0:0: [sdb] No Caching mode page present
[170074.112165] sd 7:0:0:0: [sdb] Assuming drive cache: write through
[170074.112169] sd 7:0:0:0: [sdb] Attached SCSI removable disk
[170074.904553] kjournald starting.  Commit interval 5 seconds
[170074.916813] EXT3-fs (sdb2): using internal journal
[170074.916823] EXT3-fs (sdb2): recovery complete
[170074.916826] EXT3-fs (sdb2): mounted filesystem with ordered data mode

Note: for my local machine the micro SD card was mounted on /dev/sdb as shown in the code above. Be aware of what you are doing at the next steps, as dd can completely overwrite your hard drive or other devices. Where sdX is the SD reader device found with the command above, replace sdX with your specific device in the following commands and /path/to/file with the path to your previously downloaded Gumstix image file.

$ SDCARD=/dev/sdX
$ sudo dd if=/path/to/file/gcsStix.img of=$SDCARD bs=64k

This will take several minutes depending on your configuration and when this is done, safely remove the micro SD card from your computer by right clicking on it and select eject. Then, insert the micro SD card into the Gumstix micro SD slot.

Connecting peripherals

When you have a Linux version running on your Gumstix, you can add a LCD, or a mouse, or a keyboard. First, install CuteCom on your local machine running on a terminal:

To set up your LCD you must follow these steps:

  1. Connect LCD flex cable to Gumstix connector
  2. Attach USB-to-mini-USB cable to both your local machine and Gumstix board.
  3. Power up Gumstix board
  4. Install and start cutecom
$ sudo apt-get install cutecom
$ cutecom

A window will pop up and you must adjust the pull-down menu settings as follows: Device will usually be either /dev/ttyUSB0 or /dev/ttyUSB1 . You can figure this out by typing on your command prompt:

dmesg|tail

Note: This command lists the last connected devices. Baud rate must be set to 115200, data bits to 8, stop bits to 1, parity to none, handshake none checked, open for both reading and writing checked, apply settings when opening checked, choose "CR,LF end line" and Char delay 1ms.

Click on Open device and your connection should start. If you encounter any problems, but you are sure you did everything right, check if your Gumstix board overheated or restart it.

Connect through CuteCom to the Gumstix, restart the board and hit a key within 5 seconds:

Hit any key to stop autoboot: 5

Then type the following in the CuteCom command prompt:

setenv defaultdisplay lcd43

Or, if you are using a 3.5" screen (such as the LCD panel with the Palo35):

setenv defaultdisplay lcd35

You can save this setting for future boots by saving it:

saveenv

Finally, continue with the boot process by typing in CuteCom command prompt:

boot

Connect to the Gumstix through the network

If you want to send files to the Gumstix, you can do it via a ssh connection. In order to do this, both devices, your computer and the Gumstix must be connected to the same network. Once you've done this, you can start setting up the connection. In order to do so you need to know the IP address of the Gumstix.

The first thing you need in order to get rid of the USB to mini-USB cable and its physical limitations is to create a user and set a password for it and install openssh. Please feel free to replace "sergiu" with whatever username you choose, but keep in mind that you must replace it everywhere you encounter "sergiu".

useradd -c "Sergiu S" -m -s "/bin/bash" -G sudo sergiu

Note: -G option will add the user to the specified group.

$ passwd sergiu

You will be asked to enter a password and confirm it. Type your password, then hit CTRL + Enter key combination and then retype your password. If successful, you will get this message:

passwd: password updated successfully
$ sudo apt-get install openssh-server

Once you have accomplished this, you must discover the Gumstix ip address, typing on CuteCom:

$ ifconfig -a 

Note: if you can't use this command for any reason you can get a list with all the IP addresses on the network using 'arp -a' on your machine. Among the data returned, you will see something like this:

eth0      Link encap:Ethernet  HWaddr 00:15:c9:28:c9:ff  
          inet addr:192.168.0.100  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::215:c9ff:fe28:c9ff/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3960 errors:0 dropped:0 overruns:0 frame:0
          TX packets:727 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:3734905 (3.7 MB)  TX bytes:63765 (63.7 KB)
          Interrupt:80 

Now you should be able to connect using:

$ ssh sergiu@192.168.0.100 {TODO USERNAME change}

You will be asked to type the password you previously set for the user.

Working With Gumstix

Note: You may get some errors during this installation. This depends on how well you are cooling down your system, how much RAM you have on your platform and so on. If you get errors when trying install a large number of packages/libraries at once, try to divide them into smaller groups.

1. Add a swap file Due to lack of RAM memory it is possible to see errors like this:

==== ERROR [while installing ocamlfind.1.3.3] ====
Internal error:
  # opam-version    1.0.1 (1.0.0-84-g9b3ff34)
# os              linux
opam: "fork" failed: Cannot allocate memory
'opam install ocamlfind' failed.

The solution to this problem is to create a swap file. For this case I created a 512 MB swap file, but you should adapt its size to the size of your SD card and the needed memory size.

Execute these commands to create and mount a swap file:

sudo dd if=/dev/zero of=/swapfile1 bs=1024 count=524288 (will create 512 MB swap file)
sudo mkswap /swapfile1
sudo chown root:root /swapfile1
sudo chmod 0600 /swapfile1
sudo swapon /swapfile1

Note: this will remove the swap file each time you shutdown. If you need the file, you have to repeat the swapon command after each boot. An alternative would be to have it mounted every time you boot the system. For more explanations you can go to this website

2. Autologin

Remove the login prompt

You may want to set your OS to auto-login. Why? Because there may be times you don't have a keyboard for the Gumstix around. You can find a good explanation of this here .

$ sudo locale-gen en_US.UTF-8
$ sudo apt-get install vim nano # (or use your favorite editor)

Note: if you get an error at this step, use the --fix-missing option as recommended.

$ sudo vim /etc/lightdm/lightdm.conf

Edit the autologin-user line by replacing the username with your own

autologin-user=sergiu

and add this line:

autologin-user-timeout=0

or the right locale for your keyboard. If this didn't solve your problem, you may want to read here more about it.

3. More Memory

Remove the Lightdm GUI manager in order to free memory

$ sudo apt-get remove lightdm

After this step you must reboot.

4. More speed

Remove processes not needed

$ sudo killall -9 NetworkManager  #(for faster system), {TODO in start the config? still needed?}

Because the size of the original image was 4.3 GB, you have to execute the following set of instructions to resize the partition to 8 GB:


5. Add more space

  1. Insert the micro SD card in your local machine´s card reader
  2. Use gparted to increase the size of the partition
$ sudo apt-get install gparted
$ sudo gparted

Install the prerequsites

Installing one package at a time is the best path to succes since it is likely during installation that you will be asked to re-run some of the commands with the "--fix-missing" option.

$ sudo apt-get install gtk2-engines-pixbuf
$ sudo apt-get install make #already latest
$ sudo apt-get install gcc #already latest
$ sudo apt-get install g++ #already latest
$ sudo apt-get install libgsl0-dev
$ sudo apt-get install gnuplot
$ sudo apt-get install libgnomecanvas2-dev
$ sudo apt-get install bzip2
$ sudo apt-get install git
$ sudo apt-get install libusb-dev
$ sudo apt-get install speech-dispatcher
$ sudo apt-get install glade
$ sudo apt-get install imagemagick 
$ sudo apt-get install libpcre3-dev
$ sudo apt-get install git-core
$ sudo apt-get install python-usb
$ sudo apt-get install python-lxml
$ sudo apt-get install python-wxgtk2.8
$ sudo apt-get install m4
$ sudo apt-get install python-yaml 
$ sudo apt-get install subversion
$ sudo apt-get install libglade2-dev libgnomeui-dev libgnomecanvas2-dev librsvg2-dev libgtkspell-dev libcanberra-gtk-dev --fix-missing
$ sudo apt-get install libsdl1.2-dev

Create a subdirectory where you will download and install all the libraries and other software tools needed. To keep your home dir tidy use a develop directory to store all the relevant downloads.

$ mkdir ~/develop
$ cd ~/develop/

OCAML

$ wget http://caml.inria.fr/pub/distrib/ocaml-4.00/ocaml-4.00.1.tar.gz
$ tar -xvzf ocaml-4.00.1.tar.gz 
$ cd ocaml-4.00.1
$ ./configure
$ make world
$ make opt
$ make ocamldoc
$ make ocamlbuild.native
$ make ocamlbuild.byte
$ sudo make install
$ sudo make installopt
$ ocaml -version  #(make sure you have the right version, meaning 4.00.1)
$ cd ~/develop

Opam tool

  1. Install the OCAML Opam tool
$ git clone https://github.com/OCamlPro/opam.git
$ cd opam
$ ./configure 
$ make (because of overheating you may get some errors, but keep doing 'make')
$ sudo make install
$ cd ~/develop
$ mkdir ~/.opam
$ opam init
$ eval `opam config env`

Please select yes.

$ sudo opam install ocamlfind
$ sudo opam install lablgtk 
$ sudo opam install pcre-ocaml
$ sudo opam install ocamlnet
$ sudo opam install xml-light

portability-support

  1. Get paparazzi-portability-support related files
$ sudo apt-get install  debhelper devscripts fakeroot build-essential autoconf automake autotools-dev dh-make xutils lintian pbuilder dh-ocaml tcl-dev libxt-dev libXt-devel
$ cd ~/develop
$ git clone https://github.com/paparazzi/paparazzi-portability-support.git
$ cd paparazzi-portability-support/linux/
$ sudo ./develenv.sh
$ cd ivy/
$ svn checkout http://svn.tls.cena.fr/svn/ivy/ivy-c/trunk ivy-c
$ cd ivy-c/src/

Patchthe Makefile with : Patch content:

--- Makefile.orig	2013-05-23 16:36:45.000000000 +0000
+++ Makefile	2013-05-23 16:32:22.000000000 +0000
@@ -28,6 +28,11 @@
	FPIC=
endif

+MACHINE = $(shell uname -m)
+ifeq ("$(MACHINE)", "armv7l")
+	FPIC = -fPIC
+endif
+

ifndef PREFIX
	export PREFIX=/usr/local
$ make all
$ sudo make install

IVY

IVY is a simple protocol and a set of open-source libraries and programs that allows applications to broadcast information through text messages, with a subscription mechanism based on regular expressions. The project can be found at: http://www2.tls.cena.fr/products/ivy/

In the paparazzi project, Ivy is used to send telemetry data to where ever you want.

NOTE: Do not confuse this IVY with the Apache Ivy project.

Ivy-OCAML

The Ivy-ocaml is a Library that make it possible to use Ivy via the Ocaml language.

$ cd ~/develop/paparazzi-portability-support/linux/ivy/
$ svn checkout http://svn.tls.cena.fr/svn/ivy/ivy-ocaml/trunk ivy-ocaml
$ cd ivy-ocaml/
$ make
$ sudo PATH=$PATH make install


Ivy-python

The ivy-python package makes it possible to use the IVY libraries from within the Python programming language. The ivy-python package is architecture independent, so it can be downloaded from the Ubuntu or Debian paparazzi repository. However since this is the from scratch page we will download it from the official source repository via

$ cd ~/develop/paparazzi-portability-support/linux/ivy/
$ svn co http://svn.tls.cena.fr/svn/ivy/ivy-python/trunk ivy-python
$ cd ivy-python/
$ sudo python setup.py install

Main sourcecode

Now all the prequisites are installed, finally we can grab a copy of the full Paparazzi project

$ cd ~
$ git clone https://github.com/paparazzi/paparazzi.git
$ cd paparazzi
$ export PPRZ_HOME=~/paparazzi/
$ export PAPARAZZI_HOME=~/paparazzi/
$ export PAPARAZZI_SRC=~/paparazzi/
$ make ground_segment

Calibrate your touchsreen

$ sudo apt-get install xinput_calibrate
$ X &
$ export DISPLAY=:0
$ xinput_calibrate

You will have to touch the center of the four circles. When you will have touched all four points, you will get a similar message on your command prompt.

--> Making the calibration permanent <--
 copy the snippet below into '/etc/X11/xorg.conf.d/99-calibration.conf'
Section "InputClass"

Identifier "calibration" MatchProduct "ADS7846 Touchscreen" Option "Calibration" "147 3917 3783 251"

EndSection

Note: each time you reboot you will need to start X server. Now, because we already started it to calibrate the screen, you can skip the next two commands. Only this time!

Fine, now lets start the X server.

$ X &

And make a display setting

$ export DISPLAY=:0

Finally, it's time to party, let's run the Paparazzi center

$ cd ~/paparazzi
$ ./paparazzi

Add this to the session

$ sw/ground_segment/cockpit/gcs -b 192.168.1:2010

Testing

Telemetry

Hardware list:

  1. Laptop with paparazzi softaware
  2. Gumstix board
  3. XBee module
  4. USB power hub
  5. UAV with RC transceiver and xbee module
  6. internet connection

Note: from the tests made, the xbee module won't be seen by the Gumstix board if it is not connected before you power up the system. For this tests, it was used this drone:

{TODO provide pictures} You can find here all the configuration files. Download them and copy them as it follows:

$ cd ~/paparazzi/conf/system/udev/rules/
$ sudo cp -av *rules /etc/udev/rules.d/
$ mkdir conf/radios/sergiu
$ cp conf/radios/sergiu ~Downloads/sergiu_mx22_pprz-ap.xml {TODO change the names with something more appropriate}
$ git remote -v
$ mkdir conf/airframes/sergiu
$ cp conf/airframes/sergiu ~/Downloads/orange.xml {TODO change file name}
$ cp conf/ ~/Downloads/conf.xml
$ cp conf/airframes/sergiu/ ~/Downloads/orange.xml
$ ./paparazzi

Download this tarball {TODO provide tarball} and extract it in /home/user/paparazzi/var/ . Inside you will find all the files needed to run paparazzi GCS with datalink.

{TODO provide files orange.xml,radio...xml, udev rules, config.xml; set datalink properly and explain how to build, upload, execute + print screens}

Add a joystick

{TODO add calibration steps}

$ cd ~/paparazzi/sw/ground_segment/joystick
$ make clean
$ make

In Paparazzi Center select Tool>>Joystick and make sure that the line looks like this:

/home/sergiu/paparazzi/sw/ground_segment/joystick/input2ivy -ac orange2 extreme_3d_pro.xml 

where '/sergiu' must be replaced with your user, 'orange2' with the name of your A/C and 'extreme_3d_pro.xml' with the name of your joystick.

Edited ~/paparazzi/conf/conf.xml .

opened tools: server /home/sergiu/paparazzi/sw/ground_segment/tmtc/server gcs /home/sergiu/paparazzi/sw/ground_segment/cockpit/gcs data link /home/sergiu/paparazzi/sw/ground_segment/tmtc/link -udp joystick /home/sergiu/paparazzi/sw/ground_segment/joystick/input2ivy -ac ardrone2_sdk extreme_3d_pro.xml messages /home/sergiu/paparazzi/sw/ground_segment/tmtc/messages real-time plotter /home/sergiu/paparazzi/sw/logalizer/plotter Notes: wireless connection in between the drone and laptop is required for data link.

Testing

{TODO: Describe here a first run with Paparazzi Sim}

onboard video

System identification

$ cat /proc/bus/input/devices

output

I: Bus=0019 Vendor=0000 Product=0006 Version=0000
N: Name="Video Bus"
P: Phys=LNXVIDEO/video/input0
S: Sysfs=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/input4
U: Uniq=
H: Handlers=kbd event4 
B: PROP=0
B: EV=3
B: KEY=3e000b 0 0 0 0 0 0 0

Install mplayer

$ sudo apt-get install mplayer2

to make sure that the program is working properly type

$ mplayer

and you are supposed to get a list of the options available.

Get image using mplayer, Terratec Grabby digitizer, 2.4GHz receiver, and a camera with 2.4 GHz transmitter:

$ dmesg

and look if your digitizer is registered as /dev/video0 which is the default or otherwise and replace bellow

$  mplayer tv:// -tv driver=v4l2:width=320:height=240:norm=NTSC:input=0:device=/dev/video0:noaudio

where

 inputs: 0 = Composite1; 1 = S-Video;

If 0 doesn't work for you, try with value 1. {TODO: video receiver connect description } {TODO: video digitizer a description }

Links

Links to related information