Quantcast
Channel: 蓝牙论坛 - 最近的话题
Viewing all articles
Browse latest Browse all 7485

CC2541 主从机数据通信的问题

$
0
0

一般情况下
Central作为GATT_Clitnt

Peripheral 作为GATT_Service 

Central调用GATT_WriteCharValue 或者 GATT_ReadCharValue和作为Service的Peripheral从机通信
Peripheral需要通过notify的方式 也就是GATT_Notifycation发起和主机通信

是不是意味着: 排除广播和扫描  

 主机 -》从机   只能以写特征值的方式传递数据
从机 -》主机    只能以notify的方式传递数据 
同时还要一个疑问,就是Central只能作为client  而不能作为server   Peripheral只能作为server  而不能作为client
但是我在CC2541_Guide 上看到这句话
Typically, the GATT roles of client and server are independent from the GAP roles of peripheral and
central. A peripheral can be either a GATT client or server and a central device can be either a GATT
client or server. A device can also act as both a GATT client and a GATT server.

这样的话 是不是意味着  
Central-》Peripheral  也可以用notify的方式传输数据 (Certral作为 server   Peripheral作为client)
同样
Peripheral-》Central  也可以用GATT_WriteCharValue的方式传输数据



Viewing all articles
Browse latest Browse all 7485

Trending Articles