]> git.donarmstrong.com Git - qmk_firmware.git/blob - FAQ.md
Updated FAQ (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 # Degug 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 ## Can't get message on console\r
31 Check:\r
32 - *hid_listen* finds your device. See above.\r
33 - Enable debug with pressing **Magic**+d. See [Magic Commands](https://github.com/tmk/tmk_keyboard#magic-commands).\r
34 - set `debug_enable=yes` usually in `matrix_init()` in **matrix.c**.\r
35 - try using 'print' function instead of debug print. See **common/print.h**.\r
36 - disconnect other devices with console function. See [Issue #97](https://github.com/tmk/tmk_keyboard/issues/97).\r
37 \r
38 ## Linux or UNIX like system requires Super User privilege\r
39 Just use 'sudo' to execute *hid_listen* with privilege.\r
40 ```\r
41 $ sudo hid_listen\r
42 ```\r
43 \r
44 Or add an *udev rule* for TMK devices with placing a file in rules directory. The directory may vary on each system.\r
45 \r
46 File: /etc/udev/rules.d/52-tmk-keyboard.rules(in case of Ubuntu)\r
47 ```\r
48 # tmk keyboard products     https://github.com/tmk/tmk_keyboard\r
49 SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666"\r
50 ```\r
51 \r
52 ***\r
53 \r
54 # Miscellaneous\r
55 ## NKRO Doesn't work\r
56 First you have to compile frimware with this build option `NKRO_ENABLE` in `Makefile`.\r
57 \r
58 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.\r
59 \r
60 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
61 https://github.com/tmk/tmk_keyboard#boot-magic-configuration---virtual-dip-switch\r
62 \r
63 Note that host(in particular BIOS) can force keyboard to turn into **6KRO** mode. \r
64 \r
65 \r
66 ## TrackPoint needs reset circuit(PS/2 mouse support)\r
67 Without reset circuit you will have inconsistent reuslt due to improper initialize of the hardware. See circuit schematic of TPM754.\r
68 \r
69 - http://geekhack.org/index.php?topic=50176.msg1127447#msg1127447\r
70 - http://www.mikrocontroller.net/attachment/52583/tpm754.pdf\r
71 \r
72 \r
73 ## Can't read comlumn of matrix beyond 16 \r
74 Use `1UL<<16` intead of `1<<16` in `read_cols()` in **matrix.h** when your columns goes beyond 16.\r
75 \r
76 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
77 \r
78 http://deskthority.net/workshop-f7/rebuilding-and-redesigning-a-classic-thinkpad-keyboard-t6181-60.html#p146279\r
79 \r
80 \r
81 \r
82 ## Pull-up Resistor\r
83 In some case converters needed to have pull-up resistors to work correctly. Place the resistor between VCC and signal line in parallel.\r
84 \r
85 For example:\r
86 ```\r
87 Keyboard       Conveter\r
88                ,------.\r
89 5V------+------|VCC   |\r
90         |      |      |\r
91         R      |      |\r
92         |      |      |\r
93 Signal--+------|PD0   |\r
94                |      |\r
95 GND------------|GND   |\r
96                `------'\r
97 R: 1K Ohm resistor\r
98 ```\r
99 \r
100 https://github.com/tmk/tmk_keyboard/issues/71\r
101 \r
102 \r
103 ## Arduino Micro's pin naming is confusing\r
104 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
105 http://arduino.cc/en/uploads/Main/arduino-micro-schematic.pdf\r
106 \r
107 \r
108 \r
109 ## Bootloader jump doesn't work\r
110 Properly configure boot section size in Makefile. With wrong section size bootloader won't probably start with **Magic command** and **Boot Magic**.\r
111 - https://github.com/tmk/tmk_keyboard#magic-commands\r
112 - https://github.com/tmk/tmk_keyboard#bootloader\r
113 \r
114 ```\r
115 # Boot Section Size in *bytes*\r
116 #   Teensy halfKay   512\r
117 #   Teensy++ halfKay 1024\r
118 #   Atmel DFU loader 4096       (TMK Alt Controller)\r
119 #   LUFA bootloader  4096\r
120 #   USBaspLoader     2048\r
121 OPT_DEFS += -DBOOTLOADER_SIZE=4096\r
122 ```\r
123 http://geekhack.org/index.php?topic=12047.msg1292018#msg1292018\r
124 \r
125 \r
126 ## Special Extra key doesn't work(System, Audio control keys)\r
127 You need to define `EXTRAKEY_ENABLE` in **makefile** to use them in TMK.\r
128 ```\r
129 EXTRAKEY_ENABLE = yes          # Audio control and System control\r
130 ```\r
131 http://deskthority.net/workshop-f7/tmk-keyboard-firmware-collection-t4478-60.html#p157919\r
132 \r
133 \r
134 ## Wakeup from sleep doesn't work\r
135 In Windows check `Allow this device to wake the computer` setting in Power **Management property** tab of **Device Manager**. Also check BIOS setting.\r
136 \r
137 Pressing any key during sleep should wake host.\r
138 \r
139 \r
140 ## Using Arduino?\r
141 **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
142 \r
143 - http://arduino.cc/en/uploads/Main/arduino-leonardo-schematic_3b.pdf\r
144 - http://arduino.cc/en/uploads/Main/arduino-micro-schematic.pdf\r
145 \r
146 Arduino leonardo and micro have **ATMega32U4** and can be used for TMK, though Arduino bootloader may be a problem.\r
147 \r
148 \r
149 ## Using PF4-7 pins of USB AVR?\r
150 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
151 \r
152 If you are using Teensy this isn't needed. Teensy is shipped with JTAGEN fuse bit unprogrammed to disable the function.\r
153 \r
154 See this code.\r
155 ```\r
156     // JTAG disable for PORT F. write JTD bit twice within four cycles.\r
157     MCUCR |= (1<<JTD);\r
158     MCUCR |= (1<<JTD);\r
159 ```\r
160 https://github.com/tmk/tmk_keyboard/blob/master/keyboard/hbkb/matrix.c#L67\r
161 \r
162 And read **26.5.1 MCU Control Register – MCUCR** of ATMega32U4 datasheet.\r
163 \r
164 \r
165 ## Adding LED indicators of Lock keys\r
166 You need your own LED indicators for CapsLock, ScrollLock and NumLock? See this post.\r
167 \r
168 http://deskthority.net/workshop-f7/tmk-keyboard-firmware-collection-t4478-120.html#p191560\r
169 \r
170 ## Program Arduino Micro/Leonardo\r
171 Push reset button and then run command like this within 8 seconds.\r
172 \r
173 ```\r
174 avrdude -patmega32u4 -cavr109 -b57600 -Uflash:w:adb_usb.hex -P/dev/ttyACM0\r
175 ```\r
176 \r
177 Device name will vary depending on your system.\r
178 \r
179 http://arduino.cc/en/Main/ArduinoBoardMicro\r
180 https://geekhack.org/index.php?topic=14290.msg1563867#msg1563867