diff options
Diffstat (limited to 'docs/faq.md')
| -rw-r--r-- | docs/faq.md | 238 |
1 files changed, 238 insertions, 0 deletions
diff --git a/docs/faq.md b/docs/faq.md new file mode 100644 index 000000000..0636d8b54 --- /dev/null +++ b/docs/faq.md | |||
| @@ -0,0 +1,238 @@ | |||
| 1 | ## READ FIRST | ||
| 2 | - **README** of top directory : https://github.com/tmk/tmk_keyboard/blob/master/README.md | ||
| 3 | - **README** of target project(keyboard/converter) directory. | ||
| 4 | |||
| 5 | Note that you'll need to read **both**. | ||
| 6 | |||
| 7 | |||
| 8 | # Build | ||
| 9 | - [[FAQ/Build]] | ||
| 10 | |||
| 11 | |||
| 12 | # Keymap | ||
| 13 | - [[FAQ/Keymap]] | ||
| 14 | |||
| 15 | |||
| 16 | # Debug Console | ||
| 17 | ## hid_listen can't recognize device | ||
| 18 | When debug console of your device is not ready you will see like this: | ||
| 19 | |||
| 20 | Waiting for device:......... | ||
| 21 | |||
| 22 | once the device is pluged in then *hid_listen* finds it you will get this message: | ||
| 23 | |||
| 24 | Waiting for new device:......................... | ||
| 25 | Listening: | ||
| 26 | |||
| 27 | Check if you can't get this 'Listening:' message: | ||
| 28 | - build with `CONSOLE_ENABLE=yes` in **Makefile**. | ||
| 29 | |||
| 30 | You may need privilege to access the device on OS like Linux. | ||
| 31 | - try `sudo hid_listen` | ||
| 32 | |||
| 33 | ## Can't get message on console | ||
| 34 | Check: | ||
| 35 | - *hid_listen* finds your device. See above. | ||
| 36 | - Enable debug with pressing **Magic**+d. See [Magic Commands](https://github.com/tmk/tmk_keyboard#magic-commands). | ||
| 37 | - set `debug_enable=true` usually in `matrix_init()` in **matrix.c**. | ||
| 38 | - try using 'print' function instead of debug print. See **common/print.h**. | ||
| 39 | - disconnect other devices with console function. See [Issue #97](https://github.com/tmk/tmk_keyboard/issues/97). | ||
| 40 | |||
| 41 | ## Linux or UNIX like system requires Super User privilege | ||
| 42 | Just use 'sudo' to execute *hid_listen* with privilege. | ||
| 43 | ``` | ||
| 44 | $ sudo hid_listen | ||
| 45 | ``` | ||
| 46 | |||
| 47 | Or add an *udev rule* for TMK devices with placing a file in rules directory. The directory may vary on each system. | ||
| 48 | |||
| 49 | File: /etc/udev/rules.d/52-tmk-keyboard.rules(in case of Ubuntu) | ||
| 50 | ``` | ||
| 51 | # tmk keyboard products https://github.com/tmk/tmk_keyboard | ||
| 52 | SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666" | ||
| 53 | ``` | ||
| 54 | |||
| 55 | *** | ||
| 56 | |||
| 57 | # Miscellaneous | ||
| 58 | ## NKRO Doesn't work | ||
| 59 | First you have to compile frimware with this build option `NKRO_ENABLE` in **Makefile**. | ||
| 60 | |||
| 61 | Try `Magic` **N** command(`LShift+RShift+N` by default) when **NKRO** still doesn't work. You can use this command to toggle between **NKRO** and **6KRO** mode temporarily. In some situations **NKRO** doesn't work you need to switch to **6KRO** mode, in particular when you are in BIOS. | ||
| 62 | |||
| 63 | If your firmeare built with `BOOTMAGIC_ENABLE` you need to turn its switch on by `BootMagic` **N** command(`Space+N` by default). This setting is stored in EEPROM and keeped over power cycles. | ||
| 64 | |||
| 65 | https://github.com/tmk/tmk_keyboard#boot-magic-configuration---virtual-dip-switch | ||
| 66 | |||
| 67 | |||
| 68 | ## TrackPoint needs reset circuit(PS/2 mouse support) | ||
| 69 | Without reset circuit you will have inconsistent reuslt due to improper initialize of the hardware. See circuit schematic of TPM754. | ||
| 70 | |||
| 71 | - http://geekhack.org/index.php?topic=50176.msg1127447#msg1127447 | ||
| 72 | - http://www.mikrocontroller.net/attachment/52583/tpm754.pdf | ||
| 73 | |||
| 74 | |||
| 75 | ## Can't read column of matrix beyond 16 | ||
| 76 | Use `1UL<<16` instead of `1<<16` in `read_cols()` in **matrix.h** when your columns goes beyond 16. | ||
| 77 | |||
| 78 | In C `1` means one of **int** type which is **16bit** in case of AVR so you can't shift left more than 15. You will get unexpected zero when you say `1<<16`. You have to use **unsigned long** type with `1UL`. | ||
| 79 | |||
| 80 | http://deskthority.net/workshop-f7/rebuilding-and-redesigning-a-classic-thinkpad-keyboard-t6181-60.html#p146279 | ||
| 81 | |||
| 82 | |||
| 83 | |||
| 84 | ## Pull-up Resistor | ||
| 85 | In some case converters needed to have pull-up resistors to work correctly. Place the resistor between VCC and signal line in parallel. | ||
| 86 | |||
| 87 | For example: | ||
| 88 | ``` | ||
| 89 | Keyboard Conveter | ||
| 90 | ,------. | ||
| 91 | 5V------+------|VCC | | ||
| 92 | | | | | ||
| 93 | R | | | ||
| 94 | | | | | ||
| 95 | Signal--+------|PD0 | | ||
| 96 | | | | ||
| 97 | GND------------|GND | | ||
| 98 | `------' | ||
| 99 | R: 1K Ohm resistor | ||
| 100 | ``` | ||
| 101 | |||
| 102 | https://github.com/tmk/tmk_keyboard/issues/71 | ||
| 103 | |||
| 104 | |||
| 105 | ## Arduino Micro's pin naming is confusing | ||
| 106 | Note that Arduino Micro PCB marking is different from real AVR port name. D0 of Arduino Micro is not PD0, PD0 is D3. Check schematic yourself. | ||
| 107 | http://arduino.cc/en/uploads/Main/arduino-micro-schematic.pdf | ||
| 108 | |||
| 109 | |||
| 110 | |||
| 111 | ## Bootloader jump doesn't work | ||
| 112 | Properly configure bootloader size in **Makefile**. With wrong section size bootloader won't probably start with **Magic command** and **Boot Magic**. | ||
| 113 | ``` | ||
| 114 | # Size of Bootloaders in bytes: | ||
| 115 | # Atmel DFU loader(ATmega32U4) 4096 | ||
| 116 | # Atmel DFU loader(AT90USB128) 8192 | ||
| 117 | # LUFA bootloader(ATmega32U4) 4096 | ||
| 118 | # Arduino Caterina(ATmega32U4) 4096 | ||
| 119 | # USBaspLoader(ATmega***) 2048 | ||
| 120 | # Teensy halfKay(ATmega32U4) 512 | ||
| 121 | # Teensy++ halfKay(AT90USB128) 2048 | ||
| 122 | OPT_DEFS += -DBOOTLOADER_SIZE=4096 | ||
| 123 | ``` | ||
| 124 | AVR Boot section size are defined by setting **BOOTSZ** fuse in fact. Consult with your MCU datasheet. | ||
| 125 | Note that **Word**(2 bytes) size and address are used in datasheet while TMK uses **Byte**. | ||
| 126 | |||
| 127 | AVR Boot section is located at end of Flash memory like the followings. | ||
| 128 | ``` | ||
| 129 | byte Atmel/LUFA(ATMega32u4) byte Atmel(AT90SUB1286) | ||
| 130 | 0x0000 +---------------+ 0x00000 +---------------+ | ||
| 131 | | | | | | ||
| 132 | | | | | | ||
| 133 | | Application | | Application | | ||
| 134 | | | | | | ||
| 135 | = = = = | ||
| 136 | | | 32KB-4KB | | 128KB-8KB | ||
| 137 | 0x6000 +---------------+ 0x1E000 +---------------+ | ||
| 138 | | Bootloader | 4KB | Bootloader | 8KB | ||
| 139 | 0x7FFF +---------------+ 0x1FFFF +---------------+ | ||
| 140 | |||
| 141 | |||
| 142 | byte Teensy(ATMega32u4) byte Teensy++(AT90SUB1286) | ||
| 143 | 0x0000 +---------------+ 0x00000 +---------------+ | ||
| 144 | | | | | | ||
| 145 | | | | | | ||
| 146 | | Application | | Application | | ||
| 147 | | | | | | ||
| 148 | = = = = | ||
| 149 | | | 32KB-512B | | 128KB-2KB | ||
| 150 | 0x7E00 +---------------+ 0x1FC00 +---------------+ | ||
| 151 | | Bootloader | 512B | Bootloader | 2KB | ||
| 152 | 0x7FFF +---------------+ 0x1FFFF +---------------+ | ||
| 153 | ``` | ||
| 154 | |||
| 155 | And see this discussion for further reference. | ||
| 156 | https://github.com/tmk/tmk_keyboard/issues/179 | ||
| 157 | |||
| 158 | |||
| 159 | ## Special Extra key doesn't work(System, Audio control keys) | ||
| 160 | You need to define `EXTRAKEY_ENABLE` in **makefile** to use them in TMK. | ||
| 161 | ``` | ||
| 162 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
| 163 | ``` | ||
| 164 | http://deskthority.net/workshop-f7/tmk-keyboard-firmware-collection-t4478-60.html#p157919 | ||
| 165 | |||
| 166 | |||
| 167 | ## Wakeup from sleep doesn't work | ||
| 168 | In Windows check `Allow this device to wake the computer` setting in Power **Management property** tab of **Device Manager**. Also check BIOS setting. | ||
| 169 | |||
| 170 | Pressing any key during sleep should wake host. | ||
| 171 | |||
| 172 | |||
| 173 | ## Using Arduino? | ||
| 174 | **Note that Arduino pin naming is different from actual chip.** For example, Arduino pin `D0` is not `PD0`. Check circuit with its schematics yourself. | ||
| 175 | |||
| 176 | - http://arduino.cc/en/uploads/Main/arduino-leonardo-schematic_3b.pdf | ||
| 177 | - http://arduino.cc/en/uploads/Main/arduino-micro-schematic.pdf | ||
| 178 | |||
| 179 | Arduino leonardo and micro have **ATMega32U4** and can be used for TMK, though Arduino bootloader may be a problem. | ||
| 180 | |||
| 181 | |||
| 182 | ## Using PF4-7 pins of USB AVR? | ||
| 183 | You need to set JTD bit of MCUCR yourself to use PF4-7 as GPIO. Those pins are configured to serve JTAG function by default. MCUs like ATMega*U* or AT90USB* are affeteced with this. | ||
| 184 | |||
| 185 | If you are using Teensy this isn't needed. Teensy is shipped with JTAGEN fuse bit unprogrammed to disable the function. | ||
| 186 | |||
| 187 | See this code. | ||
| 188 | ``` | ||
| 189 | // JTAG disable for PORT F. write JTD bit twice within four cycles. | ||
| 190 | MCUCR |= (1<<JTD); | ||
| 191 | MCUCR |= (1<<JTD); | ||
| 192 | ``` | ||
| 193 | https://github.com/tmk/tmk_keyboard/blob/master/keyboard/hbkb/matrix.c#L67 | ||
| 194 | |||
| 195 | And read **26.5.1 MCU Control Register – MCUCR** of ATMega32U4 datasheet. | ||
| 196 | |||
| 197 | |||
| 198 | ## Adding LED indicators of Lock keys | ||
| 199 | You need your own LED indicators for CapsLock, ScrollLock and NumLock? See this post. | ||
| 200 | |||
| 201 | http://deskthority.net/workshop-f7/tmk-keyboard-firmware-collection-t4478-120.html#p191560 | ||
| 202 | |||
| 203 | ## Program Arduino Micro/Leonardo | ||
| 204 | Push reset button and then run command like this within 8 seconds. | ||
| 205 | |||
| 206 | ``` | ||
| 207 | avrdude -patmega32u4 -cavr109 -b57600 -Uflash:w:adb_usb.hex -P/dev/ttyACM0 | ||
| 208 | ``` | ||
| 209 | |||
| 210 | Device name will vary depending on your system. | ||
| 211 | |||
| 212 | http://arduino.cc/en/Main/ArduinoBoardMicro | ||
| 213 | https://geekhack.org/index.php?topic=14290.msg1563867#msg1563867 | ||
| 214 | |||
| 215 | |||
| 216 | ## USB 3 compatibility | ||
| 217 | I heard some people have a problem with USB 3 port, try USB 2 port. | ||
| 218 | |||
| 219 | |||
| 220 | ## Mac compatibility | ||
| 221 | ### OS X 10.11 and Hub | ||
| 222 | https://geekhack.org/index.php?topic=14290.msg1884034#msg1884034 | ||
| 223 | |||
| 224 | |||
| 225 | ## Problem on BIOS(UEFI)/Resume(Sleep&Wake)/Power cycles | ||
| 226 | Some people reported their keyboard stops working on BIOS and/or after resume(power cycles). | ||
| 227 | |||
| 228 | As of now root of its cause is not clear but some build options seem to be related. In Makefile try to disable those options like `CONSOLE_ENABLE`, `NKRO_ENABLE`, `SLEEP_LED_ENABLE` and/or others. | ||
| 229 | |||
| 230 | https://github.com/tmk/tmk_keyboard/issues/266 | ||
| 231 | https://geekhack.org/index.php?topic=41989.msg1967778#msg1967778 | ||
| 232 | |||
| 233 | |||
| 234 | |||
| 235 | ## FLIP doesn't work | ||
| 236 | ### AtLibUsbDfu.dll not found | ||
| 237 | Remove current driver and reinstall one FLIP provides from DeviceManager. | ||
| 238 | http://imgur.com/a/bnwzy \ No newline at end of file | ||
