m9_22458869 2025-08-11 00:58 采纳率: 0%
浏览 76

kali 如何打开蓝牙

虚拟机kali 打开蓝牙出现错误

sudo systemctl start bluetooth 
sudo hciconfig hcio up 

Can't init device hci0: Function not implemented (38)

自己检测的信息

dmesg | grep -i blue
lsusb | grep -i bluetooth

返回结果

[    6.179085] usb 2-2.1: Product: Virtual Bluetooth Adapter
[    9.087485] Bluetooth: Core ver 2.22
[    9.087534] NET: Registered PF_BLUETOOTH protocol family
[    9.087535] Bluetooth: HCI device and connection manager initialized
[    9.087539] Bluetooth: HCI socket layer initialized
[    9.087541] Bluetooth: L2CAP socket layer initialized
[    9.087544] Bluetooth: SCO socket layer initialized
[    9.254581] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    9.254589] Bluetooth: BNEP filters: protocol multicast
[    9.254619] Bluetooth: BNEP socket layer initialized
[    9.258667] Bluetooth: hci0: unexpected cc 0x0c12 length: 2 < 3
[    9.258684] Bluetooth: hci0: Opcode 0x c12 failed: -38
Bus 002 Device 004: ID 0e0f:0008 VMware, Inc. Virtual Bluetooth Adapter

请问如何打开蓝牙

  • 写回答

6条回答 默认 最新

  • 宝码香车 优质创作者: JavaScript技术领域 2025-08-11 06:13
    关注

    让【宝码香车】来帮您解答,本回答参考DeepSeek编写,并整理提供。

    如果答案让您满意,请采纳、点赞、关注,非常感谢!
    .  
    每日一句正能量,让它带给您好心情:你对生活的态度,决定了生活对你的温度。
    .  

    根据你提供的信息,问题出在虚拟机环境下虚拟蓝牙适配器的初始化失败。以下是解决方案和详细步骤:

    1. 确认虚拟机蓝牙支持

    首先需要确保VMware已正确配置蓝牙设备:

    lsusb | grep -i bluetooth
    

    你的输出显示设备已被识别,但需要检查VMware设置:

    • 关闭Kali虚拟机
    • 在VMware设置中确保已添加蓝牙控制器(USB控制器需启用蓝牙支持)

    2. 加载蓝牙内核模块

    sudo modprobe btusb
    sudo modprobe bluetooth
    

    3. 检查蓝牙服务状态

    sudo systemctl status bluetooth
    

    如果服务未运行:

    sudo systemctl enable --now bluetooth
    

    4. 虚拟机特有解决方案

    由于错误代码-38(Function not implemented),这是VMware虚拟设备的常见问题:

    方案A:使用VMware官方驱动

    sudo apt install bluez*
    sudo service bluetooth restart
    

    方案B:强制重载设备

    sudo hciconfig hci0 reset
    sudo hcitool dev  # 检查设备是否出现
    

    5. 替代方案(如仍失败)

    如果上述方法无效,可以考虑:

    1. 使用USB直通模式连接物理蓝牙适配器
    2. 更换虚拟机网络桥接模式:
    sudo brctl addbr br0
    sudo brctl addif br0 eth0
    

    6. 最终验证

    成功启动后应能看到:

    hciconfig -a
    

    输出中应有UP RUNNING状态

    注意:VMware虚拟蓝牙对某些协议支持有限,如需完整功能建议使用物理设备直通。如果问题持续,可能需要升级VMware Tools和虚拟机硬件版本。

    评论

报告相同问题?

问题事件

  • 创建了问题 8月11日