Identifying mobile devices paired via bluetooth wi

2019-04-09 10:26发布

问题:

I want to be able to pair Microsoft PixelSense hardware with multiple mobile devices via bluetooth and I want PixelSense to know which device is which. So if I place two phones on a table, PixelSense should be able to label them by device name. My initial thought was to have the phone display an Identity Tag that has encoded its Bluetooth MAC address so that it could associate them but PixelSense sees in infrared and can't read the phone screen so that idea is out. Can anyone think of another way to do this?

回答1:

Microsoft has demonstrated a way to do this in their Mobile Connect sample application. They've ingeniously used the fact that almost all phones have a camera that faces down when the phone is placed on a flat surface. So they created an app that will read incoming color data from Surface while the phone is sitting on it.

So it goes like this:

  1. The Surface app starts and makes the Surface computer itself visible on bluetooth (although you may have to do this manually in admin mode, can't remember)
  2. you run the mobile app on your phone, click connect, and place it on the Surface at a designated spot
  3. the Surface flashes a serious of colors into the phone's camera
  4. the phone decodes those colors into a pin and scans through all the open bluetooth devices it can see until it finds one that is a desktop running the appropriate service and accepts the decoded pin.
  5. Now the two are connected with no need for manual input and the Surface knows which physical device it's talking to because it knows which pin it displayed to each device. *Note - They don't actually allow multiple simultaneous connections in this sample app, but I see no reason why it wouldn't work.

One issue with this approach (other than being pretty complicated to code), is the need for the app on the phone. One way to make it easier for people to get the app is to display a Microsoft Tag or qrcode on the Surface for people to scan (they're much more likely to have a scanning app already). I don't think there's any getting around the need to have something installed on the phone if you're using bluetooth anyway.