Author: darqoq

[Guide] Android + InfraRed (IR) + Kodi

[Copy link]

3

threads

41

posts

467

credits

Intermediate member

Rank: 3Rank: 3

credits
467
Published in 2015-11-9 12:17:05 | Show all floors
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| Published in 2015-11-9 18:49:26 | Show all floors
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 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

3

threads

41

posts

467

credits

Intermediate member

Rank: 3Rank: 3

credits
467
Published in 2015-11-9 19:40:29 | Show all floors
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
Published in 2015-11-10 00:53:25 | Show all floors
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 code
In SManager I set option "Fav", "Su" and "Boot".

3

threads

41

posts

467

credits

Intermediate member

Rank: 3Rank: 3

credits
467
Published in 2015-11-11 12:05:27 | Show all floors
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| Published in 2015-11-12 02:20:15 | Show all floors
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
Published in 2015-11-12 07:03:41 | Show all floors
You can add lines in the script
  1. echo "Insmod done!" > script.log
Copy code

And debag your problem.

3

threads

41

posts

467

credits

Intermediate member

Rank: 3Rank: 3

credits
467
Published in 2015-11-19 14:26:26 | Show all floors
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.


3

threads

41

posts

467

credits

Intermediate member

Rank: 3Rank: 3

credits
467
Published in 2015-11-19 14:29:47 | Show all floors
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
Published in 2015-11-20 16:45:18 | Show all floors
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 need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list