Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Not an issue) Trying to make this work on Android using the ConsumerIRManager class #13

Open
colistro123 opened this issue Dec 27, 2019 · 1 comment

Comments

@colistro123
Copy link

colistro123 commented Dec 27, 2019

Hello,
I recently ported this to Android using C#, hoping I could turn on/off my AC using the IR blaster on my phone. I wonder if there's any differences when transmitting data between IRremote and the ConsumerIRManager class I may be unaware off. I'm using a pre-1995 AC unit (WMA Series) with an electra remote P/N 436000. Not sure what the IR protocol on these remotes are, may be RC-5/RC-6 perhaps, I saw sites stating RC-7, but I couldn't find anything on said protocol, so that may be misleading.

Here's the code I ported:
https://github.com/colistro123/IRelectra-android-port

This is where IR signals get sent via the device's IR Blaster:
https://github.com/colistro123/IRelectra-android-port/blob/master/IRelectra.cs#L145

And this is the remote I couldn't find anything on:

Just looking for something that could lead me in the right direction perhaps, thanks in advance!

Update:

Soldered an audio jack to the IR transmitter, connected it to Line In, set up WinLirc and managed to get this off the remote:

int[] electraPowerPatt = {2979, 3875, 1979, 1916, 2000,  937,
                1000,  937, 1020,  937, 1020,  937,
                1000,  958, 1000,  937, 1020,  937,
                1020,  937, 1000,  937, 1020, 1916,
                1979,  958, 1000,  937, 1020,  937,
                1000,  958, 1000,  958, 1000,  937,
                1000,  958, 1000,  958, 1000,  958,
                979,  958, 1000,  958, 1000,  958,
                1000,  958,  979,  958, 1000,  958,
                1000,  958, 1000,  937, 1000,  958,
                2958, 3875, 1979, 1937, 1979,  937,
                1000,  958, 1000,  958, 1000,  937,
                1000,  958, 1000,  958, 1000,  958,
                 979,  958, 1000,  958, 1000, 1937,
                1958,  958, 1000,  958, 1000,  958,
                 979,  958, 1000,  958, 1000,  958,
                 979,  979,  979,  958, 1000,  958,
                 979,  979,  979,  979,  979,  958,
                1000,  958,  979,  979,  979,  958,
                1000,  958,  979,  979,  979,  979,
                2916, 3916, 1958, 1937, 1958,  979,
                 979,  979,  979,  958, 1000,  958,
                 979,  979,  979,  958, 1000,  958,
                1000,  958,  979,  979,  979, 1937,
                1979,  958,  979,  958, 1000,  958,
                1000,  958,  979,  979,  979,  958,
                1000,  958, 1000,  958,  979,  958,
                1000,  958, 1000,  958,  979,  979,
                 979,  958, 1000,  958,  979,  979,
                 979,  979,  979,  958,  979,  979,
                3916,  979, 2979, 3854, 2000, 1916,
                1979,  937, 1020,  937, 1000,  958,
                1000,  937, 1020,  937, 1020,  937,
                1000,  958, 1000,  937, 1020,  937,
                1000, 1937, 1979,  937, 1020,  937,
                1000,  958, 1000,  958, 1000,  937,
                1000,  958, 1000,  958,  979,  958,
                1000,  958, 1000,  958, 1000,  958,
                 979,  958, 1000,  958, 1000,  958,
                1000,  958,  979,  958, 1000,  958,
                1000,  958, 2937, 3895, 1979, 1916,
                1979,  958, 1000,  958, 1000,  937,
                1000,  958, 1000,  958, 1000,  937,
                1000,  958, 1000,  958, 1000,  958,
                 979, 1937, 1979,  958,  979,  979,
                 979,  958, 1000,  958, 1000,  958,
                 979,  979,  979,  958, 1000,  958,
                 979,  979,  979,  958, 1000,  958,
                 979,  979,  979,  979,  979,  958,
                 979,  979,  979,  979,  979,  979,
                 979,  958, 2937, 3895, 1958, 1958,
                1958,  958, 1000,  958,  979,  979,
                 979,  979,  979,  958, 1000,  958,
                 979,  979,  979,  979,  979,  958,
                1000, 1937, 1958,  958, 1000,  958,
                1000,  958,  979,  979,  979,  958,
                1000,  958,  979,  979,  979,  958,
                1000,  958, 1000,  958,  979,  979,
                 979,  958, 1000,  958,  979,  979,
                 979,  958, 1000,  958,  979,  979,
                 979,  979, 3895};

            mCIR.Transmit(38000, electraPowerPatt);

Sent it via the ConsumerIRManager and it seems like it worked, it finally powered on 🎉
Now to figure out how to replicate this signal with the IRelectra class.

@guysoft
Copy link

guysoft commented Dec 29, 2019

Cool - rooting for a release of https://f-droid.org if you are successful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants