**** piCorePlayer 5.0 is not GA but we expect it's release soon. *****

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 control.   The feature 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' (https://www.amazon.ca/gp/product/B00VJNCMBM/).  Check out
'this video' (https://www.youtube.com/watch?v=x-f25PeqduU) for info on
creating a solderless harness to connect an IR receiver directly to the
rpi.

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.

27517

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.

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'
(https://github.com/ralph-irving/tcz-lirc/blob/master/jivekeys.csv) 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.


+-------------------------------------------------------------------+
|Filename: ir.png                                                   |
|Download: http://forums.slimdevices.com/attachment.php?attachmentid=27517|
+-------------------------------------------------------------------+


Ralphy

*1*-Touch, *5*-Classics, *3*-Booms, *1*-UE Radio
'Squeezebox client builds'
(https://sourceforge.net/projects/lmsclients/files/) 'donations'
(https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=LL5P6365KQEXN&lc=CA&item_name=Squeezebox%20client%20builds&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted)
always appreciated.
------------------------------------------------------------------------
ralphy's Profile: http://forums.slimdevices.com/member.php?userid=3484
View this thread: http://forums.slimdevices.com/showthread.php?t=110640

_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix

Reply via email to