hello
NCS2.0.2/2.3.0, vscode
i add a fun as follow:
void PutToBleSend()
{
struct uart_data_t *buf = k_malloc(sizeof(struct uart_data_t));
if (buf) {
sprintf(buf->data, "KEY-003");
buf->len = strlen(buf->data);
k_fifo_put(&fifo_uart_rx_data, buf);
} else {
printk("[log] No buffer\n");
return;
}
}
and call it in
static void connected(struct bt_conn *conn, uint8_t err);
but bt_nus_send() will return -128 in void ble_write_thread(void);
wait 2 second, bt_nus_send() will send ok.
1.How can data be sent out faster after connected()?
2.How to creat a bounds.(test in nrf ToolBox uart)
Best regards