RPi3를 블루투스 수신기로 만들려고 합니다.
내 문제는 Windows 7 노트북을 RPi 블루투스 수신기에 연결하려고 하면 다음과 같이 표시된다는 것입니다.
죄송합니다. 프랑스어입니다.
3개의 연결을 생성할 수 있습니다.
- Rpi를 마이크로 연결하기 위한 하나
- Rpi를 헤드폰으로 연결하기 위한 것(이 옵션만 원함)
- Rpi를 오디오 파일 서버로 사용
정보:
$ sudo bluetoothctl
[bluetooth]# show
Controller B8:27:EB:XX:XX:XX
Name: Gertrude
Alias: Gertrude
Class: 0x20041c
Powered: yes
Discoverable: yes
Pairable: yes
UUID: Headset AG (00001112-0000-1000-8000-00805f9b34fb)
UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
UUID: A/V Remote Control (0000110e-0000-1000-8000-00805f9b34fb)
UUID: Generic Access Profile (00001800-0000-1000-8000-00805f9b34fb)
UUID: PnP Information (00001200-0000-1000-8000-00805f9b34fb)
UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
UUID: Audio Sink (0000110b-0000-1000-8000-00805f9b34fb)
UUID: Audio Source (0000110a-0000-1000-8000-00805f9b34fb)
Modalias: usb:v1D6Bp0246d052B
Discovering: no
블루투스 프로필:
$ cat /etc/bluetooth/main.conf
[General]
# Default adapter name
# Defaults to 'BlueZ X.YZ'
#Name = BlueZ
# Default device class. Only the major and minor device class bits are
Name =
# considered. Defaults to '0x000000'.
#Class = 0x000100
Class = 0x20041c
# How long to stay in discoverable mode before going back to non-discoverable
# The value is in seconds. Default is 180, i.e. 3 minutes.
# 0 = disable timer, i.e. stay discoverable forever
DiscoverableTimeout = 0
# How long to stay in pairable mode before going back to non-discoverable
# The value is in seconds. Default is 0.
# 0 = disable timer, i.e. stay pairable forever
#PairableTimeout = 0
# Automatic connection for bonded devices driven by platform/user events.
# If a platform plugin uses this mechanism, automatic connections will be
# enabled during the interval defined below. Initially, this feature
# intends to be used to establish connections to ATT channels. Default is 60.
#AutoConnectTimeout = 60
# Use vendor id source (assigner), vendor, product and version information for
# DID profile support. The values are separated by ":" and assigner, VID, PID
# and version.
# Possible vendor id source values: bluetooth, usb (defaults to usb)
#DeviceID = bluetooth:1234:5678:abcd
# Do reverse service discovery for previously unknown devices that connect to
# us. This option is really only needed for qualification since the BITE tester
# doesn't like us doing reverse SDP for some test cases (though there could in
# theory be other useful purposes for this too). Defaults to 'true'.
#ReverseServiceDiscovery = true
# Enable name resolving after inquiry. Set it to 'false' if you don't need
# remote devices name and want shorter discovery cycle. Defaults to 'true'.
#NameResolving = true
# Enable runtime persistency of debug link keys. Default is false which
# makes debug link keys valid only for the duration of the connection
# that they were created for.
#DebugKeys = false
# Restricts all controllers to the specified transport. Default value
# is "dual", i.e. both BR/EDR and LE enabled (when supported by the HW).
# Possible values: "dual", "bredr", "le"
#ControllerMode = dual
# Enables Multi Profile Specification support. This allows to specify if
# system supports only Multiple Profiles Single Device (MPSD) configuration
# or both Multiple Profiles Single Device (MPSD) and Multiple Profiles Multiple
# Devices (MPMD) configurations.
# Possible values: "off", "single", "multiple"
#MultiProfile = off
# Permanently enables the Fast Connectable setting for adapters that
# support it. When enabled other devices can connect faster to us,
# however the tradeoff is increased power consumptions. This feature
# will fully work only on kernel version 4.1 and newer. Defaults to
# 'false'.
#FastConnectable = false
# Default privacy setting.
# Enables use of private address.
# Possible values: "off", "device", "network"
# "network" option not supported currently
# Defaults to "off"
# Privacy = off
[Policy]
#
# The ReconnectUUIDs defines the set of remote services that should try
# to be reconnected to in case of a link loss (link supervision
# timeout). The policy plugin should contain a sane set of values by
# default, but this list can be overridden here. By setting the list to
# empty the reconnection feature gets disabled.
#ReconnectUUIDs=00001112-0000-1000-8000-00805f9b34fb,0000111f-0000-1000-8000-00805f9b34fb,0000110a-0000-1000-8000-00805f9b34fb
# ReconnectAttempts define the number of attempts to reconnect after a link
# lost. Setting the value to 0 disables reconnecting feature.
#ReconnectAttempts=7
# ReconnectIntervals define the set of intervals in seconds to use in between
# attempts.
# If the number of attempts defined in ReconnectAttempts is bigger than the
# set of intervals the last interval is repeated until the last attempt.
#ReconnectIntervals=1,2,4,8,16,32,64
# AutoEnable defines option to enable all controllers when they are found.
# This includes adapters present on start as well as adapters that are plugged
# in later on. Defaults to 'false'.
AutoEnable=true
다음과 같은 이유로 블루투스 카테고리를 변경했습니다.http://bluetooth-pentest.narod.ru/software/bluetooth_class_of_device-service_generator.html, 제거하고 다시 추가하세요."윈도우 블루투스 장치"하지만 소용이 없습니다.
그래서 나는 bluetoothctl / show
명령이 내가 원하지 않는 일부 기능에 해당하는 UUID 기능을 표시한다는 것을 알았습니다.
0000110a-0000-1000-8000-00805f9b34fb : Audio Source
00001800-0000-1000-8000-00805f9b34fb : Generic Access
00001801-0000-1000-8000-00805f9b34fb : Generic Attribute
하지만 이러한 기능을 비활성화하는 방법은 전혀 모릅니다.
어떤 아이디어가 있나요?
답변1
마침내 해결책을 찾았습니다.
이 기능을 서비스 검색이라고 하며, 블루투스 서비스를 사용하기 위한 프로토콜인 SDP가 있습니다.
Raspbian 배포판은 이 sdptool
유틸리티를 제공하지만 Bluetooth 데몬(BlueZ5)은 기본적으로 SDP와 호환되지 않습니다.
해결책
파일 을 편집하여 bluetooth.service
명령줄에 또는 옵션을 추가합니다 --compat
.-C
sdptool 유틸리티가 제대로 작동하도록 systemd를 업데이트합니다.
$ sudo systemctl daemon-reload
RPi의 Bluetooth 기능을 표시합니다.
$ sudo sdptool browse local
조사https://www.bluetooth.com/사양/할당번호/서비스-디스커버리원치 않는 기능과 일치하는 항목을 찾아 제거하려면 다음을 사용하세요.
$ sudo sdptool del 0xYYYYYY
내 경우에는 "오디오 소스"(0x110a) 및 "헤드폰 오디오 게이트웨이"(0x1112) 서비스를 제거해야 했습니다.