Main Site Documentation

Error with bluetooth HCI command


#1

Hello guys,

I have tried to follow the instruction for the ps3 controller with Bluetooth from

http://blog.tkjelectronics.dk/2011/09/fez-panda-ps3-controller-via-bluetooth/comment-page-1/#comment-14022

the error that came out on the serial terminal is as follows:

Bluetooth Dongle Connected
CSR Initialized
Init State
HCI Reset Complete
ACL Data Packet Length: 1021
SCO Data Packet Length: 180
Total ACL Data Packets: 4
Total SCO Data Packets: 1
HCI Version: 3
HCI Revision: 3
LMP Version: 3
Manufactor ID: 10
LMP Subversion: 3
Local Bluetooth Address: 00:1F:81:00:02:50
Wait For Incoming Connect Request
Bluetooth Dongle Disconnected
PS3 Controller: 1 – Connected
PS3 Controller: 1 – LeftHatX: 0 – LeftHatY: 0 – RightHatX: 0 – RightHatY: 0
PS3 Controller: 1 – Left – Got BT Address: 0×00 0×15 0×83 0×15 0xA3 0×10
PS3 Controller: 1 – Right – Set BT Address: 0×00 0x1F 0×81 0×00 0×02 0×50
PS3 Controller: 1 – Left – Got BT Address: 0×00 0x1F 0×81 0×00 0×02 0×50
PS3 Controller: 1 – Disconnected
Bluetooth Dongle Connected
CSR Initialized
Init State
HCI Reset Complete
ACL Data Packet Length: 1021
SCO Data Packet Length: 180
Total ACL Data Packets: 4
Total SCO Data Packets: 1
HCI Version: 3
HCI Revision: 3
LMP Version: 3
Manufactor ID: 10
LMP Subversion: 3
Local Bluetooth Address: 00:1F:81:00:02:50
Wait For Incoming Connect Request
Incoming Request
Remote Name:
PLAYSTATION®3 Controller
Authentication Enable Complete
Connected to Device: 00:1E:3D:B5:0C:C6
Remote Version Information – Connection Handle: 0×0000 LMP Version: 0×03 Manufactor Name: 0x000A LMP SubVersion: 0x0D22
Connection Packet Type Changed – Connection Handle: 0×0000 Packet Type: 0×3318
Write Link Policy Settings Complete
Write Link Supervision Timeout Complete
Set AFH Host Channel Classification Complete
Scan Disabled
QOS Setup Complete
HCI Command Failed – Error: 0x0C Command: 0x0C3F
HCI Command Failed – Error: 0x0C Command: 0x0C3F
HCI Command Failed – Error: 0x0C Command: 0x0C3F
HCI Command Failed – Error: 0x0C Command: 0x0C3F
HCI Command Failed – Error: 0x0C Command: 0x0C3F
HCI Command Failed – Error: 0x0C Command: 0x0C3F
HCI Command Failed – Error: 0x0C Command: 0x0C3F
HCI Command Failed – Error: 0x0C Command: 0x0C3F
HCI Command Failed – Error: 0x0C Command: 0x0C3F
HCI Command Failed – Error: 0x0C Command: 0x0C3F
HCI Command Failed – Error: 0x0C Command: 0x0C3F
HCI Command Failed – Error: 0x0C Command: 0x0C3F
HCI Command Failed – Error: 0x0C Command: 0x0C3F
HCI Command Failed – Error: 0x0C Command: 0x0C3F

Lauszus suggested I should change the

 case HCI_QOS_SETUP:
if (hciflag(hci_event.HCI_FLAG_QOS_SETUP_COMPLETE))
{
WriteSerial(QOS Setup Complete);
hci_afh_host_channel_classification();
hci_state = HCI_AFH_HOST_CHANNEL_CLASSIFICATION2;
}
break;

To this:

case HCI_QOS_SETUP:
if (hciflag(hci_event.HCI_FLAG_QOS_SETUP_COMPLETE))
{
WriteSerial(QOS Setup Complete);
WriteSerial(HCI Done);
l2cap_state = L2CAP_EV_CONTROL_SETUP;
hci_state = HCI_DONE_STATE;
}
break;

But now the analog, gyros, and rumble won’t work as before

Help please