Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 10 of 40

Threaded View

  1. #1
    Senior Member ralphy's Avatar
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    2,259

    Howto create a linux kernel IR remote keytable for Jivelite on piCorePlayer 5

    The 4.19 linux kernel has removed the original LIRC uinput drivers that piCorePlayer has used since 3.x for navigating Jivelite with an IR remote. IR remote control is still supported but you need to migrate your lircd.conf files to an IR keytables configuration. If you are using the FLIRC usb dongle, it works the same as in previous piCorePlayer releases.

    IR keytables requires an IR receiver connected to a GPIO of your raspberry pi. I'm using these 38 kHz TSOP4838 DIP-3 IR Receiver Modules. Check out this video for info on creating a solderless harness to connect an IR receiver directly to the rpi.

    LIRC is not needed for kernel IR keytables jivelite navigation and should not be installed.

    So let's get started.

    Switch to Beta mode at the bottom of the Main page of the piCorePlayer 5 webgui.

    Install Jivelite from the webgui Tweaks Tab->Jivelite Setup, reboot and configure jivelite.

    Navigate to the IR Page from the webgui Tweaks Tab->IR Remote Control section.

    Name:  ir.png
Views: 1066
Size:  37.5 KB

    Click Install IR tools for use with jivelite and reboot.

    Set the GPIO number in Set LIRC GPIO in number (IR receiver) if you are not using the default 25, save and reboot.

    A keytable for the SlimDevices remotes is loaded by default when the IR tools are installed and should be operational now.

    We also provided keytable files for the JustBoom IR and Sony RMT-D11[67]A remotes. They are located at /usr/local/share/pcp-irtools/files and currently need to be installed via putty/ssh.
    Code:
    cd /usr/local/etc/keytables
    sudo cp /usr/local/share/pcp-irtools/files/justboomir jivelite
    sudo ir-keytable -c -w jivelite
    pcp bu
    The JustBoom IR remote should now work with jivelite without restarting.

    Alternately, you could copy the keytable file from piCorePlayer to your browser system and upload the configuration via the webgui. Instructions are provide below.

    To create a custom keytable connect to your piCorePlayer using ssh or putty and login as the tc user.

    Clear the default kernel keytable and load all IR protocol drivers.

    Code:
    sudo ir-keytable -p all -c
    Code:
    Old keytable cleared
    Protocols changed to lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp imon
    Note the list of IR Protocols loaded.

    Check that your remote is recognized

    To test this, we are going to run ir-keytable and press some buttons on our remote control.

    Code:
    sudo ir-keytable -t
    Code:
    Testing events. Please, press CTRL-C to abort.
    5740.570027: lirc protocol(sony12): scancode = 0xe001b
    5740.570043: event type EV_MSC(0x04): scancode = 0xe001b
    5740.570043: event type EV_SYN(0x00).
    5740.620027: lirc protocol(sony12): scancode = 0xe001b
    5740.620047: event type EV_MSC(0x04): scancode = 0xe001b
    5740.620047: event type EV_SYN(0x00).
    5740.680024: lirc protocol(sony12): scancode = 0xe001b
    5740.680044: event type EV_MSC(0x04): scancode = 0xe001b
    5740.680044: event type EV_SYN(0x00).
    If you do not see any output as you press your remote buttons, your remote may not be supported or you have the wrong GPIO configured for the IR receiver.

    From the Testing events we can determine that my remote uses the sony protocol

    If you have an lircd.conf for your remote from piCorePlayer 3 or 4, make a copy of it and load it into your favorite text editor.

    Delete everything except the key symbols and you should have a file similiar to this.

    Code:
    KEY_MINUS 0xD8E # Tape B Fast Rewind
    KEY_EQUAL 0x38E # Tape B Fast Forward
    KEY_UP 0xCC1 # Tape A Fast Rewind
    KEY_DOWN 0x2C1 # Tape A Fast Forward
    KEY_RIGHT 0xC41 # Tape A Forward
    KEY_LEFT 0x6C1 # Tape A Record
    KEY_ENTER 0x1C1 # Tape A Stop
    KEY_ESC 0x9C1 # Tape A Pause
    The format of the keytable file is rather simple:

    It's a plain text file, the first line contains a header with a descriptive name (you can choose that rather arbitrarily, but better avoid special characters, spaces and such) and the remote protocol to use (the type: - which is very important). After that each line contains a mapping of remote scancode to Linux keycode.

    If you made a comment with the remote key that corresponds to the scan code, creating the keytable file is quite simple.

    Press each key on the remote and put the scancode BEFORE the key symbol in the file we just created.

    The scancode in the earlier test was for the Tape B Fast Rewind key on my Sony RM-S70 remote.

    Once complete remove all text following the key symbol name.

    Next we need to add the header line to identify the remote the file is for and the protocol; used by the kernel keytable loader.

    The completed keytable file.

    Code:
    # table: rms70, type: sony
    0xe001b KEY_MINUS
    0xe001c KEY_EQUAL
    0x100033 KEY_UP
    0x100034 KEY_DOWN
    0x100032 KEY_RIGHT
    0x100036 KEY_LEFT
    0x100038 KEY_ENTER
    0x100039 KEY_ESC
    If you are creating a keytable file for a new remote, you can refer to my Jivelite action to key symbol spreadsheet to help identify the jive action to key symbol mapping needed.

    Save your new keytable file, I use the remote model for the name, but you it can be called whatever you like.

    Now we need to upload the file using the piCorePlayer webgui Upload custom jivelite keytables to pCP on the IR page.

    Click Browse and choose your new keytable file, select it and click upload.

    If successful you should be able to use the remote immediately, no jivelite restart or reboot is required.
    Last edited by ralphy; 2019-09-07 at 05:48. Reason: lirc not needed.
    Ralphy

    1-Touch, 5-Classics, 3-Booms, 1-UE Radio
    Squeezebox client builds donations always appreciated.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •