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 9.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352
  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. Following settings need to be done before wiring into keyboard.
  156. - UART speed: 38400bps(115200bps didn't work with software serial)
  157. - No SSP procedure(without MITM protection)
  158. - No Power Saving
  159. # clear pairing record and set default
  160. SET BT PAIR *
  161. SET RESET
  162. SET CONTROL INIT SET CONTROL MUX 0
  163. SET CONTROL BAUD 38400,8n1
  164. SET BT NAME TMK Blootooth WT12
  165. SET BT CLASS 0005c0
  166. SET BT AUTH * 0000
  167. SET BT SSP 3 0
  168. SET CONTROL CONFIG 4800
  169. SET PROFILE HID 0f c0 0100 00 en 0409 TMK Bluetooth keyboard(WT12)
  170. SET PROFILE SPP
  171. # power saving?
  172. SET BT SNIFF 100 20 1 8
  173. # Report Descriptor
  174. # combo keyboard + mouse + consumer
  175. HID SET d2 05010906a1010507850119e029e715002501750195088102950175088101950575010508850119012905910295017503910395067508150025650507190029658100c005010902a1010901a1008502050919012908150025017501950881020501093009311581257f750895028106093895018106050c0a380295018106c0c0050c0901a1018503050c1500250109e909ea09e209cd19b529b87501950881020a8a010a21020a2a021a23022a27027501950881020a83010a96010a92010a9e010a94010a060209b209b4750195088102c0
  176. ----------
  177. after setting
  178. ----------
  179. set
  180. SET BT BDADDR 00:07:80:47:22:14
  181. SET BT NAME TMK Blootooth WT12
  182. SET BT CLASS 0005c0
  183. SET BT AUTH * 0000
  184. SET BT IDENT BT:47 f000 5.0.1 Bluegiga iWRAP
  185. SET BT LAP 9e8b33
  186. SET BT PAGEMODE 4 2000 1
  187. SET BT PAIR 78:dd:08:b7:e4:a2 9e3d85c91bcae73fef8cc10bec18b42f
  188. SET BT POWER 3 3 3
  189. SET BT ROLE 0 f 7d00
  190. SET BT SNIFF 0 20 1 8
  191. SET BT SSP 3 0
  192. SET BT MTU 667
  193. SET CONTROL BAUD 38400,8n1
  194. SET CONTROL CD 00 0
  195. SET CONTROL ECHO 7
  196. SET CONTROL ESCAPE 43 00 1
  197. SET CONTROL GAIN 0 5
  198. SET CONTROL INIT SET CONTROL MUX 0
  199. SET CONTROL MSC DTE 00 00 00 00 00 00
  200. SET CONTROL MUX 1
  201. SET CONTROL PIO 00 00
  202. SET CONTROL READY 00
  203. SET PROFILE HID 0f c0 0100 00 en 0409 TMK Bluetooth keyboard(WT12)
  204. SET
  205. set control config list
  206. SET CONTROL CONFIG 0000 0000 0000 4900 KLUDGE INTERACTIVE_PIN UART_LATENCY
  207. info config
  208. WRAP THOR AI (5.0.1 build 620)
  209. Copyright (c) 2003-2012 Bluegiga Technologies Inc.
  210. Compiled on Oct 1 2012 10:56:21, running on WT12-A module, psr v31
  211. BGIO FTP HFP HFP_AG HID HID_CONSUMER_PAGE HSP MAP MDP OTA PBAP PIO=0x00fc SSP SUBRATE TEST VOLUME
  212. - BOCK4 version 620 (Oct 1 2012 10:56:03) (max acl/sco 7/1)
  213. - Bluetooth version 3.0, Power class 2
  214. - Loader 8615, firmware 8825 (56-bit encryption), native execution mode
  215. - up 0 days, 01:50, 2 connections (pool 2)
  216. - User configuration:
  217. &028d = 0001
  218. &0295 = 0000 0005 000b 0000 0003 0000 0000 0000 0000 0000 0000
  219. &0298 = c053
  220. &0299 = 0000 0000
  221. &02a3 = 0030 0030 0030 0030
  222. &02a4 = 009d 0000
  223. &02a5 = 0053 0045 0054 0020 0043 004f 004e 0054 0052 004f 004c 0020 004d 0055 0058 0020 0030
  224. &02a7 = 0000 05c0
  225. &02a8 = 0800 0000 0000 0000
  226. &02aa = 0004 2000 0001 0033 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
  227. &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
  228. &02ad = 4d54 204b 6c42 6f6f 6f74 746f 2068 5457 3231
  229. &02b0 = fa65 b0aa 934a 077b a600 d1cc fe58 8dd5
  230. &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
  231. &02b7 = 000f 00c0 0100 0000 0065 006e 0409 4d54 204b 6c42 6575 6f74 746f &02bb = 8000
  232. READY.
  233. ----------
  234. -----
  235. After 5.0.1 Firmware update
  236. Firmware: ai-5.0.1-620-25b.bc4.dfu
  237. PSR: wt12-a.ai-5.0.1-620-25b.psrf
  238. -----
  239. info config
  240. WRAP THOR AI (5.0.1 build 620)
  241. Copyright (c) 2003-2012 Bluegiga Technologies Inc.
  242. Compiled on Oct 1 2012 10:56:21, running on WT12-A module, psr v31
  243. BGIO FTP HFP HFP_AG HID HID_CONSUMER_PAGE HSP MAP MDP OTA PBAP PIO=0x00fc SSP SUBRATE TEST VOLUME
  244. - BOCK4 version 620 (Oct 1 2012 10:56:03) (max acl/sco 7/1)
  245. - Bluetooth version 3.0, Power class 2
  246. - Loader 8615, firmware 8825 (56-bit encryption), native execution mode
  247. - up 0 days, 00:03, 0 connections (pool 1)
  248. - User configuration:
  249. &0295 = 0000 0005 000b 0000 0003 0000 0000 0000 0000 0000 0000
  250. &0299 = 0000 0000
  251. &02aa = 0004 2000 0001 0033 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
  252. &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
  253. &02ad = 5457 3231 412d
  254. &02b0 = fa65 b0aa 934a 077b a600 d1cc fe58 8dd5
  255. READY.
  256. set
  257. SET BT BDADDR 00:07:80:47:22:14
  258. SET BT NAME WT12-A
  259. SET BT CLASS 001f00
  260. SET BT IDENT BT:47 f000 5.0.1 Bluegiga iWRAP
  261. SET BT LAP 9e8b33
  262. SET BT PAGEMODE 4 2000 1
  263. SET BT PAIR 78:dd:08:b7:e4:a2 af18f81faa107e6dd068762ef921f48b
  264. SET BT POWER 3 3 3
  265. SET BT ROLE 0 f 7d00
  266. SET BT SNIFF 0 20 1 8
  267. SET BT SSP 3 0
  268. SET BT MTU 667
  269. SET CONTROL BAUD 115200,8n1
  270. SET CONTROL CD 00 0
  271. SET CONTROL ECHO 7
  272. SET CONTROL ESCAPE 43 00 1
  273. SET CONTROL GAIN 0 5
  274. SET CONTROL MSC DTE 00 00 00 00 00 00
  275. SET CONTROL PIO 00 00
  276. SET CONTROL READY 00
  277. SET PROFILE SPP Bluetooth Serial Port
  278. SET
  279. set control config list
  280. SET CONTROL CONFIG 0000 0000 0000 0100 KLUDGE
  281. ---------