Circuit Sword Bluetooth

User avatar
AntFJ
Posts: 88
Joined: Thu Nov 16, 2017 8:09 pm
Has thanked: 17 times
Been thanked: 63 times

Re: Circuit Sword Bluetooth

Post by AntFJ » 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

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.

User avatar
kite
Posts: 1770
Joined: Thu May 12, 2016 4:30 am
Location: UK
Has thanked: 390 times
Been thanked: 2153 times
Contact:

Re: Circuit Sword Bluetooth

Post by kite » 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

User avatar
AntFJ
Posts: 88
Joined: Thu Nov 16, 2017 8:09 pm
Has thanked: 17 times
Been thanked: 63 times

Re: Circuit Sword Bluetooth

Post by AntFJ » Sat Nov 03, 2018 1:31 pm

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

User avatar
KonnorJ
Posts: 223
Joined: Thu Jan 11, 2018 1:23 am
Location: United Kingdom
Has thanked: 25 times
Been thanked: 61 times

Re: Circuit Sword Bluetooth

Post by KonnorJ » Sun Nov 04, 2018 9:36 am

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

User avatar
ThompsonTinkers
Posts: 46
Joined: Sat Jan 28, 2017 9:36 pm
Has thanked: 64 times
Been thanked: 21 times

Re: Circuit Sword Bluetooth

Post by ThompsonTinkers » 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?

User avatar
kite
Posts: 1770
Joined: Thu May 12, 2016 4:30 am
Location: UK
Has thanked: 390 times
Been thanked: 2153 times
Contact:

Re: Circuit Sword Bluetooth

Post by kite » Tue Nov 06, 2018 3:18 am

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 :)

User avatar
ThompsonTinkers
Posts: 46
Joined: Sat Jan 28, 2017 9:36 pm
Has thanked: 64 times
Been thanked: 21 times

Re: Circuit Sword Bluetooth

Post by ThompsonTinkers » 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.

User avatar
kite
Posts: 1770
Joined: Thu May 12, 2016 4:30 am
Location: UK
Has thanked: 390 times
Been thanked: 2153 times
Contact:

Re: Circuit Sword Bluetooth

Post by kite » Wed Nov 07, 2018 12:36 am

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!

User avatar
YaYa
Posts: 2069
Joined: Mon Jun 26, 2017 12:42 pm
Location: brittany - France
Has thanked: 996 times
Been thanked: 857 times
Contact:

Re: Circuit Sword Bluetooth

Post by YaYa » Fri Nov 09, 2018 8:01 am

Moving this topic to the Kite support sub-forum ;)

User avatar
ThompsonTinkers
Posts: 46
Joined: Sat Jan 28, 2017 9:36 pm
Has thanked: 64 times
Been thanked: 21 times

Re: Circuit Sword Bluetooth

Post by ThompsonTinkers » Wed Dec 05, 2018 11:02 am

Minor update: I did your hardware mod to my CSO 1.1E, Kite. It works perfectly!

Post Reply

Who is online

Users browsing this forum: No registered users and 19 guests