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