Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Two major issues left: 2. bluetooth [abandoned]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
curmudgeon
Veteran
Veteran


Joined: 08 Aug 2003
Posts: 1537

PostPosted: Sun May 12, 2019 11:15 am    Post subject: Two major issues left: 2. bluetooth [abandoned] Reply with quote

Despite claims that bluetooth now "just works" in linux, I have a different experience.

The device:

Code:

$ lspci -v

[...]

02:00.0 Network controller: Ralink corp. RT3290 Wireless 802.11n 1T/1R PCIe
    Subsystem: Hewlett-Packard Company Ralink RT3290LE 802.11bgn 1x1 Wi-Fi and Bluetooth 4.0 Combo Adapter
    Flags: bus master, fast devsel, latency 0, IRQ 34
    Memory at f0a10000 (32-bit, non-prefetchable) [size=64K]
    Capabilities: [40] Power Management version 3
    Capabilities: [50] MSI: Enable- Count=1/32 Maskable- 64bit+
    Capabilities: [70] Express Endpoint, MSI 00
    Capabilities: [100] Advanced Error Reporting
    Capabilities: [140] Device Serial Number 00-00-1d-5f-77-e6-77-3c
    Kernel driver in use: rt2800pci

02:00.1 Bluetooth: Ralink corp. RT3290 Bluetooth
    Subsystem: Hewlett-Packard Company Ralink RT3290LE 802.11bgn 1x1 Wi-Fi and Bluetooth 4.0 Combo Adapter
    Flags: bus master, fast devsel, latency 0, IRQ 3
    Memory at f0a00000 (32-bit, non-prefetchable) [size=64K]
    Capabilities: [40] Power Management version 3
    Capabilities: [50] MSI: Enable- Count=1/32 Maskable- 64bit+
    Capabilities: [70] Express Endpoint, MSI 00
    Capabilities: [100] Advanced Error Reporting
    Capabilities: [140] Device Serial Number 00-00-1e-5f-77-e6-77-3c

[...]


Have the firmware in the proper place:

Code:

$ ls -al /lib/firmware/rt3290.bin
-rw-r--r-- 1 root root 4096 2019-05-12 09:28:30 /lib/firmware/rt3290.bin



It seems that the kernel sees it. From dmesg:

Code:

Bluetooth: Core ver 2.22
NET: Registered protocol family 31
Bluetooth: HCI device and connection manager initialized
Bluetooth: HCI socket layer initialized
Bluetooth: L2CAP socket layer initialized
Bluetooth: SCO socket layer initialized

[...]

Bluetooth: RFCOMM socket layer initialized
Bluetooth: RFCOMM ver 1.11
Bluetooth: HIDP (Human Interface Emulation) ver 1.2
Bluetooth: HIDP socket layer initialized


Seems to start fine:

Code:

May 12 10:17:05 system bluetoothd[2412]: Bluetooth daemon 5.50
May 12 10:17:05 system bluetoothd[2412]: Starting SDP server
May 12 10:17:05 system bluetoothd[2412]: kernel lacks bnep-protocol support
May 12 10:17:05 system bluetoothd[2412]: System does not support network plugin
May 12 10:17:05 system bluetoothd[2412]: Bluetooth management interface 1.14 initialized


But, the agent can't find the controller

Code:

# bluetoothctl
Agent registered
[bluetooth]# list
[bluetooth]# devices
No default controller available


Any thoughts? Thank you in advance.


Last edited by curmudgeon on Thu May 16, 2019 11:18 pm; edited 1 time in total
Back to top
View user's profile Send private message
genterminl
Guru
Guru


Joined: 12 Feb 2005
Posts: 485
Location: Connecticut, USA

PostPosted: Sun May 12, 2019 6:08 pm    Post subject: Reply with quote

Might you need to load some kernel module, or enable something in the kernel? What do you get from
lsmod | egrep "blue|bt"
and
zcat /proc/config.gz | egrep -i "blue|bt"
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5644

PostPosted: Sun May 12, 2019 8:52 pm    Post subject: Reply with quote

Your kernel drivers are fine. Try running "rfkill unblock bluetooth" (or "echo 1 | tee /sys/class/bluetooth/hci0/rfkill*/state").
Back to top
View user's profile Send private message
curmudgeon
Veteran
Veteran


Joined: 08 Aug 2003
Posts: 1537

PostPosted: Tue May 14, 2019 11:30 pm    Post subject: Reply with quote

Ant P. wrote:
Your kernel drivers are fine. Try running "rfkill unblock bluetooth" (or "echo 1 | tee /sys/class/bluetooth/hci0/rfkill*/state").


The first command did nothing, and I couldn't execute the second (see below). Obviously, I still have some doubt about the drivers.

Code:

$ ls -al /sys/class/bluetooth/
total 0
drwxr-xr-x  2 root root 0 2019-05-14 23:11:23 ./
drwxr-xr-x 50 root root 0 2019-05-14 23:11:23 ../
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5644

PostPosted: Wed May 15, 2019 12:33 am    Post subject: Reply with quote

Didn't pay enough attention, sorry. Just noticed it's a PCIe with two subdevices. I looked around and found this Ralink hardware has a years-long history of problems in Linux and very few solutions.

There's an out-of-tree driver for the bluetooth part. That looks like your best chance at getting it to work.
Back to top
View user's profile Send private message
curmudgeon
Veteran
Veteran


Joined: 08 Aug 2003
Posts: 1537

PostPosted: Wed May 15, 2019 10:20 am    Post subject: Reply with quote

Ant P. wrote:
Didn't pay enough attention, sorry. Just noticed it's a PCIe with two subdevices. I looked around and found this Ralink hardware has a years-long history of problems in Linux and very few solutions.

There's an out-of-tree driver for the bluetooth part. That looks like your best chance at getting it to work.


I was going to give that a crack, despite my doubts (it seems that the ebuild wants CONFIG_RT2800PCI completely disabled (not compiled in and module blacklisted), so that unless this module handles both wireless and bluetooth, the ability to use bluetooth would come at an unacceptable cost.

Anyway, the ebuild failed for reasons far beyond my ken:

Code:

>>> Compiling source in /var/tmp/portage/net-wireless/rtbth-99999999/work/rtbth-99999999 ...
make -j3
make -C /usr/src/linux M=/var/tmp/portage/net-wireless/rtbth-99999999/work/rtbth-99999999 modules
make[1]: Entering directory '/usr/src/linux-4.19.37-gentoo'
  CC [M]  /var/tmp/portage/net-wireless/rtbth-99999999/work/rtbth-99999999/rtbth_core_main.o
  CC [M]  /var/tmp/portage/net-wireless/rtbth-99999999/work/rtbth-99999999/rtbth_core_init.o
  CC [M]  /var/tmp/portage/net-wireless/rtbth-99999999/work/rtbth-99999999/rtbth_core_pci.o
  CC [M]  /var/tmp/portage/net-wireless/rtbth-99999999/work/rtbth-99999999/rtbth_core_bluez.o
/var/tmp/portage/net-wireless/rtbth-99999999/work/rtbth-99999999/rtbth_core_bluez.c: In function ‘rtbt_hps_iface_init’:
/var/tmp/portage/net-wireless/rtbth-99999999/work/rtbth-99999999/rtbth_core_bluez.c:381:22: error: ‘HCI_BREDR’ undeclared (first use in this function); did you mean ‘HCI_RESET’?
     hdev->dev_type = HCI_BREDR;
                      ^~~~~~~~~
                      HCI_RESET
/var/tmp/portage/net-wireless/rtbth-99999999/work/rtbth-99999999/rtbth_core_bluez.c:381:22: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [scripts/Makefile.build:303: /var/tmp/portage/net-wireless/rtbth-99999999/work/rtbth-99999999/rtbth_core_bluez.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/var/tmp/portage/net-wireless/rtbth-99999999/work/rtbth-99999999/rtbth_core_init.c: In function ‘BthInitializePrerequire’:
/var/tmp/portage/net-wireless/rtbth-99999999/work/rtbth-99999999/rtbth_core_init.c:1024:3: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
   if ((pAd->MACVersion != 0x00) && (pAd->MACVersion != 0xFFFFFFFF))
   ^~
/var/tmp/portage/net-wireless/rtbth-99999999/work/rtbth-99999999/rtbth_core_init.c:1027:4: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
    KeStallExecutionProcessor(5);
    ^~~~~~~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/net-wireless/rtbth-99999999/work/rtbth-99999999/rtbth_core_init.c: In function ‘Rtbth_Set_Radio_Led’:
/var/tmp/portage/net-wireless/rtbth-99999999/work/rtbth-99999999/rtbth_core_init.c:1185:3: warning: typedef ‘flag_t’ locally defined but not used [-Wunused-local-typedefs]
 } flag_t;
   ^~~~~~
/var/tmp/portage/net-wireless/rtbth-99999999/work/rtbth-99999999/rtbth_core_pci.c: In function ‘rtbt_pci_probe’:
/var/tmp/portage/net-wireless/rtbth-99999999/work/rtbth-99999999/rtbth_core_pci.c:198:1: warning: label ‘err_hps_iface’ defined but not used [-Wunused-label]
 err_hps_iface:
 ^~~~~~~~~~~~~
make[1]: *** [Makefile:1524: _module_/var/tmp/portage/net-wireless/rtbth-99999999/work/rtbth-99999999] Error 2
make[1]: Leaving directory '/usr/src/linux-4.19.37-gentoo'
make: *** [Makefile:24: all] Error 2
 * ERROR: net-wireless/rtbth-99999999::temp failed (compile phase):
 *   emake failed


I will make a guess though, that bluez has changed so much that this module (as written) will no longer work with it.

If you have any ideas on how to get this to compile, I will give it one last shot - otherwise, it looks like time to abandon the whole idea of bluetooth on this machine.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5644

PostPosted: Wed May 15, 2019 1:14 pm    Post subject: Reply with quote

I made an attempt at trying to fix the source to compile, but it's too far beyond my C ability. It spewed a lot more errors than shown there (I'm using kernel 5.0 and gcc9).

In my experience any cheap USB BT dongle will work just as well, it's not worth putting much effort into getting this working.
Back to top
View user's profile Send private message
curmudgeon
Veteran
Veteran


Joined: 08 Aug 2003
Posts: 1537

PostPosted: Thu May 16, 2019 11:17 pm    Post subject: Reply with quote

Ant P. wrote:
I made an attempt at trying to fix the source to compile, but it's too far beyond my C ability. It spewed a lot more errors than shown there (I'm using kernel 5.0 and gcc9).

In my experience any cheap USB BT dongle will work just as well, it's not worth putting much effort into getting this working.


I agree with your assessment. Thanks again for your efforts on this.
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5302

PostPosted: Fri May 17, 2019 10:09 am    Post subject: Reply with quote

I'm intrigued, what is the vid and did of the device? e.g. lspci -n -s "02:00.1"

EDIT:
take a look at this: https://github.com/loimu/rtbth-dkms
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum