Keep bluetooth scanning for joypads – rc.local

Home Forums RetroPie Project Controller Configuration in RetroPie Keep bluetooth scanning for joypads – rc.local

RetroPie has a new website and forum. Please visit https://retropie.org.uk/ for the new site. The new forum is located at https://retropie.org.uk/forum/. This forum is left here as a read-only archive.

This topic contains 2 replies, has 2 voices, and was last updated by Profile photo of segaages segaages 12 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #122373
    Profile photo of segaages
    segaages
    Participant

    Hi all, you’re great. 🙂
    Here’s my problem.

    I’m following this guide:
    https://github.com/retropie/retropie-setup/wiki/Setting-up-a-Bluetooth-controller
    No problems except for the part that says:

    *************************
    Keep bluetooth scanning
    This should keep the Pi scanning for bluetooth devices in case the pair is lost.
    sudo nano /etc/init.d/rc.local
    add “sudo hciconfig hci0 up piscan” (without the quotes) above the line that says “exit 0”
    ctrl x
    y
    enter
    sudo reboot
    *************************

    Now, my rc.local looks like that:
    ************************************************
    #! /bin/sh
    ### BEGIN INIT INFO
    # Provides: rc.local
    # Required-Start: $all
    # Required-Stop:
    # Default-Start: 2 3 4 5
    # Default-Stop:
    # Short-Description: Run /etc/rc.local if it exist
    ### END INIT INFO

    PATH=/sbin:/usr/sbin:/bin:/usr/bin

    . /lib/init/vars.sh
    . /lib/lsb/init-functions

    do_start() {
    if [ -x /etc/rc.local ]; then
    [ “$VERBOSE” != no ] && log_begin_msg “Running local boot scripts (/etc/rc.local)”
    /etc/rc.local
    ES=$?
    [ “$VERBOSE” != no ] && log_end_msg $ES
    return $ES
    fi
    }

    case “$1” in
    start)
    do_start
    ;;
    restart|reload|force-reload)
    echo “Error: argument ‘$1’ not supported” >&2
    exit 3
    ;;
    stop)
    ;;
    *)
    echo “Usage: $0 start|stop” >&2
    exit 3
    ;;
    esac
    ************************************************

    Problem is: I don’t see any “exit 0”.
    Where should I put the “sudo hciconfig hci0 up piscan” line?

    Thank you!

    #122382
    Profile photo of Floob
    Floob
    Moderator

    The wiki is probably a little dated there. I’ll take a look soon and update that part for RetroPie 3.6

    RetroPie help guides --> https://goo.gl/Yfy8kj
    Please read this before asking for help --> http://goo.gl/eLErnl

    #122395
    Profile photo of segaages
    segaages
    Participant

    Thank you Floob!
    Forgot to mention I’m still using 3.3, but I’m planning to update soon, I was just waiting for version 3.7.
    Great work btw!

Viewing 3 posts - 1 through 3 (of 3 total)

Forums are currently read only - please visit the new RetroPie forums at https://retropie.org.uk/forums/

Skip to toolbar