Open
Conversation
On AN-MR19BA, the power button doesn't seem to generate any BLE events but it does shoot out IR. In a pinch, KEY_SLEEP, to the right of the power button can be repurposed to act as a power button. Also add Makefile directive to allow compilation of the floating point code for Raspberry Pi.
Author
|
Incidentally, if you have the time, I would much appreciate if you could share with me the BLE manufacturer data that your remote (an RM20?) reports when it is advertising for pairing. For example, the RM19's manufacturer data is: c4005343442031382e312c42412033352c7765624f53 I believe the first two bytes, c400, are LG's CIC, or manufacturer code, and the rest of the bytes are the ASCII string: "SCD 18.1,BA 35,webOS" |
Author
|
Added a third commit that isn't showing up in the diff. It adds the button code for the list button on the MR19 remote. |
|
The MR20 has two power buttons. They're visible in the image in the readme. The red one is IR only. The other one has button code 0x8099. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Nice project!
It seems to work with my LG Magic Remote model AN-MR19BA.
Changes in this pull request:
Set the EV_REP bit so that repeat is enabled by kernel when pressing buttons.
Removes the general-regs-only from ccflags to allow floating point compilation on Raspberry Pi. I don't know why the CC_FLAGS_FPU flag in the line above isn't sufficient.
Changes the 0x8000 code to be the channel up key and not the power key. I have a theory about the power key that explains why it is weird. At least on my remote, the power key does not generate any kind of BLE key event. Instead, it is the only button that transmits IR from the front of the remote. My suspicion is that this is to make the onboarding process for the remote more or less bullet proof. LG's instructions to pair a remote with the TV require turning on the TV, pointing the remote at the TV, and then pressing the designated pairing button on the remote. The IR only power button ensures that the TV can always be powered on with the remote, even if they are not paired. Incidentally, the remote transmits IR on all buttons when unpaired. This may explain the instruction the point the remote at the TV when pairing. Perhaps, the IR is used to signal to the TV to start the pairing process on the TV.
Later remotes may issue a key press event in addition to the IR. On the AN-MR19BA there is no power button event, so I set the code to the channel up key which I think is also generally less surprising (I was very surprised when the channel up button caused a shutdown).