Keyboard firmwares for Atmel AVR and Cortex-M
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

iWRAP5.txt 10KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345
  1. Terminology
  2. ===========
  3. PSM
  4. HIDP HID Protocol
  5. L2CAP Logical Link Control Adaptation Protocol
  6. MTU Maximum Transmission Unit
  7. HID Protocol Messages
  8. =====================
  9. 3 of HID_SPEC_V11.pdf
  10. Control channel PSM=0x0011
  11. Interrupt channel PSM=0x0013
  12. HANDSHAKE(0)
  13. HID_CONTROL(1)
  14. GET_REPORT(4)
  15. -------------
  16. Host requests report(DATA payload on Control channel) from Device
  17. Size Desc
  18. ------------------------------------------------------------------------------
  19. HIDP-Hdr 1 7..4: HIDP Message TYpe(4: GET_REPORT)
  20. 3: Size(1:2-octed buffer size, 0:size of the report)
  21. 2: 0
  22. 1..0: Report Type(1:input, 2:output, 3: feature)
  23. ReportID 1 Optional
  24. BufferSize 2 Optional(specified when Size=1)
  25. SET_REPORT(5)
  26. GET_PROTOCOL(6)
  27. SET_PROTOCOL(7)
  28. DATA(A)
  29. -------
  30. Input/Output Report: All DATA payloads flow on Interrupt channel.
  31. Other: flows on Control channel.
  32. Size Desc
  33. ------------------------------------------------------------------------------
  34. HIDP-Hdr 1 7..4 0xA
  35. 3..2 Reserved(0)
  36. 1..0 Report Type(0:Other, 1:Input, 2:Output, 3:Feature)
  37. Payload N Data
  38. Boot Protocol
  39. =============
  40. 3.3.2
  41. No report descriptor, fixed report descriptors defined.
  42. Device ReportID Size
  43. ---------------------------------
  44. Reserved 0
  45. Keyboard 1 9octets
  46. Mouse 2 4octets
  47. Reserved 3-255
  48. Report descriptor
  49. -----------------
  50. Report ID is added to USB HID boot protocol descriptor.
  51. 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.
  52. 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.
  53. NOTE:
  54. Bluegiga HID sample say report ID of mouse is 1 but 2?
  55. Bluegiga HID sample say report ID of consumer page is 2 but 3?
  56. ** mouse.desc and consumer.desc were fixed.
  57. size
  58. keyboard.desc 67 0x43
  59. mouse.desc 60 0x3c
  60. consumer.desc 82 0x52
  61. combo.desc 209 0xd1
  62. SDP
  63. ===
  64. attributes(3.3.2)
  65. ----------
  66. HIDDeviceSubclass
  67. which type is supported in Boot Protocol Mode
  68. 7 6
  69. ---
  70. 0 1 Keyboard
  71. 1 0 Pointing device
  72. 1 1 Combo keyboard/pointing device
  73. HIDBootDevice
  74. TRUE
  75. HIDReconnectInitiate
  76. TRUE
  77. Class of Device/Service
  78. =======================
  79. http://phys.sci.hokudai.ac.jp/LABS/yts/pic/GB002/Bluetooth_assigned_numbers_baseband.pdf
  80. 0x0005C0 Keyboard and Pointing deivce(combo)
  81. 23 16 15 8 7 0
  82. ---------------------------------
  83. Service |Major |Minor |Format
  84. Format type
  85. 1 0
  86. ---
  87. 0 0
  88. Minor Device Class of Peripheral Major
  89. 7 6
  90. ---
  91. 0 1 Keyboard
  92. 1 0 Pointing device
  93. 1 1 Combo keyboard/pointing device
  94. Major device classes
  95. 12 11 10 9 8
  96. --------------
  97. 0 0 0 0 0 Miscellaneous
  98. 0 0 0 0 1 Computer
  99. 0 0 0 1 0 Phone
  100. 0 0 0 1 1 LAN /Network Access point
  101. 0 0 1 0 0 Audio/Video (headset,speaker,stereo, video display, vcr.....
  102. 0 0 1 0 1 *Peripheral (mouse, joystick, keyboards, ..... )
  103. 0 0 1 1 0 Imaging (printing, scanner, camera, display, ...)
  104. 1 1 1 1 1 Uncategorized, specific device code not specified
  105. X X X X X All other values reserved
  106. Major service classes
  107. bit
  108. --------------------------------------
  109. 13 Limited Discoverable Mode [Ref #1]
  110. 14 (reserved)
  111. 15 (reserved)
  112. 16 Positioning (Location identification)
  113. 17 Networking (LAN, Ad hoc, ...)
  114. 18 Rendering (Printing, Speaker, ...)
  115. 19 Capturing (Scanner, Microphone, ...)
  116. 20 Object Transfer (v-Inbox, v-Folder, ...)
  117. 21 Audio (Speaker, Microphone, Headset service, ...)
  118. 22 Telephony (Cordless telephony, Modem, Headset service, ...)
  119. 23 Information (WEB-server, WAP-server, ...)
  120. SET PROFILE HID 0d c0 100 0 en 0409 HHKB pro Bluetooth keyboard
  121. {function bit} uint8
  122. {subclass} uint8
  123. {version} uint16
  124. {country} uint8
  125. {BTlang} char[2]
  126. {USBlang} uint16
  127. {name} string
  128. SET PROFILE HID 0f c0 100 0 en 0409 TMK Bluetooth keyboard
  129. // composite device: keyboard and mouse
  130. SET BT CLASS 005c0
  131. Authentication SSP
  132. -------------------
  133. SET BT SSP 2 0 PASS KEY entering
  134. SET BT SSP 3 0 NO PASS KEY entering
  135. SET BT SSP <capabilities> <mitm>
  136. <capabilities>: 0:display only 1:display+yes/no button 2:keyboard only 3:none
  137. SET BT SSP 2 1 # 2:keyboard only 1:Man-in-the-middle protection is needed
  138. SET BT SSP 2 0 # 2:keyboard only 0:Man-in-the-middle protection is not needed
  139. SET BT SSP 2 1
  140. bond only if MITM protection is supported by host
  141. SET BT SSP 2 0
  142. bond even if MITM protection is not supported by host
  143. On Windows 'Add device' causes SSP PASSKEY event on iWRAP
  144. SSP PASSKEY 78:dd:08:b7:e4:a2 ?
  145. If device has display(0 or 1) this event occurs. User should be shown this code on the device.
  146. SSP CONFIRM 78:dd:08:b7:e4:a2 517572
  147. SET BT SSP 3 0
  148. No input/output, No MITM protection.
  149. Without procedure of authentication the divice is bond to host.
  150. Connect
  151. =======
  152. CALL 78:dd:08:b7:e4:a2 11 HID
  153. Setting
  154. ========
  155. SET BT PAIR *
  156. SET RESET
  157. SET BT CLASS 0005c0
  158. SET BT AUTH * 0000
  159. SET BT SSP 2 0
  160. SET CONTROL CONFIG 800
  161. SET PROFILE HID 0f c0 0100 00 en 0409 Bluetooth keyboard
  162. SET PROFILE SPP
  163. SET CONTROL INIT SET CONTROL MUX 0
  164. SET BT NAME TMK Blootooth WT12
  165. SET PROFILE HID 0f c0 0100 00 en 0409 TMK Bluetooth keyboard(WT12)
  166. SDP ADD 1124 HID
  167. SET BT PAIRCOUNT 4
  168. SET BT POWER 3 3 3
  169. SET BT SNIFF 100 20 1 8
  170. RESET
  171. SET CONTROL BAUD 38400,8n1
  172. # combo keyboard + mouse
  173. HID SET 7f 05010906a1010507850119e029e715002501750195088102950175088101950575010508850119012905910295017503910395067508150025650507190029658100c005010902a1010901a1008502050919012903150025019503750181020501093815f1250f9501750581060501093009311581257f750895028106c0c0
  174. HID SET d1 05010906a1010507850119e029e715002501750195088102950175088101950575010508850119012905910295017503910395067508150025650507190029658100c005010902a1010901a1008502050919012903150025019503750181020501093815f1250f9501750581060501093009311581257f750895028106c0c0050c0901a1018503050c1500250109e909ea09e209cd19b529b87501950881020a8a010a21020a2a021a23022a27027501950881020a83010a96010a92010a9e010a94010a060209b209b4750195088102c0
  175. ---------------------
  176. SET BT BDADDR 00:07:80:47:22:14
  177. SET BT NAME TMK BT WT12
  178. SET BT CLASS 0005c0
  179. SET BT AUTH * 0000
  180. SET BT IDENT BT:47 f000 5.0.1 Bluegiga iWRAP
  181. SET BT LAP 9e8b33
  182. SET BT PAGEMODE 4 2000 1
  183. SET BT PAIRCOUNT 4
  184. SET BT PAIR 78:dd:08:b7:e4:a2 fe2fd79e86c6bbfa9351a032bceb2648
  185. SET BT POWER 3 3 3
  186. SET BT ROLE 1 f 12c0
  187. SET BT SNIFF 100 20 1 8
  188. SET BT SSP 3 0
  189. SET BT MTU 672
  190. SET CONTROL BAUD 38400,8n1
  191. SET CONTROL CD 00 0
  192. SET CONTROL ECHO 7
  193. SET CONTROL ESCAPE - 20 1
  194. SET CONTROL GAIN 0 5
  195. SET CONTROL INIT SET CONTROL MUX 0
  196. SET CONTROL MSC DTE 00 00 00 00 00 00
  197. SET CONTROL PIO 00 00
  198. SET CONTROL READY 00
  199. SET PROFILE HID 0f c0 0100 00 en 0409 TMK Bluetooth keyboard
  200. SET
  201. SET control config list
  202. SET CONTROL CONFIG 0000 0000 0000 410e CLOCK_CACHE INTERLACED_INQ INTERLACED_PAGE KLUDGE UART_LATENCY
  203. WRAP THOR AI (5.0.1 build 620)
  204. Copyright (c) 2003-2012 Bluegiga Technologies Inc.
  205. Compiled on Oct 1 2012 10:56:21, running on WT12-A module, psr v31
  206. BGIO FTP HFP HFP_AG HID HID_CONSUMER_PAGE HSP MAP MDP OTA PBAP PIO=0x00fc SSP SUBRATE TEST VOLUME
  207. - BOCK4 version 620 (Oct 1 2012 10:56:03) (max acl/sco 7/1)
  208. - Bluetooth version 3.0, Power class 2
  209. - Loader 8615, firmware 8825 (56-bit encryption), native execution mode
  210. - up 0 days, 00:13, 0 connections (pool 1)
  211. - User configuration:
  212. &028b = 0000 1388
  213. &028c = 0001 0020 0100 0001 0008 0000
  214. &028d = 0000
  215. &0295 = 0000 0005 000b 0000 0003 0000 0000 0000 0000 0000 0000
  216. &0298 = c006
  217. &0299 = 0000 0000
  218. &02a3 = 0030 0030 0030 0030
  219. &02a4 = 009d 0000
  220. &02a5 = 0053 0045 0054 0020 0043 004f 004e 0054 0052 004f 004c 0020 004d 0055 0058 0020 0030
  221. &02a7 = 0000 05c0
  222. &02a8 = 400e 0000 0000
  223. &02aa = 0004 2000 0001 0033 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
  224. &02ab = 0001 000f 12c0
  225. &02ac = 0000 0020 002b 0000 0000 0000 0000 0000 0000 0000 000a 0000 0000 0000 0004 0000 0000 0000 0000 02a0 0000 0000 0000 0000
  226. &02ad = 4d54 204b 5442 5720 3154 0032
  227. &02b0 = fa65 b0aa 934a 077b a600 d1cc fe58 8dd5
  228. &02b3 = 0004 0004 0004 0000 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 000d 0007 0005 8afb 0005 0000 1c13 0000 0c3d 0005 b435 0006 b450 0006 0000 1416 000d
  229. &02b7 = 000f 00c0 0100 0000 0065 006e 0409 4d54 204b 6c42 6575 6f74 746f 2068 656b 6279 616f 6472 0000
  230. ---------------------
  231. ----------
  232. after SET RESET
  233. ----------
  234. WRAP THOR AI (5.0.1 build 620)
  235. Copyright (c) 2003-2012 Bluegiga Technologies Inc.
  236. READY.
  237. set
  238. SET BT BDADDR 00:07:80:47:22:14
  239. SET BT NAME WT12
  240. SET BT CLASS 001f00
  241. SET BT IDENT BT:47 f000 5.0.1 Bluegiga iWRAP
  242. SET BT LAP 9e8b33
  243. SET BT PAGEMODE 4 2000 1
  244. SET BT POWER 3 3 3
  245. SET BT ROLE 0 f 7d00
  246. SET BT SNIFF 0 20 1 8
  247. SET BT SSP 3 0
  248. SET BT MTU 667
  249. SET CONTROL BAUD 115200,8n1
  250. SET CONTROL CD 00 0
  251. SET CONTROL ECHO 7
  252. SET CONTROL ESCAPE 43 00 1
  253. SET CONTROL GAIN 0 5
  254. SET CONTROL MSC DTE 00 00 00 00 00 00
  255. SET CONTROL PIO 00 00
  256. SET CONTROL READY 00
  257. SET PROFILE SPP Bluetooth Serial Port
  258. SET
  259. SET CONTROL CONFIG 0000 0000 0000 0100 KLUDGE
  260. info config
  261. WRAP THOR AI (5.0.1 build 620)
  262. Copyright (c) 2003-2012 Bluegiga Technologies Inc.
  263. Compiled on Oct 1 2012 10:56:21, running on WT12-A module, psr v31
  264. BGIO FTP HFP HFP_AG HID HID_CONSUMER_PAGE HSP MAP MDP OTA PBAP PIO=0x00fc SSP SUBRATE TEST VOLUME
  265. - BOCK4 version 620 (Oct 1 2012 10:56:03) (max acl/sco 7/1)
  266. - Bluetooth version 3.0, Power class 2
  267. - Loader 8615, firmware 8825 (56-bit encryption), native execution mode
  268. - up 0 days, 00:00, 0 connections (pool 1)
  269. - User configuration:
  270. &0295 = 0000 0005 000b 0000 0003 0000 0000 0000 0000 0000 0000
  271. &0299 = 0000 0000
  272. &02aa = 0004 2000 0001 0033 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
  273. &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
  274. &02ad = 5457 3231
  275. &02b0 = fa65 b0aa 934a 077b a600 d1cc fe58 8dd5
  276. READY.
  277. ----------