My car (BMW 750Li) has a fixed PIN, but without the documentation it's nearly impossible to retrieve it. So my idea is to write a brute force routine that iterates through the 4 digits from "0000" to "9999" with BluetoothSecurity.PairRequest to find the PIN when it returns True.
for (int i = 0; i <= 9999; i++)
{
string pin = i.ToString("0000");
bool ret = BluetoothSecurity.PairRequest(addr, pin);if (ret)
{
MessageBox.Show(i.ToString());return;
}
Is there any reason this might NOT work? Any gotchas to keep in mind? Should I put a sleep in between PairRequest calls?
(Besides that the PIN might be more than 4 digits)