Discuss this article in the Nuts & Volts forums at http://forum.nutsvolts.com.
available USB bus current of 500 mA. The
Screenshot 2 data also tells us that the PS3 has a
single interface (interface 0) that supports two
endpoints. Physically, the DualShock 3 acts as a
human interface to a PS3 console. So, if logic
prevails, the DualShock should logically fall into
the USB HID (Human Interface Device) class.
According to its interface descriptor, it is indeed
part of the HID class of USB devices. The
presence of a HID descriptor is also a dead
giveaway. As for the pair of endpoints, the
endpoint descriptors you see in Screenshot 3 tell
us that they are both interrupt endpoints that can
accept a maximum packet size of 64 bytes. Both
endpoints operate within 1 mS frames. The
address of the OUT endpoint is 2, while the IN
endpoint’s address is 1.
Since we’re using the Microchip USB stack
and we will be running our PIC32MX795F512L as
a USB host, we will want to utilize the Microchip
USB OTG configuration tool. To effectively use the
OTG tool, we will need to know our DualShock’s PID
(Product ID) and VID (Vendor ID) assignments.
There are a number of ways to obtain the PID and
VID. We can do it the hard way or we can do it the easy
way. If you’re a Design Cycle regular, you already know
which method I will use. I removed the DualShock’s USB
cable from the Explorer 200 and plugged it directly into
my laptop. I kicked off the Kadtronix USB HID demo
application and in the blink of an eye, the DualShock 3’s
PID and VID appeared in base 10 format. My Digilent
■ SCREENSHOT 1. This is a very busy shot. However, every bit of
data on this screen is important to us. To find the PlayStation
DualShock 3 holy grail, we need to know exactly what is passing
between the MotioninJoy application and the PlayStation
■ SCREENSHOT 3.
USB host will
only talk to a
controller. So, we
can use the
sniff with the
Explorer 200 to
nail down the IN
and OUT endpoint
■ SCREENSHOT 2.
aren't as complicated
as one would expect.
If you take the
out of the equation,
descriptors can be
very helpful tools in
determining how a
USB device works.
■ SCREENSHOT 4.
tools, and we have
May 2013 55