i tried to enable bluetooth and made a log here:
https://www.fw-web.de/dokuwiki/doku.php?id=en:bpi-r2:bluetooth
after bring up the hci0-device i see “invalid device class”
hci0: Type: Primary Bus: SDIO
BD Address: 00:00:46:85:90:01 ACL MTU: 1021:4 SCO MTU: 184:1
UP RUNNING
RX bytes:554 acl:0 sco:0 events:27 errors:0
TX bytes:386 acl:0 sco:0 commands:27 errors:0
Features: 0xbf 0x3e 0x8d 0xfe 0xdb 0xff 0x5b 0x87
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH SNIFF
Link mode: MASTER
Name: 'MTK MT8590 #1'
Class: 0x001f00
Service Classes: Unspecified #<<<<<<<<<<<<<<<<<<<<<<<<<
Device Class: Invalid Device Class! #<<<<<<<<<<<<<<<<<<<<<<<<<
HCI Version: 4.0 (0x6) Revision: 0x0
LMP Version: 4.1 (0x7) Subversion: 0x0
Manufacturer: MediaTek, Inc. (70)
any idea?
i can scan devices (found my mobile-phone) and with piscan enabled i found r2 with my mobile-phone
if i try to connect from my mobile-phone a pin is requested (i thought BT>2 does not use pin)…but i don’t know how to set a pin on r2 with hciconfig/hcitool
in web i found that i can chane the /etc/bluetooth/hcid.conf, but i have none
root@bpi-r2-ubuntu:~# ls /etc/bluetooth/
input.conf main.conf network.conf
in the other files i have no passkey-option…it is removed with bluez4
https://www.linuxquestions.org/questions/linux-wireless-networking-41/setting-up-bluez-with-a-passkey-pin-to-be-used-as-headset-for-iphone-816003/
i have no simple-agent or bluetooth-agent…
ok, try the other way:
root@bpi-r2-ubuntu:~# hcitool -i hci0 scan
Scanning ...
B4:9D:0B:5F:2A:B9 Aquaris X5 Plus
root@bpi-r2-ubuntu:~# hcitool -i hci0 cc B4:9D:0B:5F:2A:B9
root@bpi-r2-ubuntu:~# hcitool -i hci0 auth B4:9D:0B:5F:2A:B9
Get connection info failed: No such file or directory
root@bpi-r2-ubuntu:~# hcitool -i hci0 dev
Devices:
hci0 00:00:46:85:90:01
root@bpi-r2-ubuntu:~# hcitool auth B4:9D:0B:5F:2A:B9
Not connected.
root@bpi-r2-ubuntu:~# hcitool cc B4:9D:0B:5F:2A:B9
root@bpi-r2-ubuntu:~# hcitool auth B4:9D:0B:5F:2A:B9
HCI authentication request failed: Connection timed out
while connecting and auth nothing happens on my mobile-phone 
directory /var/lib/bluetooth/ is empty, here should exist a folder with mac from hci0
https://www.linuxquestions.org/questions/linux-wireless-networking-41/setting-up-bluez-with-a-passkey-pin-to-be-used-as-headset-for-iphone-816003/#post4445941
also tried with bluetoothctl, here i have no default controller
[bluetooth]# agent on
Agent is already registered
[bluetooth]# select
Missing ctrl argument
[bluetooth]# select hci0
Controller hci0 not available
[bluetooth]# show
No default controller available
[bluetooth]# list
[bluetooth]#
maybe the dmesg:
root@bpi-r2-ubuntu:~# dmesg | grep luetooth
[ 3.230075] Bluetooth: Core ver 2.22
[ 3.230142] Bluetooth: HCI device and connection manager initialized
[ 3.230163] Bluetooth: HCI socket layer initialized
[ 3.230180] Bluetooth: L2CAP socket layer initialized
[ 3.230215] Bluetooth: SCO socket layer initialized
[ 6.108916] Bluetooth: Starting self testing
[ 6.113187] Bluetooth: Finished self testing
[ 267.750232] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 267.750352] Bluetooth: BNEP socket layer initialized
[ 305.760981] [BT-MOD-INIT][I]do_bluetooth_drv_init:start to do bluetooth drive
r init
[ 305.762017] [BT-MOD-INIT][I]do_bluetooth_drv_init:finish bluetooth driver ini
t, i_ret:0
[ 4688.382499] Bluetooth: HCI UART driver ver 2.3
also restarted bluetooth via “systemctl restart bluetooth” and loaded hci-uart-module (not in my public 4.14 kernel)
i tried setting manually the class (because it was invalid):
root@bpi-r2-ubuntu:~# hciconfig hci0 class ff0104
root@bpi-r2-ubuntu:~# hciconfig hci0 class
hci0: Type: Primary Bus: SDIO
BD Address: 00:00:46:85:90:01 ACL MTU: 1021:4 SCO MTU: 184:1
Class: 0xff0104
Service Classes: Positioning, Networking, Rendering, Capturing, Object T
ransfer, Audio, Telephony, Information
Device Class: Computer, Desktop workstation
https://www.question-defense.com/tools/class-of-device-bluetooth-cod-list-in-binary-and-hex
also no successful connection
root@bpi-r2-ubuntu:~# systemctl status bluetooth
��● bluetooth.service - Bluetooth service
Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset
Active: active (running) since Mon 2018-08-13 14:13:42 CEST; 19min ago
Docs: man:bluetoothd(8)
Main PID: 9037 (bluetoothd)
Status: "Running"
CGroup: /system.slice/bluetooth.service
��└��─9037 /usr/lib/bluetooth/bluetoothd
Aug 13 14:13:42 bpi-r2-ubuntu systemd[1]: Starting Bluetooth service...
Aug 13 14:13:42 bpi-r2-ubuntu bluetoothd[9037]: Bluetooth daemon 5.48
Aug 13 14:13:42 bpi-r2-ubuntu systemd[1]: Started Bluetooth service.
Aug 13 14:13:42 bpi-r2-ubuntu bluetoothd[9037]: Starting SDP server
Aug 13 14:13:42 bpi-r2-ubuntu bluetoothd[9037]: Failed to open RFKILL control de
Aug 13 14:13:42 bpi-r2-ubuntu bluetoothd[9037]: Bluetooth management interface 1
seems like i miss a rfkill-option in kernel, tried to enable it…
[544]: kernel lacks bnep-protocol support
[544]: System does not support network plugin
[544]: Failed to open RFKILL control device
[544]: Bluetooth management interface 1.14 initialized
when using rfkill as module i got multiple unresolved symbols while linking wifi-driver…so i added it as fixed. bluetoothd has now no errors, but bluetoothctl still find no device
root@bpi-r2-ubuntu:~# systemctl status bluetooth
��● bluetooth.service - Bluetooth service
Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset
Active: active (running) since Mon 2018-08-13 15:28:46 CEST; 5s ago
Docs: man:bluetoothd(8)
Main PID: 650 (bluetoothd)
Status: "Running"
CGroup: /system.slice/bluetooth.service
��└��─650 /usr/lib/bluetooth/bluetoothd
Aug 13 15:28:46 bpi-r2-ubuntu systemd[1]: Starting Bluetooth service...
Aug 13 15:28:46 bpi-r2-ubuntu bluetoothd[650]: Bluetooth daemon 5.48
Aug 13 15:28:46 bpi-r2-ubuntu systemd[1]: Started Bluetooth service.
Aug 13 15:28:46 bpi-r2-ubuntu bluetoothd[650]: Starting SDP server
Aug 13 15:28:46 bpi-r2-ubuntu bluetoothd[650]: Bluetooth management interface 1.
i installed bluez-hcidump started it with “hcidump -X &” and then run “hcitool cc B4:9D:0B:5F:2A:B9 && hcitool auth B4:9D:0B:5F:2A:B9”
< HCI Command: Create Connection (0x01|0x0005) plen 13
bdaddr B4:9D:0B:5F:2A:B9 ptype 0xcc18 rswitch 0x01 clkoffset 0x0000
Packet type: DM1 DM3 DM5 DH1 DH3 DH5
> HCI Event: Command Status (0x0f) plen 4
Create Connection (0x01|0x0005) status 0x00 ncmd 1
> HCI Event: Role Change (0x12) plen 8
status 0x00 bdaddr B4:9D:0B:5F:2A:B9 role 0x01
Role: Slave
> HCI Event: Connect Complete (0x03) plen 11
status 0x00 handle 50 bdaddr B4:9D:0B:5F:2A:B9 type ACL encrypt 0x00
< HCI Command: Read Remote Supported Features (0x01|0x001b) plen 2
handle 50
> HCI Event: Link Supervision Timeout Change (0x38) plen 4
handle 50 timeout 8000
> HCI Event: Command Status (0x0f) plen 4
Read Remote Supported Features (0x01|0x001b) status 0x00 ncmd 1
> HCI Event: Max Slots Change (0x1b) plen 3
handle 50 slots 5
> HCI Event: Connection Packet Type Changed (0x1d) plen 5
status 0x00 handle 50 ptype 0xcc18
Packet type: DM1 DM3 DM5 DH1 DH3 DH5
> HCI Event: Read Remote Supported Features (0x0b) plen 11
status 0x00 handle 50
Features: 0xff 0xfe 0x8f 0xfe 0xd8 0x3f 0x5b 0x87
< HCI Command: Read Remote Extended Features (0x01|0x001c) plen 3
handle 50 page 1
> HCI Event: Connection Packet Type Changed (0x1d) plen 5
status 0x00 handle 50 ptype 0xcc18
Packet type: DM1 DM3 DM5 DH1 DH3 DH5
> ACL data: handle 50 flags 0x02 dlen 10
L2CAP(s): Info req: type 2
> HCI Event: Command Status (0x0f) plen 4
Read Remote Extended Features (0x01|0x001c) status 0x00 ncmd 1
< HCI Command: Authentication Requested (0x01|0x0011) plen 2
handle 50
> HCI Event: Command Status (0x0f) plen 4
Authentication Requested (0x01|0x0011) status 0x00 ncmd 1
> HCI Event: Link Key Request (0x17) plen 6
bdaddr B4:9D:0B:5F:2A:B9
> HCI Event: Read Remote Extended Features (0x23) plen 13
status 0x00 handle 50 page 1 max 2
Features: 0x0f 0x00 0x00 0x00 0x00 0x00 0x00 0x00
< HCI Command: Remote Name Request (0x01|0x0019) plen 10
bdaddr B4:9D:0B:5F:2A:B9 mode 2 clkoffset 0x0000
< ACL data: handle 50 flags 0x00 dlen 10
L2CAP(s): Info req: type 2
< ACL data: handle 50 flags 0x00 dlen 16
L2CAP(s): Info rsp: type 2 result 0
Extended feature mask 0x02b8
Enhanced Retransmission mode
Streaming mode
FCS Option
Fixed Channels
Unicast Connectless Data Reception
> HCI Event: Command Status (0x0f) plen 4
Remote Name Request (0x01|0x0019) status 0x00 ncmd 1
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 50 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 50 packets 1
> HCI Event: Remote Name Req Complete (0x07) plen 255
status 0x00 bdaddr B4:9D:0B:5F:2A:B9 name 'Aquaris X5 Plus'
> ACL data: handle 50 flags 0x02 dlen 16
L2CAP(s): Info rsp: type 2 result 0
Extended feature mask 0x00b8
Enhanced Retransmission mode
Streaming mode
FCS Option
Fixed Channels
< ACL data: handle 50 flags 0x00 dlen 10
L2CAP(s): Info req: type 3
> ACL data: handle 50 flags 0x02 dlen 10
L2CAP(s): Info req: type 3
< ACL data: handle 50 flags 0x00 dlen 20
L2CAP(s): Info rsp: type 3 result 0
Fixed channel list 0x00000006
L2CAP Signalling Channel
L2CAP Connless
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 50 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 50 packets 1
> ACL data: handle 50 flags 0x02 dlen 20
L2CAP(s): Info rsp: type 3 result 0
Fixed channel list 0x00000082
L2CAP Signalling Channel
< HCI Command: Disconnect (0x01|0x0006) plen 3 #<<<<<<<< why here disconnect???
handle 50 reason 0x13
Reason: Remote User Terminated Connection
> HCI Event: Command Status (0x0f) plen 4
Disconnect (0x01|0x0006) status 0x00 ncmd 1
also tried with sspmode=0 (pin-mode), but also no success