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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

iWRAP5.txt 10KB

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