C# - Windows Mobile - Bluetooth Pairing

馋奶兔 提交于 2019-12-13 05:32:37

问题


I've been given the task of building a Windows Mobile app for our company that quickly pairs a device by scanning it's bar code. I can discover the device, and talk to it, but I am stuck as far as pairing.

In C# / Windows Mobile 6, how do I pair a device? I don't really need to talk to the device within the app, I need to pair it so other applications can use it.

Is there an API I need to do this? I've seen things saying I need to register a pass key, etc? I can't seem to find any documentation on the actual pairing process, just connecting to it. (Just connecting to it, doesn't actually pair it.)


回答1:


You can use my library 32feet.NET. Use method BluetoothSecurity.PairRequest See e.g. Bluetooth Security (That should work regardless of whether the device has Microsoft's own Bluetooth stack installed or the device has Widcomm/Broadcom or SSO Bluetopia).

The process of 'pairing' should also enable the services at the same time. If not we probably have other APIs for that too. Which services are used? SerialPort, others?



来源:https://stackoverflow.com/questions/10518307/c-sharp-windows-mobile-bluetooth-pairing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!