Page 1 of 1

gpio and android

Posted: Fri Aug 03, 2012 6:38 am
by wussie
Is there any way to interface with and use the gpio pins while running Android? Some of the things I want to do with the pi require the gpio pins. Thanks!

Re: gpio and android

Posted: Fri Aug 03, 2012 4:30 pm
by aaa801
I wouldnt recommend it

Re: gpio and android

Posted: Fri Aug 03, 2012 5:24 pm
by 6677
If you want to use the GPIO just go back to debian/rasbian/other linux distro

Re: gpio and android

Posted: Fri Aug 03, 2012 5:48 pm
by wussie
Ah, but what I want android will give me while Linux won't. I suppose I can convert what I want over to USB hid.

Re: gpio and android

Posted: Fri Aug 03, 2012 9:45 pm
by 6677
wussie wrote:Ah, but what I want android will give me while Linux won't
Theres not really anything that android gives that debian won't

Re: gpio and android

Posted: Sat Aug 04, 2012 4:54 am
by wussie
Netflix

Re: gpio and android

Posted: Sat Aug 04, 2012 1:10 pm
by 6677
Netflix relies on the DRM server being available, in all the current android ports this is missing (some sort of compatibility or licensing issue on the pi). So really you've lost your only advantage

Re: gpio and android

Posted: Sat Aug 04, 2012 3:27 pm
by wussie
6677 wrote:Netflix relies on the DRM server being available, in all the current android ports this is missing (some sort of compatibility or licensing issue on the pi). So really you've lost your only advantage
That sucks about the DRM issue, I really wish Netflix used HTML5 or another DRM solution other than silverlight. Netflix isn't my only reason for wanting to use Android on my Pi though. It was just the main reason. I intend to create a game console / media center based on my Pi and using the GPIO pins would make it cheaper and easier to interface the controllers I want to use. Perhaps I'll get lucky and the issue will get resolved in the next month or so when the foundation backed ICS port is released. I likely won't be finished with my build until then anyway. Thank you for your help 6677!

Re: gpio and android

Posted: Sat Aug 04, 2012 7:08 pm
by aaa801
wussie wrote:
6677 wrote:Netflix relies on the DRM server being available, in all the current android ports this is missing (some sort of compatibility or licensing issue on the pi). So really you've lost your only advantage
That sucks about the DRM issue, I really wish Netflix used HTML5 or another DRM solution other than silverlight. Netflix isn't my only reason for wanting to use Android on my Pi though. It was just the main reason. I intend to create a game console / media center based on my Pi and using the GPIO pins would make it cheaper and easier to interface the controllers I want to use. Perhaps I'll get lucky and the issue will get resolved in the next month or so when the foundation backed ICS port is released. I likely won't be finished with my build until then anyway. Thank you for your help 6677!
Mhm, you know you can just use the usb ports for controllers right :P

Re: gpio and android

Posted: Sat Aug 04, 2012 8:35 pm
by wussie
I'm putting my pi into an old nes, interface the original controller ports directly to the gpio pins, relatively easy to do and cheaper than converting them over to USB using a teensy or other avr. What I want is still possible using USB, and I'll have an open USB port on my hub, but I digress. I wanted to use Android from the start, but after seeing what happened with the first port of ICS figured it was much farther away so started working with raspbmc to get what I want. I know there are dev options for android, especially to interface with an arduino or the ioio, but wanted to know if I could do something with the gpio and port the code over to android for polling the nes controllers.

Re: gpio and android

Posted: Sat Aug 04, 2012 10:44 pm
by 6677
Maybe you should pop into one of the android dev threads and see if they are willing to expose some sort of GPIO interface. They might not be willing to but always worth a shot.

Re: gpio and android

Posted: Sat Aug 04, 2012 10:46 pm
by axelbarry00
Hello,
I also need to manage Android RPI gpio because I'g like to migrate an existing application based on Android 4.0.3 to RPI interfacing it (via the gpio) to buttons and encoders.
Do you know if exists a roadmap (by google or raspberry foundation) that foresee the developing of dedicated api's to manage gpio and other interface pins?
Is it possible that some of the GPIO are natively recognized as volume, power (etc.) buttons?
Any other option in case api doesn't exist yet?....really none? :o
Thank you for your support.
Have a nice WE

Re: gpio and android

Posted: Sat Aug 04, 2012 11:12 pm
by aaa801
wussie wrote:I'm putting my pi into an old nes, interface the original controller ports directly to the gpio pins, relatively easy to do and cheaper than converting them over to USB using a teensy or other avr. What I want is still possible using USB, and I'll have an open USB port on my hub, but I digress. I wanted to use Android from the start, but after seeing what happened with the first port of ICS figured it was much farther away so started working with raspbmc to get what I want. I know there are dev options for android, especially to interface with an arduino or the ioio, but wanted to know if I could do something with the gpio and port the code over to android for polling the nes controllers.
Look into the android ndk, it compiles against the android libraries, however youd have to make and implement the gpio library =/

Re: gpio and android

Posted: Sun Aug 05, 2012 1:40 am
by wussie
aaa801 wrote: Look into the android ndk, it compiles against the android libraries, however youd have to make and implement the gpio library =/
I'll take a look at it and see if I can get it working for me, thanks!

Re: gpio and android

Posted: Sun Aug 05, 2012 9:27 pm
by axelbarry00
Hi again..what do you think about using wiring pi libraries including the C code of these libraries via Android ngk (as you already suggested)? The creator of this library told ( https://projects.drogon.net/raspberry-p ... omment-320) that it works at kernel level (are closer to drivers than api libraries) so,since android works on linux kernel,it should work,right?
It would be a good solution... :)

Re: gpio and android

Posted: Sun Aug 05, 2012 10:32 pm
by aaa801
axelbarry00 wrote:Hi again..what do you think about using wiring pi libraries including the C code of these libraries via Android ngk (as you already suggested)? The creator of this library told ( https://projects.drogon.net/raspberry-p ... omment-320) that it works at kernel level (are closer to drivers than api libraries) so,since android works on linux kernel,it should work,right?
It would be a good solution... :)
should be fine
our kernel is based off the latest stable kernel with the rpi patchs
Not sure if we have the gpio patchs tho
Ask mathijs

Re: gpio and android

Posted: Mon Aug 06, 2012 11:59 am
by kolk

Re: gpio and android

Posted: Mon Aug 06, 2012 9:27 pm
by axelbarry00
Yes,from what I understood,wiring pi is based on these drivers.
Thank you for the link kolk..
Let's keep in touch guys!!

Re: gpio and android

Posted: Tue Aug 07, 2012 7:15 am
by kolk
Also you need to port
http://git.kernel.org/?p=linux/kernel/g ... .c;hb=HEAD
to use linux SPI framework.