]> git.donarmstrong.com Git - qmk_firmware.git/blob - FAQ.md
Updated FAQ (markdown)
[qmk_firmware.git] / FAQ.md
1 # Documents You Need To Read\r
2 Read these yet?\r
3  \r
4 1. First **README** under top directory : https://github.com/tmk/tmk_keyboard/blob/master/README.md\r
5 2. For **Build**: https://github.com/tmk/tmk_keyboard/blob/master/doc/build.md\r
6 3. And **README** under each project(keyboard/converter) directory. Note that you should read two **README**.\r
7 4. And then, FAQ.\r
8 \r
9 \r
10 # Build\r
11 - [[FAQ/Build]]\r
12 \r
13 \r
14 # Keymap\r
15 - [[FAQ/Keymap]]\r
16 \r
17 \r
18 # Degug Console\r
19 ## hid_listen can't recognize device\r
20 When debug console of your device is not ready you will see like this:\r
21 \r
22     Waiting for device:.........\r
23 \r
24 once the device is pluged in then *hid_listen* finds it you will get this message:\r
25 \r
26     Waiting for new device:.........................\r
27     Listening:\r
28 \r
29 Check if you can't get this 'Listening:' message:\r
30 - build with `CONSOLE_ENABLE=yes` in **Makefile**.\r
31 \r
32 ## Can't get message on console\r
33 Check:\r
34 - *hid_listen* finds your device. See above.\r
35 - Enable debug with pressing **Magic**+d. See [Magic Commands](https://github.com/tmk/tmk_keyboard#magic-commands).\r
36 - set `debug_enable=yes` usually in `matrix_init()` in **matrix.c**.\r
37 - try using 'print' function instead of debug print. See **common/print.h**.\r
38 - disconnect other devices with console function. See [Issue #97](https://github.com/tmk/tmk_keyboard/issues/97).\r
39 \r
40 ## Linux or UNIX like system requires Super User privilege\r
41 Just use 'sudo' to execute *hid_listen* with privilege.\r
42 ```\r
43 $ sudo hid_listen\r
44 ```\r
45 \r
46 Or add an *udev rule* for TMK devices with placing a file in rules directory. The directory may vary on each system.\r
47 \r
48 File: /etc/udev/rules.d/52-tmk-keyboard.rules(in case of Ubuntu)\r
49 ```\r
50 # tmk keyboard products     https://github.com/tmk/tmk_keyboard\r
51 SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666"\r
52 ```\r
53 \r
54 ***\r
55 \r
56 # Miscellaneous\r
57 ## NKRO Doesn't work\r
58 1. Build with this option of Makefile\r
59 \r
60     NKRO_ENABLE = yes\r
61 \r
62 2. After boot keyboard may be in **boot mode**(6KRO), you will need to replug keyboard to enable NKRO.\r
63 \r
64 3. Or use `Magic` **N** command to toggle NKRO function.(`LShift+RShift+N` by default)\r
65 \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 comlumn of matrix beyond 16 \r
76 Use `1UL<<16` intead 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 boot section size in Makefile. With wrong section size bootloader won't probably start with **Magic command** and **Boot Magic**.\r
113 - https://github.com/tmk/tmk_keyboard#magic-commands\r
114 - https://github.com/tmk/tmk_keyboard#bootloader\r
115 \r
116 ```\r
117 # Boot Section Size in *bytes*\r
118 #   Teensy halfKay   512\r
119 #   Teensy++ halfKay 1024\r
120 #   Atmel DFU loader 4096       (TMK Alt Controller)\r
121 #   LUFA bootloader  4096\r
122 #   USBaspLoader     2048\r
123 OPT_DEFS += -DBOOTLOADER_SIZE=4096\r
124 ```\r
125 http://geekhack.org/index.php?topic=12047.msg1292018#msg1292018\r
126 \r
127 \r
128 ## Special Extra key doesn't work(System, Audio control keys)\r
129 You need to define `EXTRAKEY_ENABLE` in **makefile** to use them in TMK.\r
130 ```\r
131 EXTRAKEY_ENABLE = yes          # Audio control and System control\r
132 ```\r
133 http://deskthority.net/workshop-f7/tmk-keyboard-firmware-collection-t4478-60.html#p157919\r
134 \r
135 \r
136 ## Wakeup from sleep doesn't work\r
137 In Windows check `Allow this device to wake the computer` setting in Power **Management property** tab of **Device Manager**. Also check BIOS setting.\r
138 \r
139 Pressing any key during sleep should wake host.\r
140 \r
141 \r
142 ## Using Arduino?\r
143 **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
144 \r
145 - http://arduino.cc/en/uploads/Main/arduino-leonardo-schematic_3b.pdf\r
146 - http://arduino.cc/en/uploads/Main/arduino-micro-schematic.pdf\r
147 \r
148 Arduino leonardo and micro have **ATMega32U4** and can be used for TMK, though Arduino bootloader may be a problem.\r
149 \r
150 \r
151 ## Using PF4-7 pins of USB AVR?\r
152 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
153 \r
154 If you are using Teensy this isn't needed. Teensy is shipped with JTAGEN fuse bit unprogrammed to disable the function.\r
155 \r
156 See this code.\r
157 ```\r
158     // JTAG disable for PORT F. write JTD bit twice within four cycles.\r
159     MCUCR |= (1<<JTD);\r
160     MCUCR |= (1<<JTD);\r
161 ```\r
162 https://github.com/tmk/tmk_keyboard/blob/master/keyboard/hbkb/matrix.c#L67\r
163 \r
164 And read **26.5.1 MCU Control Register – MCUCR** of ATMega32U4 datasheet.\r
165 \r
166 \r
167 ## Adding LED indicators of Lock keys\r
168 You need your own LED indicators for CapsLock, ScrollLock and NumLock? See this post.\r
169 \r
170 http://deskthority.net/workshop-f7/tmk-keyboard-firmware-collection-t4478-120.html#p191560\r
171 \r
172 ## Program Arduino Micro/Leonardo\r
173 Push reset button and then run command like this within 8 seconds.\r
174 \r
175 ```\r
176 avrdude -patmega32u4 -cavr109 -b57600 -Uflash:w:adb_usb.hex -P/dev/ttyACM0\r
177 ```\r
178 \r
179 Device name will vary depending on your system.\r
180 \r
181 http://arduino.cc/en/Main/ArduinoBoardMicro\r
182 https://geekhack.org/index.php?topic=14290.msg1563867#msg1563867