Skip to content

Commit

Permalink
Documentation changes SPLIT_USB_DETECT and hid_listen udev rules (qmk…
Browse files Browse the repository at this point in the history
…#11665)

Co-authored-by: David Grundberg <david@quartz>
  • Loading branch information
individ-divided and David Grundberg authored Mar 3, 2021
1 parent c168630 commit bf95737
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
13 changes: 13 additions & 0 deletions docs/faq_debug.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,19 @@ If you can't get this 'Listening:' message try building with `CONSOLE_ENABLE=yes

You may need privileges to access the device an OS like Linux. Try `sudo hid_listen`.

On many Linux distros you can avoid having to run hid_listen as root
by creating a file called `/etc/udev/rules.d/70-hid-listen.rules` with
the following content:

```
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="abcd", ATTRS{idProduct}=="def1", TAG+="uaccess", RUN{builtin}+="uaccess"
```

Replace abcd and def1 with your keyboard's vendor and product id,
letters must be lowercase. The `RUN{builtin}+="uaccess"` part is only
needed for older distros.


## Can't Get Message on Console
Check:
- *hid_listen* finds your device. See above.
Expand Down
15 changes: 12 additions & 3 deletions docs/feature_split_keyboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,12 @@ This sets how many LEDs are directly connected to each controller. The first nu
```c
#define SPLIT_USB_DETECT
```
This option changes the startup behavior to detect an active USB connection when delegating master/slave. If this operation times out, then the half is assume to be a slave. This is the default behavior for ARM, and required for AVR Teensy boards (due to hardware limitations).

Enabling this option changes the startup behavior to listen for an active USB communication to delegate which part is master and which is slave. With this option enabled and theres's USB communication, then that half assumes it is the master, otherwise it assumes it is the slave.
Without this option, the master is the half that can detect voltage on the physical USB connection (VBUS detection).
Enabled by default on ChibiOS/ARM.
?> This setting will stop the ability to demo using battery packs.
Expand All @@ -259,9 +264,13 @@ This sets the poll frequency when detecting master/slave when using `SPLIT_USB_D
## Hardware Considerations and Mods
While most any Pro Micro can be used, micro controllers like the AVR Teensys and most (if not all) ARM boards require the Split USB Detect.
Master/slave delegation is made either by detecting voltage on VBUS connection or waiting for USB communication (`SPLIT_USB_DETECT`). Pro Micro boards can use VBUS detection out of the box and be used with or without `SPLIT_USB_DETECT`.
Many ARM boards, but not all, do not support VBUS detection. Because it is common that ARM boards lack VBUS detection, `SPLIT_USB_DETECT` is automatically defined on ARM targets (technically when ChibiOS is targetted).
### Teensy boards
However, with the Teensy 2.0 and Teensy++ 2.0, there is a simple hardware mod that you can perform to add VBUS detection, so you don't need the Split USB detection option.
Teensy boards lack VBUS detection out of the box and must have `SPLIT_USB_DETECT` defined. With the Teensy 2.0 and Teensy++ 2.0, there is a simple hardware mod that you can perform to add VBUS detection, so you don't need the `SPLIT_USB_DETECT` option.

You'll only need a few things:
Expand Down

0 comments on commit bf95737

Please sign in to comment.