mirror of https://github.com/pikvm/pikvm
commit
c5847147c9
@ -0,0 +1,58 @@
|
|||||||
|
# Bluetooth HID
|
||||||
|
Pi-KVM is able to emulate a Bluetooth keyboard & mouse.
|
||||||
|
This is not the main case of using Pi-KVM since you still need it to pair with a remote host, but can be used for something like mobile KVM.
|
||||||
|
|
||||||
|
:exclamation: Using Bluetooth HID requires additional configuration of the operating system. For v2, this means losing the UART port,
|
||||||
|
since it will be used by Bluetooth. Also, Bluetooth operation was tested only on RPi4 and v2 platform. Other boards may require different system service settings.
|
||||||
|
|
||||||
|
:exclamation: Bluetooth mouse can work only in [relative mode](mouse.md). The reason is that many Bluetooth host drivers do not correctly implement HID descriptors. Horizontal scrolling is not supported for the same reason.
|
||||||
|
|
||||||
|
# Configuring the OS
|
||||||
|
1. Switch filesystem to RW-mode, perform update and install some packages:
|
||||||
|
```
|
||||||
|
# rw
|
||||||
|
# pacman -Syu
|
||||||
|
# pacman -S bluez bluez-utils raspberrypi-bluetooth
|
||||||
|
```
|
||||||
|
2. Edit `/boot/config.txt` and comment these lines:
|
||||||
|
```
|
||||||
|
#enable_uart=1
|
||||||
|
#dtoverlay=disable-bt
|
||||||
|
```
|
||||||
|
3. Create an empty directory `/var/lib/bluetooth` and add mountpoint to `/etc/fstab`:
|
||||||
|
```
|
||||||
|
# mkdir /var/lib/bluetooth
|
||||||
|
# echo 'tmpfs /var/lib/bluetooth tmpfs nodev,nosuid,mode=0755 0 0' >> /etc/fstab
|
||||||
|
```
|
||||||
|
4. Override and enable the services:
|
||||||
|
```
|
||||||
|
# mkdir /etc/systemd/system/bluetooth.service.d
|
||||||
|
# cat << EOF > /etc/systemd/system/bluetooth.service.d/override.conf
|
||||||
|
[Service]
|
||||||
|
ExecStart=
|
||||||
|
ExecStart=/usr/lib/bluetooth/bluetoothd --noplugin=*
|
||||||
|
EOF
|
||||||
|
# systemctl enable bluetooth
|
||||||
|
# systemctl enable raspberrypi-btuart
|
||||||
|
```
|
||||||
|
5. Override `kvmd` service:
|
||||||
|
```
|
||||||
|
# mkdir /etc/systemd/system/kvmd.service.d
|
||||||
|
# cat << EOF > /etc/systemd/system/kvmd.service.d/override.conf
|
||||||
|
[Service]
|
||||||
|
AmbientCapabilities=CAP_NET_RAW CAP_NET_BIND_SERVICE CAP_SYS_ADMIN CAP_SETUID CAP_SETGID CAP_CHOWN
|
||||||
|
CapabilityBoundingSet=CAP_NET_RAW CAP_NET_BIND_SERVICE CAP_SYS_ADMIN CAP_SETUID CAP_SETGID CAP_CHOWN
|
||||||
|
EOF
|
||||||
|
```
|
||||||
|
6. Add following lines to `/etc/kvmd/override.yaml`:
|
||||||
|
```yaml
|
||||||
|
kvmd:
|
||||||
|
hid:
|
||||||
|
type: bt
|
||||||
|
```
|
||||||
|
7. Perform reboot: `reboot`.
|
||||||
|
|
||||||
|
# Using Bluetooth HID
|
||||||
|
* After a reboot, the Pi-KVM will be ready for detection and pairing with no auth. You will see the `Pi-KVM HID` device.
|
||||||
|
* Once the server is connected, Pi-KVM will no longer be discoverable and pairable to other clients until you unpair the server.
|
||||||
|
* If something went wrong, use the web menu `System -> Reset keyboard & mouse`. This will cause unpair the device and switch the Pi-KVM to public mode before the first client is connected.
|
@ -0,0 +1,24 @@
|
|||||||
|
# EDID
|
||||||
|
|
||||||
|
EDID is information about the video modes supported by the video capture device.
|
||||||
|
In the case of Pi-KVM, this is an HDMI CSI bridge. Usually, you don't need to change this, since the default configuration is quite flexible,
|
||||||
|
but sometimes, for example for strange UEFIs/BIOSes, this may be necessary (the [story](https://github.com/pikvm/pikvm/issues/78)).
|
||||||
|
|
||||||
|
The EDID is stored on the Pi-KVM in the file `/etc/kvmd/tc358743-edid.hex`. If you write new data there, it will be applied on the Pi-KVM reboot.
|
||||||
|
|
||||||
|
You can also apply the new EDID without rebooting to make sure it works:
|
||||||
|
* Create file with EDID `/root/edid.hex` (examples of file contents are shown below).
|
||||||
|
* Apply EDID using the command `v4l2-ctl --device=/dev/kvmd-video --set-edid=file=/root/edid.hex --fix-edid-checksums`.
|
||||||
|
* DO NOT REBOOT the Pi-KVM. Just your PC. Check the UEFI/BIOS.
|
||||||
|
* If everything works, you can write the same data to `/etc/kvmd/tc358743-edid.hex`.
|
||||||
|
|
||||||
|
The examples below are tested on these devices, but they are also suitable for others. To edit or create EDID you can use [AW EDID Editor](https://www.analogway.com/emea/products/software-tools/aw-edid-editor).
|
||||||
|
|
||||||
|
### 1280x1024 as preferred resolution, Gigabyte GA-H77-DS3H
|
||||||
|
`00 FF FF FF FF FF FF 00 52 62 88 88 00 88 88 88 1C 15 01 03 80 00 00 78 0A EE 91 A3 54 4C 99 26 0F 50 54 25 40 00 01 00 01 00 01 00 01 00 01 00 01 00 01 01 01 01 D5 1B 00 50 50 00 19 40 08 20 B8 00 80 00 10 00 00 1E EC 2C 80 A0 70 38 1A 40 30 20 35 00 40 44 21 00 00 1E 00 00 00 FC 00 50 49 2D 4B 56 4D 20 56 69 64 65 6F 0A 00 00 00 FD 00 32 3D 0F 2E 0F 00 00 00 00 00 00 00 00 01 4D 02 03 04 00 DE 0D 20 A0 30 58 12 20 30 20 34 00 F0 B4 00 00 00 18 E0 15 00 A0 40 00 16 30 30 20 34 00 00 00 00 00 00 18 B4 14 00 A0 50 D0 11 20 30 20 35 00 80 D8 10 00 00 18 AB 22 A0 A0 50 84 1A 30 30 20 36 00 B0 0E 11 00 00 18 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 45`
|
||||||
|
|
||||||
|
### 1920x1080 as preferred resolution, Gigabyte GA-H77-DS3H
|
||||||
|
`00 FF FF FF FF FF FF 00 52 62 88 88 00 88 88 88 1C 15 01 03 80 00 00 78 0A EE 91 A3 54 4C 99 26 0F 50 54 25 40 00 01 00 01 00 01 00 01 00 01 00 01 00 01 01 01 01 D3 2C 80 A0 70 38 1A 40 30 20 35 00 40 44 21 00 00 1E 7E 1D 00 A0 50 00 19 40 30 20 37 00 80 00 10 00 00 1E 00 00 00 FC 00 50 49 2D 4B 56 4D 20 56 69 64 65 6F 0A 00 00 00 FD 00 32 3D 0F 2E 0F 00 00 00 00 00 00 00 00 01 C4 02 03 04 00 DE 0D 20 A0 30 58 12 20 30 20 34 00 F0 B4 00 00 00 18 E0 15 00 A0 40 00 16 30 30 20 34 00 00 00 00 00 00 18 B4 14 00 A0 50 D0 11 20 30 20 35 00 80 D8 10 00 00 18 AB 22 A0 A0 50 84 1A 30 30 20 36 00 B0 0E 11 00 00 18 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 45`
|
||||||
|
|
||||||
|
### 1920x1080 as preferred resolution, Intel NUC
|
||||||
|
`00 FF FF FF FF FF FF 00 52 62 88 88 00 88 88 88 1C 15 01 03 80 00 00 78 0A EE 91 A3 54 4C 99 26 0F 50 54 25 40 00 01 00 01 00 01 00 01 00 01 00 01 00 01 01 01 01 D3 2C 80 A0 70 38 1A 40 30 20 35 00 40 44 21 00 00 1E 7E 1D 00 A0 50 00 19 40 30 20 37 00 80 00 10 00 00 1E 00 00 00 FC 00 50 49 2D 4B 56 4D 20 56 69 64 65 6F 0A 00 00 00 FD 00 32 3D 0F 2E 0F 00 00 00 00 00 00 00 00 01 C4 02 03 04 00 DE 0D 20 A0 30 58 12 20 30 20 34 00 F0 B4 00 00 00 18 E0 15 00 A0 40 00 16 30 30 20 34 00 00 00 00 00 00 18 B4 14 00 A0 50 D0 11 20 30 20 35 00 80 D8 10 00 00 18 AB 22 A0 A0 50 84 1A 30 30 20 36 00 B0 0E 11 00 00 18 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 45`
|
@ -0,0 +1,43 @@
|
|||||||
|
# Mouse modes
|
||||||
|
|
||||||
|
There are two modes of pointer device: absolute and relative.
|
||||||
|
|
||||||
|
In absolute mode, the input device transmits the exact coordinates (X,Y) where the cursor should be moved. This is how touchscreens or drawing tablets work.
|
||||||
|
|
||||||
|
In relative mode, only the relative offset (dX,dY) to the current position is transmitted, which is unknown to the input device itself. This is a regular mouse.
|
||||||
|
|
||||||
|
By default, Pi-KVM uses absolute positioning mode as the most convenient for the user and software.
|
||||||
|
However, this is not always supported by the BIOS/UEFI.
|
||||||
|
For such cases, support is provided for the relative mode of operation, which can be enabled in the config.
|
||||||
|
|
||||||
|
When using relative mode, the browser will exclusively capture your mouse when you click on the stream window in Pi-KVM once.
|
||||||
|
When you press `Esc`, the browser releases the mouse.
|
||||||
|
|
||||||
|
# Important notes
|
||||||
|
The relative mouse generates a huge number of events that can be poorly transmitted over the network or very slowly perceived by the BIOS/UEFI driver. To solve this problem, mouse events are optimized using a vector sum. This mode is enabled by default and is available in the web menu `System -> Squash mouse moves`. You can try disabling this if you have problems with mouse acceleration. This is the best and most reasonable compromise right now.
|
||||||
|
|
||||||
|
Also currently the relative mouse mode is not supported by [Pi-KVM VNC server](vnc.md) yet. The reason is that none of the recommended clients support the [QEMU Pointer Motion Change](https://github.com/rfbproto/rfbproto/blob/master/rfbproto.rst#qemu-pointer-motion-change-pseudo-encoding) extension.
|
||||||
|
We expect to implement this in [TigerVNC](https://github.com/TigerVNC/tigervnc/issues/619). The relative mode is also not supported by mobile browsers.
|
||||||
|
|
||||||
|
# Enabling the relative mouse on the v2 platform (OTG HID)
|
||||||
|
* Switch filesystem to RW-mode using command `rw`.
|
||||||
|
* Edit `/etc/kvmd/override.yaml` and add these lines:
|
||||||
|
```yaml
|
||||||
|
kvmd:
|
||||||
|
hid:
|
||||||
|
mouse:
|
||||||
|
absolute: false
|
||||||
|
```
|
||||||
|
* Perform `reboot`. After that reboot your PC.
|
||||||
|
* If the mouse is still not detected by the BIOS/UEFI, try disabling horizontal scrolling to achieve the maximum compatibility:
|
||||||
|
```yaml
|
||||||
|
kvmd:
|
||||||
|
hid:
|
||||||
|
mouse:
|
||||||
|
absolute: false
|
||||||
|
horizontal_wheel: false
|
||||||
|
```
|
||||||
|
* Don't forget to perform `reboot`.
|
||||||
|
|
||||||
|
# Enabling the relative mouse on the v0 platform (serial HID)
|
||||||
|
:exclamation: This is not currently supported but will be added in a future release. The reason is that we are working on improving the HID protocol.
|
Loading…
Reference in New Issue