More about gpio:
I started the gpio test with an old BPI-M2 (Android 4.4) and worked ok with ADB and with an usb cable from a PC and also worked ok with Android Terminal apk directly from BPI M2. I noticed that if the gpio test commands are called from the Android Shell directly (without ADB), “su” is mandatory before doing setenforce.
In anyway, I am not able to get running the gpio Shell commands with JAVA & Android Studio, I think it shouldn’t be very difficult, at least in BPI-M2 because Android 4.4 is stock rooted.
In a BPI-M64, I can manage gpio from ADB with the PC and with an usb cable, but I am not able to manage GPIO with the Android Shell, “su” isn’t implemented. Of course, if Android Shell don’t support the su command, calling Shell commands from JAVA will not work to manage GPIO.
In the Android Studio documentation, the unique paragraph that gives info about the GPIOs, is Android Things but looks that BPI needs to be installed Android things, or I can choose Android 6.0+Android Things to create the Project? (I think that things commands are incompatible with an Android 6.0.1 OS based device.
Pls, advanced users and BPI team,
- How can I call to gpio Shell commands from JAVA, or how to manage GPIOs in JAVA? or isn’t the right way?
- I read that exist a WiringPi library and also a WiringBP, special library for BPI products (including M2 and M64), writed in C. How can I use this libraries and write my own app in Studio or in what another way can I get an Android app that manages GPIOs (alternative to Studio)?
- What about Android things and pure Android compatibility? It’s necessary that Android things be installed in the BPI or with a pure Android will be enought?
I am sorry if I am doing simple questions but isn’t exists any documentation in the forum nor in the BPI wiki, Gibhub or Gitbook so any support Will be helpfull.
edit: More libraries: The Pi4J Project (Java API for accessing GPIO, PWM, I2C, SPI, UART)
Pls, support, thanks in advance!!