Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
interfaces:bluetooth [2023/12/05 11:52] – [Bluetooth] darron | interfaces:bluetooth [2023/12/15 07:45] (current) – [USB] darron | ||
---|---|---|---|
Line 1: | Line 1: | ||
====Bluetooth==== | ====Bluetooth==== | ||
- | Various Bluetooth device setup in Linux on RPi and similar devices. | + | See [[tools: |
There are two standards in use known as BT classic and BT low energy. | There are two standards in use known as BT classic and BT low energy. | ||
- | Anything other than BLE is considered | + | Anything other than BLE is considered |
^HCI / LMP^Version^ | ^HCI / LMP^Version^ | ||
- | |0| 1.0b| | + | |0| |
- | |1| 1.1| | + | |1| |
- | |2| 1.2| | + | |2| |
- | |3| 2.0+EDR| | + | |3| |
- | |4| 2.1+EDR| | + | |4| |
- | |5| 3.0+HS| | + | |5| |
- | |6| 4.0| | + | |6| |
- | |7| 4.1| | + | |7| |
- | |8| 4.2| | + | |8| |
- | |9| 5.0| | + | |9| |
- | |10| 5.1| | + | |10| 5.1| |
- | |11| 5.2| | + | |11| 5.2| |
- | |12| 5.3| | + | |12| 5.3| |
- | BT 3.0+HS utilises WiFi. BT 4.0 onward is low energy, anything prior is BDR/EDR. | + | BT 3.0+HS utilises WiFi. BT 4.0 onward is BLE, anything prior is BDR/EDR. |
- | ===Hardware=== | + | ===RPi=== |
- | ==RPi== | + | The Raspberry Pi3/4 have built in BT BLE 5.0 but it can be awkward to setup |
+ | the UART configuration. UART can be /dev/ttyS0 or / | ||
+ | on how you configure it in / | ||
- | The Raspberry Pi3/4 have built in BT BLE 5.0 but it can be annoying | + | If the device needs to be attached |
- | with the UART configuration. UART can be /dev/ttyS0 or / | + | done like this. |
- | upon how you configure them in boot up. | + | |
- | The device needs to be attached via the UART. With the Pi4 | ||
- | this can be done in config.txt (not sure about Pi3). | ||
- | |||
- | Manually attachment can be done like this: | ||
< | < | ||
btattach -B / | btattach -B / | ||
</ | </ | ||
- | Kernel attachment requires | + | Alternatively, |
+ | on both the Pi3 and Pi4 (reboot to take effect). | ||
< | < | ||
dtparam=krnbt=on | dtparam=krnbt=on | ||
Line 114: | Line 113: | ||
</ | </ | ||
- | ==USB== | + | ===USB=== |
- | Here is a list of obsolete | + | Here is a list of legacy |
__BARROT__ | __BARROT__ | ||
- | BT 2.0 CSR clones which are very cheap from pound stores. | + | CSR clones which are very cheap and found in pound stores. |
+ | |||
+ | BT 2.0 | ||
< | < | ||
Line 156: | Line 157: | ||
__Silicon Wave__ | __Silicon Wave__ | ||
- | A very old BT 1.2 interface | + | A very old USB adapter. |
+ | |||
+ | BT 1.2 | ||
< | < | ||
Line 217: | Line 220: | ||
</ | </ | ||
- | BT 2.0 + EDR | + | BT 2.0 |
< | < | ||
Line 244: | Line 247: | ||
Manufacturer: | Manufacturer: | ||
</ | </ | ||
- | ===Services=== | ||
- | ==DBUS== | ||
- | |||
- | I normally disable dbus with systemd and here is how to enable this service with `runit' | ||
- | |||
- | < | ||
- | #!/bin/bash | ||
- | sleep 1 | ||
- | |||
- | #LOG | ||
- | exec 2>&1 | ||
- | ulimit -aH | ||
- | |||
- | #RUN | ||
- | export TZ=" | ||
- | rm -Rf / | ||
- | mkdir -p / | ||
- | exec dbus-daemon --syslog --syslog-only --nofork --config-file=/ | ||
- | </ | ||
- | |||
- | ==BLUETOOTHD== | ||
- | |||
- | Install bluez and various tools if not already installed | ||
- | |||
- | < | ||
- | apt install bluez bluez-test-tools bluez-hcidump | ||
- | </ | ||
- | |||
- | I prefer to run Bluetoothd from `runit' | ||
- | |||
- | This run file can work but it should wait until dbus is ready before starting. | ||
- | |||
- | See the wait method of runit to detect / | ||
- | |||
- | < | ||
- | #!/bin/bash | ||
- | sleep 5 | ||
- | |||
- | #LOG | ||
- | exec 2>&1 | ||
- | ulimit -aH | ||
- | |||
- | #RUN | ||
- | export TZ=" | ||
- | exec / | ||
- | </ |