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.

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?

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

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.

Ashok R

Hi @Asokfair

Try this document, 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);
} catch (InterruptedException e) {
} catch (IOException e) {

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.