0

I am using NVIDIA Jetson TX2 NX with WiFi-BT Module based on RTL8822ce chip. Bluetooth can open and see every detail, but when start the scan, it will not list nearby devices.

[NEW] Controller 70:66:55:A6:F4:72 BlueZ 5.48 [default]
Agent registered
[bluetooth]# show
Controller 70:66:55:A6:F4:72 (public)
    Name: BlueZ 5.48
    Alias: BlueZ 5.48
    Class: 0x00000000
    Powered: yes
    Discoverable: no
    Pairable: yes
    UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
    UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
    UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)
    Modalias: usb:v1D6Bp0246d0530
    Discovering: no
[bluetooth]# discoverable on
Changing discoverable on succeeded
[CHG] Controller 70:66:55:A6:F4:72 Discoverable: yes
[bluetooth]# show
Controller 70:66:55:A6:F4:72 (public)
    Name: BlueZ 5.48
    Alias: BlueZ 5.48
    Class: 0x00000000
    Powered: yes
    Discoverable: yes
    Pairable: yes
    UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
    UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
    UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)
    Modalias: usb:v1D6Bp0246d0530
    Discovering: no
[bluetooth]# scan on
Discovery started
[CHG] Controller 70:66:55:A6:F4:72 Discovering: yes
[bluetooth]# scan off
[CHG] Controller 70:66:55:A6:F4:72 Discovering: no
Discovery stopped
[bluetooth]# exit
Agent unregistered
[DEL] Controller 70:66:55:A6:F4:72 BlueZ 5.48 [default]

But when I take the log, I noticed some issues in HCI Command order.

root@localhost:/home/ASKC# btmon
Bluetooth monitor ver 5.48
= Note: Linux version 4.9.253-tegra (aarch64)                                                                                        0.275592
= Note: Bluetooth subsystem version 2.22                                                                                             0.275595
= New Index: 70:66:55:A6:F4:72 (Primary,USB,hci0)                                                                             [hci0] 0.275596
= Open Index: 70:66:55:A6:F4:72                                                                                               [hci0] 0.275597
= Index Info: 70:66:55:A6:F4:72 (Realtek Semiconductor Corporation)                                                           [hci0] 0.275598
@ MGMT Open: bluetoothd (privileged) version 1.14                                                                           {0x0002} 0.275599
@ MGMT Open: bluetoothd (privileged) version 1.14                                                                           {0x0001} 0.275601
@ MGMT Open: btmon (privileged) version 1.14                                                                                {0x0003} 0.275626
@ MGMT Command: Set Connectable (0x0007) plen 1                                                                     {0x0001} [hci0] 17.340311
        Connectable: Enabled (0x01)
@ MGMT Event: Command Complete (0x0001) plen 7                                                                      {0x0001} [hci0] 17.340407
      Set Connectable (0x0007) plen 4
        Status: Success (0x00)
        Current settings: 0x00000ad3
          Powered
          Connectable
          Bondable
          Secure Simple Pairing
          BR/EDR
          Low Energy
          Secure Connections
@ MGMT Event: New Settings (0x0006) plen 4                                                                          {0x0003} [hci0] 17.340425
        Current settings: 0x00000ad3
          Powered
          Connectable
          Bondable
          Secure Simple Pairing
          BR/EDR
          Low Energy
          Secure Connections
@ MGMT Event: New Settings (0x0006) plen 4                                                                          {0x0002} [hci0] 17.340425
        Current settings: 0x00000ad3
          Powered
          Connectable
          Bondable
          Secure Simple Pairing
          BR/EDR
          Low Energy
          Secure Connections
@ MGMT Command: Set Discoverable (0x0006) plen 3                                                                    {0x0001} [hci0] 17.340628
        Discoverable: General (0x01)
        Timeout: 180
< HCI Command: Write Current IAC LAP (0x03|0x003a) plen 4                                                                 #1 [hci0] 17.340783
        Number of IAC: 1
        Access code: 0x9e8b33 (General Inquiry)
> HCI Event: Command Complete (0x0e) plen 4                                                                               #2 [hci0] 17.341793
      Write Current IAC LAP (0x03|0x003a) ncmd 2
        Status: Success (0x00)
< HCI Command: Write Scan Enable (0x03|0x001a) plen 1                                                                     #3 [hci0] 17.341914
        Scan enable: Inquiry Scan + Page Scan (0x03)
> HCI Event: Command Complete (0x0e) plen 4                                                                               #4 [hci0] 17.342825
      Write Scan Enable (0x03|0x001a) ncmd 2
        Status: Success (0x00)
@ MGMT Event: Command Complete (0x0001) plen 7                                                                      {0x0001} [hci0] 17.342964
      Set Discoverable (0x0006) plen 4
        Status: Success (0x00)
        Current settings: 0x00000adb
          Powered
          Connectable
          Discoverable
          Bondable
          Secure Simple Pairing
          BR/EDR
          Low Energy
          Secure Connections
@ MGMT Event: New Settings (0x0006) plen 4                                                                          {0x0003} [hci0] 17.343001
        Current settings: 0x00000adb
          Powered
          Connectable
          Discoverable
          Bondable
          Secure Simple Pairing
          BR/EDR
          Low Energy
          Secure Connections
@ MGMT Event: New Settings (0x0006) plen 4                                                                          {0x0002} [hci0] 17.343001
        Current settings: 0x00000adb
          Powered
          Connectable
          Discoverable
          Bondable
          Secure Simple Pairing
          BR/EDR
          Low Energy
          Secure Connections
@ MGMT Command: Start Discovery (0x0023) plen 1                                                                     {0x0001} [hci0] 30.352194
        Address type: 0x07
          BR/EDR
          LE Public
          LE Random
< HCI Command: LE Set Random Address (0x08|0x0005) plen 6                                                                 #5 [hci0] 30.352384
        Address: 1D:0F:B3:73:FA:E7 (Non-Resolvable)
> HCI Event: Command Complete (0x0e) plen 4                                                                               #6 [hci0] 30.353773
      LE Set Random Address (0x08|0x0005) ncmd 2
        Status: Success (0x00)
< HCI Command: LE Set Scan Parameters (0x08|0x000b) plen 7                                                                #7 [hci0] 30.353889
        Type: Active (0x01)
        Interval: 11.250 msec (0x0012)
        Window: 11.250 msec (0x0012)
        Own address type: Random (0x01)
        Filter policy: Accept all advertisement (0x00)
> HCI Event: Command Complete (0x0e) plen 4                                                                               #8 [hci0] 30.354774
      LE Set Scan Parameters (0x08|0x000b) ncmd 2
        Status: Success (0x00)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2                                                                    #9 [hci0] 30.354871
        Scanning: Enabled (0x01)
        Filter duplicates: Enabled (0x01)
> HCI Event: Command Complete (0x0e) plen 4                                                                              #10 [hci0] 30.355763
      LE Set Scan Enable (0x08|0x000c) ncmd 2
        Status: Success (0x00)
@ MGMT Event: Command Complete (0x0001) plen 4                                                                      {0x0001} [hci0] 30.356005
      Start Discovery (0x0023) plen 1
        Status: Success (0x00)
        Address type: 0x07
          BR/EDR
          LE Public
          LE Random
@ MGMT Event: Discovering (0x0013) plen 2                                                                           {0x0003} [hci0] 30.356057
        Address type: 0x07
          BR/EDR
          LE Public
          LE Random
        Discovery: Enabled (0x01)
@ MGMT Event: Discovering (0x0013) plen 2                                                                           {0x0002} [hci0] 30.356057
        Address type: 0x07
          BR/EDR
          LE Public
          LE Random
        Discovery: Enabled (0x01)
@ MGMT Event: Discovering (0x0013) plen 2                                                                           {0x0001} [hci0] 30.356057
        Address type: 0x07
          BR/EDR
          LE Public
          LE Random
        Discovery: Enabled (0x01)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2                                                                   #11 [hci0] 35.626810
        Scanning: Disabled (0x00)
        Filter duplicates: Disabled (0x00)
> HCI Event: Command Complete (0x0e) plen 4                                                                              #12 [hci0] 35.627802
      LE Set Scan Enable (0x08|0x000c) ncmd 2
        Status: Success (0x00)
< HCI Command: Inquiry (0x01|0x0001) plen 5                                                                              #13 [hci0] 35.627958
        Access code: 0x9e8b33 (General Inquiry)
        Length: 5.12s (0x04)
        Num responses: 0
> HCI Event: Command Status (0x0f) plen 4                                                                                #14 [hci0] 35.628759
      Inquiry (0x01|0x0001) ncmd 2
        Status: Success (0x00)
> HCI Event: Inquiry Complete (0x01) plen 1                                                                              #15 [hci0] 40.750766
        Status: Success (0x00)
@ MGMT Event: Discovering (0x0013) plen 2                                                                           {0x0003} [hci0] 40.750922
        Address type: 0x07
          BR/EDR
          LE Public
          LE Random
        Discovery: Disabled (0x00)
@ MGMT Event: Discovering (0x0013) plen 2                                                                           {0x0002} [hci0] 40.750922
        Address type: 0x07
          BR/EDR
          LE Public
          LE Random
        Discovery: Disabled (0x00)
@ MGMT Event: Discovering (0x0013) plen 2                                                                           {0x0001} [hci0] 40.750922
        Address type: 0x07
          BR/EDR
          LE Public
          LE Random
        Discovery: Disabled (0x00)
client_loop: send disconnect: Broken pipe

You can see, after scan enabling step, HCI Command: Inquiry is not sending. And when scanning disables, HCI Command: Inquiry is sending. That is, there is a difference in order of command and event sequence.

Can I change the sequence? Can you anybody help me to solve?

1 Answer 1

0

We must add the device ID of our module in misc file present in the driver file. Device ID can be get from lsusb command.

Also, we need to remove unwanted modules loaded in the kernel. check using lsmod.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .