Linux Deepin蓝牙更新内核后无法使用的问题的各种方法尝试-service\heitool\hciconfig\blueman

简介

目的:解决Linux Deepin 5.10 在联想小新13上无法使用蓝牙的问题。
问题来源:5.7内核ok,内核升级带来的问题。
尝试过的方法:开启蓝牙服务、使用hciconfig、blueman。以上办法有人成功过。。但是我试了之后都不行。
可能的原因:新版的内核不支持该蓝牙设备?但是旧版的内核支持。。这个逻辑不太正常啊

hciconfig || service (Fail)

5.10.5

$ uname -a
Linux xx 5.10.5-amd64-desktop+ #1 SMP Mon Jan 11 14:55:28 CST 2021 x86_64 GNU/Linux

$ hciconfig -a
hci0:   Type: Primary  Bus: USB
        BD Address: 28:CD:C4:BA:BB:2C  ACL MTU: 1021:6  SCO MTU: 255:12
        DOWN 
        RX bytes:3938 acl:0 sco:0 events:298 errors:0
        TX bytes:37914 acl:0 sco:0 commands:298 errors:0
        Features: 0xff 0xff 0xff 0xfe 0xdb 0xfd 0x7b 0x87
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 
        Link policy: RSWITCH HOLD SNIFF PARK 
        Link mode: SLAVE ACCEPT 
       
$ hciconfig dev
hci0:   Type: Primary  Bus: USB
        BD Address: 28:CD:C4:BA:BB:2C  ACL MTU: 1021:6  SCO MTU: 255:12
        DOWN 
        RX bytes:2180 acl:0 sco:0 events:205 errors:0
        TX bytes:36816 acl:0 sco:0 commands:205 errors:0

$ hcitool dev
Devices:

$ sudo hciconfig hci0 up
Can't init device hci0: Protocol not supported (93)

$ sudo service bluetooth status
● bluetooth.service - Bluetooth service
   Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2021-02-11 11:41:20 CST; 1min 24s ago
     Docs: man:bluetoothd(8)
 Main PID: 1984 (bluetoothd)
   Status: "Running"
    Tasks: 1 (limit: 4915)
   Memory: 2.0M
   CGroup: /system.slice/bluetooth.service
           └─1984 /usr/lib/bluetooth/bluetoothd

2月 11 11:41:20 xx systemd[1]: Starting Bluetooth service...
2月 11 11:41:20 xx bluetoothd[1984]: Bluetooth daemon 5.50
2月 11 11:41:20 xx systemd[1]: Started Bluetooth service.
2月 11 11:41:20 xx bluetoothd[1984]: Starting SDP server
2月 11 11:41:20 xx bluetoothd[1984]: Bluetooth management interface 1.18 initialized

5.7

$ uname -a
Linux xx 5.7.7-amd64-desktop #75 SMP Mon Aug 24 20:38:46 CST 2020 x86_64 GNU/Linux

$ hciconfig -a
hci0:   Type: Primary  Bus: USB
        BD Address: 28:CD:C4:BA:BB:2C  ACL MTU: 1021:6  SCO MTU: 255:12
        UP RUNNING PSCAN ISCAN 
        RX bytes:264503 acl:18378 sco:0 events:363 errors:0
        TX bytes:40194 acl:54 sco:0 commands:288 errors:0
        Features: 0xff 0xff 0xff 0xfe 0xdb 0xfd 0x7b 0x87
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 
        Link policy: RSWITCH HOLD SNIFF PARK 
        Link mode: SLAVE ACCEPT 
        Name: 'xx'
        Class: 0x1c010c
        Service Classes: Rendering, Capturing, Object Transfer
        Device Class: Computer, Laptop
        HCI Version:  (0xa)  Revision: 0x99a
        LMP Version:  (0xa)  Subversion: 0x7253
        Manufacturer: Realtek Semiconductor Corporation (93)

$ hciconfig dev
hci0:   Type: Primary  Bus: USB
        BD Address: 28:CD:C4:BA:BB:2C  ACL MTU: 1021:6  SCO MTU: 255:12
        UP RUNNING PSCAN ISCAN 
        RX bytes:271156 acl:18828 sco:0 events:366 errors:0
        TX bytes:40203 acl:54 sco:0 commands:291 errors:0

$ hcitool dev
Devices:
        hci0    28:CD:C4:BA:BB:2C

$ sudo hciconfig hci0 up
kearney@xx:~$ sudo service bluetooth status
● bluetooth.service - Bluetooth service
   Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: e
   Active: active (running) since Thu 2021-02-11 18:59:26 CST; 12min ago
     Docs: man:bluetoothd(8)
 Main PID: 2418 (bluetoothd)
   Status: "Running"
    Tasks: 1 (limit: 4915)
   Memory: 4.7M
   CGroup: /system.slice/bluetooth.service
           └─2418 /usr/lib/bluetooth/bluetoothd

2月 11 18:59:26 xx bluetoothd[2418]: Starting SDP server
2月 11 18:59:26 xx bluetoothd[2418]: Bluetooth management interface 1.16 initialize
2月 11 18:59:26 xx bluetoothd[2418]: Sap driver initialization failed.
2月 11 18:59:26 xx bluetoothd[2418]: sap-server: Operation not permitted (1)
2月 11 19:00:06 xx bluetoothd[2418]: Endpoint registered: sender=:1.73 path=/MediaE
2月 11 19:00:06 xx bluetoothd[2418]: Endpoint registered: sender=:1.73 path=/MediaE
2月 11 19:00:12 xx bluetoothd[2418]: Unable to get Headset Voice gateway SDP record
2月 11 19:00:27 xx bluetoothd[2418]: bt_uhid_send: Invalid argument (22)
2月 11 19:00:27 xx bluetoothd[2418]: bt_uhid_send: Invalid argument (22)

相关命令

blueman

# 安装蓝牙包,非必要
sudo apt install bluetooth

# 安装blueman工具
sudo apt install blueman

在这里插入图片描述
在这里插入图片描述在这里插入图片描述
但是很奇怪啥也没有,wow的一声哭出来了
在这里插入图片描述
裂开,终于显示出来了一个蓝牙标志。。。右键小蓝牙图片选择添加新设备显示没找到适配器。。。wow又哭了
在这里插入图片描述

No adapter or not able to turn on bluetooth
To test if your device is recognized by BlueZ you can use tools that list all Bluetooth devices on your machine. The following command are supposed to be run from a terminal.
Troubleshooting

# 识别设备
bluetoothctl list

我的空空如也。。。

A hardware killswitch enabled, usually called “airplane mode”. - (飞行模式)
The adapter is not supported by the Linux bluetooth stack. - (Linux还不支持该设备)
To check the later, you can find the hardware ID with lsusb or lspci depending on the interface to google for it.(查看硬件ID然后搜索吧。。。)
Troubleshooting

参考

sudo service bluetooth start
sudo service bluetooth status	# 查看蓝牙状态
sudo systemctl enable bluetooth.service #开启开机自启

Just want to report back, that enabling CONFIG_BT_HCIUART_LL in kernel can fix the (Can’t set device: Protocol not supported) problem.
Same problem:
$hciattach -s 115200 /dev/ttyS1 texas
Found a Texas Instruments’ chip!
Firmware file : /lib/firmware/TIInit_11.8.32.bts
Loaded BTS script version 1
Can’t set device: Protocol not supported
Can’t initialize device: Protocol not supported
The solution of guodong xu works: just set the HCILL protocol flag in the kernel and now the output is:
$hciattach -s 115200 /dev/ttyS1 texas
Found a Texas Instruments’ chip!
Firmware file : /lib/firmware/TIInit_11.8.32.bts
Loaded BTS script version 1
Device setup complete

看来几个修改内核配置的帖子,找了半天都没有找到在哪里配置,最后想起了编译内核的时候在boot下有.config文件,但是本来就是y

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值