-
Notifications
You must be signed in to change notification settings - Fork 0
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
Drop LIRC in favor of ir-ctl #5
Comments
Actually you can also use kernel decoder of generic IR protocols like NEC, RC5, RC6, Sony.... and then you do not need to guess pulses and TX them, just say you want transmit IR code 0x0E with NEC protocol and kernel will do it for you. With one ir-* command you will tell to kernel "now use this decoder" and then if you run some "rx" (I think it was that ir-keytab) and you press on RC some buttons, you already see scan codes instead RAW pulses (as LIRC done). But of course you can access to RAW pulses as-well I have to find my text file, where I had recorded SF4008 satellite receiver's remote I had idea to reuse remote XML files from Enigma2 OpenWebIf project, because they have also pictures for remotes with mapping in HTML and we need only extend those buttons/XML files by attributes like RC Protocol="NEC" and every button like Play button scancode=0x0e <rc model="my remote" protocol="nec" image="myremote.png">
<button label="play" coordinates="10 10 20 20" scancode="0x0e" />
</rc> but seems Enigma2 community again fighting each other, so almost everyone made their repositories private. :( |
and if I remember well, there could be some mapping file scancode vs keycode (check https://github.com/torvalds/linux/blob/master/include/uapi/linux/input-event-codes.h ) and if I remember well it can be used as /dev/input device then. But I do not know if I do not merging two things at once, because that time I also played with that Linux based satellite receiver |
thanks @petrkr i've got a working POC by capturing codes with so it's clear we don't need the old LIRC daemon anymore. i'm trying to come up with a user-friendly way to capture codes, stumbled upon https://github.com/Rafostar/ir-gen which i am now adapting to work (it's only slightly functional). hopefully i can get an MR going soon once i fix the script. |
so far i'm having troubles building the keymap file. the aforementioned
this seems good at first, but you diff that with my working LIRC-based config we start to see some stark contrasts:
the returned codes are as follows:
clearly we need a valid protocol, so i changed
feeding these back into our
unfortunately however, when going back to transmit the captured codes the KVM does not respond: if we compare the keycodes from the working LIRC config
@petrkr if you have any clue where to begin with this or any resources that would aid me in this hex code purgatory, that would be most welcomed. |
if I remember well, there are two separated devices in /dev (lirc0, lirc1) one for RX one for TX (as you loaded two GPIO modules). So be sure you use that TX one. and this is command which I've used to send actuall key... If you recorded scan code 0x15 of NEC protocol, then try to use change /dev/lircX according to your TX device. Also you can check camera if that diode really transmits (flashing) |
MUCH appreciated, @petrkr I have it wired up correctly as when I am using the LIRC daemon, everything is working. Confirmed the LED is flashing on submission of TX, and I'm able to capture accurate codes when using the daemon as well (after switching the correct device as you mention in your post). I just can't figure out why ir-keytable is able to "see" that something is transmitting, but unable to accurately capture what codes are being sent. |
This lircd.conf file is describing the nec protocol. You can convert this lircd.conf to toml using lircd2toml.py. You will get:
This is a problem in the v4l-utils package. The BPF decoders are missing. Note that you can still use this toml file for transmitting. That should be unaffected by the packaging bug.
This looks good except for there are lots of pointless fields like
It might be worth transmitting it using the toml file with the Your original code did I'm working on IR tooling which can read lircd.conf files directly, but
Does that help in any way? |
So actually I missed this earlier, but this lircd.conf file sends two codes for each key: there is a trailing 0 code. So, if you want to this with Using this toml file:
If you install cir via |
thanks for having a look @seanyoung
ok so i've reduced my config(s) to the following based on your recommendations:
minding that the scancodes are matching and have been pulled from the aforementioned
nec keymap sends, but doesn't actually do anything to the KVM. i have a sneaking suspicion that there is something wrong with the codes that are being captured with
i tried this as well. LED flashes, affects no change. this almost further reinforces that the codes captured by for the record, my versions are:
if i swap in a keymap that i captured via LIRC to an ir-ctl toml, again the LED flashes, but doesn't result in any changes. @aflyingcougar and i are digging into this more. just for the record: |
Struggling to get |
That's weird. Is this a non-glibc, musl system or so? What are the errors? |
I've just tried |
in the middle of switching laptops (moving from Mac to Linux full time here shortly). give me some time to come back to this. i'm sure it'll run no problem on linux. |
Details
Describe the solution you'd like:
Ideally I'd like to move away from using LIRC - patched or unpatched - due to it's uncertain future. As per the discussion in pikvm/pikvm#291 it seems like we can capture raw codes from
ir-ctl
and implement them as essentially raw TX.In agile terms this could be viewed as a SPIKE, but may transform over the issue's lifetime.
Anything else you would like to add:
I've repurposed GPIO 19 as TX, and GPIO 16 as RX for the time being.
Some prelim testing indicates that this should be possible, but the config files are not nearly as user-friendly as the LIRC-based configs. I'd be happy to make that sacrifice so that the project can be on more stable ground instead of depending on 3 year old software.
Additional Information:
This may wind up encompassing #4 as well
The text was updated successfully, but these errors were encountered: