Firefly开源社区

关于蓝牙透传,求教

4

积分

0

威望

0

贡献

游客

积分
4
发表于 2016-9-25 12:34:50     
调用哪个方法可以实现通过蓝牙透传传送数据给app
回复

使用道具 举报

400

积分

0

威望

0

贡献

注册会员

Rank: 8Rank: 8

积分
400
QQ
发表于 2016-9-27 09:30:45     
  1. /*
  2. ****************************************************************************************
  3. * @brief Send a notification containing raw data - at connection.        *//**
  4. *
  5. * @param[in] conhdl Connection handle
  6. * @param[in] index Index of Characteristic to be sent
  7. * @param[in] length Length of data to be sent
  8. * @param[in] data Pointer to data to be sent
  9. *
  10. * @response QPPS_DATA_SEND_CFM
  11. * @description
  12. * This function is used by the application to send a raw data.
  13. *
  14. ****************************************************************************************
  15. */
  16. void app_qpps_data_send(uint16_t conhdl, uint8_t index, uint8_t length, uint8_t *data)
  17. {
  18.     struct qpps_data_send_req * msg = KE_MSG_ALLOC_DYN(QPPS_DATA_SEND_REQ, TASK_QPPS, TASK_APP,
  19.                                                        qpps_data_send_req, length);

  20.     msg->conhdl = conhdl;
  21.     msg->index = index;
  22.     msg->length = length;
  23.     memcpy(msg->data, data, length);

  24.     ke_msg_send(msg);
  25. }
复制代码

以上方法可以实现
没个性,不签名!
回复

使用道具 举报

21

积分

0

威望

0

贡献

游客

积分
21
发表于 2016-11-25 16:28:53     
需要发送的时候直接调用吗?
例如我的需求采集数据慢100Byte就发送,可以这样吗

Senddata

Senddata



回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

友情链接 : 爱板网 电子发烧友论坛 云汉电子社区 粤ICP备14022046号-2
快速回复 返回顶部 返回列表