Bumping this thread On Thursday, June 5, 2014 4:47:42 PM UTC+5:30, reubeni...@gmail.com wrote: > > Hi Everybody, > We have with us a BeagleBone Black rev B. We have TI's pre-built JB 4.2.2 > image running on it. > > We also have CCSv5 installed on our Ubuntu laptop, and are able to connect > and load sample applications on the Bone, using SDK as well as NDK. > For some reason, NDK(or JNI apps) aren't debuggable, in the sense that > execution doesn't stop at inserted breakpoints. > > Now, to control the GPIO's, we need root access. I've read somewhere on > this forum that the TI image is already rooted. > Also, through ADB, if for eg ,we want to toggle an LED attached to GPIO, > we have to type the following into ADB shell. > > root@android:/ # echo 53 > /sys/class/gpio/export > root@android:/ # echo "out" > /sys/class/gpio/gpio53/direction > for LED on > root@android:/ # echo 1 > /sys/class/gpio/gpio53/value > for LED off > root@android:/ # echo 0 > /sys/class/gpio/gpio53/value > > We are trying to toggle an LED through an app i.e. apk file. Obviously, we > are coding using the SDK. Attached is the app source code. > We referred the source code of ToogleLED.apk available from > http://olimex.wordpress.com/2013/05/23/a10s-olinuxino-android-gpio-control-led-toggle-app/ > > Both the files are zipped into one and available at 2 zip files > <http://www.fileconvoy.com/dfl.php?id=g608e889f70dd39da999512511291808fb6c275d70> > > which is also attached. We have written a very simple app, so that > debugging is not a headache, optimization will be done later. > > Please see the source code now. We have the following doubts/queries: > 1) In the Manifest file : > <uses-permission android:name="android.permission.HARDWARE_TEST" /> > <uses-permission android:name="android.permission.BLUETOOTH" /> > > These permissions are notified to the user while installing the App. DOES > IT MEAN THAT THE APP NOW HAS ACCESS TO THE REQUESTED RESOURCES ? > Or do we have to include some android/java libraries for explicit > permission ? > > 2) The Android Doc for "android.permission.HARDWARE_TEST" says, from Android > Manifest - Hardware > <http://developer.android.com/reference/android/Manifest.permission.html#HARDWARE_TEST> > Allows access to hardware peripherals. Intended only for hardware > testing. > Not for use by third-party applications. > Is this permission enough for access to GPIO's ? > > 3) from the adb shell we see : " root@android:/ # " > Does this mean that the image is rooted ? > > 4) Most imp. question : Why doesn't this code work ? > Refer the functions : "outputLow" and "outputHigh" > > 5) Is there a way to access GPIO's through JNI, i.e. for eg, without using > "exec" function(which consumes time) ? > > 6) Is there anyone here who has a fully functioning app written. Can you > share the source code so that we can compare and learn ? >
-- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.