forked from xboxdrv/xboxdrv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPROTOCOL
847 lines (657 loc) · 41 KB
/
PROTOCOL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
===========================
[[ Protocol Descriptions ]]
===========================
General:
========
The following was learned through a combination of guessing and
looking at the Windows, MacOSX and Linux Kernel drivers. No gurantee
for correctness.
Use usb_interrupt_read() not usb_bulk_read(), the later one fails with
the Xbox360 guitar.
Xbox:
=====
The A, B, X, Y, black, white, LT and RT buttons on the Xbox pad are 8bit
pressure sensitive.
The two memory ports of the controller aren't discussed here.
LED: the controller doesn't have LEDs
+----------- small weight (right side), 0-255
v v-- large weight (left side), 0-255
Rumble: { 0x00, 0x06, 0x00, s, 0x00, large };
^-- length of the message
struct XboxMsg
{
// --------------------------
unsigned int type :8;
unsigned int length :8;
// data[2] ------------------
unsigned int dpad_up :1;
unsigned int dpad_down :1;
unsigned int dpad_left :1;
unsigned int dpad_right :1;
unsigned int start :1;
unsigned int back :1;
unsigned int thumb_l :1;
unsigned int thumb_r :1;
// data[3] ------------------
unsigned int dummy :8;
unsigned int a :8;
unsigned int b :8;
unsigned int x :8;
unsigned int y :8;
unsigned int black :8;
unsigned int white :8;
unsigned int lt :8;
unsigned int rt :8;
// data[6] ------------------
int x1 :16;
int y1 :16;
// data[10] -----------------
int x2 :16;
int y2 :16;
} __attribute__((__packed__));
Xbox360 Controller
==================
The Xbox360 controller doesn't have pressure sensitive A,B,X,Y,LB,RB
buttons like the Xbox controller, only LT and RT are analog. Black and
white are replaced by LB and RB. And in addition to that it has a
guide button (big fat X).
Interface 0:
Endpoint 1(in): Controller events
Endpoint 2(out): Messages to the controller
Interface 1:
Endpoint 3(in): Headset mic
Endpoint 4(out): Headset phone
Endpoint 5(in): Headset status information
Endpoint 5(out): Headset configuration information
Interface 2:
Endpoint 6(in): Chatpad
Interface 3:
None:
On first connect the controller sends:
len: 3 data: 0x01 0x03 0x0e // current LED status
len: 3 data: 0x02 0x03 0x00 // UNKNOWN: maybe headset connection status or volume
len: 3 data: 0x03 0x03 0x03 // Rumble Status (0x00 in the last pos means rumble is disabled, 0x03 is default)
len: 3 data: 0x08 0x03 0x00 // Headset connection status (0x00 no headset, 0x02 headset)
// also chatpad status, but requires sending 0x1f before its reported
len: 20 data: 0x00 0x14 0x00 0x00 0x00 0x00 0x69 0xed 0x23 0xff 0x6b 0x00 0x15 0x03 0x00 0x00 0x00 0x00 0x00 0x00
len: 20 data: 0x00 0x14 0x00 0x00 0x00 0x00 0xfc 0xec 0x23 0xff 0x6b 0x00 0x15 0x03 0x00 0x00 0x00 0x00 0x00 0x00
The first four lines are unknown, but seem to be always the same, the
"len: 20" ones are event data of the following form. The controller
sends them two times on each button press and also two times on first
connect.
send 2 2 0 0
-> Sending to endpoint 2: [3] { 0x02, 0x00, 0x00 }Ep1: [3] { 0x03, 0x03, 0x00 }
Commands send to the controller:
--------------------------------
,--------- type of message
v v-- length of message
LED: { 0x01, 0x03, LED_STATUS };
LED Status Update Message, send out after one has changed the led status:
{ 0x01 0x03 LED_STATUS } (blinking states are reported as non-blinking)
+-------- large weight (left side), 0-255
v v-- small weight (right side), 0-255
Rumble: { 0x00, 0x08, 0x00, large, small, 0x00, 0x00, 0x00 };
^ ^-- length of the message
`--------- type of message
Unknown:
sending { 0x02, 0x03, INT } causes a reply of { 0x03, 0x03, INT } (values of 0-3 are supported)
sending { 0x02, 0x03, 0x00 } causes future rumble update messages to be ignored, this seems to be permanent, even disconnecting the controller doesn't reset it
Event Messages:
struct Xbox360Msg
{
// -------------------------
unsigned int type :8; // always 0
unsigned int length :8; // always 0x14
// data[2] ------------------
unsigned int dpad_up :1;
unsigned int dpad_down :1;
unsigned int dpad_left :1;
unsigned int dpad_right :1;
unsigned int start :1;
unsigned int back :1;
unsigned int thumb_l :1;
unsigned int thumb_r :1;
// data[3] ------------------
unsigned int lb :1;
unsigned int rb :1;
unsigned int guide :1;
unsigned int dummy1 :1; // always 0
unsigned int a :1; // green
unsigned int b :1; // red
unsigned int x :1; // blue
unsigned int y :1; // yellow
// data[4] ------------------
unsigned int lt :8;
unsigned int rt :8;
// data[6] ------------------
int x1 :16;
int y1 :16;
// data[10] -----------------
int x2 :16;
int y2 :16;
// data[14]; ----------------
unsigned int dummy2 :32; // always 0
unsigned int dummy3 :16; // always 0
} __attribute__((__packed__));
Plugging in a headset (interface 1, endpoint 5):
____ When chatpad is plugged this is 0x01, but only if no headphone is plugged into the headset?!
len: 4 data: 0x00 0x04 0x01 0x00
len: 3 data: 0x01 0x03 0x00
len: 3 data: 0x02 0x03 0x0f
len: 5 data: 0x03 0x05 0xff 0x00 0x00
len: 3 data: 0x04 0x03 0xff
len: 3 data: 0x05 0x03 0x00
Pulling out a headset (interface 1, endpoint 5):
len: 4 data: 0x00 0x04 0x00 0x00
---------
Sending to interface 1, endpoint 5:
This only works with the headset plugged in, these settings seem to be
permanent, so handle with care:
0x00 0x03 0x0N -> { 0x05, 0x03, 0x0N } - sets something to N, with N [0, 1]
0x01 0x03 0x0N -> { 0x01, 0x03, 0x0N } - sets something to N, with N [0, 1]
0x02 0x03 0x0N -> { 0x02, 0x03, 0x0N } - sets something to N, with N [0, f] (seems to be volume control)
0x03 0x05 ???? -> { 0x03, 0x05, 0xff, 0x00, 0x00 } - doesn't seem to set anything, just reply
0x04 ???? ????-> { 0x04, 0x03, 0xff } - doesn't seem to set anything, just reply
$ ./usbdebug 0x045e:0x028e
listen 5
send 5 0x00 0x03 0x01
send 5 0x01 0x03 0x01
send 5 0x02 0x03 0x0f
0x04 0x04 0x00 0x00 seems to cause status reply
---------
Plugging in a headset (interface 0, endpoint 1): len: 3 data: 0x08 0x03 0x00
Pulling out a headset (interface 0, endpoint 1): len: 3 data: 0x08 0x03 0x02
Headset sends with 8192 bytes per second
The headset might be using isochronous transfer, neither bulk nor interrupt, libusb doesn't support that yet I think
Chatpad on Xbox360 wired USB controller
=======================================
usb_control_msg()'s
,----------------- requesttype
| '------------ request
| | ,-------- value
v v v v-- index
0x41 0x0 0x00 0x02 # clear capslock
0x41 0x0 0x01 0x02 # clear square
0x41 0x0 0x02 0x02 # clear circle
0x41 0x0 0x03 0x02 # clear people
0x41 0x0 0x04 0x02 # clear backlight (not perfectly reproducible, timing matters)
0x41 0x0 0x05 0x02 #
0x41 0x0 0x06 0x02 #
0x41 0x0 0x07 0x02 #
0x41 0x0 0x08 0x02 # light capslock
0x41 0x0 0x09 0x02 # light square
0x41 0x0 0x0a 0x02 # light circle
0x41 0x0 0x0b 0x02 # light people
0x41 0x0 0x0c 0x02 # light backlight leds
0x41 0x0 0x0d 0x02 #
0x41 0x0 0x0e 0x02 #
0x41 0x0 0x0f 0x02 #
0x41 0x0 0x10 0x02 # send at start
0x41 0x0 0x11 0x02 # light capslock
0x41 0x0 0x12 0x02 # light square
0x41 0x0 0x13 0x02 # light square and capslock
0x41 0x0 0x14 0x02 # light circle
0x41 0x0 0x15 0x02 # light capslock and circle
0x41 0x0 0x16 0x02 # light circle and square
0x41 0x0 0x17 0x02 # light circle, square and capslock
0x41 0x0 0x18 0x02 # send at start
0x41 0x0 0x19 0x02 #
0x41 0x0 0x1a 0x02 #
0x41 0x0 0x1b 0x02 # makes led go on on a keypress
0x41 0x0 0x1e 0x02 # Init part 2, not needed but log shows it
0x41 0x0 0x1f 0x02 # Init (without this, no led will work, so send before anything else)
Sending "0x41 0x0 0x1f 0x02" gives a reply of "0x08, 0x03, 0x01"
(chatpad) or "0x08, 0x03, 0x03" (chatpad + headset)
Data from Chatpad
=================
0xf0 0x04
0x00 MODIFIER SCAN1 SCAN2 0x00
,- active LEDs
/ ,----,---- clock, counts up to 0x0f then rolls to zero
0xf0 0x04 LEDSTATUS 0x0e 0x0e
0x00 0x00 0x34 0x00 0x00 <- always zero
| | `- scan1 `scan2
\ `--- modifier bit field
`--- input event
LED:
10111001
<backlight> <zero> <shift> <orange> <green> 0 0 <people>
LED_STATUS_PEOPLE = (1<<0)
LED_STATUS_SHIFT = (1<<5)
LED_STATUS_ORANGE = (1<<4)
LED_STATUS_GREEN = (1<<3)
LED_STATUS_BACKLIGHT = (1<<7)
0xa0 - shift
0x88 - green
0x81 - people
0x90 - orange
0x91 - people+orange
0x98 - orange+green
0xb0 - shift+orange
0xb9 - shift+orange+green+shift
Chatpad init:
Hardware version 1.10, uses 0x01 0x02 for init.
Hardware version 1.14, uses 0x09 0x00 for init.
0x0114
0x0110
Xbox360 Guitar
==============
The Xbox360 Guitar behaves the same as a regular Xbox360 controller
and talks the same protocol just with the meaning of a few buttons and
axis changed. The guitar doesn't have rumble support.
struct Xbox360GuitarMsg
{
// -------------------------
unsigned int type :8;
unsigned int length :8;
// data[2] ------------------
unsigned int dpad_up :1; // also strum-up
unsigned int dpad_down :1; // also strum-down
unsigned int dpad_left :1;
unsigned int dpad_right :1;
unsigned int start :1;
unsigned int back :1;
unsigned int thumb_l :1; // unused
unsigned int thumb_r :1; // unused
// data[3] ------------------
unsigned int orange :1; // 5
unsigned int rb :1; // unused
unsigned int guide :1;
unsigned int dummy1 :1; // unused
unsigned int green :1; // 1, A
unsigned int red :1; // 2, B
unsigned int blue :1; // 4, X
unsigned int yellow :1; // 3, Y
// data[4] ------------------
unsigned int lt :8; // unknown
unsigned int rt :8; // unknown
// data[6] ------------------
int x1 :16; // unused
int y1 :16; // unused
// data[10] -----------------
int whammy :16;
int tilt :16;
// data[14]; ----------------
unsigned int dummy2 :32; // unused
unsigned int dummy3 :16; // unused
} __attribute__((__packed__));
Xbox360 Wireless
================
Bottom of the controller has three holes:
[_ _] () [_ _]
the two on the left and right are for the chatpat, the middle one is for the headphone.
Top of the controller has a port for the Play&Charge cable
On the top of the controller there is a sync button to connect the controller.
The wireless reciever acts as a single USB device, each of the four
controller is on a seperate Interface together with the headset port:
Interface 0:
Endpoint 1(in/out): Controller 1
Interface 1:
Endpoint 2(in/out): Headset 1
Interface 2:
Endpoint 3(in/out): Controller 2
Interface 3:
Endpoint 4(in/out): Headset 2
Interface 4:
Endpoint 5(in/out): Controller 3
Interface 5:
Endpoint 6(in/out): Headset 3
Interface 6:
Endpoint 7(in/out): Controller 4
Interface 7:
Endpoint 8(in/out): Headset 4
v-- typo? might be 0x0c, i.e. length
Rumble: { 0x00, 0x01, 0x0f, 0xc0, 0x00, large, small, 0x00, 0x00, 0x00, 0x00, 0x00 }
^ ^--- ???
+--------- seems the same as in Event Data
LED: { 0x00, 0x00, 0x08, 0x40 + (mode % 0x0e), 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }
Wireless Headset LED: ???
// Start (LED Status Messages)
len: 29 data: 0x00 0xf8 0x02 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
// Shutdown (LED Status Messages)
len: 29 data: 0x00 0xf8 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Connection Status Messages:
0x08 0x00 - Nothing
0x08 0x40 - Headset
0x08 0x80 - Controller
0x08 0xc0 - Controller and Headset
On connection:
--------------
len: 2 data: 0x08 0x80
len: 29 data: 0x00 0x0f 0x00 0xf0 0xf0 0xcc 0xfd 0x1f 0x9f 0x70 0xc9 0x00 0x63 0xb0 0x00 0x05 0x13 0xa7 0x20 0x1d 0x30 0x03 0x40 0x01 0x50 0x01 0xff 0xff 0xff
len: 29 data: 0x00 0xf8 0x02 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Connecting Chatpad:
-------------------
len: 2 data: 0x08 0xc0 -- headset
len: 29 data: 0x00 0x00 0x00 0x17 0xaa 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
len: 28 data: 0x01 0x00 0x67 0x00 0x0c 0xfd 0x0d 0xf6 0x10 0xd2 0x11 0xe2 0xb0 0x00 0x18 0x01 0x34 0x85 0x00 0xdd 0xdd 0xdd 0xdd 0xd2 0x11 0xe2 0xb0 0x00
len: 29 data: 0x00 0x00 0x00 0xf0 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
len: 28 data: 0x01 0xff 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
len: 29 data: 0x00 0xf9 0x02 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
len: 29 data: 0x00 0x00 0x00 0x13 0xa2 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 -- battery
len: 2 data: 0x08 0x80
len: 29 data: 0x00 0x00 0x00 0xf0 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Chatpad vs Headphone:
---------------------
____ ???
len: 29 data: 0x00 0x00 0x00 0x17 0xe0 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
len: 29 data: 0x00 0x00 0x00 0x17 0xaa 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
_____ ____ ____ ____ ____ ____ ____ ____ ____
len: 28 data: 0x01 0x00 0x67 0x00 0x0c 0xfd 0x0d 0xf6 0x10 0xd2 0x26 0x4d 0x00 0x00 0x18 0x01 0x34 0x85 0x00 0xdd 0xdd 0xdd 0x01 0x50 0x01 0xff 0xff 0xff
len: 28 data: 0x01 0x00 0x67 0x00 0x0c 0xfd 0x0d 0xf6 0x10 0xd2 0x11 0xe2 0xb0 0x00 0x18 0x01 0x34 0x85 0x00 0xdd 0xdd 0xdd 0xdd 0xd2 0x11 0xe2 0xb0 0x00
^- Chatpad
http://www.mp3car.com/vbulletin/input-devices/108554-xbox360-chatpad-awsome-backlit-mini-keyboard-10.html
http://www.youtube.com/watch?v=qWWIuh1vsoM
Pluggin in a headphone without chatpat:
---------------------------------------
(instantly)
len: 2 data: 0x08 0xc0 ____
len: 29 data: 0x00 0x00 0x00 0x17 0xe0 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
len: 28 data: 0x01 0x00 0x67 0x00 0x0c 0xfd 0x0d 0xf6 0x10 0xd2 0x26 0x4d 0x00 0x00 0x18 0x01 0x34 0x85 0x00 0xdd 0xdd 0xdd 0x01 0x50 0x01 0xff 0xff 0xff
^^^^ ^^^^ ^^^^
len: 29 data: 0x00 0x00 0x00 0xf0 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
len: 28 data: 0x01 0xff 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
(repeatatly afterwards, every 5-10 seconds, changing volume, mute or talking into mic don't change anything, when they come, then multiple at once)
len: 29 data: 0x00 0xf9 0x02 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
len: 29 data: 0x00 0xf8 0x03 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
len: 29 data: 0x00 0xf9 0x03 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
len: 29 data: 0x00 0xf8 0x02 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
...
On Endpoint 2 the headphone data is coming in, a constant stream, not split into packets.
Pulling out the headphone without chatpat:
len: 29 data: 0x00 0x00 0x00 0x13 0xe0 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
len: 29 data: 0x00 0x00 0x00 0xf0 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Connecting the wireless headset:
--------------------------------
The wireless headset reports its battery status to the Xbox360 somewhere
____ ____ ____ ____ ____ ?
len: 28 data: 0x01 0x01 0x60 0x01 0x01 0x00 0x00 0x03 0x03 0x00 0xf7 0x5a 0x0c 0xc0 0x16 0x01 0x03 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
len: 2 data: 0x08 0x40 ____ ___ _____
len: 28 data: 0x01 0x00 0x67 0x00 0x0c 0xfd 0x0d 0xf6 0x10 0xf7 0x5a 0x0c 0xc0 0x00 0x18 0x08 0x34 0x05 0x01 0x44 0x01 0xdd 0xdd 0xdd 0x05 0x05 0x01 0x02
len: 28 data: 0x01 0xff 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
len: 28 data: 0x01 0xff 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
... (last line gets repeated 2-4 times a second)
When switching ports:
serial? ____ ____ ____ ____ ____ ____
len: 28 data: 0x01 0x01 0x00 0x01 0x01 0x00 0x00 0x03 0x03 0x00 0xf7 0x5a 0x0c 0xc0 0x16 0x01 0x03 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
____ connection status (0x60 connected, 0x00 gone ____ portid
len: 28 data: 0x01 0x01 0x00 0x01 0x01 0x01 0x00 0x03 0x03 0x00 0xf7 0x5a 0x0c 0xc0 0x16 0x01 0x19 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
len: 28 data: 0x01 0x01 0x60 0x01 0x01 0x01 0x00 0x03 0x03 0x00 0xf7 0x5a 0x0c 0xc0 0x16 0x01 0x1a 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
len: 28 data: 0x01 0x01 0x00 0x01 0x01 0x01 0x00 0x03 0x03 0x00 0xf7 0x5a 0x0c 0xc0 0x16 0x01 0x1b 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Randomly:
____ battery status?!
len: 28 data: 0x01 0xff 0x00 0x41 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
____ ____ Muted?
len: 28 data: 0x01 0xff 0x02 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
len: 28 data: 0x01 0xff 0x02 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 (turn off)
len: 28 data: 0x01 0xff 0x02 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 (turn on)
Connecting the wireless and pressing sync button multiple times:
----------------------------------------------------------------
len: 2 data: 0x08 0x40
len: 28 data: 0x01 0x00 0x67 0x00 0x0c 0xfd 0x0d 0xf6 0x10 0xf7 0x5a 0x0c 0xc0 0x00 0x18 0x08 0x34 0x02 0x04 0xdd 0xdd 0xdd 0x03 0x00 0x05 0x05 0x01 0x02
____ (portid & 3)
len: 28 data: 0x01 0x01 0x00 0x01 0x01 0x01 0x00 0x03 0x03 0x00 0xf7 0x5a 0x0c 0xc0 0x16 0x01 0x03 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
len: 28 data: 0x01 0x01 0x60 0x01 0x01 0x00 0x00 0x03 0x03 0x00 0xf7 0x5a 0x0c 0xc0 0x16 0x01 0x04 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
len: 28 data: 0x01 0x01 0x00 0x01 0x01 0x01 0x00 0x03 0x03 0x00 0xf7 0x5a 0x0c 0xc0 0x16 0x01 0x05 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
len: 28 data: 0x01 0x01 0x00 0x01 0x01 0x01 0x00 0x03 0x03 0x00 0xf7 0x5a 0x0c 0xc0 0x16 0x01 0x06 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
len: 28 data: 0x01 0x01 0x00 0x01 0x01 0x01 0x00 0x03 0x03 0x00 0xf7 0x5a 0x0c 0xc0 0x16 0x01 0x07 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
len: 2 data: 0x08 0x00
Different connection:
---------------------
|||| |||| |||| |||| |||| |||| |||| _________________ Serial?_________ |||| |||| |||| _____ Battery?
29 data: 0x00 0x0f 0x00 0xf0 0xf0 0xcc 0xfd[0x55 0x40 0xf0 0x48 0xe4 0x5d 0x10]0x00 0x05 0x13[0x67]0x20 0x1d 0x30 0x03 0x40 0x01 0x50 0x01 0xff 0xff 0xff
len: 29 data: 0x00 0x0f 0x00 0xf0 0xf0 0xcc 0xfd 0x1f 0x9f 0x70 0xc9 0x00 0x63 0xb0 0x00 0x05 0x13 0xe7 0x20 0x1d 0x30 0x03 0x40 0x01 0x50 0x01 0xff 0xff 0xff
len: 29 data: 0x00 0x0f 0x00 0xf0 0xf0 0xcc 0xfd 0x1f 0x9f 0x70 0xc9 0x00 0x63 0xb0 0x00 0x05 0x13 0xa7 0x20 0x1d 0x30 0x03 0x40 0x01 0x50 0x01 0xff 0xff 0xff
When the controller connects it sends { 0x08 0x80 } -> 0000'1000 1000'0000
When the headset connects it sends: { 0x08 0xc0 } -> 0000'1000 1100'0000
When nothing is connected: { 0x08 0x00 } -> 0000'1000 0000'0000
Event data:
===========
+-------- always 0
| +---- 0x01 when a event message, 0x00 otherwise (battery status?), also 0xf8 and 0x0f (both on new connection)
| | +--- always 0xf0 (1111'0000)
| | |
| | | +-- length
v v v v v---- normal xbox event message, but one byte shorter + 5x 0x00 padding
len: 29 data: 0x00 0x01 0x00 0xf0 0x00 0x13 0x20 0x00 0x00 0x00 0xc1 0x08 0xc9 0xfc 0x67 0xf4 0xe5 0xfe 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
len: 29 data: 0x00 0x00 0x00 0xf0 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
len: 29 data: 0x00 0x01 0x00 0xf0 0x00 0x13 0x00 0x00 0x00 0x00 0xc1 0x08 0xc9 0xfc 0x67 0xf4 0xe5 0xfe 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
len: 29 data: 0x00 0x00 0x00 0xf0 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Battery Status Msg (maybe):
------------------------
len: 29 data: 0x00 0xf8 0x03 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
len: 29 data: 0x00 0xf8 0x02 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Battery Full(?):
len: 29 data: 0x00 0x00 0x00 0xf0 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Controller without doing anything
2 data: 0x08 0x80
29 data: 0x00 0x00 0x00 0x00 0x05 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
____ battery ?
29 data: 0x00 0x00 0x00 0x13 0xe2 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
29 data: 0x00 0x00 0x00 0x13 0xe6 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
29 data: 0x00 0x00 0x00 0x20 0x1d 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
29 data: 0x00 0x00 0x00 0x40 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
29 data: 0x00 0x00 0x00 0xf0 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
29 data: 0x00 0x0f 0x00 0xf0 0xf0 0xcc 0xfd 0x1f 0x9f 0x70 0xc9 0x00 0x63 0xb0 0x00 0x05 0x13 0xe7 0x20 0x1d 0x30 0x03 0x40 0x01 0x50 0x01 0xff 0xff 0xff
29 data: 0x00 0xf8 0x02 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Unknown Messages:
29 data: 0x00 0x00 0x00 0x20 0x1d 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
29 data: 0x00 0x00 0x00 0x40 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
29 data: 0x00 0xf8 0x03 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
29 data: 0x00 0xf8 0x02 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
---------------
len: 29 data: 0x00 0x01 0x00 0xf0 0x00 0x13 0x00 0x00 0x00 0x00 0x94 0xff 0xc0 0x02 0xa6 0x02 0xf0 0xf6 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
len: 29 data: 0x00 0x01 0x00 0xf0 0x00 0x13 0x00 0x00 0x00 0x00 0x14 0xfd 0xc0 0x02 0xa6 0x02 0xf0 0xf6 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
len: 29 data: 0x00 0x00 0x00 0x00 0x05 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Battery Message?:
len: 29 data: 0x00 0x00 0x00 0x13 0xa2 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
len: 29 data: 0x00 0x00 0x00 0x13 0xe2 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
len: 29 data: 0x00 0x00 0x00 0x13 0xe6 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
// Charging?
len: 29 data: 0x00 0x00 0x00 0x13 0xe0 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Unknown:
len: 29 data: 0x00 0xf8 0x02 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
len: 29 data: 0x00 0x00 0x00 0x20 0x1d 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
len: 29 data: 0x00 0x00 0x00 0x40 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
len: 29 data: 0x00 0x00 0x00 0xf0 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
len: 29 data: 0x00 0x01 0x00 0x13 0xa6 0x13 0x00 0x00 0x00 0x00 0xa9 0xfc 0x60 0x01 0x9d 0x00 0x61 0xf7 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - similar to normal event message
Init message
__________________________________ ____
len: 29 data: 0x00 0x0f 0x00 0xf0 0xf0 0xcc 0xfd 0x1f 0x9f 0x70 0xc9 0x00 0x63 0xb0 0x00 0x05 0x13 0xa7 0x20 0x1d 0x30 0x03 0x40 0x01 0x50 0x01 0xff 0xff 0xff
len: 29 data: 0x00 0x0f 0x00 0xf0 0xf0 0xcc 0xfd 0x1f 0x9f 0x70 0xc9 0x00 0x63 0xb0 0x00 0x05 0x13 0xe7 0x20 0x1d 0x30 0x03 0x40 0x01 0x50 0x01 0xff 0xff 0xff
C1n: 29 data: 0x00 0x0f 0x00 0xf0 0xf0 0xcc 0xfd 0x55 0x40 0xf0 0x47 0xee 0x1a 0xb0 0x00 0x05 0x13 0xe1 0x20 0x1d 0x30 0x03 0x40 0x01 0x50 0x01 0xff 0xff 0xff
C2n: 29 data: 0x00 0x0f 0x00 0xf0 0xf0 0xcc 0xfd 0x55 0x40 0xf0 0x48 0xe4 0x5d 0x10 0x00 0x05 0x13 0xa7 0x20 0x1d 0x30 0x03 0x40 0x01 0x50 0x01 0xff 0xff 0xff
C3n: 29 data: 0x00 0x0f 0x00 0xf0 0xf0 0xcc 0xfd 0x55 0x40 0xf0 0x47 0x06 0x87 0xc0 0x00 0x05 0x13 0xa7 0x20 0x1d 0x30 0x03 0x40 0x01 0x50 0x01 0xff 0xff 0xff
len: 29 data: 0x00 0xf8 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
len: 29 data: 0x00 0xf8 0x02 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
len: 28 data: 0x00 0x01 0xff 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
# Request power-off?
len: 29 data: 0x00 0xf8 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
len: 29 data: 0x00 0xf8 0x02 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
29 data: 0x00 0x0f 0x00 0xf0 0xf0 0xcc 0xfd 0x55 0x40 0xf0 0x48 0xe4 0x5d 0x10 0x00 0x05 0x13 0xa7 0x20 0x1d 0x30 0x03 0x40 0x01 0x50 0x01 0xff 0xff 0xff
29 data: 0x00 0x00 0x00 0x00 0x05 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
29 data: 0x00 0x00 0x00 0x40 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
29 data: 0x00 0x00 0x00 0xf0 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Unknown stuff from Jaymes:
Connection status: controller connected
Serial: d:f6:10:d2:41:48:60
Battery Status: 161
Unknown: len: 29 data: 0x00 0xf8 0x02 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
**I'll hook up the normal wired headset now. Here is the appended data:
Unknown: len: 29 data: 0x00 0x00 0x00 0x60 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Unknown: len: 29 data: 0x00 0x00 0x00 0x17 0xa0 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Connection status: controller and headset connected
Unknown: len: 28 data: 0x01 0x00 0x67 0x00 0x0c 0xfd 0x0d 0xf6 0x10 0xd2 0x41 0x48 0x60 0x00 0x18 0x01 0x34 0x85 0x00 0xdd 0xdd 0xdd 0xdd 0x50 0x01 0xff 0xff 0xff
Unknown: len: 28 data: 0x01 0xff 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Unknown: len: 29 data: 0x00 0xf9 0x02 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
**Disconnecting:
Battery Status: 160
Connection status: controller connected
**Connecting the messenger headset:
Connection status: controller and headset connected
Unknown: len: 28 data: 0x01 0xff 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Unknown: len: 28 data: 0x01 0x00 0x67 0x00 0x0c 0xfd 0x0d 0xf6 0x10 0xd2 0x41 0x48 0x60 0x00 0x18 0x01 0x34 0x85 0x00 0xdd 0xdd 0xdd 0xdd 0x50 0x01 0xff 0xff 0xff
Unknown: len: 29 data: 0x00 0xf8 0x02 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Unknown: len: 29 data: 0x00 0xf9 0x02 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
(No change when switching on/off the mic or adjusting volume.. as expected I guess :))
**Disconnecting the headset:
Battery Status: 160
Connection status: controller connected
*** After this, I got a couple random lines: ***
Unknown: len: 29 data: 0x00 0xf8 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Unknown: len: 29 data: 0x00 0xf8 0x02 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
(Don't know if this is important... it happened 5 seconds or so after disconnect)
**Connecting chatpad:
Unknown: len: 29 data: 0x00 0x00 0x00 0x60 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Connection status: controller and headset connected
Unknown: len: 29 data: 0x00 0x00 0x00 0x17 0xa8 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Unknown: len: 28 data: 0x01 0x00 0x67 0x00 0x0c 0xfd 0x0d 0xf6 0x10 0xd2 0x41 0x48 0x60 0x00 0x18 0x01 0x34 0x85 0x00 0xdd 0xdd 0xdd 0xdd 0x50 0x01 0xff 0xff 0xff
Unknown: len: 28 data: 0x01 0xff 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Unknown: len: 29 data: 0x00 0xf9 0x02 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
**I tried connecting this a second time just in case:
Unknown: len: 29 data: 0x00 0xf8 0x02 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Unknown: len: 29 data: 0x00 0xf8 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Unknown: len: 29 data: 0x00 0xf8 0x02 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Unknown: len: 29 data: 0x00 0xf8 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Unknown: len: 29 data: 0x00 0xf8 0x02 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
(These pair 0x01 and 0x02 repeat)
**Third time I tried after disconnecting the controller and reconnecting and syncing again (just for the heck of it)
Unknown: len: 29 data: 0x00 0x00 0x00 0x60 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Unknown: len: 29 data: 0x00 0x00 0x00 0x17 0xa8 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Connection status: controller and headset connected
Unknown: len: 28 data: 0x01 0x00 0x67 0x00 0x0c 0xfd 0x0d 0xf6 0x10 0xd2 0x41 0x48 0x60 0x00 0x18 0x01 0x34 0x85 0x00 0xdd 0xdd 0xdd 0x01 0x50 0x01 0xff 0xff 0xff
Unknown: len: 28 data: 0x01 0xff 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Unknown: len: 29 data: 0x00 0xf9 0x02 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
**Disconnect chatpad:
No change ?
**Connecting the wireless headset:
Repeats this:
Unknown: len: 28 data: 0x01 0xff 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Unknown: len: 28 data: 0x01 0xff 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Unknown: len: 28 data: 0x01 0xff 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
**Let me try and get the start of this:
Unknown: len: 28 data: 0x01 0x01 0x60 0x01 0x01 0x00 0x00 0x03 0x03 0x00 0xf7 0x5a 0x0c 0xc0 0x16 0x01 0x02 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Connection status: controller and headset connected
Unknown: len: 28 data: 0x01 0x00 0x67 0x00 0x0c 0xfd 0x0d 0xf6 0x10 0xf7 0x5a 0x0c 0xc0 0x00 0x18 0x08 0x34 0x05 0x01 0x44 0x01 0xdd 0xdd 0xdd 0x05 0x05 0x01 0x02
Unknown: len: 28 data: 0x01 0xff 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Unknown: len: 28 data: 0x01 0xff 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Unknown: len: 28 data: 0x01 0xff 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Unknown: len: 28 data: 0x01 0xff 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Unknown: len: 28 data: 0x01 0xff 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
(I had to CTRL-C this as it just keep repeating)
Xbox One Wireless Controller
==================
The Xbox One controller buttons are similar to Xbox 360 controller, and it too has an extension interface.
VID:PID is 045e:02d1.
Interface 0:
Endpoint 1(interrupt in): Controller events
Endpoint 1(interrupt out): Messages to the controller
Interface 1 Alternate 0:
None
Interface 1 Alternate 1:
Endpoint 2(iso in)
Endpoint 2(iso out)
Interface 2 Alternate 0:
None
Interface 2 Alternate 1:
Endpoint 3(bulk in)
Endpoint 3(bulk out)
All messages from/to controller have a 4-byte header:
struct XboxOneMsg
{
unsigned int type :8; // type of message
unsigned int type2 :8; // always 0x20 except for rumble command and controls response when it's 0
unsigned int sequence :8; // sequence number of a message (separate counters for each direction), incremented by 1 for each new message
unsigned int length :8; // length of the following payload
// -------------------------
unsigned char payload[];
}
When connected the controller starts to send "pairing request"s every second or so until it gets back a specific response; once that response is received it starts working in a normal mode.
Pairing request in my case:
[02 20 03 1c] 7e ed 88 64 d2 2b 00 00 5e 04 d1 02 01 00 01 00 90 01 06 00 01 00 01 00 01 00 01 00
Type is 02;20. No idea about meaning of payload fields; probably some sort of ID and/or info on capabilities and connected extension hardware (note the controller VID/PID in there in reversed order).
Expected response is:
1) type 05:20 payload 06 00 00 00 00 00 55 53
2) type 05:20 payload 00
Commands sent to the controller:
================================
LED control
-----------
Type 0A 20
payload:
struct
{
unsigned int field1 :8; // unknown, always 0. Maybe light ID for extensions?
unsigned int blink_type :8; // 0 - off, 1 - on, 2 - fast blink, 3 - slow blink, other values may have some meaning too
unsigned int brightness :8; // 0 to 50 decimal
}
Rumble control
--------------
Type 09 00
I'm not sure about exact meaning of the most fields but changing them does change type of the rumble
payload:
struct
{
unsigned int field1 :8; // unknown, always 0
unsigned int speed :24; // speed of the motors or type or several fields controlling the type of the rumble; usual value would be 0F 00 00
unsigned int left :8; // 0-100
unsigned int right :8 // 0-100
unsigned int on_duration :8; // duration of "ON" phase in rumble cycle (in 10ms increments or something)
unsigned int off_duration :8; // duration of "OFF" phase
unsigned int repeats :8; // number of repeated cycles to do (0 - single rumble, 1 - on-off-on-off etc)
}
Reports sent by the controller:
===============================
Battery status
--------------
Type 03 20
4 bytes in a payload, meaning unknown
Buttons event
-------------
Type 07 20
Only seems to be sent when pressing the big X button
Payload:
struct
{
unsigned int state :1; // 1 - pressed, 0 - released
unsigned int padding :7;
unsigned int id :8; // Always 0x5B; I assume this is button ID
}
Controls event
--------------
Type 20 20
It is sent on every other button/joystick press/release/move; somehow similar to Xbox 360 message layout
Payload:
struct
{
unsigned int connect :1; // small button on the back for wireless pairing
unsigned int dummy1 :1; // always 0
unsigned int start :1;
unsigned int back :1;
unsigned int a :1; // green
unsigned int b :1; // red
unsigned int x :1; // blue
unsigned int y :1; // yellow
// --------------------------
unsigned int dpad_up :1;
unsigned int dpad_down :1;
unsigned int dpad_left :1;
unsigned int dpad_right :1;
unsigned int lb :1; // left back digital button
unsigned int rb :1; // right back digital button
unsigned int thumb_l :1; // left analog joystick click
unsigned int thumb_r :1; // right analog joystick click
// --------------------------
unsigned int lt :10; // left analog trigger
unsigned int padding1 :6;
unsigned int rt :10; // right analog trigger
unsigned int padding2 :6;
// --------------------------
int x1 :16; // left analog joystick - signed shorts
int y1 :16;
// --------------------------
int x2 :16; // right analog joystick
int y2 :16;
}
# EOF #