Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 3 123 LastLast
Results 1 to 10 of 22
  1. #1
    Junior Member
    Join Date
    Aug 2014
    Posts
    13

    picoreplayer 3 lirc setup and tweaking

    So, I have been trying to setup the lirc in picoreplayer 3 with non responsive remote. So I want to drop to command line to start troubleshooting.

    I'm quite familiar with setting up lircd with MythTV from years back. My biggest challenge, is really basic. How do I stop lirc from running from the command line?

    I want to run:
    irrecord -d /dev/lirc0 test.conf
    But I can't do that if lircd is running.

    It is an embarrassing question to ask. But I can't figure out how to stop lirc?

    Thanks in advance!

  2. #2
    Junior Member
    Join Date
    Aug 2014
    Posts
    13
    Ok. Can someone confirm that I am on the right track here.

    To stop lirc:
    sudo modprobe lirc_rpi
    sudo kill $(pidof lircd)

    To see if my IR receiver is working:
    mode2 -d /dev/lirc0
    This kicks back with:
    mode2: could not open /dev/lirc0
    mode2: default_init(): Permission denied

    If run:
    sudo mode2 -d /dev/lirc0
    It runs, but when I press keys on any remote I have I get no output. Which is wrong.

    I also have a USB IR receiver.
    sudo mode2 -d /dev/hidraw1
    This kicks back with:
    mode2: could not get file information for /dev/hidraw1
    mode2: default_init(): No such file or directory

    Arghhh. Are there any other device names I should use for a usb receiver?

  3. #3
    Junior Member
    Join Date
    Aug 2014
    Posts
    13
    Ok, time to document things:

    To stop lircd

    sudo modprobe lircd
    sudo kill $(pidof lircd)


    I want to use a MCE USB IR receiver as the RPi is buried behind some cabinet doors.

    I looked in the /dev/ directory and noticed LIRC0 AND LIRC1 listed. If I unplug the USB IR device, LIRC1 disappears. So I now know my device name.

    Lets test:
    sudo mode2 -d /dev/lirc1

    When I press keys on any remote I see responses on the screen. Cool.

    Now lets test this with lircd:

    First terminal window:
    sudo lircd -n -d /dev/lirc1

    This opens lircd but does not send it to background. This is a great trick to see if lircd is crashing due to a configuration issue. If lircd has an issue, you will see the program kick out and give some troubleshooting text.

    Open a 2nd terminal windows to the RPi
    Run:
    irw

    I can now see key presses being read properly by lircd.

    Cool.

    Now the only uncool part? You can't set the device in the picoreplayer LIRC configuration page to use LIRC1. The only two acceptable inputs are LIRC0 and HIDRAW1. Dang. So close.

    I can't find a hardware.conf file related to lircd to force it to use lirc1.

    Anyone have an idea what file I need to edit to force lircd to use lirc1?

  4. #4
    Senior Member Greg Erskine's Avatar
    Join Date
    Sep 2006
    Location
    Sydney, Australia
    Posts
    1,491
    hi Zounder1

    Adding a "&" to the end of a Linux command line puts it into the background.

    You could probably edit /usr/local/sbin/config.cfg directly, change IR_DEVICE="lirc0" to IR_DEVICE="lirc1", it might work.

    Remember to backup and reboot, $pcp bu & $pcp rb or $pcp br.

    I don't think you need the modprobe commands, lirc_rpi is loaded at boot, see /mnt/mmcblk0p1/config.txt, "dtoverlay=lirc-rpi,gpio_in_pin=25" ($m1; $c1; $vicfg)

    regards
    Greg

  5. #5
    Junior Member
    Join Date
    Aug 2014
    Posts
    13
    Quote Originally Posted by Greg Erskine View Post
    hi Zounder1

    Adding a "&" to the end of a Linux command line puts it into the background.

    You could probably edit /usr/local/sbin/config.cfg directly, change IR_DEVICE="lirc0" to IR_DEVICE="lirc1", it might work.

    Remember to backup and reboot, $pcp bu & $pcp rb or $pcp br.

    I don't think you need the modprobe commands, lirc_rpi is loaded at boot, see /mnt/mmcblk0p1/config.txt, "dtoverlay=lirc-rpi,gpio_in_pin=25" ($m1; $c1; $vicfg)

    regards
    Greg
    Thank you! Thank you! That is all I needed to get things working with my IR receiver.

    Changing IR_DEVICE="lirc1" worked perfectly.

    I suspect this setting will get wiped during upgrades and changing settings using the web GUI. But dropping to the command line to edit this file is easy enough to get IR remote control working.

    Cheers.

  6. #6
    Senior Member Greg Erskine's Avatar
    Join Date
    Sep 2006
    Location
    Sydney, Australia
    Posts
    1,491
    Quote Originally Posted by Zounder1 View Post
    Thank you! Thank you! That is all I needed to get things working with my IR receiver.

    Changing IR_DEVICE="lirc1" worked perfectly.

    I suspect this setting will get wiped during upgrades and changing settings using the web GUI. But dropping to the command line to edit this file is easy enough to get IR remote control working.

    Cheers.
    Hi Zounder1,

    I have changed the lirc web interface in pCP3.03 to allow lirc[0-9], so you won't have an issue "going forward" (doesn't "going forward" make you laugh!)

    I try to restrict input to reduce possible errors, but it can be too restrictive sometimes in normal use.

    Thanks for your feedback.
    Greg

  7. #7
    Senior Member sckramer's Avatar
    Join Date
    Oct 2008
    Posts
    301
    Anyone happen to do an lircd.conf for the silver/aluminum apple tv remote they could share? Thanks!
    Scott Kramer

  8. #8
    Senior Member ralphy's Avatar
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    2,002
    Quote Originally Posted by sckramer View Post
    Anyone happen to do an lircd.conf for the silver/aluminum apple tv remote they could share? Thanks!
    Have you tried this one?
    Ralphy

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

  9. #9
    Senior Member sckramer's Avatar
    Join Date
    Oct 2008
    Posts
    301
    Think I tried that same one at first... retried with your link just now, does not work.

    *This same pi/gpio ir receiver setup does work with the standard squeezebox controller.

    Not really sure how to map the it properly.

    Thanks!
    Scott Kramer

  10. #10
    Senior Member ralphy's Avatar
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    2,002
    I pulled out the Apple Remote model A1294 for my macmini and created the attached lircd.conf file.

    It works fine with a 38 kHz TSOP4838 DIP-3 IR Receiver Module.

    I tweaked the ENTER and PLAY/PAUSE keys to work better with jivelite.

    If you get double presses for the direction keys add suppress_repeat 2 before the toggle_bit_mask line in the config.
    Attached Files Attached Files
    Last edited by ralphy; 2018-03-31 at 05:19.
    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
  •