BLE将专用特征写入UUID

时间:2019-06-06 23:29:25

标签: bluetooth-lowenergy microcontroller

我使用RN4020 BLE模块与VALRT BT按钮进行通信:https://vsnmobil.com/products/v-alrt/specs

问题是,我需要在连接到特定的专用UDID“ FFFFFFF5-00F7-4000-B000-000000000000”(请参阅​​参考:https://github.com/HoyosIntegrity/V.ALRT-bluetooth-spec)后的30秒内发送“ 80BEF5ACFF”

问题是,我总是从RN4020取回“ ERR”。

这是我的初始化代码(有效):

sf,2 //Factory Reset
+ //echo on
sr,92000000 //configure as Master
r,1 //reboot
F //search devices
X //stop searching
E,0,001EC026C931 //connect to device with mac: 001EC026C931 which is my device 
B //Bond

找回“已连接”,然后按钮用蜂鸣器将其退出。

现在我想写

CUWV,FFFFFFF5-00F7-4000-B000-000000000000,80BEF5ACFF

带和不带“-”,但始终会返回错误。在github上有适用于Android和iOS的示例,但对我来说不清楚我必须发送什么...

认为我忘记了第一步,但是我不知道是哪个。

1 个答案:

答案 0 :(得分:0)

奇怪的是,当我连接并发送“ LC”时,我得到了以下提示:

    180A

  2A23,0012,02

  2A24,0014,02

  2A25,0016,02

  2A26,0018,02

  2A27,001A,02

  2A28,001C,02

  2A29,001E,02

  2A2A,0020,02

1803

  2A06,0025,0A

1802

  2A06,0028,04

1804

  2A07,002B,02

  2A07,002C,10

180F

  2A19,002F,02

  2A19,0030,10

  FFFFFFA000F74000B000000000000000

  FFFFFFA100F74000B000000000000000,0034,0A

  FFFFFFA200F74000B000000000000000,0037,02

  FFFFFFA300F74000B000000000000000,003A,00

  FFFFFFA300F74000B000000000000000,003B,10

  FFFFFFA400F74000B000000000000000,003E,00

  FFFFFFA400F74000B000000000000000,003F,10

  FFFFFFA500F74000B000000000000000,0042,00

  FFFFFFA500F74000B000000000000000,0043,10

END

那是一些服务,但不是全部。