[FE training-materials-updates] We now provide the libusb source code

maxime.ripard at free-electrons.com maxime.ripard at free-electrons.com
Tue Jun 26 15:17:28 CEST 2012

- Log -----------------------------------------------------------------

commit 13ee7a8d465b1f9f6facc17bd062ef48b6929f83
Author: Maxime Ripard <maxime.ripard at free-electrons.com>
Date:   Tue Jun 26 15:16:12 2012 +0200

    We now provide the libusb source code
    Signed-off-by: Maxime Ripard <maxime.ripard at free-electrons.com>

diff --git a/labs/android-native-app/android-native-app.tex b/labs/android-native-app/android-native-app.tex
index 53c247c..3060cae 100644
--- a/labs/android-native-app/android-native-app.tex
+++ b/labs/android-native-app/android-native-app.tex
@@ -7,32 +7,11 @@ After this lab, you will be able to:
   \item Express dependencies on other components of the build system
-\section{Develop the application}
+\section{Add the binary to the compiled image}
 Copy the \code{mlbin.c} file from the
 \code{/home/<user>/felabs/android/native-app} directory and put it
 into the \code{external/ml} folder.
-As you can see, the application is almost empty, so you need to fill
-it with the appropriate code. You will need to implement an
-initialization function, basic functions to control the launcher and
-finally a freeing function.
-You will need the \code{libusb_init}, \code{libusb_get_device_list},
-\code{libusb_get_device_descriptor}, \code{libusb_open},
-\code{libusb_detach_kernel_driver} and \code{libusb_claim_interface}
-functions to initialize our program, the matching functions to exit
-properly are \code{libusb_exit}, \code{libusb_close}
-and \code{libusb_reclaim_interface}.
-You can send an instruction by using the code
-unsigned char[] data = {0x5f, ACTION, 0xe0, 0xff, 0xfe};
-libusb_control_transfer(devh, 0x21, 0x09, 0, 0, data, 5, 300};
-\section{Add the binary to the compiled image}
 Just as for \code{libusb}, you now need to make an \code{Android.mk} file
 giving all the details needed by the build system to compile. But
 unlike \code{libusb}, this binary is an executable and depends on another
@@ -42,6 +21,8 @@ Make it compile and be integrated in the generated images. Once you
 have the images, boot the board, plug a missile launcher and test the
 application. You should see the launcher move.
+\section{Fix the Problems}
 However, when you start your tests, you will find that \code{libusb} cannot open
 the usb devices because of restricted permissions. This can be fixed
 through \code{ueventd.rc} files. Add a device-specific \code{ueventd}


Summary of changes:
 labs/android-native-app/android-native-app.tex |   25 +++---------------------
 1 file changed, 3 insertions(+), 22 deletions(-)

More information about the training-materials-updates mailing list