monokulo / 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

GoogleCodeExporter commented 8 years ago
Wrong topic mate, this is the thread about creating a WIRELESS version of the 
driver. I understand that posting here will probably get you the quickest 
response seeing as this is the hottest thread right now but please go through 
the correct channels; there are many people keenly waiting on any report of 
progress towards a fully functional wireless driver and posts like this send 
email notifications to those who've starred the thread, potentially inspiring 
false hope.
Create a new issue thread for yourself, please.
Your problem lies within a whole different ballpark and with that i suggest no 
one bar ryan, brandon, gtsch()emer or any other coders working on this project 
post on this topic unless there is a major revelation; these folks well deserve 
applause but as they said in high school: please save your applause for the 
end. Thank you.

Original comment by tommcnam...@gmail.com on 17 Mar 2013 at 2:39

GoogleCodeExporter commented 8 years ago
Just in case anyone is interested in following my builds I just started posting 
them on github, https://github.com/ryandb2/XBOX360WIRELESSCONTROLLERCHATPAD. 
There is a lot missing at this point (single controller, requires libusb and 
vjoy, vjoy registry entries aren't written so you need to configure vjoy 
manually).

The joystick and chatpad are working, though I haven't validated the right 
analog due to some vJoy mapping issues, but I think it is working :)

I wouldn't recommend anyone try this build as it isn't ready, but I wanted to 
make sure everyone knew where the updates were.

Also don't look at the code ;), like I said, its a little on the ugly/hacky 
side right now.

Original comment by ryan...@gmail.com on 17 Mar 2013 at 5:30

GoogleCodeExporter commented 8 years ago
I just noticed this thread. If anyone cares, http://brandonw.net/udraw now 
sends tablet and controller data to the PPJoy virtual joystick you specify in 
the settings.

Original comment by brando...@gmail.com on 17 Mar 2013 at 11:00

GoogleCodeExporter commented 8 years ago
Cool, nice work Brandon. If anyone gets a chance, please post here thoughts on 
Brandon's new driver. I'm having fun building mine, so I'm not stopping yet, 
but if his is working well, no reason to have two :)

Great job Brandon!

Original comment by ryan...@gmail.com on 17 Mar 2013 at 11:16

GoogleCodeExporter commented 8 years ago
Can not use PPJoy, the driver won't install on Windows 7 32 bit.

Original comment by x1800mod...@yahoo.com on 18 Mar 2013 at 2:13

GoogleCodeExporter commented 8 years ago
@ #30 tommcnam...@gmail.com

Not to be rude my friend (truly) but last time I checked this is still an issue 
thread on google code regarding wired/wireless driver support, this is not a 
separate Google code release project. That however is how it is being used as 
however which I have no corral with but the same should go to me, when I am 
reporting an issue in the issue thread that is just what that is. Under windows 
8 on my secondary drive I have installed udraw on my wireless adapter (both 
official and makeshift), however it is very buggy and the gui locks about 50% 
of the time regarding any input. The other 50% the light on the controller 
either flashes or is off, there is never an upper left quadrant indicator. The 
Dpad and button keystrokes work correctly until I switch windows, it seems that 
the control is dropped when switching away from the target GUI. Also the 
chatpad is non-functional, again. I tried ryan's executable build on both 
command line and administrative launch, neither command line options open nor 
does a GUI. Perhaps I am using Ryan's incorrectly but these are the issues I am 
experiencing with the solution's available.

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

GoogleCodeExporter commented 8 years ago
Just to respond on my program, I tried to be clear it wasn't ready for anyone 
to run. In fact given I didn't give any install instructions I doubt anything 
would work :) Although I would expect you to get a gui even if you don't have 
libusb/vJoy.

Original comment by ryan...@gmail.com on 18 Mar 2013 at 2:25

GoogleCodeExporter commented 8 years ago
Im having trouble connecting the program to PPJoy, the movement options are 
greyed out in the settings and i cant get the tablet program to send signals to 
PPJoy. Am i just not setting up the virtual joystick properly?

Original comment by tommcnam...@gmail.com on 18 Mar 2013 at 10:55

GoogleCodeExporter commented 8 years ago
It was being grayed out when it wasn't supposed to be, sorry; I fixed it. (I 
usually test with the PS3 tablet.)

I don't really use PPJoy/vJoy/whatever, so if the mapping's not convenient, I'm 
sure it can be changed. (To avoid cluttering up this thread, you can just 
e-mail me with problems/questions/complaints/etc. instead, if you want.)

Original comment by brando...@gmail.com on 18 Mar 2013 at 11:55

GoogleCodeExporter commented 8 years ago
@Ryan I was just giving you a heads up as a quick test, not a complaint :P

It could be a windows 8 compatibility issue, same with brandon's app. That or 
the chatpad I have is defective as I have yet to use it with an xbox 360. I 
will try testing on other work stations.

Original comment by lllsondo...@gmail.com on 18 Mar 2013 at 10:07

GoogleCodeExporter commented 8 years ago
No problem, I just wanted to make sure you knew. That is odd though, as Win 8 
has all the WPF frameworks you should need. Did you try the debug or release 
exe, as I am working from the debug build still. The release one is very out of 
date.

Original comment by ryan...@gmail.com on 19 Mar 2013 at 1:42

GoogleCodeExporter commented 8 years ago
@Ryan Bin>Debug>Driver360WChatPad.exe does not execute. Bin folder is on 
desktop.

@Brandon I was able to correctly run the application without compatibility 
features enabled my problem was on the side of installing it on an off drive, 
locally the app behaves correctly. However chatpad does not work, same issue I 
ran into with SuperDriver with a wired controller. The chatpad functions 
normally under Xbox environment. 

Original comment by lllsondo...@gmail.com on 19 Mar 2013 at 2:47

GoogleCodeExporter commented 8 years ago
First attempt is now online http://thepocketofresistance.wordpress.com/

Let's hope it works. I think I fixed the issue of my app not showing up for you 
lllsondo, but let me know if I didn't.

Original comment by ryan...@gmail.com on 23 Mar 2013 at 6:21

GoogleCodeExporter commented 8 years ago
Driver360WChatPad.exe Crashes on startup :(

Original comment by Bouyarma...@gmail.com on 23 Mar 2013 at 7:43

GoogleCodeExporter commented 8 years ago
Let me take a look, I will add more logging and error trapping, it could be 
differences in controller, libusb or vjoy configuration.

Original comment by ryan...@gmail.com on 23 Mar 2013 at 7:51

GoogleCodeExporter commented 8 years ago
Also what OS are you on?

Original comment by ryan...@gmail.com on 23 Mar 2013 at 7:52

GoogleCodeExporter commented 8 years ago
Win 7 x64 SP1
vJoy and libUSB are the versions you linked in your page.

Original comment by Bouyarma...@gmail.com on 23 Mar 2013 at 8:01

GoogleCodeExporter commented 8 years ago
Same OS I am on so that shouldn't be an issue. If you have a moment could you 
try the latest build? I added a lot of logging that will help me find the 
problem. If it does crash you should have a file "errorLog2013323.log" in the 
bin\release folder. You can either attach that here, github or email me and 
then I can try to resolve the issue.

Thank you!

Original comment by ryan...@gmail.com on 23 Mar 2013 at 9:49

GoogleCodeExporter commented 8 years ago
hey ryan. I recently became very interested in finding a driver for my wireless 
controller chatpad and after trying your alpha, it crashes for me too. I've 
attached the log.
Win7 x64 SP1.
I installed vjoy and libUSB but not entirely sure if I installed libUSB 
correctly.
i ran the inf_wizard and chose the microsoft wireless adapter, then in the 
amd64 folder, i ran the install-filter-win and chose the adapter. is this 
correct?

Original comment by mrt0...@gmail.com on 24 Mar 2013 at 2:22

Attachments:

GoogleCodeExporter commented 8 years ago
That should be all that is needed, thanks for the error log it helps a ton. I 
think I know how to fix it... famous last words :)

Original comment by ryan...@gmail.com on 24 Mar 2013 at 2:31

GoogleCodeExporter commented 8 years ago
glad i could help!
 looking forward to try the fix

Original comment by mrt0...@gmail.com on 24 Mar 2013 at 2:38