linux 用藍芽和手機通訊

來源:互聯網
上載者:User

標籤:通訊   掃描   0ms   pack   bluetooth   bridge   ...   can   sla   

載入模組: 

# modprobe hci_usb
   # modprobe rfcomm
   # hciconfig hci0 up
# hciconfig hci0 up

查看狀況: 
# hciconfig -a

hci0:   Type: USB
        BD Address: 00:10:60:A3:68:9F ACL MTU: 192:8  SCO MTU: 64:8
        UP RUNNING PSCAN ISCAN
        RX bytes:1860 acl:10 sco:0 events:88 errors:0
        TX bytes:1432 acl:10 sco:0 commands:52 errors:0
        Features: 0xff 0xff 0x0f 0x00
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
        Link policy: HOLD SNIFF PARK
        Link mode: SLAVE ACCEPT
        Name: ‘Debian‘
        Class: 0x000100
        Service Classes: Unspecified
        Device Class: Computer, Uncategorized
        HCI Ver: 1.1 (0x1) HCI Rev: 0x20d LMP Ver: 1.1 (0x1) LMP Subver: 0x20d
        Manufacturer: Cambridge Silicon Radio (10)

掃描周圍藍牙裝置: 

# hcitool scan

Scanning...
      00:80:37:B5:A8:3A     T68i
      00:0E:07:1C:AE:1D     T628

Ping一下看看: 

# l2ping 00:0E:07:1C:AE:1D   #(l2ping,是小寫L而不是數字1)

Ping: 00:0E:07:1C:AE:1D from 00:10:60:A3:68:9F (data size 20) ...
0 bytes from 00:0E:07:1C:AE:1D id 200 time 39.62ms
0 bytes from 00:0E:07:1C:AE:1D id 201 time 35.25ms
0 bytes from 00:0E:07:1C:AE:1D id 202 time 33.60ms
0 bytes from 00:0E:07:1C:AE:1D id 203 time 40.57ms
0 bytes from 00:0E:07:1C:AE:1D id 204 time 38.96ms
0 bytes from 00:0E:07:1C:AE:1D id 205 time 34.60ms
6 sent, 6 received, 0% loss

本地主機設定檔(主機名稱等參數):       

/etc/bluetooth/hcid.conf
PIN配對碼所在檔案:      
/etc/bluetooth/pin
載入設定檔:      
#hcid -f /etc/bluetooth/hcid.conf

linux 用藍芽和手機通訊

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.