[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bluetooth-dev] Send L2CAP Data



Could someone tell me why this doesn't work... I'm trying to send l2cap data

Btw, receiving data works well.

s32
send_data(l2cap_con *con, u8 *data, u32 len)
{
  bt_tx_buf *tx;
  char c;
  
  tx = subscribe_bt_buf(sizeof(l2cap_tx_buf) + len);
  if (!tx)
    /* no more memory available */
    return -1;
  tx->cur_len = len;
  memcpy(tx->data + sizeof(l2cap_tx_buf), data, len);
  printf("Send data : %s\n", tx->data + sizeof(l2cap_tx_buf));

  return l2cap_send_data(tx, con);
}
-
To unsubscribe from this list: send the line "unsubscribe bluetooth-dev" in
the body of a message to majordomo@xxxxxxx.com