idnits 2.17.1 draft-ruminski-homenet-galop-proto-07.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The abstract seems to contain references ([HACKNEY]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == The document doesn't use any RFC 2119 keywords, yet seems to have RFC 2119 boilerplate text. -- The document date (July 15, 2013) is 3939 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- No issues found here. Summary: 1 error (**), 0 flaws (~~), 2 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Home Networking (homenet) L. Ruminski 3 Internet-Draft M. Kutzner 4 Intended status: Informational A. Dymek 5 Expires: January 15, 2014 S. Kwiatkowski 6 M. Langa 7 Nicolaus 8 Copernicus 9 University 10 Faculty of 11 Mathematics 12 and Computer 13 Science 14 July 15, 2013 16 Grazed and Lightweight Open Protocol (GaLOP), v. 1.0 17 draft-ruminski-homenet-galop-proto-07 19 Status of this Memo 21 This Internet-Draft is submitted to IETF in full conformance 22 with the provisions of BCP 78 and BCP 79. 24 Internet-Drafts are working documents of the Internet 25 Engineering Task Force (IETF), its areas, and its working 26 groups. Note that other groups may also distribute working 27 documents as Internet-Drafts. The list of current 28 Internet-Drafts is at 29 http://datatracker.ietf.org/drafts/current/. 31 Internet-Drafts are draft documents valid for a maximum of six 32 months and may be updated, replaced, or obsoleted by other 33 documents at any time. It is inappropriate to use 34 Internet-Drafts as reference material or to cite them other 35 than as "work in progress." 37 The list of current Internet-Drafts can be accessed at 38 http://www.ietf.org/ietf/1id-abstracts.txt 40 The list of Internet-Draft Shadow Directories can be accessed at 41 http://www.ietf.org/shadow.html. 43 This Internet-Draft will expire on January 15, 2014. 45 Abstract 47 This informational memo specifies a Grazed and Lightweight Open 48 Protocol (GaLOP), designed to exchange information within the 49 Hackney project [HACKNEY]. The document describes messages' 50 structures, defined message types used in the communication and 51 standard connection scenarios. 53 Copyright Notice 55 Copyright (c) 2012 IETF Trust and the persons identified as the 56 document authors. All rights reserved. 58 This document is subject to BCP 78 and the IETF Trust's Legal 59 Provisions Relating to IETF Documents 60 (http://trustee.ietf.org/license-info) in effect on the date of 61 publication of this document. Please review these documents 62 carefully, as they describe your rights and restrictions with 63 respect to this document. 65 Introduction 67 The main goal for the protocol is to provide fast and reliable 68 communication between mobile devices (client software) and 69 Personal Computer (server software) via Bluetooth with minimal 70 data size needed to realize full functionality of the project. 71 The protocol was designed to be easy to extend - adding new 72 features and developing clients for other mobile platforms 73 should be as easy as possible. 75 Conventions used in this document 77 In examples, "CL:" and "SR:" indicate lines sent by the client 78 and server respectively. 80 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", 81 "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", 82 and "OPTIONAL" in this document are to be interpreted as 83 described in RFC-2119. 85 The following acronyms are used in this document: 87 SID - Session Identifier 88 GID - Gamepad functionality Identifier 89 DID - Device Identifier 90 UUID - Universally Unique Identifier 91 RFCOMM - Radio frequency communication protocol 92 J2ME - Java Platform, Micro Edition 93 MT - Message Data Type 94 PL - Payload 96 GaLOP in Bluetooth architecture model 98 By default, protocol uses the communication provided by RFCOMM. 99 It is assigned to the same middleware layer, as RFCOMM and to 100 application layer. 102 Message data definition 103 The basic unit of the communication in Hackney project is the 104 message specified by MessageData class. The data is an array of 105 bytes. 106 Each message consists of 2-byte header and at least 2-byte 107 payload. 109 Byte 0 specifies the MT, byte 1 describes the SID in case of 110 already established connection or DID instead. Header length is 111 constant. 113 30-byte payload is intended for use only by messages of type 114 STRING_EXCHANGE. Other messages use 2-byte payload. 116 0 117 0 1 2 3 4 118 +-+-+-+-+-+-+-+-+ 119 |MT |SID| PL | 120 +-+-+-+-+-+-+-+-+ 122 Default message structure 124 0 125 0 1 2 3 4 5 6 7 8 126 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 127 |MT |SID| PL | 128 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 129 | PL | 130 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 131 | PL | 132 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 133 | PL | 134 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 136 Type STRING_EXCHANGE message structure 138 Message data types with description 140 General messages 142 CONNECTION_HELLO - 1 143 Description: Message used for connection 144 establishment. 145 Byte 1: DID, in case the message sent by client 146 or SID as a response from a server. 147 Payload: Ignored. 149 CONNECTION_GOODBYE - 2 150 Description: Connection termination. 151 Byte 1: Ignored. 152 Payload: Ignored. 154 Mouse handler messages 156 MOUSE_NUMPAD_START_MOVE - 10 157 Description: Pressing a mouse button or 158 starting to move the mouse using the keypad 159 or joystick. Action is performed until message 160 of type MOUSE_NUMPAD_STOP is received. 161 Byte 1: SID. 162 Payload: 163 Byte 2: Key code as in Appendix A. 165 MOUSE_NUMPAD_STOP - 11 166 Description: Stopping the action related with 167 the message of type MOUSE_NUMPAD_START_MOVE. 168 Byte 1: SID. 169 Payload: 170 Byte 2: Key code as in Appendix A. 172 MOUSE_SCREEN_PRESSED - 12 173 Description: Touching the screen before the 174 proper mouse action. 175 Byte 1: SID. 176 Payload: 177 Byte 2: 1, 178 Byte 3: Ignored. 180 MOUSE_SCREEN_MOVE - 13 181 Description: Moving the mouse, using touch 182 screen. 183 Byte 1: SID. 184 Payload: 185 Byte 2: Abscissa of direction vector 186 in which the motion is performed, 187 Byte 3: Ordinate of direction vector 188 in which the motion is performed. 190 MOUSE_SCREEN_RELEASED - 14 191 Description: Releasing the screen. 192 Byte 1: SID. 193 Payload: 194 Byte 2: 1, 195 Byte 3: Ignored. 197 Keyboard handler messages 199 KEYBOARD_PRESSED - 20 200 Description: Pressing the keyboard. 201 Byte 1: SID. 202 Payload: 203 Byte 2: ASCII of key value (in case of 204 letter - ASCII code of capital letter), 205 Byte 3: Modifiers. 207 Modifier is a special key, which change 208 the standard function of keys. 209 Available modifiers, with the values: 210 SHIFT: 2^0, 211 CTRL: 2^1, 212 ALT: 2^2, 213 ALTGR: 2^3, 214 SUPER/META/WIN: 2^4. 215 The combination of modifiers is 216 possible as the sum of their values - 217 for example, SHIFT and 218 ALT: 2^0 + 2^2 = 1 + 4 = 5. 219 It's not expected to use more than 220 three modifiers at the same time. 222 Hotkeys (keyboard shortcuts) and application management 224 HOTKEY_APPLIST_REQUEST - 30 225 Description: Requesting a list of applications 226 that have keyboard shortcuts defined on the 227 server side. 228 Byte 1: SID. 229 Payload: 230 Byte 2: 1, 231 Byte 3: Ignored. 233 HOTKEY_APPLIST_COUNT - 31 234 Description: Count of the items on application 235 list which is sent by the server to client. 236 Byte 1: SID. 237 Payload: 238 Byte 2: Count of items on the list of 239 apps, 240 Byte 3: Ignored. 242 HOTKEY_APP_CHOSED - 32 243 Description: Application selection from a list 244 received from the server. 245 Byte 1: SID. 246 Payload: 247 Byte 2: Number of item from the list, 248 Byte 3: Ignored. 250 HOTKEY_APPHOTKEY_REQUEST - 33 251 Description: Requesting a list of keyboard 252 shortcuts for the chosed application. 253 Byte 1: SID. 254 Payload: 255 Byte 2: 1, 256 Byte 3: Ignored. 258 HOTKEY_APPHOTKEY_COUNT - 34 259 Description: Count of the items on keyboard 260 shortcuts list which is sent by the server to 261 client. 262 Byte 1: SID. 263 Payload: 264 Byte 2: Count of items on the list of 265 hotkeys, 266 Byte 3: Ignored. 268 HOTKEY_USED - 35 269 Description: Number of used shortcut. 270 Byte 1: SID. 271 Payload: 272 Byte 2: Number of item from the list 273 of hotkeys, 274 Byte 3: Ignored. 276 STRING_EXCHANGE - 39 277 Description: The message used to transfer 278 applications and hotkeys descriptions. Is used 279 with HOTKEY_APPLIST_COUNT and 280 HOTKEY_APPHOTKEY_COUNT types messages. 281 As the only type uses extended payload, with 282 a length of 30 bytes. 283 Byte 1: SID. 284 Payload: 285 Bytes from 2 to 30: String encoded in 286 UTF-8 (15 characters, each encoded by 287 2 bytes). 289 Gamepad handler messages 291 GAMEPAD_ACCEL_MOVE - 40 292 Description: Begin action/motion by changing 293 the orientation 294 of the device against its default settings. 295 Measurement is 296 made by the accelerometer. 297 Byte 1: SID. 298 Payload: 299 Byte 2: the code corresponding to a 300 change in 301 orientation against the default 302 settings (landscape position): 303 Tilt the device to the left - 2, 304 Tilt the device to the right - 4, 305 Tilt the device to the left against 306 to its height - 8, 307 Tilt the device to the right against 308 to its height - 16, 309 Tilt the device to the front - 32, 310 Tilt the device to the back - 64, 311 Byte 3: GID set by GAMEPAD_PLAYER_SET 312 type message. 314 GAMEPAD_ACCEL_STOP - 41 315 Description: Stopping the action performed by 316 GAMEPAD_ACCEL_MOVE type message. 317 Byte 1: SID. 318 Payload: 319 Byte 2: the code of the action which 320 should be terminated. 321 Values are identical to values 322 defined for GAMEPAD_ACCEL_MOVE type 323 message. 324 Byte 3: GID set by GAMEPAD_PLAYER_SET 325 type message. 327 GAMEPAD_KEY_PRESSED - 42 328 Description: The message used when special 329 function key is pressed. These keys work with 330 the accelerometer, together performing the 331 functionality of a gamepad controller. 332 Byte 1: SID. 333 Payload: 334 Byte 2: code of a special function key: 335 'A' button - 2, 336 'B' button - 4, 337 'C' button - 8, 338 'D' button - 16, 339 'E' button - 32, 340 'F' button - 64, 341 Byte 3: GID set by GAMEPAD_PLAYER_SET 342 type message. 344 GAMEPAD_KEY_RELEASED - 43 345 Description: Releasing a special function key. 346 Byte 1: SID. 347 Payload: 348 Byte 2: code of a special function key. 349 Values are identical to values defined 350 for GAMEPAD_KEY_PRESSED type message, 351 Byte 3: GID set by GAMEPAD_PLAYER_SET 352 type message. 354 GAMEPAD_PLAYER_SET - 44 355 Description: Message used to assign a set of 356 keys to 357 player actions or release a set by the player. 359 Byte 1: SID. 360 Payload: 361 Byte 2: actual GID, or 0 if message 362 is a response, 363 Byte 3: new/proposed GID. 365 Defined Client Device Identifiers 367 Java Platform, Micro Edition - 1, 368 Android - 2. 369 Values from 3 to 9 are reserved for future clients for other 370 mobile platforms. 372 Usage scenarios 374 Connection establishment ("handshake") 376 CL: CONNECTION_HELLO with DID at byte 1 as above 377 SR: CONNECTION_HELLO with SID at byte 1 or 378 CONNECTION_GOODBYE 380 If Client was identified as Android Device: 381 SR: GAMEPAD_PLAYER_SET 383 Interaction with the server without response being sent by 384 the Server 386 CL: MOUSE_NUMPAD_START_MOVE or 387 MOUSE_NUMPAD_STOP or 388 MOUSE_SCREEN_PRESSED or 389 MOUSE_SCREEN_MOVE or 390 MOUSE_SCREEN_RELEASED or 391 KEYBOARD_PRESSED or 392 GAMEPAD_ACCEL_MOVE or 393 GAMEPAD_ACCEL_STOP or 394 GAMEPAD_KEY_PRESSED or 395 GAMEPAD_KEY_RELEASED 397 Hotkey usage 399 CL: HOTKEY_APPLIST_REQUEST 400 SR: HOTKEY_APPLIST_COUNT w/count at byte 2 as LC 401 SR: STRING_EXCHANGE (LC times) 402 CL: HOTKEY_APP_CHOSED 403 CL: HOTKEY_APPHOTKEY_REQUEST 404 SR: HOTKEY_APPHOTKEY_COUNT w/cnt. as above as HC 405 SR: STRING_EXCHANGE (HC times) 406 CL: HOTKEY_USED 408 Changing assigned player set 409 CL: GAMEPAD_PLAYER_SET with actual GID at byte 2 410 and proposed GID at byte 3 411 SR: GAMEPAD_PLAYER_SET with 0 at byte 2 and new 412 GID at byte 3, if available; 0 otherwise 414 Connection termination 416 CL: CONNECTION_GOODBYE 417 SR: CONNECTION_GOODBYE 419 Security Considerations 421 The Protocol was designed to be simple and lightweight. 422 The safety of its use depends on the security mechanisms 423 used by Bluetooth Technology and implementation of Hackney 424 Server. 425 The connection between client applications and server is not 426 possible if the UUIDs on both sides are not identical. 427 The computer must be discoverable. This forces a conscious 428 interaction from the user while using a computer. 429 Android-based devices require pairing with a computer before 430 connection will be made. Pairing J2ME-enabled devices depends 431 on Bluetooth implementation for Java virtual machine (but 432 still UUIDs must be the same). Default Hackney server 433 implementation uses so-called allow-list, allowing user to 434 control client access to the server (for example, prohibit 435 access to devices other than actually connected). 437 IANA Considerations 439 This specification makes no request of the IANA. 441 References 443 Informative References 445 [HACKNEY] 447 Acknowledgments 449 This document was prepared using 2-Word-v2.0.template.dot. 451 Appendix A. Keycodes with assigned Actions for 10 and 11 Message Types 453 49 or -5 - Left Mouse Button, 454 51 - Right Mouse Button, 455 53 or -1 - Move up, 456 56 or -2 - Move down, 457 52 or -3 - Move left, 458 54 or -4 - Move right. 460 Author's Addresses 462 Lukasz Ruminski 463 Nicolaus Copernicus University 464 Faculty of Mathematics and Computer Science 465 Chopin Street 12/18 466 87-100 Torun 467 PL 469 Email: protazy@mat.umk.pl 471 Michal Kutzner 472 Nicolaus Copernicus University 473 Faculty of Mathematics and Computer Science 474 Chopin Street 12/18 475 87-100 Torun 476 PL 478 Email: kucyk@mat.umk.pl 480 Adrian Dymek 481 Nicolaus Copernicus University 482 Faculty of Mathematics and Computer Science 483 Chopin Street 12/18 484 87-100 Torun 485 PL 487 Email: include@mat.umk.pl 489 Szymon Kwiatkowski 490 Nicolaus Copernicus University 491 Faculty of Mathematics and Computer Science 492 Chopin Street 12/18 493 87-100 Torun 494 PL 496 Email: szymonk@mat.umk.pl 498 Marcin Langa 499 Nicolaus Copernicus University 500 Faculty of Mathematics and Computer Science 501 Chopin Street 12/18 502 87-100 Torun 503 PL 505 Email: iglis@mat.umk.pl