使用RN4870和BL620的BLE UART数据传输

时间:2018-11-14 21:29:22

标签: serial-port bluetooth-lowenergy uart microchip bluetooth-gatt

我正在尝试启动并运行原型。 我想将RN4870用作我的外围设备,并将BL620用作我的中央设备。 RN4870将其UART TX / RX称为“透明UART”,而BL620则将其UART TX / RX称为“ VSP(虚拟串行端口)”。

我已经连接了两个设备,并在两个设备的GATT表中列出了自定义服务和特性。我的问题是:下一步要如何通过UART将数据从RN4870发送到BL620?

对BLE设备的一般响应或对这两个模块之一的响应都将非常有帮助。

下面列出了我用于这两种命令模式的一组指令。

BL620:我正在使用cmd.manager.sb(https://github.com/LairdCP/BL620-Applications/blob/master/cmd.manager.sb

cmd
connect 00D88039FCECD4 20000 20 20 20     \\Connect to RN4870
uuid custom 49535343FE7D4AE58FA99FAFD205E455    \\List the UUID's for Microchip's transparent UART TX/RX.
uuid custom 495353431E4D4BD9BA6123C647249616
uuid custom 49535343884143F4A8D4ECBE34729BB3

uuid custom 569a1101b87f490c92cb11ba5ea5167c \\List the UUID's for Laird's BL620 Virtual Serial Port (VSP)
uuid custom 569a2001b87f490c92cb11ba5ea5167c
uuid custom 569a2000b87f490c92cb11ba5ea5167c
bridge vsp \\Supposed to allow me to write anything in the terminal on the rn4870 and have it sent to the bl620. This is the step I am lease sure about or if this is the next correct step.
\\RN4870 Module Code
S-,RN4870  \\Set Name to RN4870
SR,0040    \\Run script on power on
SS,C0      \\\Enable transparent UART and device Charatersitics
SB,07      \\Set Baud Rate
PZ         \\Erase all characteristis before loading new
PS,49535343FE7D4AE58FA99FAFD205E455      //Transparent UART Service
PC,495353431E4D4BD9BA6123C647249616,1A,20 //TX Characteristic
PC,49535343884143F4A8D4ECBE34729BB3,1A,20 //RX Characteristic           

PS,569a1101b87f490c92cb11ba5ea5167c  //VSP base UUID
PC,569a2003b87f490c92cb11ba5ea5167c  //Modem in UUID
PC,569a2002b87f490c92cb11ba5ea5167c  //Modem out UUID
PC,569a2001b87f490c92cb11ba5ea5167c,1A,20  //Receive VSP UUID
PC,569a2000b87f490c92cb11ba5ea5167c,1A,20  //Transmit VSP UUID 

0 个答案:

没有答案