简体   繁体   English

首次设置BLE外设名称的方式和时间

[英]How and when a BLE peripheral name is set for the first time

Changing peripheral name on hardware: 更改硬件上的外设名称:

  • When and how is it possible to change a BLE peripheral name ? 何时以及如何更改BLE外设名称
  • Is this something that needs to be written in the firmware ? 这是需要写入固件的东西吗? And if so how? 如果是这样怎么办?

I am looking at some iOS client code and using the CBPeripheral to detect a BLE peripheral using the CoreBluetooth library. 我正在查看一些iOS客户端代码,并使用CBPeripheral使用CoreBluetooth库检测BLE外围设备。 I can see an advertisement of my iPad where the name field has the mutable name "mm24 iPad" (which I can change from iTunes). 我可以看到我的iPad的广告,其中名称字段具有易变的名称“ mm24 iPad”(可以从iTunes更改)。

I suspect that each BLE peripheral can be configured at production time with a default name and then modified subsequently using a BLE API . 我怀疑可以在生产时使用默认名称配置每个BLE外围设备,然后使用BLE API对其进行修改 Is this correcT? 这个对吗?

As you understood about name is correct . 如您所知,名字是正确的。 The name of the peripheral is Read-only property and you cannot change it . 外设的名称是只读属性,您不能更改它 The name of the peripheral is written firmware. 外设的名称是书面固件。

If you have the control of peripheral code , you can create one writable/readable characteristic on which you can send the new name for the peripheral. 如果您具有外围设备代码的控制权,则可以创建一个可写/可读的特征,在该特征上可以发送外围设备的新名称。 And from next time you will get that new name . 从下一次开始,您将获得该新名称。

If you dont have control on peripheral code then use one writable/readable characteristic to read and write the name of the peripheral . 如果您无法控制外围设备代码,则使用一种可写/可读的特性来读写外围设备的名称。 This is obviously not the real name of the device but for the end user it is like a real name of the device . 这显然不是设备的真实名称,但对于最终用户而言,它就像设备的真实名称。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM