Updated Home (markdown)

dphys 2018-08-10 22:00:06 +08:00
parent a1f8c583a9
commit f60a0ce3db

30
Home.md

@ -7,14 +7,14 @@
<pre>
sudo rfkill block 0
sudo rfkill unblock 0
sudo brcm_patchram_plus --patchram /lib/firmware/brcm/bcm43438a0.hcd --enable_hci --bd_addr aa:22:33:44:55:66 --no2bytes --tosleep 5000 /dev/ttyS1
sudo brcm_patchram_plus --patchram /lib/firmware/brcm/bcm43438a0.hcd --enable_hci --bd_addr B0:F1:EC:2D:07:5B --no2bytes --tosleep 5000 /dev/ttyS1
</pre>
"--bd_addr aa:22:33:44:55:66" is to set the Bluetooth MAC address, recommended to read the wifi MAC address and change the last bit as the Bluetooth MAC address.
"--bd_addr B0:F1:EC:2D:07:5B" is to set the Bluetooth MAC address, recommended to read the WiFi MAC address and change the last bit as the Bluetooth MAC address.
If the driver loads successfully, you can see "Done setting line discpline", currently it takes **about 20 seconds** (this is an issue).
After loading, you can see the Bluetooth device with hciconfig:
After loading, you can see the Bluetooth device with `hciconfig`:
<pre>
cpi@clockworkpi:~$ hciconfig
hci0: Type: Primary Bus: UART
@ -23,3 +23,27 @@ hci0: Type: Primary Bus: UART
RX bytes:1193 acl:1 sco:0 events:64 errors:0
TX bytes:2339 acl:2 sco:0 commands:54 errors:0
</pre>
Now you can use the command `bluetoothctl` to connecting a Bluetooth device:
<pre>
cpi@clockworkpi:~$ bluetoothctl
[NEW] Controller B0:F1:EC:2D:07:5B clockworkpi [default]
[bluetooth]# scan on
Discovery started
[CHG] Device 34:88:5D:3B:CB:6F LegacyPairing: yes
[CHG] Device 34:88:5D:3B:CB:6F RSSI: -72
[CHG] Device 34:88:5D:3B:CB:6F Class: 0x002540
[CHG] Device 34:88:5D:3B:CB:6F Icon: input-keyboard
[bluetooth]# connect 34:88:5D:3B:CB:6F
Attempting to connect to 34:88:5D:3B:CB:6F
[CHG] Device 34:88:5D:3B:CB:6F Connected: yes
Connection successful
[Keyboard K480]# [12027.524551] hid-generic 0005:046D:B33C.0003: unknown main item tag 0x0
[12027.535022] input: Keyboard K480 as /devices/platform/soc@01c00000/1c28400.serial/tty/ttyS1/hci0/hci0:12/0005:046D:B33C.0003/input/input3
[12027.548045] hid-generic 0005:046D:B33C.0003: input: BLUETOOTH HID v28.02 Keyboard [Keyboard K480] on b0:f1:ec:2d:07:5b
[CHG] Device 34:88:5D:3B:CB:6F ServicesResolved: yes
</pre>
`Pair 34:88:5D:3B:CB:6F` is required for pairing before the first connection.