Unfortunately I don't have time to work on my "non-genuine-fix" (still have problems with lag) and some people were interested in tweaks i've made to successfully connect them by BTH. Maybe someone will have more time to make it work in 100%. So, here are my changes (based on v1.0.0.103)
The clue is to modify some bytes in "m_Report" for fake controllers. I recognize fake controller by MAC staring with 00:26:5C:xx:xx:xx
BthDevice.cs
Code:
...
case HCI.Event.HCI_Connection_Complete_EV:
bd = String.Format("{0:X2}:{1:X2}:{2:X2}:{3:X2}:{4:X2}:{5:X2}", Buffer[10], Buffer[9], Buffer[8], Buffer[7], Buffer[6], Buffer[5]);
BthDs3 Connection = Add(Buffer[3], (Byte)(Buffer[4] | 0x20), NameList[bd]);
if (Buffer[10] == 0x00 && Buffer[9] == 0x26 && Buffer[8] == 0x5c)
{
Connection.Fake = true;
LogDebug("-- Fake DualShock3 founded. Workaround applied");
}
else
{
Connection.Fake = false;
LogDebug("-- Genuine Sony DualShock3 founded.");
}
Connection.Remote_Name = NameList[bd]; NameList.Remove(bd);
Connection.BD_Address = new Byte[] { Buffer[5], Buffer[6], Buffer[7], Buffer[8], Buffer[9], Buffer[10] };
LogDebug(String.Format(">> {0} [{1:X2}]", Event, Buffer[0]));
break;
...
BthDevice.cs
Code:
...
case L2CAP.Code.L2CAP_Configuration_Response:
LogDebug(String.Format(">> {0} [{1:X2}]", Event, Buffer[8]));
if (Connection.CanStartSvc)
{
UInt16 DCID = BthConnection.DCID++;
L2_DCID = new Byte[2] { (Byte)((DCID >> 0) & 0xFF), (Byte)((DCID >> 8) & 0xFF) };
if (!Connection.Fake)
{
L2CAP_Connection_Request(Connection.HCI_Handle.Bytes, m_Id++, L2_DCID, L2CAP.PSM.HID_Service);
LogDebug(String.Format("<< {0} [{1:X2}] PSM [{2:X2}]", L2CAP.Code.L2CAP_Connection_Request, (Byte)L2CAP.Code.L2CAP_Connection_Request, (Byte)L2CAP.PSM.HID_Service));
}
else
{
Connection.CanStartSvc = false;
OnInitialised(Connection);
}
}
break;
...
BthDs3.cs
Code:
namespace ScpControl
{
public partial class BthDs3 : BthConnection, IDs3Device
{
protected Boolean m_Fake = true;
protected ReportEventArgs m_ReportArgs = new ReportEventArgs();
...
BthDs3.cs
Code:
...
protected Byte[] m_Leds = { 0x02, 0x04, 0x08, 0x10, };
protected Byte[] m_Enable = { 0x53, 0xF4, 0x42, 0x03, 0x00, 0x00, };
public DeviceState State
{
get { return m_State; }
}
public Boolean Fake
{
get { return (Boolean) m_Fake; }
set { m_Fake = (Boolean)value; }
}
public Ds3PadId PadId
...
BthDs3.cs
Code:
...
if (Global.DisableLED) m_Report[11] = 0;
if (m_Fake)
{
m_Report[0] = 0xA2;
m_Report[3] = 0x00;
m_Report[5] = 0x00;
}
if (!m_Blocked && m_Queued > 0)
{
if ((Now - m_Last).TotalMilliseconds >= 125)
...
Good luck!