linux bluetooth的问题

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

linux bluetooth的问题

2,225 Views
haibohe
Contributor II

软件环境:

使用的是Linux 4.1.15 BSP包,根据i.MX_Linux_Reference_Manual文档打开了所有的关于BT的flag。

用yocto BSP build 

Building X11
------------
  DISTRO=fsl-imx-x11 MACHINE=imx6qsabresd source fsl-setup-release.sh -b build-x11
  bitbake fsl-image-gui
or
  bitbake fsl-image-qt5

生成的rootfs文件系统

硬件环境:

       一套蓝牙键盘鼠标套件+USB适配器,在windows下面和ubuntu下面都可以正常使用。

现在在ARM iMX6上面:

    log如下:

    root@imx6qsabresd:~# hciconfig -a
        hci0:   Type: BR/EDR  Bus: USB
        BD Address: 00:1A:7D:DA:71:13  ACL MTU: 310:10  SCO MTU: 64:8
        DOWN
        RX bytes:574 acl:0 sco:0 events:30 errors:0
        TX bytes:368 acl:0 sco:0 commands:30 errors:0
        Features: 0xff 0xff 0x8f 0xfe 0xdb 0xff 0x5b 0x87
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
        Link policy: RSWITCH HOLD SNIFF PARK
        Link mode: SLAVE ACCEPT

root@imx6qsabresd:~# hcitool scan    
Scanning ...
        0C:FC:85:CE:02:5E       Bluetooth  Keyboard
        0C:FC:83:9E:C1:EB       Bluetooth Mouse
root@imx6qsabresd:~#

可以找到键盘鼠标

操作的方法如下:

hciconfig hci0 up

hcitool dev

mknod /dev/rfcomm0 c 216 1

chmod 666 /dev/rfcomm0

rfcomm bind /dev/rfcomm0 0C:FC:85:CE:02:5E 1
sdptool add --channel=1 DID SP DUN LAN FAX OPUSH FTP HS HF SAP NAP GN PANU HID CIP CTP A2SRC A2SNK SYNCML NOKID PCSUITE SR1

rfcomm

hcitool cc 0C:FC:85:CE:02:5E

在网上查了很多,无论怎么连接都无法连接上,也不知道配置文件或是哪里设置不对,请iMX6的的工程师们,帮忙看看,谢谢了!由于招标项目所需求,感谢了!急急急!

谢谢大神们了!

0 Kudos
3 Replies

1,575 Views
igorpadykov
NXP Employee
NXP Employee

Hi haibo

are you using BCM4339 as Linux 4.1.15 BSP support this model, please check

PDF | Murata Manufacturing 

for other models you may need to contact vendor support.

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,575 Views
haibohe
Contributor II

参考了这个pdf说的是串口,而我用的是USB适配器,所以两个不一样,都能找到鼠标和键盘,同时也可以l2ping 鼠标的MAC地址,都可以ping通!但是就是连接的时候连接不上,我不知道在关于yocto的蓝牙这个模块的时候,还需要配置什么才可以正常连接呢?很奇怪了!谢谢大神位再想想看有什么办法呢?在ubuntu x86下面桌面的右上角有一个蓝牙图标,就可以连接我的鼠标,不知道这个后台做了哪些动作和启动程序,就可以连接,待解这个问题 ,感谢了!

0 Kudos