如何在Windows上调试蓝牙堆栈,使用哪些工具

问题描述

问题:如何调试Windows10蓝牙堆栈?使用什么工具?

设置:通过蓝牙连接到Windows10计算机的嵌入式Linux板

连接: Linux板正在使用蓝牙bnep服务连接到Windows10计算机,效果很好。

问题:在重新启动Linux板之前,它运行良好,然后在Linux板尝试连接Windows机器时,Windows始终拒绝连接到 bnep 服务,如果它不支持

(这是我对Linux日志的理解,我不知道如何从Windows端获取任何日志)

问题2:为什么Windows拒绝连接?

Windows10计算机蓝牙:

Manufacturer: Cambridge Silicon Radio Ltd.     Hardware Ids: USB\VID_0A12&PID_0001&REV_8891

Driver version: 10.0.17134.1067 

使用btmon创建的Linux开发板日志: complete log wireshark version,系统日志:bluetoothd syslog


    Bluetooth monitor ver 5.48
    = New Index: 00:04:F3:0E:1C:61 (Primary,UART,hci0)              [hci0] 0.964086
     HCI Event: Command Status (0x0f) plen 4                    #2 [hci0] 6.047900
          Create Connection (0x01|0x0005) ncmd 1
            Status: Success (0x00)
    > HCI Event: Connect Complete (0x03) plen 11                #3 [hci0] 11.174878
            Status: Page Timeout (0x04)
            Handle: 3839
            Address: 00:1A:7D:DA:71:11 (OUI 00-1A-7D)
            Link type: ACL (0x01)
            Encryption: disabled (0x00)
    @ Connect Failed: 00:1A:7D:DA:71:11 (0) status 0x04
     HCI Event: Command Status (0x0f) plen 4                   #5 [hci0] 21.943722
          Create Connection (0x01|0x0005) ncmd 1
            Status: Success (0x00)
    > HCI Event: Role Change (0x12) plen 8                      #6 [hci0] 22.302343
            Status: Success (0x00)
            Address: 00:1A:7D:DA:71:11 (OUI 00-1A-7D)
            Role: Slave (0x01)
    > HCI Event: Connect Complete (0x03) plen 11                #7 [hci0] 22.336363
            Status: Success (0x00)
            Handle: 21
            Address: 00:1A:7D:DA:71:11 (OUI 00-1A-7D)
            Link type: ACL (0x01)
            Encryption: disabled (0x00)
     HCI Event: Command Status (0x0f) plen 4                   #9 [hci0] 22.337862
          Read Remote Supported Features (0x01|0x001b) ncmd 1
            Status: Success (0x00)
    > HCI Event: Read Remote Supported Featu.. (0x0b) plen 11  #10 [hci0] 22.352464
            Status: Success (0x00)
            Handle: 21
            Features: 0xff 0xff 0x8f 0xfe 0xdb 0xff 0x5b 0x87
              3 slot packets
              5 slot packets
              Encryption
              Slot offset
              Timing accuracy
              Role switch
              Hold mode
              Sniff mode
              Park state
              Power control requests
              Channel quality driven data rate (CQDDR)
              SCO link
              HV2 packets
              HV3 packets
              u-law log synchronous data
              A-law log synchronous data
              CVSD synchronous data
              Paging parameter negotiation
              Power control
              Transparent synchronous data
              broadcast Encryption
              Enhanced Data Rate ACL 2 Mbps mode
              Enhanced Data Rate ACL 3 Mbps mode
              Enhanced inquiry scan
              Interlaced inquiry scan
              Interlaced page scan
              RSSI with inquiry results
              Extended SCO link (EV3 packets)
              EV4 packets
              EV5 packets
              AFH capable slave
              AFH classification slave
              LE Supported (Controller)
              3-slot Enhanced Data Rate ACL packets
              5-slot Enhanced Data Rate ACL packets
              Sniff subrating
              Pause encryption
              AFH capable master
              AFH classification master
              Enhanced Data Rate eSCO 2 Mbps mode
              Enhanced Data Rate eSCO 3 Mbps mode
              3-slot Enhanced Data Rate eSCO packets
              Extended Inquiry Response
              Simultaneous LE and BR/EDR (Controller)
              Secure Simple Pairing
              Encapsulated PDU
              Non-flushable Packet Boundary Flag
              Link Supervision Timeout Changed Event
              Inquiry TX Power Level
              Enhanced Power Control
              Extended features
     HCI Event: Command Status (0x0f) plen 4                  #12 [hci0] 22.353738
          Read Remote Extended Features (0x01|0x001c) ncmd 1
            Status: Success (0x00)
    > HCI Event: Read Remote Extended Features (0x23) plen 13  #13 [hci0] 22.359895
            Status: Success (0x00)
            Handle: 21
            Page: 1/1
            Features: 0x07 0x00 0x00 0x00 0x00 0x00 0x00 0x00
              Secure Simple Pairing (Host Support)
              LE Supported (Host)
              Simultaneous LE and BR/EDR (Host)
     HCI Event: Command Status (0x0f) plen 4                  #15 [hci0] 22.360591
          Remote Name Request (0x01|0x0019) ncmd 1
            Status: Success (0x00)
    > HCI Event: Remote Name Req Complete (0x07) plen 255      #16 [hci0] 22.369271
            Status: Success (0x00)
            Address: 00:1A:7D:DA:71:11 (OUI 00-1A-7D)
            Name: PC0184691
     HCI Event: Command Status (0x0f) plen 4                  #18 [hci0] 22.371420
          Authentication Requested (0x01|0x0011) ncmd 1
            Status: Success (0x00)
    > HCI Event: Link Key Request (0x17) plen 6                #19 [hci0] 22.371517
            Address: 00:1A:7D:DA:71:11 (OUI 00-1A-7D)
     HCI Event: Command Complete (0x0e) plen 10               #21 [hci0] 22.372259
          Link Key Request Reply (0x01|0x000b) ncmd 1
            Status: Success (0x00)
            Address: 00:1A:7D:DA:71:11 (OUI 00-1A-7D)
    @ Device Connected: 00:1A:7D:DA:71:11 (0) flags 0x0000
            0a 09 50 43 30 31 38 34 36 39 31                 ..PC0184691     
    > HCI Event: Auth Complete (0x06) plen 3                   #22 [hci0] 22.492450
            Status: Success (0x00)
            Handle: 21
     HCI Event: Command Status (0x0f) plen 4                  #24 [hci0] 22.493058
          Set Connection Encryption (0x01|0x0013) ncmd 1
            Status: Success (0x00)
    > HCI Event: Encryption Change (0x08) plen 4               #25 [hci0] 22.527926
            Status: Success (0x00)
            Handle: 21
            Encryption: Enabled with E0 (0x01)
     HCI Event: Number of Completed Packets (0x13) plen 5     #27 [hci0] 22.536970
            Num handles: 1
            Handle: 21
            Count: 1
    > ACL Data RX: Handle 21 flags 0x02 dlen 16                #28 [hci0] 22.537208
          L2CAP: information Response (0x0b) ident 1 len 8
            Type: Extended features supported (0x0002)
            Result: Success (0x0000)
            Features: 0x000000b8
              Enhanced Retransmission Mode
              Streaming Mode
              FCS Option
              Fixed Channels
     HCI Event: Number of Completed Packets (0x13) plen 5     #30 [hci0] 22.543231
            Num handles: 1
            Handle: 21
            Count: 1
    > ACL Data RX: Handle 21 flags 0x02 dlen 20                #31 [hci0] 22.543692
          L2CAP: information Response (0x0b) ident 2 len 12
            Type: Fixed channels supported (0x0003)
            Result: Success (0x0000)
            Channels: 0x00000000000000f2
              L2CAP Signaling (BR/EDR)
              Attribute Protocol
              L2CAP Signaling (LE)
              Security Manager (LE)
              Security Manager (BR/EDR)
     HCI Event: Number of Completed Packets (0x13) plen 5     #33 [hci0] 22.549461
            Num handles: 1
            Handle: 21
            Count: 1
    > ACL Data RX: Handle 21 flags 0x02 dlen 16                #34 [hci0] 22.549800
          L2CAP: Connection Response (0x03) ident 3 len 8
            Destination CID: 64
            Source CID: 64
            Result: Connection pending (0x0001)
            Status: No further information available (0x0000)
    > ACL Data RX: Handle 21 flags 0x02 dlen 16                #35 [hci0] 37.590680
          L2CAP: Connection Response (0x03) ident 3 len 8
            Destination CID: 0
            Source CID: 0
            Result: Connection refused - PSM not supported (0x0002)
            Status: No further information available (0x0000)
     HCI Event: Command Status (0x0f) plen 4                  #37 [hci0] 39.591886
          disconnect (0x01|0x0006) ncmd 1
            Status: Success (0x00)
    > HCI Event: disconnect Complete (0x05) plen 4             #38 [hci0] 39.782849
            Status: Success (0x00)
            Handle: 21
            Reason: Connection Terminated By Local Host (0x16)
    @ Device disconnected: 00:1A:7D:DA:71:11 (0) reason 2

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)