Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bluetoothctl info command doesn't show device name #10

Open
janvda opened this issue Sep 4, 2019 · 1 comment
Open

bluetoothctl info command doesn't show device name #10

janvda opened this issue Sep 4, 2019 · 1 comment

Comments

@janvda
Copy link
Owner

janvda commented Sep 4, 2019

Within bluetoothctl session (running in a balena terminal window for the pulseaudio-server service): using the command info <mac address> gives information on the bluetooth device, but it doesn't show the device name - instead it shows again its MAC address.

Strange enough when successfully connecting/pairing/trusting the device, from then onwards (also after reboot of balena device) the info command is always correctly showing the device name.

The below log file shows both an example of a device for which info didn't return a name and one for which info did return a name.

root@ba7c427:/# bluetoothctl
Agent registered
[NEW] Device 7F:36:E3:B5:C6:A6 7F-36-E3-B5-C6-A6
[bluetooth]# scan off
Failed to stop discovery: org.bluez.Error.Failed
[CHG] Device 00:1A:22:0F:07:67 RSSI: -86
[bluetooth]# devices
Device 71:6F:23:53:51:43 71-6F-23-53-51-43
Device 58:FF:EB:97:37:C8 58-FF-EB-97-37-C8
Device 43:3F:2B:61:1E:38 43-3F-2B-61-1E-38
Device D0:58:C7:3A:D3:41 D0-58-C7-3A-D3-41
Device 64:D7:5F:A1:F1:82 64-D7-5F-A1-F1-82
Device 70:C6:D0:A7:67:50 70-C6-D0-A7-67-50
Device 62:5D:CD:CB:AA:1B 62-5D-CD-CB-AA-1B
Device 4C:3E:7D:97:41:9C 4C-3E-7D-97-41-9C
Device 77:33:9E:DA:D4:76 77-33-9E-DA-D4-76
Device 42:11:53:8F:EB:3A 42-11-53-8F-EB-3A
Device 57:92:5E:A4:9F:B3 57-92-5E-A4-9F-B3
Device 7F:96:F1:2C:65:0A 7F-96-F1-2C-65-0A
Device 6B:9A:59:6C:F7:7B 6B-9A-59-6C-F7-7B
Device 5D:B1:7E:24:24:6F 5D-B1-7E-24-24-6F
Device 75:C8:98:AE:DD:D9 75-C8-98-AE-DD-D9
Device 7B:DE:E0:D4:F7:EE 7B-DE-E0-D4-F7-EE
Device 40:B2:B9:B2:0D:1B 40-B2-B9-B2-0D-1B
Device 56:C5:83:2C:F9:93 56-C5-83-2C-F9-93
Device 72:5E:21:EF:4E:19 72-5E-21-EF-4E-19
Device 00:80:25:C9:33:53 ASG_BLE 33
Device 71:1F:71:78:CB:B4 71-1F-71-78-CB-B4
Device 42:86:C7:E5:FA:0F 42-86-C7-E5-FA-0F
Device 60:BA:E0:7E:DA:51 60-BA-E0-7E-DA-51
Device 63:9A:A5:01:AA:3D 63-9A-A5-01-AA-3D
Device 7A:FF:F6:B3:6F:8D 7A-FF-F6-B3-6F-8D
Device 7F:25:91:0F:8D:50 7F-25-91-0F-8D-50
Device 5A:E7:A9:C0:18:80 5A-E7-A9-C0-18-80
Device 4E:EB:71:C6:2D:A1 4E-EB-71-C6-2D-A1
Device 60:23:E6:CD:AF:1B 60-23-E6-CD-AF-1B
Device 76:9C:51:B2:24:FF 76-9C-51-B2-24-FF
Device 4B:5C:93:FF:82:7C 4B-5C-93-FF-82-7C
Device 7C:7A:53:88:59:A5 7C-7A-53-88-59-A5
Device 6D:78:40:A8:CE:94 6D-78-40-A8-CE-94
Device 44:1D:51:95:86:B6 44-1D-51-95-86-B6
Device 62:9B:0C:1A:48:8C 62-9B-0C-1A-48-8C
Device 71:41:AB:0D:E8:E0 71-41-AB-0D-E8-E0
Device 5A:DD:F9:55:D9:7D 5A-DD-F9-55-D9-7D
Device 7D:84:11:D9:06:7F 7D-84-11-D9-06-7F
Device 62:B1:34:57:A3:27 62-B1-34-57-A3-27
Device 64:4B:AF:B7:67:53 64-4B-AF-B7-67-53
Device 4C:CD:F6:F5:1F:8E 4C-CD-F6-F5-1F-8E
Device 45:1C:64:67:02:F1 45-1C-64-67-02-F1
Device 00:80:25:1C:43:12 SMA001d SN: 2100453275 SN2100453275
Device 4B:E0:81:32:C7:86 4B-E0-81-32-C7-86
Device 00:1A:22:0F:07:67 CC-RT-BLE
Device A0:E9:DB:09:CF:FF GEAR4 SPW
Device F0:18:98:39:D5:C4 Jan’s MacBook Pro
Device 8C:DE:52:B4:EA:40 SRS-X11
Device 7F:36:E3:B5:C6:A6 7F-36-E3-B5-C6-A6
[bluetooth]# info  4B:E0:81:32:C7:86
Device 4B:E0:81:32:C7:86 (random)
        Alias: 4B-E0-81-32-C7-86
        Paired: no
        Trusted: no
        Blocked: no
        Connected: no
        LegacyPairing: no
        RSSI: -85
        AdvertisingFlags:
  02                                               .               
[CHG] Device 00:1A:22:0F:07:67 RSSI: -69
[NEW] Device 7F:09:35:97:89:00 7F-09-35-97-89-00
[NEW] Device 5A:B5:D2:54:40:9D 5A-B5-D2-54-40-9D
[CHG] Device 00:1A:22:0F:07:67 RSSI: -85
[bluetooth]# info 8C:DE:52:B4:EA:40
Device 8C:DE:52:B4:EA:40 (public)
        Name: SRS-X11
        Alias: SRS-X11
        Class: 0x00240414
        Icon: audio-card
        Paired: yes
        Trusted: no
        Blocked: no
        Connected: no
        LegacyPairing: no
        UUID: Headset                   (00001108-0000-1000-8000-00805f9b34fb)
        UUID: Audio Sink                (0000110b-0000-1000-8000-00805f9b34fb)
        UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
        UUID: Handsfree                 (0000111e-0000-1000-8000-00805f9b34fb)
        UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
        Modalias: bluetooth:v0039p13BFd2103
[NEW] Device 79:D0:BD:29:05:A9 79-D0-BD-29-05-A9
[bluetooth]# 
@janvda
Copy link
Owner Author

janvda commented Sep 4, 2019

apparently you should first pair the device in your bluetoothctlsession. Once this is done, the name is returned by the infocommand.

[bluetooth]# devices
Device A0:E9:DB:09:CF:FF GEAR4 SPW
Device F0:18:98:39:D5:C4 Jan’s MacBook Pro
Device 8C:DE:52:B4:EA:40 SRS-X11
Device 78:77:1B:86:8E:0C 78-77-1B-86-8E-0C
Device 00:80:25:1C:43:12 SMA001d SN: 2100453275 SN2100453275
[bluetooth]# info 78:77:1B:86:8E:0C
Device 78:77:1B:86:8E:0C (random)
        Alias: 78-77-1B-86-8E-0C
        Paired: no
        Trusted: no
        Blocked: no
        Connected: no
        LegacyPairing: no
        ManufacturerData Key: 0x004c
        ManufacturerData Value:
  10 05 13 1c 44 4f 0e                             ....DO.         
        AdvertisingFlags:
  00                                               .               
[bluetooth]# pair 78:77:1B:86:8E:0C
Attempting to pair with 78:77:1B:86:8E:0C
[CHG] Device 78:77:1B:86:8E:0C Connected: yes
[NEW] Primary Service
        /org/bluez/hci0/dev_78_77_1B_86_8E_0C/service0006
        00001801-0000-1000-8000-00805f9b34fb
        Generic Attribute Profile
[NEW] Characteristic
        /org/bluez/hci0/dev_78_77_1B_86_8E_0C/service0006/char0007
        00002a05-0000-1000-8000-00805f9b34fb
        Service Changed
[NEW] Descriptor
        /org/bluez/hci0/dev_78_77_1B_86_8E_0C/service0006/char0007/desc0009
        00002902-0000-1000-8000-00805f9b34fb
        Client Characteristic Configuration
[NEW] Primary Service
        /org/bluez/hci0/dev_78_77_1B_86_8E_0C/service000a
        d0611e78-bbb4-4591-a5f8-487910ae4366
        Vendor specific
[NEW] Characteristic
        /org/bluez/hci0/dev_78_77_1B_86_8E_0C/service000a/char000b
        8667556c-9a37-4c91-84ed-54ee27d90049
        Vendor specific
[NEW] Descriptor
        /org/bluez/hci0/dev_78_77_1B_86_8E_0C/service000a/char000b/desc000d
        00002900-0000-1000-8000-00805f9b34fb
        Characteristic Extended Properties
[NEW] Descriptor
        /org/bluez/hci0/dev_78_77_1B_86_8E_0C/service000a/char000b/desc000e
        00002902-0000-1000-8000-00805f9b34fb
        Client Characteristic Configuration
[NEW] Primary Service
        /org/bluez/hci0/dev_78_77_1B_86_8E_0C/service000f
        9fa480e0-4967-4542-9390-d343dc5d04ae
        Vendor specific
[NEW] Characteristic
        /org/bluez/hci0/dev_78_77_1B_86_8E_0C/service000f/char0010
        af0badb1-5b99-43cd-917a-a77bc549e3cc
        Vendor specific
[NEW] Descriptor
        /org/bluez/hci0/dev_78_77_1B_86_8E_0C/service000f/char0010/desc0012
        00002900-0000-1000-8000-00805f9b34fb
        Characteristic Extended Properties
[NEW] Descriptor
        /org/bluez/hci0/dev_78_77_1B_86_8E_0C/service000f/char0010/desc0013
        00002902-0000-1000-8000-00805f9b34fb
        Client Characteristic Configuration
[CHG] Device 78:77:1B:86:8E:0C UUIDs: 00001800-0000-1000-8000-00805f9b34fb
[CHG] Device 78:77:1B:86:8E:0C UUIDs: 00001801-0000-1000-8000-00805f9b34fb
[CHG] Device 78:77:1B:86:8E:0C UUIDs: 9fa480e0-4967-4542-9390-d343dc5d04ae
[CHG] Device 78:77:1B:86:8E:0C UUIDs: d0611e78-bbb4-4591-a5f8-487910ae4366
[CHG] Device 78:77:1B:86:8E:0C ServicesResolved: yes
[CHG] Device 78:77:1B:86:8E:0C Name: iPhone
[CHG] Device 78:77:1B:86:8E:0C Alias: iPhone
[CHG] Device 78:77:1B:86:8E:0C Appearance: 0x0040
[CHG] Device 78:77:1B:86:8E:0C Icon: phone
[78-77-1B-86-8E-0C]# info 78:77:1B:86:8E:0C
Device 78:77:1B:86:8E:0C (random)
        Name: iPhone
        Alias: iPhone
        Appearance: 0x0040
        Icon: phone
        Paired: no
        Trusted: no
        Blocked: no
        Connected: yes
        LegacyPairing: no
        UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)
        UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
        UUID: Vendor specific           (9fa480e0-4967-4542-9390-d343dc5d04ae)
        UUID: Vendor specific           (d0611e78-bbb4-4591-a5f8-487910ae4366)
        ManufacturerData Key: 0x004c
        ManufacturerData Value:
  10 05 13 1c 44 4f 0e                             ....DO.         
        AdvertisingFlags:
  00                                               .               
[78-77-1B-86-8E-0C]# 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant