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