]> git.gir.st - tmk_keyboard.git/blob - keyboard/hhkb_rn42/MEMO.txt
Update MEMO.txt
[tmk_keyboard.git] / keyboard / hhkb_rn42 / MEMO.txt
1 Roving RN-42
2 ============
3
4
5 TODO
6 ----
7 - Lipo voltage ADC sensing
8 - Lipo charger configuration: fast charge time: USB charger spec?
9 - Low voltage alarm: LED indcates voltage of Lipo
10 - CTS/RTS lines are needed? just connect in loop back if no flow control is needed.
11 - CTS is needed for waking up from deep sleep?
12 - Serial API callback when data are available/received(and when send buffer is available)
13 - Serial API instance several serial ports can be used
14 - DCDC converter: squeaky inducter with onsemi NCP1402
15 - Lipo charger MCP73831: needs capacitor 4.7uF *2
16 - Keymap layer bug: during space is pressed(mousekey) press Fn(HHKB) then release space before Fn, in result HHKB layer is locked(toggled) unintentionally.
17
18 DONE:
19 - USB connection check - 07.01
20 - BT on/off check: whether RX line is pulled up? - checking RTS 07.01
21 - USB/BT switching BT is on -> BT, BT is off -> USB - 07.01
22 - Under voltage lock out UVLO for protection of Lipo - Lipo has discharge protection at 3.100V 07.01
23 - Power saving: HHKB scan, BT radio control - 9h with 850mAh, this is enough 07.01
24 - Power selector doesn't work; Q4 MOSFET leaks from Lipo to USB power line. -- use Schottky instead 07/04
25
26
27
28
29 Configuration
30 -------------
31 Ver 6.15 04/26/2013
32 (c) Roving Networks
33 ***Settings***
34 BTA=0006664B3AE3
35 BTName=tmkBT-3AE3
36 Baudrt(SW4)=115K
37 Mode =Pair
38 Authen=2
39 Bonded=1
40 Rem=001BDC06415B
41 ***ADVANCED Settings***
42 SrvName= keyboard/mouse
43 SrvClass=0000
44 DevClass=05C0
45 InqWindw=0100
46 PagWindw=0100
47 CfgTimer=255
48 StatuStr=NULL
49 HidFlags=3f
50 DTRtimer=8
51 KeySwapr=0
52 ***OTHER Settings***
53 Profile= HID
54 CfgChar= $
55 SniffEna=0
56 LowPower=0
57 TX Power=4
58 IOPorts= 0
59 IOValues=0
60 Sleeptmr=0
61 DebugMod=0
62 RoleSwch=0
63
64 Ver 6.15 04/26/2013
65 (c) Roving Networks
66 ***Settings***
67 BTA=0006664B3AE3
68 BTName=tmkBT-3AE3
69 Baudrt(SW4)=115K
70 Mode =DTR
71 Authen=2
72 Bonded=0
73 Rem=BCF5AC9BCB7E
74 ***ADVANCED Settings***
75 SrvName= keyboard/mouse
76 SrvClass=0000
77 DevClass=0000
78 InqWindw=0100
79 PagWindw=0100
80 CfgTimer=255
81 StatuStr=NULL
82 HidFlags=3f
83 DTRtimer=8
84 KeySwapr=0
85 ***OTHER Settings***
86 Profile= HID
87 CfgChar= $
88 SniffEna=0
89 LowPower=0
90 TX Power=ffe8
91 IOPorts= 0
92 IOValues=0
93 Sleeptmr=0
94 DebugMod=0
95 RoleSwch=0
96
97
98 command mode
99 ------------
100 To enter command mode disconnect the module from host and type '$$$'.(you will see 'CMD')
101 To exit type '---'.(you will see 'END')
102
103 Serial line: 115200bps, 8bit, 1-stopbit, non-parity, no flow control
104 SSP: 115200bps, 8bit, 1-stopbit, non-parity, no flow control(via Bluetooth)
105
106
107 S-,tmkBT // Device name
108 SH,0038 // HID register
109 SC,0000 // COD: 000005C0 (see HID spec/Bluegiga doc)
110 SD,05C0 // bit 12-8 7 6 5-0
111 // 00101 1 1 0
112 // peripheral pointing keybaord joystick, gamepad, ...
113 S~,6 // HID profile
114 SS,keyboard/mouse // service name
115 SM,6 // Pairing mode: auto connect
116 SM,4 // Master mode: Connection can be controled with GPIO6
117
118 SY,FEE8 // lower power -20dbM
119
120
121
122 HID profile
123 -----------
124 S~,6 HID profile
125 S~,0 SPP profile
126 R,1 reboot
127
128
129 Apple iOS
130 ---------
131 Cannot supported without apple iAP authentication chip.
132
133
134 HID flag register
135 -----------------
136 SH,0200
137 GH
138
139 10 0000 0000(0200) default
140 00 0011 1000(0038) Combo
141 || | | |\_\____ number of paired devices to which the module can reconnect
142 || | | \_______ send out reports over UART (0xFF <len> <data>)
143 || \__\_________ descriptor type
144 |\______________ toggle virtual keyboard on iOS when first connected
145 \_______________ Force HID mode if GPIO11 is high on power-up
146
147 Descriptor type:
148 0000: keybaord
149 0001: Game Pad
150 0010: Mouse
151 0011: Combo
152 0100: Joystick
153 1xxx: reserved
154
155 Out report - Indicator
156 ----------------------
157 0xFE 0x02 0x01 <LED_state>
158
159
160 LED Status
161 ----------
162 Configuring 10 times per sec
163 Startup/configuration timer 2 times per sec
164 Discoverable/Inquiring/Idle once per sec
165 Connected solid on
166
167
168 Pairing
169 -------
170 First, host initiates pairing process and once it is done, auto connect will work thereafter.
171 SM,3 Master mode
172 SM,4 Auto Connect DTR Mode uses GPIO6 to make and break connection(Mode =DTR)
173 confirm: auto connect works and control connection with GPIO6
174 SM,5 Auto Connect ANY Mode (Mode =ANY)
175 each time GPIO is set, make inquiry and connect to the first found device
176 SM,6 automatically reconnect(Mode =Pair)
177 confirm: auto connect works well but difficult to enter command mode.
178
179
180 Fast data mode
181 --------------
182 The module enters fast data mode after 'remote configuration timer' window is passed from power on.
183 In this mode the module does not accept '$$$' to enter command mode.
184
185 Power Management
186 ----------------
187 Inquiry and Page window Idle or Active (3.1.1)
188 Downside: delay in discovery or connection time
189 SI, // set inquiry scan window(discovery) on/off duty?
190 SJ, // set page scan window(connection)
191 This reduces averaege power >20mA to 5mA(3mA in Sniff mode)
192
193 Sniff mode Transmit
194 Sniff mode is disabled by default and radio is active continuously when connected.(25-30mA)
195 In Sniff mode the radio wakes up intermittently and sleeps in very low power mode.(2mA)
196 SW,<val> // set interval timer(*0.625ms) 0000-7FFF
197
198 Deep sleep Idle (3.1.2)
199 In this mode the module shuts down completly and only draws about 300uA. To enable this set the most signifant bit(0x8000) of Sniff interaval timer.
200 SW,8320 // deep sleep enable(interval=0x320*0.625ms)
201 In normal sleep the firmware is still running in idle mode, and wakes up about 20 times per second to check ports, update LEDs, etc. During deep sleep, the firmware actually stops runnig some tasks and the LEDs only update about once per second.
202 To wake from deep sleep there are three ways: (in worst case wake up takes 5ms)
203 *send a charactor to the UART(first charactor will be lost)
204 *toggle CTS low to high and wait 5ms
205 *wake automatically every slot time(<val>*0.625ms)
206 Once the radio is awake it stay active for exactly 1 second of inactivity and then sleeps again.
207 Downside: latency and data loss
208
209 Disable Output driver Idle or Active (3.1.3)
210 S%,1000 // set all GPIO pins(0-11) to inputs.
211
212 Lower Transmit Power Idle or Active (3.1.4)
213 SY,<hex> // transmit power setting(takes effect after a power cycle and reboot)
214 Downside: reducing effective range
215
216
217 Optimizig for Latency
218 ---------------------
219 By default the firmware is optimized for throughput.
220 SQ,16 // set latency bit
221 SQ,0 // unset latency bit
222
223
224 Configuration timer settings
225 ----------------------------
226 Remote configuration is used for the module to be configured with various commands over Bluetooth(SPP profile only?).
227
228 The module has remote configuration timer to allow remote configuration over Bluetooth after power up in Slave mode. In Master modes the remote configuration timer is set to 0(no remote configuration). (In Trigger Master mode the timer is used as an idle timer to break the connection after time expires with no charactors receive.)
229 ST,0 // no remote, no local when connected
230 ST,<1-252> // local and remote with timeout in seconds from power up
231 ST,253 // local only without timeout
232 ST,254 // remote only without timeout
233 ST,255 // local and remote without timeout
234
235
236 Android
237 -------
238 3.7.1.5 Note: To connect with Android phone the modules must wake up 11ms every 2.5seconds.
239
240
241 Commands
242 --------
243 SC,
244 SM,<val>
245 SD,
246 SP,<string> Pin code(alpahnumeric)
247 SQ,<mask> Special configuration(GPIO, discovery mode, low latency, reboot, UART)
248 SR,<hex> Store remote address
249 SR,Z Erase all address
250 SS,<string> Set service name(1-20)**
251 ST,<val> Remote configuration timer(Master:0, Slave:0-255, Triger:as idle timer)
252 SU,<val> UART baud rate
253 SW,<val> low-power sniff mode** deep sleep and wake up every 625us * <val>
254 SX,<0|1> bonding enable only acceps device that matches the stored address
255 SY,<hex> power setting**
256 SZ,<val> non-standard raw baud rate <val>=baud*0.004096
257 S~,<val> Profile 0:SPP, 5:APL, 6:HID
258 S-,<string> Device name -15 alphanumeric charactors
259 S?,<0|1> role switch enable
260 S$,<char> command mode char
261 $|,<hex> low-power connect mode deep sleep/active(discoverable and connectable) cycle
262 D display basic setting
263 E display extended setting
264 GB display the device's Bluetooth address
265 GF display Bluetooth address of connected device
266 GK show connection status
267 GR show remote address for reconnecting
268 G& show GPIO pin
269 G<char> show stored setting
270 + toggle local echo on/off
271 & show GPIO 3,4,6,7(DIP switch)
272 C connect to stored remote address
273 C,<address> connect last address
274 CFI connect and go into fast data mode
275 CFR connect and go into fast data mode
276 CT,<address>,<val> connect to the address and disconnect after val?
277 F,1 fast data mod:
278 H display help
279 I,<time>,<cod> inquiry scan with <cod>
280 IN
281 IQ scan
282 IS inquiry scan with 001F00
283 J hide pin code
284 K, kill disconnects current connection
285 L link quality
286 M show modem signlal status
287 O display other settings
288 P,<car> pass through?
289 Q quiet mode make the module not discoverable
290 Q,0 discoverable and connectable
291 Q,1 not discoverable and not connectable
292 Q,2 not discoverable and connectable
293 Q,? display current quiet mode
294 R,1 reboot
295 T,<0|1> pass received data while in command mode
296 U,<baud>,<parity> change UART setting tentatively
297 V display firmware version
298 W wake from quiet mode enable discovery and connection
299 Z deep sleep mode(<2mA)
Imprint / Impressum