mohamedshendy / chatpad-super-driver

Automatically exported from code.google.com/p/chatpad-super-driver
0 stars 0 forks source link

Wireless Controller Support #46

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Here is how to make chatpad work on a Xbox360 wireless controller:

All the data below has to be send to endpoint 1 (assuming endpoint 2, 3, 4 for 
controller 2, 3, 4). The chatpad will return data on endpoint 1, the same 
endpoint as the normal controller events.

To turn off the Xbox360 controller send: 00 00 08 C0 00 00 00 00 00 00 00 00

To enable wireless controller chatpad events, send: 00 00 0C 1B 00 00 00 00 00 
00 00 00

You will have to send alternating 1E/1F keep-alive packets (every second or so, 
I guess) to keep the chatpad events flowing: 00 00 0C 1E/1F 00 00 00 00 00 00 
00 00

After doing this, you'll start getting 00 02 00 F0 event packets (the 02 
signifying chatpad data). The same data as the wired chatpad starts appearing 
at offset 0x18.

LED activation works much the same as with the wired controller, but the 
control codes have to be send to endpoint one, the same as the init and 
keep-alive stuff:

00 00 0C  8 00 00 00 00 00 00 00 00 capslock
00 00 0C  9 00 00 00 00 00 00 00 00 square
00 00 0C  a 00 00 00 00 00 00 00 00 circle
00 00 0C  b 00 00 00 00 00 00 00 00 people
00 00 0C  c 00 00 00 00 00 00 00 00 backlight
00 00 0C 11 00 00 00 00 00 00 00 00 capslock
00 00 0C 12 00 00 00 00 00 00 00 00 square
00 00 0C 13 00 00 00 00 00 00 00 00 square and capslock
00 00 0C 14 00 00 00 00 00 00 00 00 circle
00 00 0C 15 00 00 00 00 00 00 00 00 capslock and circle
00 00 0C 16 00 00 00 00 00 00 00 00 circle, square
00 00 0C 17 00 00 00 00 00 00 00 00 circle, square, capslock
00 00 0C 1b 00 00 00 00 00 00 00 00 makes backlight led go on on keypress

Original issue reported on code.google.com by grum...@gmail.com on 1 Jan 2013 at 8:24

GoogleCodeExporter commented 8 years ago
Grumbel!  Are you still only working on the Linux driver?  I really appreciate 
the information.  If I take time to make the Windows drivers better I will 
hopefully be able to add this in.

Thanks very much.

Original comment by gtsche...@gmail.com on 5 Jan 2013 at 8:04

GoogleCodeExporter commented 8 years ago

Original comment by gtsche...@gmail.com on 5 Jan 2013 at 8:18

GoogleCodeExporter commented 8 years ago
Brandon Wilson did all the work with the USB capture, the full log is available 
at:

http://brandonw.net/Xbox360ChatpadLog.zip

And software to view it is at:

http://www.totalphase.com/products/data_center/

Only thing I did is figured out how to light up the LEDs. I haven't yet added 
this stuff to the Linux driver, but I am working on it.

Original comment by grum...@gmail.com on 5 Jan 2013 at 8:48

GoogleCodeExporter commented 8 years ago
Cool deal, thanks again for letting me know.

Original comment by gtsche...@gmail.com on 5 Jan 2013 at 9:04

GoogleCodeExporter commented 8 years ago
Make the Wireless driver reality, please!

Original comment by philipp....@gmail.com on 21 Jan 2013 at 9:31

GoogleCodeExporter commented 8 years ago
Please create the driver for windows :)

Original comment by xidades...@googlemail.com on 24 Jan 2013 at 7:26

GoogleCodeExporter commented 8 years ago
http://tattiebogle.net/index.php/ProjectRoot/Xbox360Controller/OsxDriver

There's also apparently support for the Chatpad in this OSX driver, so looking 
there may also be helpful.  If you add this and it works on Windows 8 then 
it'll be very much appreciated.

Original comment by pizza29...@gmail.com on 27 Jan 2013 at 8:44

GoogleCodeExporter commented 8 years ago
Please please this would be so awesome! i was just thinking about posting a 
link to brandonw's website today when i read a forum post he made about the 
xbox 360 wirelesss controller's security and then i seen that the connection 
had already been made. Thanks devs for all the hard work on this. this is going 
to be the best htpc remote that ever graced the planet when this wireless 
driver gets sorted out! thanks again. and good luck guys!

Original comment by 1337volt...@gmail.com on 4 Feb 2013 at 4:18

GoogleCodeExporter commented 8 years ago
I can't provide much in the way of technical assistance, but if you require a 
wireless 360 controller and a 360 receiver for windows, just let me know and I 
will send you the gear. Otherwise let me know if there is anything I can assist 
with (financial or otherwise). 

Original comment by twillsie@gmail.com on 11 Feb 2013 at 11:45

GoogleCodeExporter commented 8 years ago
Please, please. I need it.

Original comment by KSanz...@gmail.com on 14 Feb 2013 at 3:45

GoogleCodeExporter commented 8 years ago
I got my chatpad two days ago not knowing it didn't work on a PC, but this is a 
great find. I started working on a windows driver for the wireless, and so far 
it is working well. Well is probably an overstatement, but at least I can turn 
off the controller and change the light :) Right now it is just a lot of guess 
work and combing through the existing code.

Any tips on how best to read the USB capture logs, I don't have a Beagle and 
can't afford one, but the logs seem to provide all I would need. The only 
difficulty I am having is in discerning the data. I can't quite correlate what 
input on the device caused what output. Am I missing something? Or is it moot 
because the packets are the same for wired and wireless, and now that I can 
communicate with controller 1 on ep1, I can probably just use all of the 
commands from the wired driver.

Either way any additional information you can provide would be helpful, 
otherwise I will just keep plugging away.

Thank you again though, without the hard work of everyone parsing through USB 
commands this would be impossible!

Original comment by ryan...@gmail.com on 7 Mar 2013 at 4:40

GoogleCodeExporter commented 8 years ago
A good example of what I am unsure about would be a response packet like 00 F8 
02 00. Occasionally I get this or the 01 variant. I looked through the logs and 
it looks like these packets occur. Mine usually occur when the controller is at 
rest with no input.

Also you mentioned the 00 02 00 F0 packets, which I receive, but they alternate 
with 00 00 00 F0 packets. Basically I get both within milliseconds of each 
other. I'm considering them response keep alives for now, but I'm not sure the 
00 packet is as the 00 is where I would expect the chatpad data 02. It looks 
normal based on the logs you sent, I just don't know what the heck they mean :)

I will just keep experimenting if I don't see anything. Or is there a better 
place to collaborate on this?

Has anyone verified the OSX driver works? It looks like from his comments in 
the code (i.e. hilarious decent into programmer madness), that he stopped on 
that branch once he determined you needed the security handshake, though I'm 
not positive that is the case, but I just started looking at it.

Original comment by ryan...@gmail.com on 7 Mar 2013 at 11:02

GoogleCodeExporter commented 8 years ago
Hey ryandb2, nice work.  I imagine quite a few people will be happy if you get 
a wireless version working and/or fix all the bugs I have in the drivers.  :P

I think I tried looking at the OSX drive back before chatpad support was added 
with updated code, but did not get it working.  There might be a later version 
that works now, however.

Original comment by gtsche...@gmail.com on 8 Mar 2013 at 12:25

GoogleCodeExporter commented 8 years ago
Lol well if you were looking for someone to fix bugs than keep looking. I'm 
more likely to just introduce new ones ;)

Having said that this controller is crazy, it's like 3 different teams worked 
on the controller, chatpad, and driver. Getting controller events and lighting 
up the chatpad controls is easy, but I still can't receive any chatpad events 
(00 00 0C 1B didn't work for me except light on key press). Well more digging 
through code to see if someone else has solved this for me.

Original comment by ryan...@gmail.com on 9 Mar 2013 at 5:09

GoogleCodeExporter commented 8 years ago
Spent most of last night and this morning trying to get past the security 
handshake. That all seems to be worked out (thanks to everyone elses hard 
work), although still a little bizarre/confusing. I'm also not confident it 
will work across the board, but it is reliable with my controller so far.

I also have issues with repeating keys and response filtering, but at least I 
can send a key to notepad. And now I am taking a break :)

Video below of progress:
http://www.youtube.com/watch?v=6v2Xl4rFyPs

Original comment by ryan...@gmail.com on 9 Mar 2013 at 7:19

GoogleCodeExporter commented 8 years ago
thanks for your hard work, ryan!
you will be a hero, if you get wireless chatpad funktional.

Original comment by philipp....@gmail.com on 9 Mar 2013 at 8:40

GoogleCodeExporter commented 8 years ago
Nice work.  :)  Yeah, I seem to remember repeating keys and response filtering 
were a pain for the wired version.

Original comment by gtsche...@gmail.com on 10 Mar 2013 at 4:42

GoogleCodeExporter commented 8 years ago
Awsome im soo waiting for this.

Original comment by johan80d...@gmail.com on 10 Mar 2013 at 4:57

GoogleCodeExporter commented 8 years ago
Just a quick update, the chatpad and modifer keys are mapped and working. I 
still have a few issues with coordinating the modifier keys, but that isn't a 
huge priority. 

I'm working on virtual joystick emulation now, but after that I should have a 
basic alpha release (maybe a week or two, no promises lol). It is still going 
to require a separate driver and my program, but I will work on prettying up 
the setup later. Also this will only be one controller support, but the 
additional controller support looks to be pretty easy.

Also I'm not doing mapping of keys for joystick commands so for now you would 
need to use something like XPadder for that, although I may add it later.

Original comment by ryan...@gmail.com on 13 Mar 2013 at 12:47

GoogleCodeExporter commented 8 years ago
oh man i cannot wait for this, youre killin it ryan, i hereby dub ye employee 
of the month.
I dont even care how shoddy the alpha is, i just want it asap haha. 
Thumbs up.

Original comment by tommcnam...@gmail.com on 13 Mar 2013 at 6:48

GoogleCodeExporter commented 8 years ago
Thank you Ryan and everybody else who has contributed! You guys are superstars.

Original comment by unknowns...@gmail.com on 14 Mar 2013 at 1:59

GoogleCodeExporter commented 8 years ago
check this: http://brandonw.net/udraw/

is a working and easy to install driver for Wireless ChatPAD... Works in any 
version of Windows (x86 / x64).

Not Need to install extrange drivers not signed... uses LibUsbDoNet, and is 
easy to install using the last LibUSBDoNet Filter Wizzard.

ChatPad Light Works perfectly, keyboard works perfectly without any lag and can 
configure buttons to any thing... for example the "People" Button maps to any 
Keyboard configuration of action.

Include Sources.

Original comment by SiTW...@gmail.com on 14 Mar 2013 at 8:41

GoogleCodeExporter commented 8 years ago
Awesome work Brandon. I haven't had a chance to take a look at it yet but a 
quick curiosity question. How did you deal with the Joystick? Once you have the 
libusb driver installed you can intercept the traffic, but you need to handle 
the chatpad as well as the joystick, as the MS driver is replaced by libusb, 
correct?

I'm working with a virtual joystick but toyed with also allowing keyboard/mouse 
mapping, how did you approach it?

Thanks!

Original comment by ryan...@gmail.com on 15 Mar 2013 at 12:27

GoogleCodeExporter commented 8 years ago
Just tried your work Brandon, the code is really clean, I'm very impressed. My 
code looks like a bunch of monkeys with typewriters in comparison :)

I tried the driver and it works well, it doesn't look like it maps the 
controller as a Windows joystick, which I need, so I am going to continue on my 
project (having too much fun to stop anyway), but let me know if that is 
something you plan to add.

Great work!

Original comment by ryan...@gmail.com on 15 Mar 2013 at 12:40

GoogleCodeExporter commented 8 years ago
just trying out Brandons version, pretty nice and very well done. i hope this 
can help you finish your version ryan as i too need those sticks and triggers 
to work as well. thanks once again to everyone involved in getting this project 
so far since the start of the year

Original comment by tommcnam...@gmail.com on 15 Mar 2013 at 4:29

GoogleCodeExporter commented 8 years ago
woah this version gets very annoying very quickly with the dpad as a mouse, 
very hard to move smoothly and gets very easily stuck. We're so close here tho, 
no problems with the keys that ive noticed.

Original comment by tommcnam...@gmail.com on 15 Mar 2013 at 7:47

GoogleCodeExporter commented 8 years ago
Brandon's version is great for solely HTPC purposes!
But I'm more looking foreword to Ryan's for MMO purposes, regardless this is 
the best news....ever!

Original comment by MailboxJ...@gmail.com on 16 Mar 2013 at 1:58

GoogleCodeExporter commented 8 years ago
If anyone needs a tester let me know. I am running windows 8 with 4.5ghz proc, 
16gb of ram, and an hd 7850. Wired controller and black chatpad+mic. So in 
short latest software stressing machine. I have stayed up for no joke 18 hours 
trying to get the super driver to work, the drivers install, the device manager 
sees it, the control box runs correctly but the only end result is the tab 
feature on the guide button, none of the keypad or sticks work as they should. 
I dropped some cash before doing my research and its a kind of need thing for 
my setup + xpadder. So if you have software you need tested on another machine 
I am your man because I have see sunlight and birds chirping outside and I 
started this project yesterday afternoon literally everything I tried had no 
affect. Also if only Brandon had a wired version of his utility >_< At any rate 
I am off to bed and then radioshack tomorrow to build a wireless receiver from 
an old Xbox, if anyone has any information about wireless testing or especially 
an alternative driver / program to super driver let me know.

Original comment by lllsondo...@gmail.com on 17 Mar 2013 at 2:21

GoogleCodeExporter commented 8 years ago
Ah sorry for the double post one last thing, I also tried it in x86 XP and 
different usb ports so its not just windows 8 or user error - on the issue 
concerning the super driver.

Original comment by lllsondo...@gmail.com on 17 Mar 2013 at 2:23