1

I am using a SPP Bluetooth module to send data between my Android phone app and the module. I stumbled upon an interesting thing today.

  1. I pair to my module by entering a passkey
  2. I can normally send data back and forth between my app and the module
  3. From within my app I disconnect from the module and close my app.
  4. On the module I change its passkey to a new value.
  5. I reopen my app and can still exchange data. I do not need to go through pairing again. All security information exchanged by my phone and module when I first paired them (using the old passkey) seem to still be valid even after changing the PIN on the module.
  6. I then close my app and unpair the device from Bluetooth settings.
  7. After that I pair the two devices to make sure Passkey change was in fact accepted and surely enough it was. I can now only pair with the new PIN.

My surprise is that in point 5 above everything still worked even without updating the PIN also on my mobile phone. I plan on getting around this by calling removeBond() using reflection after I send the module a command to change PIN since this is enough for my particular use case. But if the PIN change could be triggered by something else then my phone this would not work.

My question is if this is normal. Bluetooth specs are quite long so I was hoping someone else knows this. I would imagine that after changing the passkey for a Bluetooth device all devices already paired with it will have to go through the pairing process again, this time with the new passkey. But steps above indicate this is not the case. Is this a bug on my Bluetooth module (Bluegiga WT12) or is this expected behaviour? Has Anyone encountered this before?

Thank you.

Cheers!

4

1 回答 1

1

所以,蓝牙规格比我想象的更友好。我在这一段中找到了答案:

蓝牙 PIN 用于对两个蓝牙设备(之前没有交换过链接密钥)进行身份验证,并在它们之间建立信任关系。PIN 用于配对过程(参见第 241 页的第 11.2 节)以生成用于进一步验证的初始链接密钥。

所以密码不像路由器中的密码。这只是两个设备在连接时需要知道的序列,以便一个设备对另一个设备进行身份验证。一旦他们确定他们可以相互信任,他们就会交换链接密钥,这些密钥用于未来的通信。密码/PIN 则无关紧要。

我希望我能正确理解这一点。

非常抱歉发布得太早。

干杯!

于 2013-10-01T18:05:48.433 回答