Homepage Forums RetroPie Project Ideas for Further Enhancements Bluetooth Connection prompt?

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #97655
    smoothmalik
    Participant

    is there anyway that when you start retropie that when the linux script is running that it pauses and asks if you have a bluetooth device to connect it now? and then counts down like 20 secs or something while you connect it. I do find in 3.0 the bluetooth connectivity is alot more consistant when trying to connect my ps3 controller however if I try to connect too soon once emu station loads up it will say no controller connected etc even though it rumbled before the emu station screen came on…

    #97712
    eventhorizon
    Participant

    This is what I use:

    1. sudo vi /etc/rc.local

    2. Add the following code at the end, just before the “exit 0” line:

    echo Waiting for controller
    while ! ls /dev/js* 1>/dev/null 2>&1
    do
    sleep 1
    done
    echo Controller found

    3. Save

    4. Reboot

    What this does is wait indefinitely at bootup until a controller is connected. It works perfectly for my PS3 controller over either bluetooth or USB.

    #97713
    smoothmalik
    Participant

    im tryin this on the latest beta and once it says waiting for controller and I connect the system never loads up. Just stays on the boot screen still saying waiting for controller.

    #97737
    eventhorizon
    Participant

    Try pressing ctrl-alt-del and connect the controller again when it waits. There isn’t any harm in rebooting and trying again in case you want to attempt connecting via both direct (USB) and bluetooth methods.

    #99095
    sekazi
    Participant

    [quote=97712]This is what I use:

    1. sudo vi /etc/rc.local

    2. Add the following code at the end, just before the “exit 0″ line:

    echo Waiting for controller
    while ! ls /dev/js* 1>/dev/null 2>&1
    do
    sleep 1
    done
    echo Controller found

    3. Save

    4. Reboot

    What this does is wait indefinitely at bootup until a controller is connected. It works perfectly for my PS3 controller over either bluetooth or USB.

    [/quote]

    What do I need to do to get it to stop after 5 seconds of not connection? I got it to work with my RetroPie but if it does not detect I would like it to eventually skip to emulationstation.

    To get it to work I had to change /dev/js to /dev/input/js

    #100400
    smoothmalik
    Participant

    i updated the rc.local file as instructed above. It worked once and never worked again. I went to check on the rc.local file and its now blank for some reason.

    #102837
    Anonymous
    Inactive

    I solved this issue in a different way. I edited my es_input.cfg file in ~/.emulatinostation and added a dummy keyboard. With a keyboard entry present in the configuration it will never ask you to configure a controller. That way i can reboot my Pi without having to worry about if my PS4 remote is connected or not.

    <inputConfig type="keyboard" deviceName="Keyboard">
        <input name="start" type="button" id="9" value="1"/>
      </inputConfig>
    #103030
    sparkleriot
    Participant

    [quote=102837]I solved this issue in a different way. I edited my es_input.cfg file in ~/.emulatinostation and added a dummy keyboard. With a keyboard entry present in the configuration it will never ask you to configure a controller. That way i can reboot my Pi without having to worry about if my PS4 remote is connected or not.

    <inputConfig type="keyboard" deviceName="Keyboard">
        <input name="start" type="button" id="9" value="1"/>
      </inputConfig>

    [/quote]

    Fantastic tip! ..thank you :)

    #103750
    gonzothegreat
    Participant

    so is this the only text that goes in the es_input.cfg?

    this is what is in there at the moment…

    <?xml version="1.0"?>
    <inputList>
      <inputAction type="onfinish">
        <command>/opt/retropie/supplementary/emulationstation/scripts/inputconfiguration.sh</command>
      </inputAction>
      <inputConfig type="joystick" deviceName="Logitech Logitech Cordless RumblePad 2">
        <input name="pagedown" type="button" id="7" value="1"/>
        <input name="start" type="button" id="9" value="1"/>
        <input name="pageup" type="button" id="6" value="1"/>
        <input name="up" type="hat" id="0" value="1"/>
        <input name="a" type="button" id="1" value="1"/>
        <input name="b" type="button" id="2" value="1"/>
        <input name="down" type="hat" id="0" value="4"/>
        <input name="right" type="hat" id="0" value="2"/>
        <input name="select" type="button" id="8" value="1"/>
        <input name="left" type="hat" id="0" value="8"/>
      </inputConfig>
    </inputList>

    do i add this… (below) to the text? above/below? or delete and just add the keyboard info?

    <inputConfig type="keyboard" deviceName="Keyboard">
        <input name="start" type="button" id="9" value="1"/>
      </inputConfig>

    thank you

    #103753
    Anonymous
    Inactive

    [quote=103750]so is this the only text that goes in the es_input.cfg?

    this is what is in there at the moment…

    <?xml version="1.0"?>
    <inputList>
      <inputAction type="onfinish">
        <command>/opt/retropie/supplementary/emulationstation/scripts/inputconfiguration.sh</command>
      </inputAction>
      <inputConfig type="joystick" deviceName="Logitech Logitech Cordless RumblePad 2">
        <input name="pagedown" type="button" id="7" value="1"/>
        <input name="start" type="button" id="9" value="1"/>
        <input name="pageup" type="button" id="6" value="1"/>
        <input name="up" type="hat" id="0" value="1"/>
        <input name="a" type="button" id="1" value="1"/>
        <input name="b" type="button" id="2" value="1"/>
        <input name="down" type="hat" id="0" value="4"/>
        <input name="right" type="hat" id="0" value="2"/>
        <input name="select" type="button" id="8" value="1"/>
        <input name="left" type="hat" id="0" value="8"/>
      </inputConfig>
    </inputList>

    do i add this… (below) to the text? above/below? or delete and just add the keyboard info?

    <inputConfig type="keyboard" deviceName="Keyboard">
        <input name="start" type="button" id="9" value="1"/>
      </inputConfig>

    thank you

    [/quote]

    It needs to be added to the file, and it does not matter where it is as long as it is between the <inputList> and </inputList>. So in your example it could look like this.

    <?xml version="1.0"?>
    <inputList>
      <inputAction type="onfinish">
        <command>/opt/retropie/supplementary/emulationstation/scripts/inputconfiguration.sh</command>
      </inputAction>
      <inputConfig type="joystick" deviceName="Logitech Logitech Cordless RumblePad 2">
        <input name="pagedown" type="button" id="7" value="1"/>
        <input name="start" type="button" id="9" value="1"/>
        <input name="pageup" type="button" id="6" value="1"/>
        <input name="up" type="hat" id="0" value="1"/>
        <input name="a" type="button" id="1" value="1"/>
        <input name="b" type="button" id="2" value="1"/>
        <input name="down" type="hat" id="0" value="4"/>
        <input name="right" type="hat" id="0" value="2"/>
        <input name="select" type="button" id="8" value="1"/>
        <input name="left" type="hat" id="0" value="8"/>
      </inputConfig>
    <inputConfig type="keyboard" deviceName="Keyboard">
        <input name="start" type="button" id="9" value="1"/>
    </inputConfig>
    </inputList>

    You could also just hookup a keyboard and configure it through emulationstation as you do the remote, but i did not have one handy so i did the above. Just for safe measure i would take a backup of your current es_input.cfg file before you do this , also i would make a copy of it after as well so if you ever upgrade emulationstation you can easily restore it as it will get overwritten.

    #103768
    syrupdash
    Participant

    Hi there, sorry for the newbie question but where exactly can I find the es_input.cfg file? I’m using WINSCP and I’m at the root of the directory but I have no idea which emulationstation folder I should be looking at to get the input file.

    #103769
    herbfargus
    Member

    /home/pi/.emulationstation

    The search function in the forum is a very useful tool.

    #103807
    syrupdash
    Participant

    Thanks. Didn’t realise that I needed to check the “show hidden folder” option in WinSCP. I added the Inputeconfig keyboard code to the es_input.cfg file and although it bypasses the “no gamepad detected” nag screen, now I can’t get the bluetooth on my PS3 to connect. Really starting to think I goofed up somewhere.

    #103906
    gonzothegreat
    Participant

    thank you

Viewing 14 posts - 1 through 14 (of 14 total)
  • The forum ‘Ideas for Further Enhancements’ is closed to new topics and replies.