Ralink RT3290 doesn't have a bluetooth driver

Bug #1189721 reported by Graeme Pietersz on 2013-06-11
788
This bug affects 160 people
Affects Status Importance Assigned to Milestone
Linux
Unknown
Unknown
Linux Mint
Undecided
Unassigned
bluetooth
Confirmed
Medium
Unassigned
Ubuntu
Undecided
Unassigned

Bug Description

As of Raring Ubuntu has a wifi driver for the RT3290 that works out of the box.

It still does not have bluetooth support.

This thread in the Ubuntu forums links to a driver that is claimed to work:

http://ubuntuforums.org/showthread.php?t=2115570
---
ApportVersion: 2.9.2-0ubuntu8.3
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: graeme 2412 F.... pulseaudio
CRDA:
 country GB:
  (2402 - 2482 @ 40), (N/A, 20)
  (5170 - 5250 @ 40), (N/A, 20)
  (5250 - 5330 @ 40), (N/A, 20), DFS
  (5490 - 5710 @ 40), (N/A, 27), DFS
DistroRelease: Ubuntu 13.04
EcryptfsInUse: Yes
HibernationDevice: RESUME=UUID=2d107179-35e2-4b1f-8bdd-90a01132ec70
InstallationDate: Installed on 2013-05-17 (144 days ago)
InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Release amd64 (20130424)
MachineType: Hewlett-Packard HP ProBook 4540s
MarkForUpload: True
Package: linux (not installed)
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.8.0-31-generic root=UUID=ac74fd89-3445-4a6d-b91b-ae4987867afe ro quiet splash acpi_backlight=vendor vt.handoff=7
ProcVersionSignature: Ubuntu 3.8.0-31.46-generic 3.8.13.8
RelatedPackageVersions:
 linux-restricted-modules-3.8.0-31-generic N/A
 linux-backports-modules-3.8.0-31-generic N/A
 linux-firmware 1.106
RfKill:
 0: phy0: Wireless LAN
  Soft blocked: no
  Hard blocked: no
Tags: raring
Uname: Linux 3.8.0-31-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dialout dip lpadmin plugdev sambashare sudo
dmi.bios.date: 11/06/2012
dmi.bios.vendor: Hewlett-Packard
dmi.bios.version: 68IRR Ver. F.32
dmi.board.name: 17F6
dmi.board.vendor: Hewlett-Packard
dmi.board.version: KBC Version 58.1D
dmi.chassis.type: 10
dmi.chassis.vendor: Hewlett-Packard
dmi.modalias: dmi:bvnHewlett-Packard:bvr68IRRVer.F.32:bd11/06/2012:svnHewlett-Packard:pnHPProBook4540s:pvrA1018C1100:rvnHewlett-Packard:rn17F6:rvrKBCVersion58.1D:cvnHewlett-Packard:ct10:cvr:
dmi.product.name: HP ProBook 4540s
dmi.product.version: A1018C1100
dmi.sys.vendor: Hewlett-Packard

tags: added: bluetooth ralink rt3290

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 1189721

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
summary: - Ralink RT3290 needs blueetooth driver
+ Ralink RT3290 needs bluetooth driver
Changed in linux (Ubuntu):
importance: Undecided → Medium
tags: added: raring

HP ProBook 450.
Kernel 3.8.0-26 x86_64

 lspci -v output
04:00.1 Bluetooth: Ralink corp. RT3290 Bluetooth
 Subsystem: Hewlett-Packard Company Device 18ec
 Flags: bus master, fast devsel, latency 0, IRQ 10
 Memory at d0600000 (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-a0-f4-47-56-85-bc

bluethoot device not configured at boot.

emanuele@emybook:~$ lsmod |egrep "rt3|rt2"
rt2800pci 18582 0
rt2800lib 66507 1 rt2800pci
rt2x00pci 14519 1 rt2800pci
rt2x00lib 54869 3 rt2x00pci,rt2800lib,rt2800pci
mac80211 606457 3 rt2x00lib,rt2x00pci,rt2800lib
cfg80211 510937 2 mac80211,rt2x00lib
eeprom_93cx6 13344 1 rt2800pci
crc_ccitt 12707 1 rt2800lib

And the Wifi car is also unstable (randomic disconnections)

girto (patspiper) wrote :

The link in the OP refers indeed to the RT3290 bluetooth driver (and WiFi driver) that should in theory compile on Ubuntu 12.04. It needs however some modifications in order to compile on the more recent kernels.

ApportVersion: 2.9.2-0ubuntu8.1
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: christopher 2046 F.... pulseaudio
DistroRelease: LinuxMint 15
HibernationDevice: RESUME=UUID=3d08e960-32f0-4d5f-b0ec-08b794b71b5a
InstallationDate: Installed on 2013-07-29 (6 days ago)
InstallationMedia: Linux Mint 15 "Olivia" - Release amd64 (20130520)
MachineType: Hewlett-Packard HP ENVY dv6 Notebook PC
MarkForUpload: True
Package: linux 3.8.0.27.45 [origin: Ubuntu]
PackageArchitecture: amd64
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.8.0-27-generic root=UUID=7ab12979-e1b1-4799-9c1d-e640023a4c84 ro quiet splash acpi_backlight=vendor vt.handoff=7
ProcVersionSignature: Ubuntu 3.8.0-27.40-generic 3.8.13.4
RelatedPackageVersions:
 linux-restricted-modules-3.8.0-27-generic N/A
 linux-backports-modules-3.8.0-27-generic N/A
 linux-firmware 1.106
RfKill:
 0: phy0: Wireless LAN
  Soft blocked: no
  Hard blocked: no
Tags: olivia third-party-packages
Uname: Linux 3.8.0-27-generic x86_64
UnreportableReason: This is not an official LinuxMint package. Please remove any third party package and try again.
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo
dmi.bios.date: 11/02/2012
dmi.bios.vendor: Insyde
dmi.bios.version: F.22
dmi.board.asset.tag: Type2 - Board Asset Tag
dmi.board.name: 181E
dmi.board.vendor: Hewlett-Packard
dmi.board.version: 52.24
dmi.chassis.asset.tag: Chassis Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: Hewlett-Packard
dmi.chassis.version: Chassis Version
dmi.modalias: dmi:bvnInsyde:bvrF.22:bd11/02/2012:svnHewlett-Packard:pnHPENVYdv6NotebookPC:pvr088A110000305920000620100:rvnHewlett-Packard:rn181E:rvr52.24:cvnHewlett-Packard:ct10:cvrChassisVersion:
dmi.product.name: HP ENVY dv6 Notebook PC
dmi.product.version: 088A110000305920000620100
dmi.sys.vendor: Hewlett-Packard

tags: added: apport-collected olivia third-party-packages

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

Download full text (123.1 KiB)

  Hi,
  I have the same problem with raring, and this ralink RT3290. Wifi works, but not bluetooth. What can I do to help you ?

  My dmesg :
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 3.8.0-26-generic (buildd@panlong) (gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-1ubuntu1) ) #38-Ubuntu SMP Mon Jun 17 21:43:33 UTC 2013 (Ubuntu 3.8.0-26.38-generic 3.8.13.2)
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-3.8.0-26-generic root=UUID=c7d6be7f-601f-4f51-85f3-bd3714965325 ro quiet splash acpi_osi=Linux acpi_backlight=vendor vt.handoff=7
[ 0.000000] KERNEL supported cpus:
[ 0.000000] Intel GenuineIntel
[ 0.000000] AMD AuthenticAMD
[ 0.000000] Centaur CentaurHauls
[ 0.000000] e820: BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000006dfff] usable
[ 0.000000] BIOS-e820: [mem 0x000000000006e000-0x000000000006ffff] ACPI NVS
[ 0.000000] BIOS-e820: [mem 0x0000000000070000-0x0000000000087fff] usable
[ 0.000000] BIOS-e820: [mem 0x0000000000088000-0x00000000000bffff] reserved
[ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x00000000df2befff] usable
[ 0.000000] BIOS-e820: [mem 0x00000000df2bf000-0x00000000dfabefff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000dfabf000-0x00000000dfbbefff] ACPI NVS
[ 0.000000] BIOS-e820: [mem 0x00000000dfbbf000-0x00000000dfbfefff] ACPI data
[ 0.000000] BIOS-e820: [mem 0x00000000dfbff000-0x00000000dfbfffff] usable
[ 0.000000] BIOS-e820: [mem 0x00000000dfc00000-0x00000000dfffffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000f8000000-0x00000000fbffffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000fec00000-0x00000000fec00fff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000fec10000-0x00000000fec10fff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000fed80000-0x00000000fed80fff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000fee00000-0x00000000fee00fff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000ffc00000-0x00000000ffffffff] reserved
[ 0.000000] BIOS-e820: [mem 0x0000000100000000-0x0000000106ffffff] usable
[ 0.000000] BIOS-e820: [mem 0x0000000107000000-0x000000011effffff] reserved
[ 0.000000] NX (Execute Disable) protection: active
[ 0.000000] efi: EFI v2.31 by INSYDE Corp.
[ 0.000000] efi: ACPI=0xdfbfe000 ACPI 2.0=0xdfbfe014 SMBIOS=0xdfabef98
[ 0.000000] efi: mem00: type=3, attr=0xf, range=[0x0000000000000000-0x0000000000001000) (0MB)
[ 0.000000] efi: mem01: type=7, attr=0xf, range=[0x0000000000001000-0x000000000000e000) (0MB)
[ 0.000000] efi: mem02: type=3, attr=0xf, range=[0x000000000000e000-0x0000000000010000) (0MB)
[ 0.000000] efi: mem03: type=7, attr=0xf, range=[0x0000000000010000-0x000000000002e000) (0MB)
[ 0.000000] efi: mem04: type=3, attr=0xf, range=[0x000000000002e000-0x000000000002f000) (0MB)
[ 0.000000] efi: mem05: type=4, attr=0xf, range=[0x000000000002f000-0x0000000000030000) (0MB)
[ 0.000000] efi: mem06: type=3, attr=0xf, range=[0x0000000000030000-0x000000000006e000) (0MB)
[ 0.000000] efi: mem07: type=10, attr=0xf, range=[0x000000000006e000-0x0000000000070000) (0MB)
[ 0.000000]...

Aleksander Kovač (adrkv97) wrote :

is there any bluetooth driver for rt3290? i have ubuntu 13.04 and wifi works fine, but bluetooth is simply dead.....

sry for my bad english

wmccarty (wdmlist) wrote :

I am also having the same issue.

Mahesh S Rao (mahesh-srao) wrote :

Having same issue on hp Pavilion 15-e016TX, Ubuntu 13.04
Kernel ve: 3.9.11-030911-generic

WiFi works fine.. No Bluetooth, Device driver status is unclaimed

downloaded rt3290
http://www.mediatek.com/_en/07_downloads/01-1_windowsDetail.php?sn=5033

http://askubuntu.com/questions/253632/how-do-i-get-a-ralink-rt3290-wireless-card-working
Unable to compile..

Josue Soto (josue-soto1) wrote :

Hi I had installed 12.04LTS 64 bit.
Drivers for WIFI works fine. However Bluetooth is not detected.
I had tried solution: Setting Up Wifi and Bluetooth on 12.04 LTS posted previously, but cannot compile in the latest kernel 3.8.

regards
Josue Soto

apport information

description: updated

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

Changed in linux (Ubuntu):
status: Incomplete → Confirmed

Hi found solution how to make bluetooth work. I use https://launchpad.net/~barracuda72/+archive/ralink and download package with source code https://launchpad.net/~barracuda72/+archive/ralink/+files/rtbth-dkms_3.9.3-0ubuntu1~ppa3.tar.gz and compile and install. After then my bluetooth adapter starts work. Tested on Ubuntu 13.10

casper (casper-e) on 2013-10-21
Changed in linux (Ubuntu):
assignee: nobody → casper (casper-e)
assignee: casper (casper-e) → nobody
Høst (helvete) on 2014-05-07
tags: added: trusty
Changed in linux (Ubuntu):
status: Confirmed → Incomplete
tags: added: kernel-request-3.13.0-24.46
Høst (helvete) on 2014-06-14
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
ChemaRR (buzonchachi) on 2014-07-01
no longer affects: linux
tags: removed: apport-collected bluetooth olivia ralink rt3290 third-party-packages
wmccarty (wdmlist) on 2014-07-17
tags: added: bot-stop-nagging
summary: - Ralink RT3290 needs bluetooth driver
+ Ralink RT3290 doesn't have a bluetooth driver
Changed in linux:
importance: Undecided → Unknown
status: New → Unknown
Changed in linuxmint:
status: New → Confirmed
Changed in linux (Ubuntu):
status: Confirmed → Triaged
Changed in linux (Ubuntu):
status: Triaged → Confirmed
Changed in linux (Ubuntu):
status: Confirmed → Triaged
Jayakrishnan (jkv-nair) on 2014-11-02
Changed in linux (Ubuntu):
status: Triaged → Confirmed
status: Confirmed → New
status: New → Confirmed
AAK (aakb234) on 2014-11-03
Changed in linux (Ubuntu):
assignee: nobody → AAK (aakb234)
visred (visred) on 2014-12-05
Changed in linux (Ubuntu):
assignee: AAK (aakb234) → visred (visred-deactivatedaccount-deactivatedaccount)
status: Confirmed → Incomplete
Høst (helvete) on 2014-12-07
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Tomáš (halamek-tomas) on 2015-11-16
affects: linux (Ubuntu) → bluetooth
Changed in bluetooth:
assignee: visred (visred) → Tomáš (halamek-tomas)
Changed in ubuntu:
status: New → Confirmed
Høst (helvete) on 2016-11-14
Changed in bluetooth:
assignee: Tomáš (halamek-tomas) → nobody
203 comments hidden view all 283 comments
Blaze (blaze) wrote :

Yeah, I have a decompiled file already. But, as far as it cannot be compiled back with all the resources included, there's not much use of it. There are non-zero chances to get the sources from Mediatek, but you need to find the right person and maybe to sign some NDA. It would be better to try that.

Jan Vodochalek (kukulo2011) wrote :

I am wondering what the Mediatek is going to protect with NDA. The rt3290 combo card is a legacy product and moreover they abandoned the support of the card. Will be they selling this product in the future ? Anyway, there is only 64bit version out in the linux domain only for one platform. új

Jan Vodochalek (kukulo2011) wrote :

You will need following source files. I am attaching the list.

Jan Vodochalek (kukulo2011) wrote :

The problem is in the rtbt binary. The BT V4 and BT V2 pairing routines are completely different. I traced the rtbt binary with edb debugger and I could find the LMssp_LM_User_Confirmation_Request_Reply routine activated only with BT V4 devices. Eventually we could pair BT V4 devices with patched rtbt binary in order to pair BT V4 devices.

Høst (helvete) wrote :

@kukulo2011
If you're going to use the driver on Ubuntu 12.04 you can use the unpatched version that is several replies back in this thread. It works flawlessly with Ubuntu 12.10 (up to Ubuntu 13.10).

Just installed the driver on Manjaro Linux, but the bt chip appears to not be recognized by the OS. Also, I remember that if I did an 'sudo modprobe rtbth', the light would turn from orange to white. But it's not turning white, lol.

Some outputs
[schutzstaffel@kristallnacht ~]$ uname -a
Linux kristallnacht 4.9.0-1-MANJARO #1 SMP PREEMPT Fri Dec 23 10:47:01 UTC 2016 x86_64 GNU/Linux

sudo lspci -v:
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 16
 Memory at f0200000 (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-ba-ac-a0-dc-84-0c
 Kernel driver in use: rtbt
 Kernel modules: rtbth

relevant dmesg output when rmmod'ing rtbth and then modprobe'ing it again:

[ +5.990406] ieee80211 phy0: rt2x00queue_flush_queue: Warning - Queue 2 failed to flush
[Jan16 20:38] ieee80211 phy0: rt2x00queue_flush_queue: Warning - Queue 2 failed to flush
[ +12.505436] Bluetooth: rtbt_hps_iface_deinit(): hciDev=0xffff9cb2b5504000
[ +0.002935] Bluetooth: remove rtbt_pci_driver done!
[ +13.172726] Bluetooth: RTBT_Tb: vendor=0x1814, device=0x3298
[ +0.000002] Bluetooth: RTBT_Tb: vendor=0x0, device=0x0
[ +0.000002] Bluetooth: DynamicAlloc pci_device_id table at 0xffff9cb2491e4f40 with size 64
[ +0.000001] Bluetooth: RTBT_Tb: vendor=0x1814, device=0x3298
[ +0.000001] Bluetooth: Convert: vendor=0x1814, device=0x3298
[ +0.000002] Bluetooth: RTBT_Tb: vendor=0x0, device=0x0
[ +0.000001] Bluetooth: pci_device_id: vendor=0x1814, device=0x3298
[ +0.000186] Bluetooth: rtbt_pci_probe(): PCI Dev(0000:02:00.1) get resource at 0xf0200000,VA 0xffffb95442c60000,IRQ 16.
[ +0.000010] Bluetooth: call dev_ops->dev_ctrl_init!
[ +0.000017] Bluetooth: call dev_ops->dev_resource_init!
[ +0.000208] RX_Base_PTR0(0x180)= 0x371cd000
[ +0.000798] RX_Base_PTR1(0x190)= 0x280

Installed the driver from the last github link with 'sudo make install' (yes I did comment the 3 lines before installing it) and then patched it. No luck so far.

Jan Vodochalek (kukulo2011) wrote :

When you want to patch the rtbt binary with newest firmware, you should do it befofe sudo make install. You can repeat the sudo make install after patching the binary. I will give it a try on 12.10 live system.

Jan Vodochalek (kukulo2011) wrote :

I tried the Ubuntu 12.10 with the rtbt driver, but the situation is the same as with the 12.04: The BT V4 device can pair, but cannot transfer files. Moreover the connection drops each 1-2 seconds, then reconnects.

Høst (helvete) wrote :

@kukulo2011
Which driver are you using? There's a zip somewhere among all the previous replies that works *absolutely* flawlessly. I guess the patched version doesn't work with older kernel releases.

Try using Ubuntu 13.10 - the last Ubuntu release on which the driver worked with no problems.

As for the driver, whatever I did it wouldn't work. Even without patching the driver it should at least initialize the bt device, but it doesn't seem to enable the bt chip. The module is loaded in kernel, though. Perhaps it doesn't work on non-ubuntu kernels.

Blaze (blaze) wrote :

2 Höst

1. It's simply not possible that you were using the same driver every and each ubuntu release because kernel API is constantly changing.

2. Since you are a dualboot user there is a high probability that you already had an updated firmware from windoze session. That's why you had no issues at some point. But now it's fixed and the stock firmware is being loaded at every driver startup. Ironically it's the old outdated and buggy firmware. :) Remember: it's almost 5 years old.

Jan Vodochalek (kukulo2011) wrote :

@Host

The bluetooth driver I was using with Ubuntu 12.04 and 12.10 was the loimu's driver. The rtbth.ko was compiled without problems. Pairing with BT V2 possible, pairing with BT V4 as well, but I was unable to send data to BT V4 and the connection dropped after 2 seconds. I've tried the firmware from windows bluetooth driver: I shortened the file by three bytes and used the update-driver.sh in the tools directory, then used sudo make install. Unfortunately the windows firmware is working the same way - I cannot pair in simple secure mode. The rtbt user space driver is doing the pin comparison and rejecting the connection. I guess the rtbt user space driver needs to be corrected. In the later kernels the data structures were changing, but the rtbt binary remained unchanged and thus some structures are failing to get processed by rtbt binary. If we would have source then the thing would be straight forward, but without source modifying the rtbt binary really depends on how lucky is the one, who is tracing the binary. The rtbt binary is possible to trace with edb debugger in user space, but the tracing is complicated in the timeout routines, where the other bluetooth party is setting timeout on communication channel and thus making the tracing difficult.

Blaze (blaze) wrote :

>In the later kernels
>the data structures were changing, but the rtbt binary remained
>unchanged and thus some structures are failing to get processed by rtbt
>binary.

But is it possible to track down the exact kernel version where those changes did happen? So we can find out at least what was changed (ioctl api for example). That's the information I'm trying to get here all the way, but nobody's willing to help. Maybe it's even possible to came up with some workaround on the kernelspace side but only if you know exactly what's wrong.

Jan Vodochalek (kukulo2011) wrote :

It is quite hard, since I have no source for the rtbt. The kernel 3.18 was ok to pair, but the kernel 4.02 is not pairing in simple secure mode. When I compiled the wrapper rtbth some time ago, I checked the source and there are data structure changes between these two versions. You have this already implemented in your source via macros, which is checking the kernel version. Can happen that some more structures are changes.

Blaze (blaze) wrote :

But I didn't touch any structures except "rtbt_hps_ops" and now it's in an original state besides it's not being used inside the userspace part.

Jan Vodochalek (kukulo2011) wrote :

The work was done previously, before you took over the source. Check the kernel macros in the source.

Blaze (blaze) wrote :

But I had to revisit and rework all the changes that were done before up to an original version in order to make the module compile with every kernel since v3.2. So now I'm pretty confident that every single change works how it should and has no sideffects.

Jan Vodochalek (kukulo2011) wrote :

Is it possible that the changes to bluetooth package affect the driver pairing? What I have tested, the Bt v4 pairing on Ubuntu 12.04 and 12.10 succeeds, but on 14.04 and later not. The differences that could affect the functioning are kernel and bluetooth package - bluez. When I tried to pair with command line on 15.10, the pairing was not successful due to mismatched pin.

Blaze (blaze) wrote :

Can it be that some security imrovements had been made on the bluez side? As a result default pin is not being accepted in simple secure mode.

Jan Vodochalek (kukulo2011) wrote :

The default pin does not matter. In ssm both pins are shown up. Each time a new set of pins is generated. When I click on accept pin, the rtbt routine LMssp_LM_User_Confirmation_Request_Reply is being executed. When I traced the binary, for some reason the comparison routine is not reached. It can be that some signals in the bluez changed in the header files, the hexadecimal value of some strings. I would be looking for something like that. The bluez 4.98 was with kernel 3.18 working, the bluez 5.35 with kernel 4.2.0 is not pairing.

Blaze (blaze) wrote :

Oh, I guess you may be right. It looks more like a protocol story rather than an API story. In the worst case scenario we can patch bluez and bluez-obexd to make the whole thing work again as it should.

Jan Vodochalek (kukulo2011) wrote :

I would first get the source diff of bluez and when we have the root cause of the pin mismatch, then I would decide whether is reasonable to patch bluez or the rtbt binary.

Høst (helvete) wrote :

@kukulo2011 (post 252)

Having Windoze doesn't always mean that it will update critical firmware components (it doesn't, and I barely use Windows). I just installed Ubuntu 13.10 on a usb drive along with the respective drivers (rt3290sta for wifi and rtbt for bt) and almost everything works as expected. However I noticed some things that as far I remember didn't happen in 12.04-13.04:

- When trying to send/receive a file, the transfer dialog returns an error (it doesn't even connect to the device).
- BT FTP browsing works, but nautilus gives an error (it was something like 'backend doesn't support this') when trying to download/upload a file to the bt client, which, in this case, was my phone. It's not my phone's fault, though.
- Oddly, applications can download data if you open anything. For example, if you open a picture, the image viewer will download and display it.
- The connection doesn't drop when using the PC as bluetooth speaker.
This suggests me that something is wrong in Ubuntu's bluetooth stack.

I've been following this since a while ago and I remember that back when Ubuntu 14.04 was out I tried:
- downgrading the kernel
- downgrading everything bluez-related
Nothing worked. I'm now thinking about downloading older Ubuntu versions on which the driver worked ok and then try upgrading bluez/kernel to see what happens.
Count me in if you want a tester.

Jan Vodochalek (kukulo2011) wrote :

@Host

Can you trace with edb debugger this routine inside rtbt?

LMssp_LM_User_Confirmation_Request_Reply()
{// addr = 0x00486064
    long long _v16; // _cfa_fffffff0
    long long _v32; // _cfa_ffffffe0
    long long _v40; // _cfa_ffffffd8
    long long _v48; // _cfa_ffffffd0
    _unknown_ __rbp; // r59
    long long _t73; // _t73
    long long _t96; // _t96
    long long _t102; // _t102
    long long _t109; // _t109
    long long _t110; // _t110

    _v32 = _t102;
    _v40 = _t109;
    _v48 = _t96;
    _t73 = _v40;
    _t110 = _t73;
    LM_Find_Link_Table_Entry();
    _v16 = _t73;
    if(_v16 == 0) {
        return;
    }
    if(( *(_v16 + 122) & 65535) == 31) { // *(_v16 + 122) & 65535) = 31
        if(( *(_v16 + 219) & 255) != 0) {
            DM_Clear_Timer(); //0x0049bbf4 //timer cleared
             *(_v16 + 219) = 0;
        }
        if(( *(_v16 + 216) & 255) == 0) {
             *(_v16 + 221) = 1;
            if(( *(_v16 + 220) & 255) == 0) { //0x48615c we go here
                 *(_v16 + 122) = 33; //put 33 decimal value to pointer *(_v16 + 122) and quit writing du
            } else {
                if(( *(_v16 + 221) & 255) == 1) {
                    r8d = 65;
                    LMP_Send_Accepted(); //0x00494DF6
                    _t110 = _v16;
                    _LMssp_Send_LMP_DH_Key_Check() //0x0048983A
                   }
            }
        } else {
             *(_v16 + 221) = 1;
            if(( *(_v16 + 225) & 255) != 0) {
                _t110 = _v16;
                _LMssp_Send_LMP_DH_Key_Check();//0x0048983A
                 *(_v16 + 122) = 32;
            }
        }
        write_du(6, _v16 + 424, _v48, _t110); //we get here and quit
        return;
    } else {
        return;
    }

Somehow the value at the *(_v16 + 220) in this routine is zero and the program is quitting before _LMssp_Send_LMP_DH_Key_Check() is reached. This is not the case on Ubuntu 12.04 and 12.10 where it is pairing. I would be interested how it is on Ubuntu 12.10. You will need a BT V4 device in order to pair with simple secure mode and reach this routine.

The decompiled file is provided in the earlier post.

Blaze (blaze) wrote :

_v16 stores the output of LM_Find_Link_Table_Entry() which can be 0 when RtlCompareMemory() is non-zero (error) on the last iteration. See the link below.

http://paste.ubuntu.com/23880923/

Blaze (blaze) wrote :

Logic an physical link table structures from include/rt3298_iomap.h:

http://paste.ubuntu.com/23881034/

Jan Vodochalek (kukulo2011) wrote :

At the address 0x48615c I've got jump, so the memory at the address (_v16 + 220) & 255) equals 0, which is wrong. This way we never reach the _LMssp_Send_LMP_DH_Key_Check() routine.

I would need to trace this on Ubuntu 12.10 where is the pairing successful.

I could nop-out the jump at the address 0x48615c and reach the _LMssp_Send_LMP_DH_Key_Check(), but the comparison is done in the _LMssp_Send_LMP_DH_Key_Check(), so the patch of rtbt was so far without pairing.

Blaze (blaze) wrote :

Correction:
>on the last iteration
on every iteration
Or there's another way also but it doesn't really make sense. I'm being confused here.

Blaze (blaze) wrote :

So my basic theory is: LM_Find_Link_Table_Entry() is trying to read something (link table) from efuse data and when the data is malformed LMssp_LM_User_Confirmation_Request_Reply() fails. Now it's only left to find out why is the data malformed.

Blaze (blaze) wrote :

How about to try compiling the driver with an ancient gcc version (4.5.3)?

Jan Vodochalek (kukulo2011) wrote :

I traced the rtbt binary on 12.10. The result is:
Ubuntu 12.10:

48609b - jump taken
4860b3 -jump
4860cc - no jump
486102 - jump
48615c - jump

It means, that the _v16 value is zero on Ubuntu 12.10. So the function LM_Find_Link_Table_Entry() should return 0 value. For some reason the comparison in that routine is returning non zero value on 15.10.
The rest of the LMssp_LM_User_Confirmation_Request_Reply() routine on 12.10 clears the timer and writes du then quits.

Jan Vodochalek (kukulo2011) wrote :

I have got the same trace on Ubuntu 15.10. So LM_Find_Link_Table_Entry() returns a valid pointer value as it should. However I still haven't got pairing in 15.10.

Antonio (fagottino) wrote :

I had this problem on Hp ENVY 15-j040el and Ubuntu 16.04 and I solved the problem with this (Italian) guide
http://forum.ubuntu-it.org/viewtopic.php?f=9&t=617322&p=4961328#p4961328

Jan Vodochalek (kukulo2011) wrote :

Can you pair with BT V4 devices?

shihiro (asd616-0) wrote :

New Deb-File look here: https://launchpad.net/~blaze/+archive/ubuntu/rtbth-dkms

Use in terminal

sudo add-apt-repository ppa:blaze/rtbth-dkms sudo apt-get update

and look in synaptic for package rtbth-dkms and install it

or load and install it here https://launchpad.net/~blaze/+archive/ubuntu/rtbth-dkms/+packages

On the first link there is the source link to GitHub https://github.com/loimu/rtbth-dkms

On README.md you can read:

# Init sudo modprobe rtbth
sudo rfkill unblock bluetooth
hcitool dev # check

i typed it in terminal and everything works.

Høst (helvete) wrote :

According to https://bugzilla.kernel.org/show_bug.cgi?id=84521, there's a kernel module that seems to be working (https://github.com/loimu/rtbth-dkms). I can't test it by myself since I replaced the wireless combo with a Qualcomm-Atheros card.

It's (at least) compatible with most HP laptops and all-in-one desktops. I can understand that a lot of you aren't in the position of buying a new card, but if you're interested here's the datasheet:
https://wikidevi.com/files/Atheros/specsheets/AR9462.pdf

Høst wrote:
> According to https://bugzilla.kernel.org/show_bug.cgi?id=84521, there's
> a kernel module that seems to be working (https://github.com/loimu
> /rtbth-dkms). I can't test it by myself since I replaced the wireless
> combo with a Qualcomm-Atheros card.
>
> It's (at least) compatible with most HP laptops and all-in-one desktops. I
> can understand that a lot of you aren't in the position of buying a new
> card, but if you're interested here's the datasheet:
> https://wikidevi.com/files/Atheros/specsheets/AR9462.pdf

Well, that's my Github profile. And I already asked a number of times to
test the driver against GCC 4.5 to see if the pairing works, but still no one
did.

Alex10336 (ap10336) wrote :

@Blaze: Can you update make/install instruction ?

clone & make seem to work. (gcc 5.4)

Blaze (blaze) wrote :

Alex10336 wrote:
> @Blaze: Can you update make/install instruction ?
>
> clone & make seem to work. (gcc 5.4)

GCC 4.5 is an oldish GCC version Ubuntu 12.04 had in times of the driver
release (see the doc provided by Ralink). But today you need to compile
and install it yourself. Computer savvy people required.

Ralink doc on the driver:
https://github.com/loimu/rtbth-dkms/blob/master/doc/Ubuntu
%20RT3290%20Bluetooth%20Host%20Driver%20User%20Guide.pdf

Alex10336 (ap10336) wrote :

Hello,

Step followed, one by one.
Still fail on pairing. saying no same paring code for a phone. Just fail for a mouse.

kernel 4.4.0 / ubuntu base 17.04

Still fail in Aardvark 17.10

No pairing even on my ubuntu 16.04 4-8..-rt
Sad, bluetooth is one function basic for me.

Displaying first 40 and last 40 comments. View all 283 comments or add a comment.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.