Please select To the mobile version | Continue to access the desktop computer version

OrangePi

 Login            
 Register            
Search
Hot search: orangepi
Author: darqoq

[Guide] Android + InfraRed (IR) + Kodi

[Copy link]

1

Threads

37

Posts

396

Credits

Intermediate member

Rank: 3Rank: 3

Credits
396
Post time 2015-11-9 12:17:05 | Show all posts
warik replied at 2015-11-2 02:20
I make script file and use Script Manager.
My script:

Can you advise how you use the script manager in enabling the IR receiver on boot?
I am able to use  my IR remote to control the Android, however it is tiring to enable the service each time after i power up the orange pi pc.

I had tried saving your script in a file s.sh, and had saved it in /system/etc/init.d/
I had chmod 777 to the script file s.sh
I had set the script to be favorite, su and boot in Script Manager, however I just couldn't get the IR remote to work upon boot.

Please advise in detail how you use the script manager in enabling your script file to execute.

Thanks
 Author| Post time 2015-11-9 18:49:26 | Show all posts
darkwing_duc replied at 2015-11-9 04:38
I am running opi2_lobo_Android_v2.img installed on an sd card on an orange pi plus.
when i try to d ...

try chmod  from busybox
  1. busybox chmod a+x /system/bin/evtest
Copy the Code
probably you have got chmod linked from toolbox.
Also you can find other busyboxes on your system (I found three busyboxes :-) in different locations)

Orange PI PC

1

Threads

37

Posts

396

Credits

Intermediate member

Rank: 3Rank: 3

Credits
396
Post time 2015-11-9 19:40:29 | Show all posts
darkwing_duc replied at 2015-11-9 11:38
I am running opi2_lobo_Android_v2.img installed on an sd card on an orange pi plus.
when i try to d ...


It works for me with:
chmod 777 /system/bin/evtest




2

Threads

36

Posts

1443

Credits

Gold member

Rank: 6Rank: 6

Credits
1443
Post time 2015-11-10 00:53:25 | Show all posts
goondu replied at 2015-11-9 12:17
Can you advise how you use the script manager in enabling the IR receiver on boot?
I am able to us ...

I install SManager on Android. After this I add folder "Script" on SD card and make file "kodi-ir-remote-control". In file I add this code:
  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 the Code
In SManager I set option "Fav", "Su" and "Boot".

1

Threads

37

Posts

396

Credits

Intermediate member

Rank: 3Rank: 3

Credits
396
Post time 2015-11-11 12:05:27 | Show all posts
Edited by goondu at 2015-11-11 12:42
warik replied at 2015-11-10 00:53
I install SManager on Android. After this I add folder "Script" on SD card and make file "kodi-ir- ...

That's what I have tried. Unfortunately I still have no luck.

It seems:
insmod /system/vendor/modules/sunxi-ir-rx.ko won't open, when it was call in a shell script. Even though I had chmod 777 to sunxi-ir-rx.ko. Any advise?

I would love to have the ir remote to be able to use upon boot, thus I had tried hard for this to work.  Any advise welcome.
 Author| Post time 2015-11-12 02:20:15 | Show all posts
goondu replied at 2015-11-11 05:05
That's what I have tried. Unfortunately I still have no luck.

It seems:

MAybe you are using wrong insmod.
I noticed that some command works other not (I have some problems with chmod, modprobe, insmod, mount),
Some of them are standalone apps some are linked from toolbox, or busybox (try use busyboxes from other locations, I have got 3 busyboxes).

Orange PI PC

2

Threads

36

Posts

1443

Credits

Gold member

Rank: 6Rank: 6

Credits
1443
Post time 2015-11-12 07:03:41 | Show all posts
You can add lines in the script
  1. echo "Insmod done!" > script.log
Copy the Code

And debag your problem.

1

Threads

37

Posts

396

Credits

Intermediate member

Rank: 3Rank: 3

Credits
396
Post time 2015-11-19 14:26:26 | Show all posts
warik replied at 2015-11-12 07:03
You can add lines in the script

And debag your problem.




Thanks, after spending much time on it, manage to get the start-up script to work.


1

Threads

37

Posts

396

Credits

Intermediate member

Rank: 3Rank: 3

Credits
396
Post time 2015-11-19 14:29:47 | Show all posts
darqoq replied at 2015-11-12 02:20
MAybe you are using wrong insmod.
I noticed that some command works other not (I have some problem ...



Thanks for your suggestion on busybox, indeed it requires busyboxes for mount and insmod.

3

Threads

165

Posts

1203

Credits

Gold member

Rank: 6Rank: 6

Credits
1203
Post time 2015-11-20 16:45:18 | Show all posts
I also had "problems" with start-up script.
The upside of using Tronfy X2 image is that it in fact has init.d . So I just added this script to init.d and it initially worked partly. At first it didn't work at all. Then it did the insmod, but didn't start lircd. And after playing around for an hour, I've found the solution.
I had to change 3 things:
1) Change Superuser to SuperSU
2) Install busybox in /system/bin
3) Chmod sunxi-ir-rx.ko to 777

It now works great!
You have to log in before you can reply Login | Register

Points Rules

Archiver|Mobile edition|Darkroom|OrangePi En ( 粤ICP备14086627号-2

2019-11-19 00:17 GMT+8 , Processed in 0.032220 second(s), 19 queries .

Powered by Discuz! X3.2

© 2014-2015 orangepibbs en.

Quick Reply To Top Return to the list