RTL8723bs Bluetooth
#1
Hi, I was playing a bit with the bluetooth part on the RTL8723bs. What I gather from the documentation and the web it's just a normal serial interface and needs to be initialized correctly. I used a small program from https://github.com/lwfinger/rtl8723bs_bt and was able to talk to the BT module on /dev/ttyS1 (physical UART is UART1 on Port G of the A64) and it seems it was able to initialize the BT and hook it up to the Linux BT subsystem. (see http://pastebin.com/Z3RUS9kc for output and dmesg). Now I have to see if it actually works :-)

Edit: while the initialization seems to work, the Linux BT stack doesnt register any new adapters, I have to look into how to debug that....
Come have a chat in the Pine IRC channel >>
  Reply
#2
ubuntu@fjords:~$ rfkill list
0: sunxi-bt: Bluetooth
Soft blocked: no
Hard blocked: no
1: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
2: phy1: Wireless LAN
Soft blocked: no
Hard blocked: no
3: hci0: Bluetooth
Soft blocked: no <- was yes
Hard blocked: no
$ sudo rfkill unblock 3
$ hcitool dev

Bluetooth LE scan works!
  Reply
#3
D'oh... I totally forgot about the rfkill switches... Thanks for pointing that out...
Come have a chat in the Pine IRC channel >>
  Reply
#4
Ok back from work... time to test this some more...

I successfully initialized and attached the BT module today and it seems to be able to scan for devices:


Code:
[bluetooth]# list
Controller 34:C3:D2:E4:60:D8 pine64 [default]
[bluetooth]# devices
[NEW] Device DC:2C:26:0B:3C:08 DC-2C-26-0B-3C-08
[CHG] Device DC:2C:26:0B:3C:08 Connected: no
[DEL] Device DC:2C:26:0B:3C:08 DC-2C-26-0B-3C-08
[NEW] Device 00:02:76:32:1E:53 00-02-76-32-1E-53
[NEW] Device DC:2C:26:0B:3C:08 DC-2C-26-0B-3C-08
[CHG] Device 00:02:76:32:1E:53 Connected: no
[DEL] Device 00:02:76:32:1E:53 00-02-76-32-1E-53
[NEW] Device 00:02:76:32:1E:53 00-02-76-32-1E-53
[bluetooth]# devices
Device DC:2C:26:0B:3C:08 DC-2C-26-0B-3C-08
Device 00:02:76:32:1E:53 00-02-76-32-1E-53
[CHG] Device 00:02:76:32:1E:53 LegacyPairing: no
[CHG] Device 00:02:76:32:1E:53 Name: ThinkPad Bluetooth Laser Mouse
[CHG] Device 00:02:76:32:1E:53 Alias: ThinkPad Bluetooth Laser Mouse
[CHG] Device 00:02:76:32:1E:53 LegacyPairing: yes
[CHG] Device 00:02:76:32:1E:53 RSSI: -82
[CHG] Device 00:02:76:32:1E:53 RSSI: -74
[CHG] Device 00:02:76:32:1E:53 RSSI: -82

Edit: I was able to pair my BT mouse and keyboard using blueman on the Mate Desktop and they both work, so this doesnt look so bad anymore... blueman is sometimes crashing when trying to scan for devices, but using the shell bluetoothctl / hciconfig seems to work reliably...
Come have a chat in the Pine IRC channel >>
  Reply
#5
Thats nice, if someone cares to create dkms packaging , post a link to a Git repository (preferably with Gbp support) and i will happily upload to launchpad. Look at https://github.com/longsleep/bcmwl-ubuntu for inspiration.
  Reply
#6
(06-16-2016, 03:07 PM)longsleep Wrote: Thats nice, if someone cares to create dkms packaging , post a link to a Git repository (preferably with Gbp support) and i will happily upload to launchpad. Look at https://github.com/longsleep/bcmwl-ubuntu for inspiration.

I'm either missing something or this is entirely contained within the current kernel config (as you've included HCI H5 support and the appropriate UART)
This is a modified (compatible?) hciattach and a firmware blob or two, with a script to install the firmware into /lib/firmware and a 'detection' for some compatible boards.
  Reply
#7
(06-16-2016, 03:54 PM)Faye Wrote:
(06-16-2016, 03:07 PM)longsleep Wrote: Thats nice, if someone cares to create dkms packaging , post a link to a Git repository (preferably with Gbp support) and i will happily upload to launchpad. Look at https://github.com/longsleep/bcmwl-ubuntu for inspiration.

I'm either missing something or this is entirely contained within the current kernel config (as you've included HCI H5 support and the appropriate UART)
This is a modified (compatible?) hciattach and a firmware blob or two, with a script to install the firmware into /lib/firmware and a 'detection' for some compatible boards.
I do not get what you mean.
  Reply
#8
I think what Faye wanted to say is that https://github.com/lwfinger/rtl8723bs_bt is not a Linux kernel driver. It just provides a small tool to handshake with the BT module via the UART and upload a firmware blob to the internal BT MCU. After that, the module can be attached to the BT stack (which already speaks HCI H5) available from the current kernel/userland. So the question is rather, how would this workaround be implemented in a proper way? Make a kernel side driver that just does the handshake and firmware loading? Or have something in userland that just calls the tool from lwfinger if a rtl8723bs wifi adapter is detected? I am only a embedded hardware developer with a bit of Linux experience so I dont know what the "right" way is to do this...
Come have a chat in the Pine IRC channel >>
  Reply
#9
My ubuntu load is very confused... thinks the blue tooth is a secondary wifi (it really is I suppose) calls it wlan1 and then disables it !

I'll think about it tomorrow.
  Reply
#10
(06-17-2016, 06:53 AM)MarkHaysHarris777 Wrote: My ubuntu load is very confused... thinks the blue tooth is a secondary wifi (it really is I suppose) calls it wlan1 and then disables it !

I'll think about it tomorrow.

The secondary wifi interface is just a duplicate because of network configuration / udev rules I think, I got that too. The BT interface is not via SDIO, it's just a three wire UART interface that is directly connected to UART1 on the A64 which is mapped to /dev/ttyS1...
Come have a chat in the Pine IRC channel >>
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Wifi / Bluetooth Board Update S265 2 4,687 07-30-2020, 04:53 PM
Last Post: S265
Information Howto: Getting Bluetooth (serial console) working on Debian pfeerick 14 34,887 08-19-2019, 04:33 AM
Last Post: Roverius
  WIFI & Bluetooth? 7777777 14 31,015 12-24-2016, 05:01 AM
Last Post: Toriless
  Using Bluetooth for Sending serial data Arjun 9 16,435 10-19-2016, 10:19 PM
Last Post: Arjun
  How can you get the WIFI/Bluetooth module separate? GoZone 8 12,654 07-06-2016, 05:23 PM
Last Post: JasperBrown
  WiFi/BT module, no bluetooth riviera89 5 8,032 06-24-2016, 04:32 PM
Last Post: srinivas.s34@gmail.com
  Board doesn't boot when wifi/Bluetooth connected with Lcd screen Krinilssen 4 7,755 06-16-2016, 07:22 AM
Last Post: Krinilssen
  WIFI/Bluetooth Chipset monmoonmooonmoooon 2 5,719 01-20-2016, 06:02 AM
Last Post: monmoonmooonmoooon

Forum Jump:


Users browsing this thread: 3 Guest(s)