Firefly Open Source Community

   Login   |   Register   |
New_Topic
Print Previous Topic Next Topic

how to control GPIO in Android application?

27

Credits

0

Prestige

0

Contribution

new registration

Rank: 1

Credits
27

how to control GPIO in Android application?

Posted at 9/7/2015 09:34:29      View:6387 | Replies:7        Print      Only Author   [Copy Link] 1#
Hi,
I want to create android application that is able to control GPIO, LED, Serial port.
I've searched a lot but can't get enough good answer.

I know it uses JNI interface in android app, but do now know in driver side.

would you give me effective example?

thanks
Jay
Reply

Use props Report

403

Credits

10

Prestige

12

Contribution

intermediate

Rank: 3Rank: 3

Credits
403
Posted at 9/7/2015 18:02:01        Only Author  2#
Last edited by busybee In 9/7/2015 18:10 Editor

Please reference:
- http://falsinsoft.blogspot.jp/20 ... nux-user-space.html
- http://android.serverbox.ch/?p=972

Make sure your program has access permission to the files.
Reply

Use props Report

27

Credits

0

Prestige

0

Contribution

new registration

Rank: 1

Credits
27
Posted at 9/9/2015 10:09:42        Only Author  3#
thanks for your reply.

would you give me more explanation?
how can I access UART serial by using TX, RX, GRD?
I need a specific guide or code..
Reply

Use props Report

403

Credits

10

Prestige

12

Contribution

intermediate

Rank: 3Rank: 3

Credits
403
Posted at 9/11/2015 10:33:57        Only Author  4#
zamster Posted at 9/9/2015 10:09
thanks for your reply.

would you give me more explanation?

First refer to the uart driver wiki:
http://wiki.t-firefly.com/index.php/Firefly-RK3288/UART/en

If you are using uart3, you can access /dev/ttyS3.
Then google for "Linux serial programming", which will give you a bunch of
documents and examples. One is:

http://www.comptechdoc.org/os/li ... inux_pgcserial.html
Reply

Use props Report

27

Credits

0

Prestige

0

Contribution

new registration

Rank: 1

Credits
27
Posted at 9/11/2015 16:27:33        Only Author  5#
busybee Posted at 9/11/2015 10:33
First refer to the uart driver wiki:
http://wiki.t-firefly.com/index.php/Firefly-RK3288/UART/en
...

thanks.

one more question.
Do I have to make new uart driver for uart communications?
(if I'm using uart3 I can just access /dev/ttyS3 without making new uart driver..)
Reply

Use props Report

403

Credits

10

Prestige

12

Contribution

intermediate

Rank: 3Rank: 3

Credits
403
Posted at 9/11/2015 17:42:24        Only Author  6#
Same uart driver is already configured builtin for all the uart devices.  
No need to make new one.
Reply

Use props Report

27

Credits

0

Prestige

0

Contribution

new registration

Rank: 1

Credits
27
Posted at 9/11/2015 17:59:56        Only Author  7#
Last edited by zamster In 9/11/2015 18:23 Editor

in the middle of page (http://wiki.t-firefly.com/index.php/Firefly-RK3288/UART/en),
what is meaning of "Turn on CONFIG_SERIAL_ROCKCHIP in kernel configuration"?

Compile and Flash KernelTurn on CONFIG_SERIAL_ROCKCHIP in kernel configuration, which will add corresponding drivers/tty/serial/rk_serial.c to kernel. Then compile the kernel as followed:
make firefly-rk3288.img
Reply

Use props Report

403

Credits

10

Prestige

12

Contribution

intermediate

Rank: 3Rank: 3

Credits
403
Posted at 9/12/2015 10:53:25        Only Author  8#
Add:
  CONFIG_SERIAL_ROCKCHIP=y
in your kernel/.config file
Reply

Use props Report

You need to log in before you can reply Login | Register

This forum Credits Rules

Quick Reply Back to top Back to list