Skip to content

Some tweaks#1

Open
retsyx wants to merge 3 commits intobrainrom:masterfrom
retsyx:master
Open

Some tweaks#1
retsyx wants to merge 3 commits intobrainrom:masterfrom
retsyx:master

Conversation

@retsyx
Copy link
Copy Markdown

@retsyx retsyx commented Nov 30, 2025

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).

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.
@retsyx
Copy link
Copy Markdown
Author

retsyx commented Nov 30, 2025

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"

@retsyx
Copy link
Copy Markdown
Author

retsyx commented Dec 1, 2025

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.

@xiota
Copy link
Copy Markdown

xiota commented Dec 9, 2025

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.

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

Successfully merging this pull request may close these issues.

2 participants