please choosego to mobile | Continue to access the PC version
Author: darqoq

[Guide] Android + InfraRed (IR) + Kodi

[Copy link]
 Author| Published in 2015-10-23 23:55:29 | Show all floors
Edited by darqoq at 2015-10-23 16:57
Dima replied at 2015-10-23 15:59
(... )the tutorial has to be corrected in some places (...)

I fixed paths, and changed start_lircd.sh on mega, thanx.

For other distro you can use any other paths you needs, then you have to only fix path in start_lircd.sh.
This guide it is only example, so you can adjust it as you needs.


Orange PI PC

2

threads

36

posts

1443

credits

Gold member

Rank: 6Rank: 6

credits
1443
Published in 2015-10-26 08:02:22 | Show all floors
Edited by warik at 2015-10-26 08:05

Hello,

I have some problem.
If i start start_lircd.sh and run command /systembin/irw /dev/lircd i don't see anything message on konsole. Remmote not work. But! After i stop stop_lircd.sh and run command /system/bin/evtest /dev/input/event4 i see data and remote work and send ir commands. What could be the problem? I use opi2_lobo_Android_v3.img.xz and new your files on mega.

Sorry for my english. Thank you!
lircd.conf:
  1. # Please make this file available to others
  2. # by sending it to <lirc@bartelmus.de>
  3. #
  4. # this config file was automatically generated
  5. # using lirc-0.9.1-git(devinput) on Sun Oct 25 22:41:53 2015
  6. #
  7. # contributed by
  8. #
  9. # brand: /etc/lircd/lircd.conf
  10. # model no. of remote control:
  11. # devices being controlled by this remote:
  12. #

  13. begin remote

  14. name devinput
  15. bits 56
  16. eps 30
  17. aeps 100

  18. one 0 0
  19. zero 0 0
  20. pre_data_bits 8
  21. pre_data 0x0
  22. gap 39967
  23. toggle_bit_mask 0x0

  24. begin codes
  25. KEY_0 0x01005500000001
  26. KEY_1 0x01000900000001
  27. KEY_2 0x01001D00000001
  28. KEY_3 0x01001F00000001
  29. KEY_4 0x01001900000001
  30. KEY_5 0x01001B00000001
  31. KEY_6 0x01001100000001
  32. KEY_7 0x01001700000001
  33. KEY_8 0x01001200000001
  34. KEY_9 0x01005900000001
  35. KEY_AUDIO 0x01000800000001
  36. KEY_MENU 0x01004700000001
  37. KEY_VIDEO 0x01004A00000001
  38. KEY_VOLUMEUP 0x01000600000001
  39. KEY_VOLUMEDOWN 0x01005E00000001
  40. KEY_UP 0x01000500000001
  41. KEY_DOWN 0x01000F00000001
  42. KEY_LEFT 0x01000700000001
  43. KEY_RIGHT 0x01000200000001
  44. KEY_ENTER 0x01004000000001
  45. KEY_NEXT 0x01004500000001
  46. KEY_MUTE 0x01005700000001
  47. KEY_STOP 0x01004400000001
  48. KEY_ZOOM 0x01005200000001
  49. KEY_PLAYPAUSE 0x01005100000001
  50. KEY_SUBTITLE 0x01001500000001
  51. KEY_POWER 0x01001400000001
  52. KEY_PREVIOUS 0x01000100000001
  53. end codes

  54. end remote
Copy code


 Author| Published in 2015-10-26 16:17:49 | Show all floors
Edited by darqoq at 2015-10-26 11:41
warik replied at 2015-10-26 01:02
Hello,

I have some problem.


First, of all try:

1. /system/bin/lircd --uinput -H devinput -d /dev/input/event4 /etc/lircd/lircd.conf --pidfile=/etc/lircd/lircd.pid --output=/dev/lircd -L /etc/lircd/lircd.log
then /system/bin/irw /dev/lircd, then start pressing button on your remote.


2. If still not working download files form "debug" folder (on my mega) and replace on your Android, then
run start_lirc_debug.sh then /system/bin/irw /dev/lircd, then start pressing button on your remote.
Read log (/etc/lircd/lircd.log) and find your problem.






Orange PI PC

2

threads

36

posts

1443

credits

Gold member

Rank: 6Rank: 6

credits
1443
Published in 2015-10-26 20:01:05 | Show all floors
Edited by warik at 2015-10-26 20:09

In log i see:
  1. Oct 26 11:56:31 localhost lircd: lircd(devinput) ready, using /dev/lircd - this line add after i run start_lircd.sh
  2. Oct 26 11:56:35 localhost lircd: accepted new client on /dev/lircd - this line add after i run /system/bin/irw /dev/lircd
  3. Oct 26 11:56:51 localhost lircd: removed client - this line add after i press CTRL+C on command /system/bin/irw /dev/lircd
  4. Oct 26 11:56:56 localhost lircd: caught signal - this line add after i stop lircd stop_lircd.sh
Copy code


 Author| Published in 2015-10-26 22:10:41 | Show all floors
Edited by darqoq at 2015-10-26 15:11

You should use start_lirc_debug.sh (not start_lirc.sh) and also replace lircd from mega debug folder.
Debug wersion (bin and script) uses debug level=7, so you should see more informations in log.
Orange PI PC

0

threads

1

posts

6

credits

Novice

Rank: 1

credits
6
Published in 2015-10-28 00:28:45 | Show all floors
Hi.
How I can set auto run command "/system/bin/start_lirc.sh"?
And how auto open app Kodi?
  
 Author| Published in 2015-10-28 03:53:44 | Show all floors
Alex_ua31 replied at 2015-10-27 17:28
Hi.
How I can set auto run command "/system/bin/start_lirc.sh"?
And how auto open app Kodi?

1. You can try use /init.rc (start_lircd.sh)
2. https://play.google.com/store/apps/details?id=imoblife.startupmanager
Orange PI PC

2

threads

36

posts

1443

credits

Gold member

Rank: 6Rank: 6

credits
1443
Published in 2015-11-2 02:20:34 | Show all floors
I make script file and use Script Manager.
My script:
  1. #!/system/bin/sh
  2. mount -o remount,rw /system
  3. rmmod sunxi_ir_rx
  4. insmod /system/vendor/modules/sunxi-ir-rx.ko
  5. /system/bin/start_lircd.sh
  6. am start -n org.xbmc.kodi/org.xbmc.kodi.Splash
Copy code

0

threads

2

posts

21

credits

Novice

Rank: 1

credits
21
Published in 2015-11-3 23:26:40 | Show all floors
Hello

I have a issue that some of you may have. After verifying that the IR module was loaded i event test it and it receives signals from a cheap remote that came with a digital picture frame. I also tested it with different remotes, Samsung TV, Grundig home cinema, MCE RC6 remotes ( from diferent brands ) and none of them are capable of send signals. I started digging and found the IR module VS 838 that is used an my orange pi pc can work in the same frequency has the MCE RC6 remotes. This leads me to conclude that the problem is related with software. I suspect that the problem is related with the module "sunxi-ir-ux.ko". Is there a different module i can use, or is the module dependent form the kernel or any other part of the operative system that doesn't allow it to be changed.

Best Regards to All

0

threads

3

posts

21

credits

Novice

Rank: 1

credits
21
Published in 2015-11-9 11:38:08 | Show all floors
Edited by darkwing_duc at 2015-11-9 11:39

I am running opi2_lobo_Android_v2.img installed on an sd card on an orange pi plus.
when i try to do step 6 after typing in

chmod a+x /system/bin/evtest

it returns

Bad mode

what am i doing wrong and thanks in advance.
You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list