Okay, here's what I did so far:
- Enabled built-in BT on pCP's Wifi Settings page, rebooted.
- Installed bluetooth-4.14.81-rt47-pcpAudioCore and pcp-bluez from pCP'
repository.
- Installed evtest from the official piCore repository.
- ssh'd in and started dbus and bluetoothd:
Code:
--------------------
sudo /usr/local/etc/init.d/dbus start
sudo /usr/local/lib/bluetooth/bluetoothd -nd
--------------------
- Loaded uart_hci kernel module and ran hciattach:
Code:
--------------------
sudo modprobe hci_uart
hciattach /dev/ttyAMA0 bcm43xx 921600 noflow
--------------------
- Started bluetoothctl and paired the device:
Code:
--------------------
tc@piCorePlayer:~$ bluetoothctl
Agent registered
[bluetooth]# power on
Changing power on succeeded
[CHG] Controller 43:43:A1:12:1F:AC Powered: yes
[bluetooth]# discoverable on
Changing discoverable on succeeded
[CHG] Controller 43:43:A1:12:1F:AC Discoverable: yes
[bluetooth]# pairable on
Changing pairable on succeeded
[bluetooth]# scan on
Discovery started
[CHG] Controller 43:43:A1:12:1F:AC Discovering: yes
...
[NEW] Device 5F:5F:5B:A1:65:17
小米蓝牙遥控器
...
[bluetooth]# pair 5F:5F:5B:A1:65:17
Attempting to pair with 5F:5F:5B:A1:65:17
[CHG] Device 5F:5F:5B:A1:65:17 Connected: yes
...rather long output deleted...
Pairing successful
[CHG] Device 5F:5F:5B:A1:65:17 Name: XiaoMi RC
[CHG] Device 5F:5F:5B:A1:65:17 Alias: XiaoMi RC
[CHG] Device 5F:5F:5B:A1:65:17 Modalias: usb:v2717p3200d0000
[小米蓝牙遥控器]# info
5F:5F:5B:A1:65:17
Device 5F:5F:5B:A1:65:17 (public)
Name: XiaoMi RC
Alias: XiaoMi RC
Appearance: 0x03c1
Icon: input-keyboard
Paired: yes
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: Device Information (0000180a-0000-1000-8000-00805f9b34fb)
UUID: Battery Service (0000180f-0000-1000-8000-00805f9b34fb)
UUID: Human Interface Device (00001812-0000-1000-8000-00805f9b34fb)
UUID: Vendor specific (f000ffc0-0451-4000-b000-000000000000)
Modalias: usb:v2717p3200d0000
RSSI: -59
TxPower: 0
[小米蓝牙遥控器]#
--------------------
The device is now available as /dev/input/event0 and I can see its key
presses with evtest.
So far so good, but when I reboot I have to start the whole procedure
from scratch again. So, for me, persistence is the first problem to
solve. I would consider automatic reconnection a part of that.
What I tried so far was to add "/usr/local/etc/init.d/dbus start" and
"/usr/local/lib/bluetooth/bluetoothd" to /opt/bootlocal.sh (before the
pCP start command as I assume that blocks while pCP is running), but
that led to the Pi no longer being able to boot. I'm out of ideas for
now and would be very grateful for a nudge in the right direction.
------------------------------------------------------------------------
Manul's Profile: http://forums.slimdevices.com/member.php?userid=68932
View this thread: http://forums.slimdevices.com/showthread.php?t=109404
_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix