如何以编程方式更改BLE引脚 [英] How to change BLE pin programmatically
问题描述
我们可以更改低功耗蓝牙中的密码(4位数字)吗?如何以编程方式更改它? 仅供参考:我使用sensortag cc2650和> https://github.com/don/cordova-plugin -ble-central
Can we change passkey (4 digit pin) in Bluetooth Low Energy? How to change it programmatically ? FYI : I using sensortag cc2650 and https://github.com/don/cordova-plugin-ble-central
推荐答案
否,它是由内部蓝牙堆栈生成的.顺便说一下,它是6位数字,而不是4位数字.您应该更改它,因为它应该是随机生成的代码.该标准说:
No, it's generated by the internal bluetooth stack. By the way it is 6 digits, not 4. You shouldn't change it anyway since it should be a randomly generated code. The standard says:
如果设备的IO功能为DisplayOnly或表2.8 定义设备显示密码,然后该设备应 显示一个介于000,000和之间的随机生成的密钥值 999,999.
If the IO capabilities of a device are DisplayOnly or if Table 2.8 defines that the device displays the passkey, then that device shall display a randomly generated passkey value between 000,000 and 999,999.
如果您不需要代码,则应使用"Just Works"配对方法.
If you don't need a code you should use the "Just Works" pairing method.
您为什么要更改代码?
这篇关于如何以编程方式更改BLE引脚的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!