From what I could google, it looks like you have to write this yourself. However, check out the library published here: https://github.com/felis/USB_Host_Shield_2.0/wiki/PS3-Information. This is a library to allow connection of a PS3 controller to an Arduino using a shield, but it gives both details on the packets being sent/received as well as specific links to a more detailed explanation of the protocol, and bluetooth packet sniffer app suggestions (Mac and PC).
Specifically, it says:
For information about the Bluetooth Protocol. See this pdf:
Take a good look at the categories: "HCI COMMANDS AND EVENTS" Volume 2
p. 458, "HCI ACL Data Packets" Volume 2 p.428 and "SIGNALING PACKET
FORMATS" Volume 3 p. 54.
See this pdf, for standard BT HID Commands, used by the program, at
"Bluetooth HID L2CAP Protocol Specification" p. 50.
I used this program to sniff the Bluetooth Commands sent from my mac:
PacketLogger.app. It is developed by apple, so it is mac only! If you
are on a mac, this is what the program decoded:
The Protocol and Service Multiplexor (PSM) used by the L2CAP Protocol
(HID_Control and HID_Interrupt), are defined here: