Controling the Port Pins of Dragon Board 410C from Android App

Hi Everyone,
I would like to control the Port pins of DragonBoard 410C from Android Application.
What should do for that? any good document that shows how to blink a LED ?

Also interested to know implement UART on ports.

thanks,
Ashok R

refer LEDS section in arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi

read about linux,default-trigger , there will be sysfs entry also to use it in userspace “/sys/class/leds”

Hi Vinay,

I am new to this board, can you explain little more ? what is apq8016-sbc.dtsi?

Thanks,
Ashok R

.dtsi is the device tree for the board.
dtbs are generated with this .dtsi.

You need to read more to build the kernel, compiling, customizing, then you will be able to understand clearly the dtsi

http://builds.96boards.org/releases/dragonboard410c/linaro/ubuntu/latest/#tabs-1

Thanks Vinay! Let me look into this

Hi Vinay,
The link you provide is for creating linux boot image ? actually i am looking for android.

thanks,
Ashok R

Hi @Asokfair

Try this document https://developer.qualcomm.com/download/db410c/gpio-usage-low-speed-connector-application-note.pdf, it doesn’t exactly tell you how to access a GPIO from an app, but it does show how to access a GPIO from the command line.

Full disclosure, I am an employee of Qualcomm Canada. Any opinions expressed in this or any other post may not reflect the opinions of my employer.

Thank you so much @ljking ! let me check it

Hi Everyone,

I tried to control GPIO from adb command window, was working fine,

But when i try to control from Android App , its not working.

 command  = "echo 1 > /sys/class/gpio/gpio938/value"

try {
Process su = Runtime.getRuntime().exec("su -c " + command);
su.waitFor();
} catch (InterruptedException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}

Hi @asokfair!

I would like to know if you could finish your app, I am having the same problem and I have not solved it yet. I would like to have a guide of it or something that could help me to make work my app.

Also, I want to interface my Dragon Board 410c with a camera vía UART (and build an app for it as well). Any help would be awesome.

Thank you in advance.