Page 3 of 6

Re: Circuit Sword Bluetooth

Posted: Thu Nov 01, 2018 11:53 pm
by AntFJ
been working on this for several hours. I can get the BT running well but I have to manually start the start_bt.sh by going into the directory

cd rtl8723bs_bt

and then typing

sudo ~/rtl8723bs_bt/start_bt.sh

then dmesg shows the bluetooth working and I'm able to connect. I think my problem is that I don't understand how to make the .service file.

I tried copying the code above into "bluetooth.service" located in /etc/systemd/system

I created this by commanding

cd /etc/systemd/system

sudo touch bluetooth.service

sudo nano bluetooth.service

and then I copied the text in... CNTRL X, "Y", Enter and then commanded

sudo systemctl enable bluetooth.service

once i reboot and check dmesg it does not show the BT enabled.
----------------------------------------------

I have tested a bluetooth keyboard and ps3 controller extensively (minus the analog sticks on the PS3 controller) and they all work great and sync as easily as they do with my raspberry pi 3.
BOTTOM LINE: bluetooth in retropie is messy. Each unique device has it's own challenges except for maybe a USB keyboard. I looked into connecting bluetooth headphones and gave up on the idea... it looks way too complicated and results on forums/youtube did not look promising.

Sorry I can't be more help but I'm pretty new when it comes to all this. I'm wondering if we can delay the .service somehow so that it doesn't start right away. I've tried ExecStartPost and it didn't work either.

Re: Circuit Sword Bluetooth

Posted: Fri Nov 02, 2018 3:07 am
by kite
AntFJ wrote:
Thu Nov 01, 2018 11:53 pm
been working on this for several hours. I can get the BT running well but I have to manually start the start_bt.sh by going into the directory
...
Ok that's great news about the reliability, and yeah BT in linux is a bit weird, like controller mappings too there definitely has to be a better way (and would hope there is work effort going on there!)

As a 'quick fix' to your issue, you could edit "/etc/rc.local" and BEFORE the exit at the end of the file, add in "sudo /home/pi/rtl8723bs_bt/start_bt.sh &" (note that the quotes aren't included, and the ampersand is important).

When i get round to packaging it up into my image i'll look in to the service thing, it should just be changing the 'WantedBy' bit

Re: Circuit Sword Bluetooth

Posted: Sat Nov 03, 2018 1:31 pm
by AntFJ
Thanks Kite...I figured out my foolishness. The code that ThompsonTinkers wrote has the "rtl8723bs_bt" folder in "/root"
for some reason I don't know how to get to that directory - i get Permission denied.

As you picked up I ran my git clone command in the "/home/pi" directory.. mostly because that is the default directory upon login.

Once I changed the ThompsonTinkers code by replacing "/root" with "/home/pi" and added your command to "/etc/rc.local" everything works as advertised. You do have to go into the bluetooth menu each time you want to connect the device. I'm sure you can get around that somehow but I'm not too concerned about it right now.

I've made these changes to both the modded Circuit Sword and to my unmodded one... As discussed above with an unmodded board you must fully power off the device in order to get the bluetooth to come back up. With the modded one as Kite shows earlier in this thread the bluetooth will come back online with a reboot instead of a power cycle.
kite wrote:
Fri Nov 02, 2018 3:07 am
AntFJ wrote:
Thu Nov 01, 2018 11:53 pm
been working on this for several hours. I can get the BT running well but I have to manually start the start_bt.sh by going into the directory
...
Ok that's great news about the reliability, and yeah BT in linux/retropie is a bit weird, like controller mappings too there definitely has to be a better way (and would hope there is work effort going on there!)

As a 'quick fix' to your issue, you could edit "/etc/rc.local" and BEFORE the exit at the end of the file, add in "sudo /home/pi/rtl8723bs_bt/start_bt.sh &" (note that the quotes aren't included, and the ampersand is important).

When i get round to packaging it up into my image i'll look in to the service thing, it should just be changing the 'WantedBy' bit

Re: Circuit Sword Bluetooth

Posted: Sun Nov 04, 2018 9:36 am
by KonnorJ
kite wrote:
Wed Oct 31, 2018 8:46 am
I did connect to a PS4 controller but it kept disconnecting.. hopefully more people having a go we can get some answers to how it performs.
From what i can tell ps4 support can be shaky anyways on the older ps4 controller models, maybe use an 8bitdo or simillar instead as those are 100% known working

Re: Circuit Sword Bluetooth

Posted: Mon Nov 05, 2018 3:24 pm
by ThompsonTinkers
I don't check in for a week, and all this happens :lol:

Sorry for the confusion @AntFJ. As an old unix hack, I tend to run as root too much.

@kite, the hardware mod looks good. I'll have to give that a shot! As for setup, I've been meaning to open a PR... Would you prefer that I copy in rtl8723bs_bt as source? Check in a binary version?

Re: Circuit Sword Bluetooth

Posted: Tue Nov 06, 2018 3:18 am
by kite
ThompsonTinkers wrote:
Mon Nov 05, 2018 3:24 pm
I don't check in for a week, and all this happens :lol:

Sorry for the confusion @AntFJ. As an old unix hack, I tend to run as root too much.

@kite, the hardware mod looks good. I'll have to give that a shot! As for setup, I've been meaning to open a PR... Would you prefer that I copy in rtl8723bs_bt as source? Check in a binary version?
Source + compiled binary would probably be best of both worlds, and some information about the original repo etc.. i doubt the original is going to be updated at all but keeping it all together is probably sensible :)

Re: Circuit Sword Bluetooth

Posted: Tue Nov 06, 2018 9:37 am
by ThompsonTinkers
It looks like support has recently made it into the kernel. It looks like they ran into the UART speed issue in an earlier patch, too.

A couple of releases down the line, and we'll be able to install the firmware, update the device tree, and be done with it.

Re: Circuit Sword Bluetooth

Posted: Wed Nov 07, 2018 12:36 am
by kite
ThompsonTinkers wrote:
Tue Nov 06, 2018 9:37 am
It looks like support has recently made it into the kernel. It looks like they ran into the UART speed issue in an earlier patch, too.

A couple of releases down the line, and we'll be able to install the firmware, update the device tree, and be done with it.
Oh wow nice, that would be amazing! The stretch build already included the SDIO kernel module which was great (not enabled by default in raspbian though) but it's definitely getting there!

Re: Circuit Sword Bluetooth

Posted: Fri Nov 09, 2018 8:01 am
by YaYa
Moving this topic to the Kite support sub-forum ;)

Re: Circuit Sword Bluetooth

Posted: Wed Dec 05, 2018 11:02 am
by ThompsonTinkers
Minor update: I did your hardware mod to my CSO 1.1E, Kite. It works perfectly!