Open aguaviva opened 3 years ago
Hello, I also have the problem. apparently the problem is with Joystick clones. I solved it but it is not a direct way but it could be a solution with some advantages, such as the wifi, greater range of reach.
https://subefotos.com/ver/?fbccec11ff9f8dad65eaf00a0bdb7a98o.jpg
How were you able to pair the PS3 controller with your cellphone? Do you have any links?
First you must know if your joystick is compatible with your phone, then my application enters into action that makes the link to the esp32. but my application has a cost
Sixaxis Compatibility Checker https://play.google.com/store/apps/details?id=com.dancingpixelstudios.sixaxiscompatibilitychecker&hl=es_AR
https://www.mediafire.com/view/zh9lyhyn67bckbl/Sin_t%25C3%25ADtulo.png/file https://www.mediafire.com/view/sa6jlacs11nu2i0/Screenshot_2021-04-05-21-39-13.png/file https://www.mediafire.com/view/42ivvlkg55ojbxo/Screenshot_2021-04-05-21-39-04.png/file https://www.mediafire.com/view/6jeix7032thqtsr/Screenshot_2021-04-05-21-38-38.png/file
I found the solultion, my controller is a Gasia clone, you need to use this code to get the controller to stream its state
void ps3Enable()
{
uint16_t len = sizeof(hid_cmd_payload_ps3_enable);
hid_cmd_t hid_cmd;
#ifdef GASIA
//*****************************Begin hack***************************************
static const uint8_t hid_cmd_payload_gasia_enable[] = {
//0xA2, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, // rumble values [0x00, right-timeout, right-force, left-timeout, left-force]
0x00, 0x00, 0x00, 0x00, 0x02, // 0x02=LED1 .. 0x10=LED4
0xff, 0x27, 0x10, 0x00, 0x32, // LED 4
0xff, 0x27, 0x10, 0x00, 0x32, // LED 3
0xff, 0x27, 0x10, 0x00, 0x32, // LED 2
0xff, 0x27, 0x10, 0x00, 0x32, // LED 1
0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00
};
uint16_t len = sizeof(hid_cmd_payload_gasia_enable);
hid_cmd_t hid_cmd;
hid_cmd.code = 0xA2;
hid_cmd.identifier = 0x01;
memcpy( hid_cmd.data, hid_cmd_payload_gasia_enable, len);
//*****************************End hack***************************************
#else
hid_cmd.code = hid_cmd_code_set_report | hid_cmd_code_type_feature;
hid_cmd.identifier = hid_cmd_identifier_ps3_enable;
memcpy( hid_cmd.data, hid_cmd_payload_ps3_enable, len);
#endif
ps3_l2cap_send_hid( &hid_cmd, len );
}
hello, it works !!! it connects and throws me the information all correct. but the LEDs start to flash, they change places. It's like this for a while, and then the control is turned off
.... I don't have this function ps3_l2cap_send_hid( &hid_cmd, len );
I put the original ps3_gap_send_hid( &hid_cmd, len );
For more info see: https://github.com/falkTX/qtsixa/blob/c2f4ed9ee5646aefa68fb44fa14eda0460f02e66/sixad/shared.cpp#L272
and search for GASIA_GAMEPAD_HACKS in that repo to see how to set up the rumble and lights...
If someone still needs it. this might be also due to the esp32. the same code giving problem in old esp32 works fine in new esp32 board. the old esp32 board requuires to press the bootsel button while uploading while the old one does not. the absence of the capacitor also might be an issue.
I can't seem to get data from the controller (that I just discovered it is a chinese clone).
This is a summary of the BT transactions:
Here are the details of the transaction, any help is more than welcome :)
Any help with this on how to debug it is more than welcome :)
Oh! And thanks for this great project!!