0

My company is developing a Bluetooth-enabled robotics kit. We have found the following to be true:

  1. Pair device to computer A (a Mac)
  2. Pair device to computer B (a Windows PC)
  3. Computer A is now unable to connect to the device until...
    1. You ask computer A to remove the device from its list of paired devices and re-pair it. But...
    2. Doing so means computer B can no longer connect until it is re-paired.

The same process as outlined above works as expected if computers A and B are the same OS, e.g. both Windows or both OS X. That is, you can pair the Bluetooth device to multiple computers and connect any one of them at any time (provided you aren't currently connected to anything). No need to re-pair. But going between different operating systems causes a problem.

The Bluetooth chip is an off-the-shelf BM77 from Microchip.

We tried dumping the EPROM from the BM77 and diff'd the memory between each successive pairing. We found that after each re-pair (even on the same machine) the same 16 bytes would change starting at memory address 0x84. The documentation we have does not cover this memory range.

This does not seem like the expected behavior. Any insights?

mekin
  • 9
  • 1
  • Could happen if A and B shared the same BT radio address, e.g. trying to use the same USB BT dongle. – Turbo J May 18 '16 at 18:36
  • @TurboJ I am using the same brand of USB BT dongle, but each machine has its own dongle. – mekin May 18 '16 at 20:56
  • 3
    Possible duplicate of [Bluetooth pairing on Mac and Windows causes one to dismiss the other](http://electronics.stackexchange.com/questions/235840/bluetooth-pairing-on-mac-and-windows-causes-one-to-dismiss-the-other) – Mark Booth May 23 '16 at 09:53
  • 1
    This was cross-posted from *Robotics*, I have migrated the [original here](http://electronics.stackexchange.com/questions/235840). – Mark Booth May 23 '16 at 09:54
  • The 16 bytes is undoubtedly the negotiated key after pairing. I suspect the problem is something to do with Apple's strange BT implementation and "dual mode", but this is a bit of a mystery to me. – pjc50 May 23 '16 at 10:17
  • @TurboJ Even with physically the same dongle used across multiple computers, pairing will generate a unique link key each time. – Dmitry Grigoryev May 23 '16 at 10:45

1 Answers1

1

The behavior you describe is indeed unusual, in fact, previous pairing should be lost regardless of the OS used. During pairing, Bluetooth host generates a link key which depends on the claiming device's MAC address and a random number. This key is the essence of pairing: two devices trust each other because they both know the link key. So, when you pair your device to the second computer, the link key gets overwritten and pairing to the first one is lost.

Since multi-pairing is not mentioned in BM77 datasheet, I assume it is simply not supported. You should take a look at different Bluetooth modules if you need it. For example, RN41/RN42 store up to 8 link keys in first in - first out fashion.

Dmitry Grigoryev
  • 25,576
  • 5
  • 45
  • 106
  • 1
    Microchip claims the BM77 supports 4 link keys, but we see the same one get overwritten each time rather than cycling through the 4 slots. Thanks for the help! Investigation continues... – mekin May 24 '16 at 20:15
  • That's good news, perhaps all you need is to find a config parameters which enables multi-pairing mode. – Dmitry Grigoryev May 25 '16 at 07:33