This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] BOOST-CC2564MODA:CAN't init device with Ubuntu 20.04

Guru**** 654100 points
Other Parts Discussed in Thread: BOOST-CC2564MODA, CC2564C
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/992175/boost-cc2564moda-can-t-init-device-with-ubuntu-20-04

器件型号:BOOST-CC2564MODA
主题中讨论的其他器件: CC2564C

您好!

我们正在使用 Linux 作为主机、通过 BOOST-CC2564MODA 评估板验证 HCI UART 功能。 我们可以使用 btattach 命令通过 Linux 连接模块、但 在尝试 建立 hci0节点时、我们会遇到设备或资源错误。 请找到所附的日志。  

用于连接的命令

sudo btattach -B /dev/ttyUSB0

在连接模块时记录

[ 4144.853920] Bluetooth: HCI UART driver ver 2.3
[ 4144.853925] Bluetooth: HCI UART protocol H4 registered
[ 4144.853926] Bluetooth: HCI UART protocol BCSP registered
[ 4144.854016] Bluetooth: HCI UART protocol LL registered
[ 4144.854018] Bluetooth: HCI UART protocol ATH3K registered
[ 4144.854050] Bluetooth: HCI UART protocol Three-wire (H5) registered
[ 4144.854186] Bluetooth: HCI UART protocol Intel registered
[ 4144.854462] Bluetooth: HCI UART protocol Broadcom registered
[ 4144.854486] Bluetooth: HCI UART protocol QCA registered
[ 4144.854488] Bluetooth: HCI UART protocol AG6XX registered
[ 4144.854588] Bluetooth: HCI UART protocol Marvell registered

启动模块

$ sudo hciconfig hci0 up
Can't init device hci0: Device or resource busy (16)

发生 设备或资源繁忙错误时的 dmesg

[ 4227.635449] debugfs: File 'dut_mode' in directory 'hci0' already present!

1.您能不能告诉我们哪里出错了?

2.在某些论坛中,我们发现必须将不同的固件替换到 /lib/firmware/ti-connectivity 文件夹中,如果需要,您可以指导如何进一步操作?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您可以尝试使用"hciattach"实用程序吗?  

    hciattach /dev/ttyUSB0 Texas 115200

    谢谢

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    请尝试使用以下服务包:

    git.ti.com/.../initscripts

    谢谢

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好 Hari、

    感谢您的回答。

    我尝试使用您共享的源代码中的 initscripts。

    我将 TIInit_6.7.16.bts 文件复制到 /lib/firmware/ti-connectivity

    $ sudo hciattach /dev/ttyUSB3 texas 115200
    Found a Texas Instruments' chip!
    Firmware file : /lib/firmware/ti-connectivity/TIInit_6.7.16.bts
    Loaded BTS script version 1
    texas: changing baud rate to 3000000, flow control to 1
    Cannot send hci command to socket: Connection timed out
    Can't initialize device: Connection timed out

    然后、我尝试 了 https://e2e.ti.com/support/wireless-connectivity/bluetooth/f/bluetooth-forum/738769/linux-boost-cc2564moda-cc256xb-service-pack-load-fail 论坛中的解决方案、如下所示、

    将 initscripts-TIInit_6.7.16_bt_spec_4.1.bts 文件复制到 /lib/firmware/ti-connectivity 并重命名为 TIInit_6.7.16.bts

    输出是  

    $ sudo hciattach /dev/ttyUSB2 texas 115200
    Found a Texas Instruments' chip!
    Firmware file : /lib/firmware/ti-connectivity/TIInit_6.7.16.bts
    Loaded BTS script version 1
    texas: changing baud rate to 115200, flow control to 1
    Can't init device hci0: Device or resource busy (16)Can't initialize device: Device or resource busy

    现在、我将 initscripts-TIInit_6.7.16_ble_add-on.bts 文件复制到 /lib/firmware/ti-connectivity 并重命名为 TIInit_6.7.42.bts

    $ sudo hciattach /dev/ttyUSB2 texas 115200
    Found a Texas Instruments' chip!
    Firmware file : /lib/firmware/ti-connectivity/TIInit_6.7.42.bts
    Loaded BTS script version 1
    Device setup complete

    hciattach 成功

    但只发生了 lescan、我无法连接任何蓝牙设备。

    您能否指导您如何继续?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    我看到.. BLE 补丁似乎未包含在 BTS 主文件中。

    可以、请尝试使用服务包中 BluetopiaPM_Linux 下的 BTS 文件:

    https://www.ti.com/tool/CC256XB-BT-SP

    谢谢

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    HII Hari、

    我尝试了您的建议、但出现以下错误

    $ sudo hciattach /dev/ttyUSB0 texas 115200
    Found a Texas Instruments' chip!
    Firmware file : /lib/firmware/ti-connectivity/TIInit_6.7.16.bts
    Loaded BTS script version 1
    texas: changing baud rate to 3000000, flow control to 1
    Cannot send hci command to socket: Connection timed out
    Can't initialize device: Connection timed out
    

    也尝试 使用3000000波特率、但结果相同。  

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好 Hari、

    我很好奇您是否对此有任何更新。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Aravinth、

    我还看到 CC2564C 有类似的问题。 但是、我看不到 WL18xx BT 控制器的问题。 我想、是否存在任何端字节序问题。 您能否尝试对 ARM 主机(如 AM335/AM43x/AM57x 主机)进行相同的实验?

    谢谢