]> git.gir.st - tmk_keyboard.git/blob - tmk_core/protocol/iwrap/iWRAP5.txt
Merge commit '20b787fc1284176834cbe7ca2134e4b36bec5828'
[tmk_keyboard.git] / tmk_core / protocol / iwrap / iWRAP5.txt
1 Terminology
2 ===========
3 PSM
4 HIDP HID Protocol
5 L2CAP Logical Link Control Adaptation Protocol
6 MTU Maximum Transmission Unit
7
8
9
10 HID Protocol
11 ============
12 3 of HID_SPEC_V11.pdf
13
14 Channel
15 -------
16 Control channel PSM=0x0011
17 Interrupt channel PSM=0x0013
18
19 Message
20 -------
21 HANDSHAKE(0)
22 HID_CONTROL(1)
23
24 GET_REPORT(4)
25 Host requests report(DATA payload on Control channel) from Device
26 Size Desc
27 ------------------------------------------------------------------------------
28 HIDP-Hdr 1 7..4: HIDP Message TYpe(4: GET_REPORT)
29 3: Size(1:2-octed buffer size, 0:size of the report)
30 2: 0
31 1..0: Report Type(1:input, 2:output, 3: feature)
32 ReportID 1 Optional
33 BufferSize 2 Optional(specified when Size=1)
34
35 SET_REPORT(5)
36 GET_PROTOCOL(6)
37 SET_PROTOCOL(7)
38
39 DATA(A)
40 Input/Output Report: All DATA payloads flow on Interrupt channel.
41 Other: flows on Control channel.
42 Size Desc
43 ------------------------------------------------------------------------------
44 HIDP-Hdr 1 7..4 0xA
45 3..2 Reserved(0)
46 1..0 Report Type(0:Other, 1:Input, 2:Output, 3:Feature)
47 Payload N Data
48
49
50
51
52 Boot Protocol
53 =============
54 3.3.2
55 No report descriptor, fixed report descriptors defined.
56
57 Device ReportID Size
58 ---------------------------------
59 Reserved 0
60 Keyboard 1 9octets
61 Mouse 2 4octets
62 Reserved 3-255
63
64 Report descriptor
65 -----------------
66 Report ID is added to USB HID boot protocol descriptor.
67 Boot Protocol device doesn't need to supply descriptors. and can send extra data on end of boot report this data will be ignored unless host supports report descriptor.
68
69 Report Protocol devices can have specific descriptors. Using Boot protocol descriptor followed by extra data may be useful for compatibility to Boot protocol only supported host.
70
71 NOTE:
72 Bluegiga HID sample say report ID of mouse is 1 but 2?
73 Bluegiga HID sample say report ID of consumer page is 2 but 3?
74 ** mouse.desc and consumer.desc were fixed.
75 size
76 keyboard.desc 67 0x43
77 mouse.desc 60 0x3c
78 consumer.desc 82 0x52
79 combo.desc 209 0xd1
80
81
82
83 SDP
84 ===
85 attributes(3.3.2)
86 ----------
87 HIDDeviceSubclass
88 which type is supported in Boot Protocol Mode
89 7 6
90 ---
91 0 1 Keyboard
92 1 0 Pointing device
93 1 1 Combo keyboard/pointing device
94
95 HIDBootDevice
96 TRUE
97 HIDReconnectInitiate
98 TRUE
99
100
101 Class of Device/Service
102 =======================
103 http://phys.sci.hokudai.ac.jp/LABS/yts/pic/GB002/Bluetooth_assigned_numbers_baseband.pdf
104
105 0x0005C0 Keyboard and Pointing deivce(combo)
106
107
108 23 16 15 8 7 0
109 ---------------------------------
110 Service |Major |Minor |Format
111
112 Format type
113 1 0
114 ---
115 0 0
116
117 Minor Device Class of Peripheral Major
118 7 6
119 ---
120 0 1 Keyboard
121 1 0 Pointing device
122 1 1 Combo keyboard/pointing device
123
124
125 Major device classes
126 12 11 10 9 8
127 --------------
128 0 0 0 0 0 Miscellaneous
129 0 0 0 0 1 Computer
130 0 0 0 1 0 Phone
131 0 0 0 1 1 LAN /Network Access point
132 0 0 1 0 0 Audio/Video (headset,speaker,stereo, video display, vcr.....
133 0 0 1 0 1 *Peripheral (mouse, joystick, keyboards, ..... )
134 0 0 1 1 0 Imaging (printing, scanner, camera, display, ...)
135 1 1 1 1 1 Uncategorized, specific device code not specified
136 X X X X X All other values reserved
137
138
139 Major service classes
140 bit
141 --------------------------------------
142 13 Limited Discoverable Mode [Ref #1]
143 14 (reserved)
144 15 (reserved)
145 16 Positioning (Location identification)
146 17 Networking (LAN, Ad hoc, ...)
147 18 Rendering (Printing, Speaker, ...)
148 19 Capturing (Scanner, Microphone, ...)
149 20 Object Transfer (v-Inbox, v-Folder, ...)
150 21 Audio (Speaker, Microphone, Headset service, ...)
151 22 Telephony (Cordless telephony, Modem, Headset service, ...)
152 23 Information (WEB-server, WAP-server, ...)
153
154
155
156
157 Authentication SSP
158 -------------------
159 SET BT SSP 2 0 PASS KEY entering
160 SET BT SSP 3 0 NO PASS KEY entering
161 SET BT SSP <capabilities> <mitm>
162 <capabilities>: 0:display only 1:display+yes/no button 2:keyboard only 3:none
163 SET BT SSP 2 1 # 2:keyboard only 1:Man-in-the-middle protection is needed
164 SET BT SSP 2 0 # 2:keyboard only 0:Man-in-the-middle protection is not needed
165
166
167 SET BT SSP 2 1
168 bond only if MITM protection is supported by host
169 SET BT SSP 2 0
170 bond even if MITM protection is not supported by host
171
172 On Windows 'Add device' causes SSP PASSKEY event on iWRAP
173 SSP PASSKEY 78:dd:08:b7:e4:a2 ?
174
175 If device has display(0 or 1) this event occurs. User should be shown this code on the device.
176 SSP CONFIRM 78:dd:08:b7:e4:a2 517572
177
178
179 SET BT SSP 3 0
180 No input/output, No MITM protection.
181 Without procedure of authentication the divice is bond to host.
182
183
184 Connect
185 =======
186 CALL 78:dd:08:b7:e4:a2 11 HID
187
188
189 Setting
190 ========
191 Following settings need to be done before wiring into keyboard.
192 - UART speed: 38400bps(115200bps didn't work with software serial)
193 - No SSP procedure(without MITM protection)
194 - No Power Saving
195
196 # clear pairing record and set default
197 SET BT PAIR *
198 SET RESET
199
200 SET CONTROL INIT SET CONTROL MUX 0
201 SET CONTROL BAUD 38400,8n1
202 SET BT NAME TMK Blootooth WT12
203 SET BT CLASS 0005c0
204 SET BT AUTH * 0000
205 SET BT SSP 3 0
206 SET CONTROL CONFIG 4800
207 SET PROFILE HID 0f c0 0100 00 en 0409 TMK Bluetooth keyboard(WT12)
208 SET PROFILE SPP
209
210 # power saving?
211 SET BT SNIFF 100 20 1 8
212
213
214 # Report Descriptor
215 # combo keyboard + mouse + consumer
216 HID SET d2 05010906a1010507850119e029e715002501750195088102950175088101950575010508850119012905910295017503910395067508150025650507190029658100c005010902a1010901a1008502050919012908150025017501950881020501093009311581257f750895028106093895018106050c0a380295018106c0c0050c0901a1018503050c1500250109e909ea09e209cd19b529b87501950881020a8a010a21020a2a021a23022a27027501950881020a83010a96010a92010a9e010a94010a060209b209b4750195088102c0
217
218
219
220 SET PROFILE HID
221 ---------------
222 SET PROFILE HID 0d c0 100 0 en 0409 HHKB pro Bluetooth keyboard
223 {function bit} uint8
224 {subclass} uint8
225 {version} uint16
226 {country} uint8
227 {BTlang} char[2]
228 {USBlang} uint16
229 {name} string
230
231
232 SET BT CLASS
233 ------------
234 See Class of Device
235 composite device: keyboard and mouse
236 SET BT CLASS 005c0
237
238
239
240
241
242
243 ----------
244 after setting
245 ----------
246 set
247 SET BT BDADDR 00:07:80:47:22:14
248 SET BT NAME TMK Blootooth WT12
249 SET BT CLASS 0005c0
250 SET BT AUTH * 0000
251 SET BT IDENT BT:47 f000 5.0.1 Bluegiga iWRAP
252 SET BT LAP 9e8b33
253 SET BT PAGEMODE 4 2000 1
254 SET BT PAIR 78:dd:08:b7:e4:a2 9e3d85c91bcae73fef8cc10bec18b42f
255 SET BT POWER 3 3 3
256 SET BT ROLE 0 f 7d00
257 SET BT SNIFF 0 20 1 8
258 SET BT SSP 3 0
259 SET BT MTU 667
260 SET CONTROL BAUD 38400,8n1
261 SET CONTROL CD 00 0
262 SET CONTROL ECHO 7
263 SET CONTROL ESCAPE 43 00 1
264 SET CONTROL GAIN 0 5
265 SET CONTROL INIT SET CONTROL MUX 0
266 SET CONTROL MSC DTE 00 00 00 00 00 00
267 SET CONTROL MUX 1
268 SET CONTROL PIO 00 00
269 SET CONTROL READY 00
270 SET PROFILE HID 0f c0 0100 00 en 0409 TMK Bluetooth keyboard(WT12)
271 SET
272
273 set control config list
274 SET CONTROL CONFIG 0000 0000 0000 4900 KLUDGE INTERACTIVE_PIN UART_LATENCY
275
276
277 info config
278 WRAP THOR AI (5.0.1 build 620)
279 Copyright (c) 2003-2012 Bluegiga Technologies Inc.
280 Compiled on Oct 1 2012 10:56:21, running on WT12-A module, psr v31
281 BGIO FTP HFP HFP_AG HID HID_CONSUMER_PAGE HSP MAP MDP OTA PBAP PIO=0x00fc SSP SUBRATE TEST VOLUME
282 - BOCK4 version 620 (Oct 1 2012 10:56:03) (max acl/sco 7/1)
283 - Bluetooth version 3.0, Power class 2
284 - Loader 8615, firmware 8825 (56-bit encryption), native execution mode
285 - up 0 days, 01:50, 2 connections (pool 2)
286 - User configuration:
287 &028d = 0001
288 &0295 = 0000 0005 000b 0000 0003 0000 0000 0000 0000 0000 0000
289 &0298 = c053
290 &0299 = 0000 0000
291 &02a3 = 0030 0030 0030 0030
292 &02a4 = 009d 0000
293 &02a5 = 0053 0045 0054 0020 0043 004f 004e 0054 0052 004f 004c 0020 004d 0055 0058 0020 0030
294 &02a7 = 0000 05c0
295 &02a8 = 0800 0000 0000 0000
296 &02aa = 0004 2000 0001 0033 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
297 &02ac = 0000 0000 002b 0000 0000 0000 0000 0000 0000 0000 0002 0000 0000 0000 0010 0000 0000 0000 0000 029b 0000 0000 0000 0000
298 &02ad = 4d54 204b 6c42 6f6f 6f74 746f 2068 5457 3231
299 &02b0 = fa65 b0aa 934a 077b a600 d1cc fe58 8dd5
300 &02b3 = 0004 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0005 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0005
301 &02b7 = 000f 00c0 0100 0000 0065 006e 0409 4d54 204b 6c42 6575 6f74 746f &02bb = 8000
302 READY.
303 ----------
304
305
306
307 -----
308 After 5.0.1 Firmware update
309 Firmware: ai-5.0.1-620-25b.bc4.dfu
310 PSR: wt12-a.ai-5.0.1-620-25b.psrf
311 -----
312 info config
313 WRAP THOR AI (5.0.1 build 620)
314 Copyright (c) 2003-2012 Bluegiga Technologies Inc.
315 Compiled on Oct 1 2012 10:56:21, running on WT12-A module, psr v31
316 BGIO FTP HFP HFP_AG HID HID_CONSUMER_PAGE HSP MAP MDP OTA PBAP PIO=0x00fc SSP SUBRATE TEST VOLUME
317 - BOCK4 version 620 (Oct 1 2012 10:56:03) (max acl/sco 7/1)
318 - Bluetooth version 3.0, Power class 2
319 - Loader 8615, firmware 8825 (56-bit encryption), native execution mode
320 - up 0 days, 00:03, 0 connections (pool 1)
321 - User configuration:
322 &0295 = 0000 0005 000b 0000 0003 0000 0000 0000 0000 0000 0000
323 &0299 = 0000 0000
324 &02aa = 0004 2000 0001 0033 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
325 &02ac = 0000 0000 002b 0000 0000 0000 0000 0000 0000 0000 0002 0000 0000 0000 0010 0000 0000 0000 0000 029b 0000 0000 0000 0000
326 &02ad = 5457 3231 412d
327 &02b0 = fa65 b0aa 934a 077b a600 d1cc fe58 8dd5
328 READY.
329
330 set
331 SET BT BDADDR 00:07:80:47:22:14
332 SET BT NAME WT12-A
333 SET BT CLASS 001f00
334 SET BT IDENT BT:47 f000 5.0.1 Bluegiga iWRAP
335 SET BT LAP 9e8b33
336 SET BT PAGEMODE 4 2000 1
337 SET BT PAIR 78:dd:08:b7:e4:a2 af18f81faa107e6dd068762ef921f48b
338 SET BT POWER 3 3 3
339 SET BT ROLE 0 f 7d00
340 SET BT SNIFF 0 20 1 8
341 SET BT SSP 3 0
342 SET BT MTU 667
343 SET CONTROL BAUD 115200,8n1
344 SET CONTROL CD 00 0
345 SET CONTROL ECHO 7
346 SET CONTROL ESCAPE 43 00 1
347 SET CONTROL GAIN 0 5
348 SET CONTROL MSC DTE 00 00 00 00 00 00
349 SET CONTROL PIO 00 00
350 SET CONTROL READY 00
351 SET PROFILE SPP Bluetooth Serial Port
352 SET
353
354 set control config list
355 SET CONTROL CONFIG 0000 0000 0000 0100 KLUDGE
356 ---------
Imprint / Impressum