Powering On a OrangePi PC with infrared remote control

  • Hello,

    I need to use my OPI-PC for Live TV and its working flawlessly for Mpeg 2 TV channels (miss deinterlacing).

    My TV doesn't have CEC, so I grab a infrared remote control for X96 mini and it is working, including Power Off.

    Is it possible to Power On the device with that remote.

    I did a little research and didn't find anything about that.

  • Go to Best Answer
    • Official Post

    TL;DR: Technically yes, but it won't be implemented in near future

    Long version:

    Such things are handled by AR100 coprocessor, which is unused for now. There is firmware in work for this coprocessor, called "crust" (currently only for 64-bit SoCs IIRC). I'm not sure how far it is and how much it will interfere with normal Linux drivers. I'm not fan of leaving control of peripherals to some firmware if it is not necessary. Actually, I'm not fan of firmwares at all (open source or otherwise), but I have to live with ATF and potentially with AR100 FW, if someone provide simple, unintrusive FW.

  • Thanks @jernej

    I learn something new from you every day :)

    Did a little search for this coprocessor and for what is used.

    Obviously I'll have to live without these extras.

  • I'm not sure when AW started adding low power coprocessors. I think early SoCs don't have it, but A64 has it.

    Some wake up options must be done using coprocessor, but simple ones, like power button press might be easily done already by marking it's interrupt as a wake up source in DT. If IR interrupt would be marked as a wake up source, board would be woken up even when a light in the room is turned on.

  • TL;DR: Technically yes, but it won't be implemented in near future

    Long version:

    Such things are handled by AR100 coprocessor, which is unused for now. There is firmware in work for this coprocessor, called "crust" (currently only for 64-bit SoCs IIRC). I'm not sure how far it is and how much it will interfere with normal Linux drivers. I'm not fan of leaving control of peripherals to some firmware if it is not necessary. Actually, I'm not fan of firmwares at all (open source or otherwise), but I have to live with ATF and potentially with AR100 FW, if someone provide simple, unintrusive FW.

    Well, I agree with you. But, I'm also interested in turning on the orange PI 3 using IR.

    Actually, I'm trying to learn this. And check if it's even possible modify the current Orange PI 3 build with patches to activate this. Found some related post from you, jernej in internet (How to: setup wakeup with your IR remote control - Openelec - OrangePi - Powered by Discuz!), something you recommend to read or to start trying to activate this?

    I'm not asking "to implement this", just begin curious.

  • Gatuno unfortunately method described there is totally incompatible with mainline kernel. That's why there is work being done on crust firmware, which should be compatible with mainline and more importantly, being open source. I suggest you start here: GitHub - crust-firmware/crust: SCP firmware for sunxi SoCs

    It's possible to patch LE build system to do anything, question is only if it is worth it or it will collide with something else.

  • I got the whole view. First, we would need to patch u-boot and atf. Second, generate the crust firmware and include it as binary blob. Third, send commands to the arisc-crust firmware???

    And jernej, you are right, I didn't even found anything about IR in the crust firmware source code. Seems like everything needs time. Thanks for your reply.

  • Sorry for bumping up such an old thread.

    I remember that about 5 years ago, waking up by IR remote control worked on Orange Pi PC running OpenELEC.

    jernej, is it possible to achieve this nowadays with LibreELEC?

  • dando Current crust firmware (v0.6) supports NEC, extended NEC and RC6 infrared protocols. So your remote control must be using one of this protocols.

    By default it is enabled and built with:

    CONFIG_CIR_PROTO_RC6=y
    CONFIG_CIR_WAKE_CODE=0x800f040c

    It seems that the only way to change these settings is to build LE image (or at least crust and u-boot) from source.

    I just tried and it works :)

  • Many thanks for the helpful answer, myokaski!

    I trained my MX3 remote to use the KEY_POWER code from rc6_mce. Now I can wake the Orange Pi PC up successfully.

    Hopefully it would be easier to change CONFIG_CIR_WAKE_CODE in the future, as then one can be much more flexible with the choice of remote control.