Central uart on thingy91:nrf52840 unstabile ble_data_received

Hi,

I am running central_uart example on thingy91:nrf52840 it is paired up with Thingy52 running peripheral_uart example.

everything seems to run fine i send and receive msg every 5 sec.
my problem is that the ble_data_received is toggling with triggered when buffer is full (40 bytes) and end of msg that is normaly 15-20 bytes.

how can i controll this? is there any time settings or end of msg character i can use

Rune

/*
 * Copyright (c) 2018 Nordic Semiconductor ASA
 *modifyed by rv
 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
 */

/** @file
 *  @brief Nordic UART Service Client sample
 */

#include <errno.h>
#include <zephyr/kernel.h>
#include <zephyr/device.h>
#include <zephyr/devicetree.h>
#include <zephyr/sys/byteorder.h>
#include <zephyr/sys/printk.h>

#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/hci.h>
#include <zephyr/bluetooth/conn.h>
#include <zephyr/bluetooth/uuid.h>
#include <zephyr/bluetooth/gatt.h>

#include <bluetooth/services/nus.h>
#include <bluetooth/services/nus_client.h>
#include <bluetooth/gatt_dm.h>
#include <bluetooth/scan.h>

#include <zephyr/settings/settings.h>

#include <zephyr/drivers/uart.h>

#include <zephyr/logging/log.h>


#define LOG_MODULE_NAME central_uart
LOG_MODULE_REGISTER(LOG_MODULE_NAME);

/* UART payload buffer element size. */
#define UART_BUF_SIZE 40

#define KEY_PASSKEY_ACCEPT DK_BTN1_MSK
#define KEY_PASSKEY_REJECT DK_BTN2_MSK

#define NUS_WRITE_TIMEOUT K_MSEC(150)
#define UART_WAIT_FOR_BUF_DELAY K_MSEC(50)
#define UART_RX_TIMEOUT 500

static const struct device *uart = DEVICE_DT_GET(DT_NODELABEL(uart1));
static struct k_work_delayable uart_work;

K_SEM_DEFINE(nus_write_sem, 0, 1);

struct uart_data_t {
	void *fifo_reserved;
	uint8_t  data[UART_BUF_SIZE];
	uint16_t len;
};



struct uart_data_t *uart_rx_buf;
uint8_t  uart_tx_buf[UART_BUF_SIZE];

static K_FIFO_DEFINE(fifo_uart_tx_data);
static K_FIFO_DEFINE(fifo_uart_rx_data);

static struct bt_conn *default_conn;
static struct bt_nus_client nus_client;

bool btcon=false;

static void ble_data_sent(struct bt_nus_client *nus, uint8_t err,
					const uint8_t *const data, uint16_t len)
{
	ARG_UNUSED(nus);
/*
	struct uart_data_t *buf;

	// Retrieve buffer context.
	buf = CONTAINER_OF(data, struct uart_data_t, data);
	k_free(buf);
*/
	k_sem_give(&nus_write_sem);

	if (err) {
		LOG_WRN("ATT error code: 0x%02X", err);
	}
	
}

static uint8_t ble_data_received(struct bt_nus_client *nus,
						const uint8_t *data, uint16_t len)
{
	ARG_UNUSED(nus);

		int err;
		LOG_INF("BLE data received!  %d,:%s",len,data);

		for (uint16_t x=0;x<len;x++){
			if ( data[x]=='\n' || x==len-1 ){
				uart_tx_buf[x]=data[x];
				uart_tx_buf[x+1]='\0';
				err = uart_tx(uart,uart_tx_buf, x+1, SYS_FOREVER_MS);
				if (err) {
				LOG_INF("Error Sending data over UART");
				}else{
					LOG_INF("Sending data over UART to nrf91! %d,%s",x,uart_tx_buf);
				}
				break;
			}
		uart_tx_buf[x]=data[x];		
		}
	
	return BT_GATT_ITER_CONTINUE;
}

static void uart_cb(const struct device *dev, struct uart_event *evt, void *user_data)
{
	ARG_UNUSED(dev);
	int err;


	switch (evt->type) {
	
	case UART_RX_RDY:
		uart_rx_buf = CONTAINER_OF(evt->data.rx.buf, struct uart_data_t, data);
		uart_rx_buf->len=evt->data.rx.len;
		if (evt->data.rx.buf[uart_rx_buf->len - 1] == '\n') { // removed or '\r'
			k_fifo_put(&fifo_uart_rx_data, uart_rx_buf);
			
			uart_rx_disable(uart);
		}


		break;

	case UART_RX_DISABLED:
		LOG_DBG("UART_RX_DISABLED");

		uart_rx_enable(uart, uart_rx_buf->data, sizeof(uart_rx_buf->data),
			       UART_RX_TIMEOUT);

		break;

	default:
		break;

	}
	
}

static int uart_init(void)
{
	
	int err;
	struct uart_data_t *rx;

	if (!device_is_ready(uart)) {
		LOG_ERR("UART device not ready");
		return -ENODEV;
	}

	rx = k_malloc(sizeof(*rx));
	if (rx) {
		rx->len = 0;
	} else {
		return -ENOMEM;
	}



	err = uart_callback_set(uart, uart_cb, NULL);
	if (err) {
		return err;
	}

	return uart_rx_enable(uart, rx->data, sizeof(rx->data),
			      UART_RX_TIMEOUT);
	
}


static void discovery_complete(struct bt_gatt_dm *dm,
			       void *context)
{
	struct bt_nus_client *nus = context;
	LOG_INF("Service discovery completed");

	bt_gatt_dm_data_print(dm);

	bt_nus_handles_assign(dm, nus);
	bt_nus_subscribe_receive(nus);

	bt_gatt_dm_data_release(dm);
}

static void discovery_service_not_found(struct bt_conn *conn,
					void *context)
{
	LOG_INF("Service not found");
}

static void discovery_error(struct bt_conn *conn,
			    int err,
			    void *context)
{
	LOG_WRN("Error while discovering GATT database: (%d)", err);
}

struct bt_gatt_dm_cb discovery_cb = {
	.completed         = discovery_complete,
	.service_not_found = discovery_service_not_found,
	.error_found       = discovery_error,
};

static void gatt_discover(struct bt_conn *conn)
{
	int err;

	if (conn != default_conn) {
		return;
	}

	err = bt_gatt_dm_start(conn,
			       BT_UUID_NUS_SERVICE,
			       &discovery_cb,
			       &nus_client);
	if (err) {
		LOG_ERR("could not start the discovery procedure, error "
			"code: %d", err);
	}
}

static void exchange_func(struct bt_conn *conn, uint8_t err, struct bt_gatt_exchange_params *params)
{
	if (!err) {
		LOG_INF("MTU exchange done");
	} else {
		LOG_WRN("MTU exchange failed (err %" PRIu8 ")", err);
	}
}

static void connected(struct bt_conn *conn, uint8_t conn_err)
{
	char addr[BT_ADDR_LE_STR_LEN];
	int err;

	bt_addr_le_to_str(bt_conn_get_dst(conn), addr, sizeof(addr));

	if (conn_err) {
		LOG_INF("Failed to connect to %s (%d)", log_strdup(addr),
			conn_err);

		if (default_conn == conn) {
			bt_conn_unref(default_conn);
			default_conn = NULL;

			err = bt_scan_start(BT_SCAN_TYPE_SCAN_ACTIVE);
			if (err) {
				LOG_ERR("Scanning failed to start (err %d)",
					err);
			}
		}

		return;
	}

	LOG_INF("Connected: %s", log_strdup(addr));

	static struct bt_gatt_exchange_params exchange_params;

	exchange_params.func = exchange_func;
	err = bt_gatt_exchange_mtu(conn, &exchange_params);
	if (err) {
		LOG_WRN("MTU exchange failed (err %d)", err);
	}

	err = bt_conn_set_security(conn, BT_SECURITY_L2);
	if (err) {
		LOG_WRN("Failed to set security: %d", err);

		gatt_discover(conn);
	}

	err = bt_scan_stop();
	if ((!err) && (err != -EALREADY)) {
		LOG_ERR("Stop LE scan failed (err %d)", err);
	}
}

static void disconnected(struct bt_conn *conn, uint8_t reason)
{
	char addr[BT_ADDR_LE_STR_LEN];
	int err;

	bt_addr_le_to_str(bt_conn_get_dst(conn), addr, sizeof(addr));

	LOG_INF("Disconnected: %s (reason %u)", log_strdup(addr),
		reason);
	btcon=false;
	if (default_conn != conn) {
		return;
	}

	bt_conn_unref(default_conn);
	default_conn = NULL;

	err = bt_scan_start(BT_SCAN_TYPE_SCAN_ACTIVE);
	if (err) {
		LOG_ERR("Scanning failed to start (err %d)",
			err);
	}
}

static void security_changed(struct bt_conn *conn, bt_security_t level,
			     enum bt_security_err err)
{
	char addr[BT_ADDR_LE_STR_LEN];

	bt_addr_le_to_str(bt_conn_get_dst(conn), addr, sizeof(addr));

	if (!err) {
		LOG_INF("Security changed: %s level %u", log_strdup(addr),
			level);
	} else {
		LOG_WRN("Security failed: %s level %u err %d", log_strdup(addr),
			level, err);
	}

	gatt_discover(conn);
}

BT_CONN_CB_DEFINE(conn_callbacks) = {
	.connected = connected,
	.disconnected = disconnected,
	.security_changed = security_changed
};

static void scan_filter_match(struct bt_scan_device_info *device_info,
			      struct bt_scan_filter_match *filter_match,
			      bool connectable)
{
	char addr[BT_ADDR_LE_STR_LEN];

	bt_addr_le_to_str(device_info->recv_info->addr, addr, sizeof(addr));

	LOG_INF("Filters matched. Address: %s connectable: %d",
		log_strdup(addr), connectable);
	btcon=true;
}

static void scan_connecting_error(struct bt_scan_device_info *device_info)
{
	LOG_WRN("Connecting failed");
}

static void scan_connecting(struct bt_scan_device_info *device_info,
			    struct bt_conn *conn)
{
	default_conn = bt_conn_ref(conn);
}

static int nus_client_init(void)
{
	int err;
	struct bt_nus_client_init_param init = {
		.cb = {
			.received = ble_data_received,
			.sent = ble_data_sent,
		}
	};

	err = bt_nus_client_init(&nus_client, &init);
	if (err) {
		LOG_ERR("NUS Client initialization failed (err %d)", err);
		return err;
	}

	LOG_INF("NUS Client module initialized");
	return err;
}

BT_SCAN_CB_INIT(scan_cb, scan_filter_match, NULL,
		scan_connecting_error, scan_connecting);

static int scan_init(void)
{
	int err;
	struct bt_scan_init_param scan_init = {
		.connect_if_match = 1,
	};

	bt_scan_init(&scan_init);
	bt_scan_cb_register(&scan_cb);
	//static uint8_t cname[] = "CriticAlert";
	err = bt_scan_filter_add(BT_SCAN_FILTER_TYPE_UUID, BT_UUID_NUS_SERVICE);
	//err = bt_scan_filter_add(BT_SCAN_FILTER_TYPE_NAME,*cname);
	if (err) {
		LOG_ERR("Scanning filters cannot be set (err %d)", err);
		return err;
	}

	err = bt_scan_filter_enable(BT_SCAN_UUID_FILTER, false);
	//err = bt_scan_filter_enable(BT_SCAN_NAME_FILTER, false);
	if (err) {
		LOG_ERR("Filters cannot be turned on (err %d)", err);
		return err;
	}

	LOG_INF("Scan module initialized");
	return err;
}


static void auth_cancel(struct bt_conn *conn)
{
	char addr[BT_ADDR_LE_STR_LEN];

	bt_addr_le_to_str(bt_conn_get_dst(conn), addr, sizeof(addr));

	LOG_INF("Pairing cancelled: %s", log_strdup(addr));
}


static void pairing_complete(struct bt_conn *conn, bool bonded)
{
	char addr[BT_ADDR_LE_STR_LEN];

	bt_addr_le_to_str(bt_conn_get_dst(conn), addr, sizeof(addr));

	LOG_INF("Pairing completed: %s, bonded: %d", log_strdup(addr),
		bonded);
}


static void pairing_failed(struct bt_conn *conn, enum bt_security_err reason)
{
	char addr[BT_ADDR_LE_STR_LEN];

	bt_addr_le_to_str(bt_conn_get_dst(conn), addr, sizeof(addr));

	LOG_WRN("Pairing failed conn: %s, reason %d", log_strdup(addr),
		reason);
}

static struct bt_conn_auth_cb conn_auth_callbacks = {
	.cancel = auth_cancel,
};

static struct bt_conn_auth_info_cb conn_auth_info_callbacks = {
	.pairing_complete = pairing_complete,
	.pairing_failed = pairing_failed
};

void main(void)
{
	int err;

	err = bt_conn_auth_cb_register(&conn_auth_callbacks);
	if (err) {
		LOG_ERR("Failed to register authorization callbacks.");
		return;
	}

	err = bt_conn_auth_info_cb_register(&conn_auth_info_callbacks);
	if (err) {
		printk("Failed to register authorization info callbacks.\n");
		return;
	}

	err = bt_enable(NULL);
	if (err) {
		LOG_ERR("Bluetooth init failed (err %d)", err);
		return;
	}
	LOG_INF("Bluetooth initialized");

	if (IS_ENABLED(CONFIG_SETTINGS)) {
		settings_load();
	}

	int (*module_init[])(void) = {uart_init, scan_init, nus_client_init};
	for (size_t i = 0; i < ARRAY_SIZE(module_init); i++) {
		err = (*module_init[i])();
		if (err) {
			return;
		}
	}

	printk("Starting Bluetooth Central UART example\n");


	err = bt_scan_start(BT_SCAN_TYPE_SCAN_ACTIVE);
	if (err) {
		LOG_ERR("Scanning failed to start (err %d)", err);
		return;
	}

	LOG_INF("Scanning successfully started");


	for (;;) {
		/* Wait indefinitely for data to be sent over Bluetooth */
		
		struct uart_data_t *nusbuf = k_fifo_get(&fifo_uart_rx_data,
						     K_FOREVER);
		
		err = bt_nus_client_send(&nus_client, nusbuf->data, nusbuf->len);
		if (err) {
			LOG_WRN("Failed to send data over BLE connection"
				"(err %d)", err);
		}
		else
		{
			LOG_INF("Sent data over BLE from nrf52: %d:%s", nusbuf->len,nusbuf->data);
		}

		err = k_sem_take(&nus_write_sem, NUS_WRITE_TIMEOUT);
		if (err) {
			LOG_WRN("NUS send timeout");
		}
	
		k_msleep(5);
	}
}

Parents
  • Hei Rune,

    The ble_data_received() callback should be invoked each time you receive a BLE notification packet from the peripheral regardless of what the packet size is. How do you determine that the last 15-20 byte message is not received, are you looking at the messages relayed to the uart interface, or at the debug log messages on RTT (those printed with the LOG_* macros)?

    Best regards,

    Vidar

  • Hi Vidar,

    I am Looking at the Log msg on the rtt. the peripheral reveives a msg on bt_nus from central unit and passes it thrue to the uart. the reply from uart is then sent to central uart thrue bt_nus. ( standard uart bridge ).
    I can see on the rtt that the peripheral unit is sending and receiving good. on the central unit the ble_data_received() trigger when buffer is full(40 byte) and the data contet is 2 or 3 mesgs.
    This is not constant, suddenly it can work as expected and trigger on one msg and then go backto trigger on buffer full.

    Br

    Rune

  • Hi Vidar,

    I just do the same as you, can it be that peripheraql_uart does not handles sending and receiving simultaneously, can you modify your central uart to loop bt_nus_client_send with "abcdefghij" and with an delay of 1200ms?

    br

    Rune

  • Hi Rune, 

    I repeated the test as you suggested by having another instance of my test script connected to the central, but it still did not fail. This is as expected as the write commands should not interfere with the notifications. 

    What SDK version are your projects based on? If you are on v.2.1.0/1/2 you should consider upgrading to the 2.1.3 tag as this release includes some critical bug fixes for the UART driver. 

    I have been testing with SDK v.2.2.0 here.

    Another thing I would suggest you try is to monitor the buf->len value passed to the bt_nus_send() call on your peripheral to check if it always matches the expected message length. 

  • Hi Vidar,

    I am not sure what you mean with another instance of your test script. My suggestion was to add an new thread in the Central_uart example that Loop with an delay of 1200ms and send the string “abcdefghij” over Bluetooth NUS to the pheroperal_uart device, and the “abcdefghij” string is different than the receive string . This to force an send and receive at the same time, As my problem is with the Bluetooth communication not the uart. My hunch is that the send command influence on the receive buffer.

    br

    Rune

  • Hi Rune,

    I ran a second instance of my script to relay UART data to the peripheral via the central while the central was receiving the same dummy data from the peripheral. Anyway. The problem from what you have described is that the peripheral sometimes sends notification packets that are larger than expected. The size of these packets is defined by the 'len' argument passed to bt_nus_send() on your peripheral. So, the question is why 'len' intermittently ends up being set to 40.

    As my problem is with the Bluetooth communication not the uart. My hunch is that the send command influence on the receive buffer.

    The problem is that the UART fills the FIFO with elements containing multiple messages instead of one. 

  • Hi Vidar,

    I monitor the pheriperal_uart data and len before ble_send and it always has a len less than 15. While I monitor on the central_uart ble receive  data = msg1,msg2.. and len =40. However I am only able to monitor one at the time not both simultaneously.  I will move to sdk 2.2.0 on both sides and see if it solves the problem.

    I use the Central_uart example on Thingy91_nrf52840 and tried to built it with sdk 2.2.0 and board Thingy91_nrf52840. It wont build, it gives me the error:

    In file included from C:\Users\ruve\ncs\v2.2.0\zephyr\include\zephyr\toolchain\gcc.h:88,

                     from C:\Users\ruve\ncs\v2.2.0\zephyr\include\zephyr\toolchain.h:50,

                     from C:\Users\ruve\ncs\v2.2.0\zephyr\include\zephyr\sys\errno_private.h:10,

                     from C:\Users\ruve\ncs\v2.2.0\zephyr\lib\libc\minimal\include\errno.h:32,

                     from C:\Users\ruve\ncs\v2.2.0\zephyr\drivers\bluetooth\hci\h4.c:9:

    C:\Users\ruve\ncs\v2.2.0\zephyr\include\zephyr\device.h:83:41: error: '__device_dts_ord_DT_CHOSEN_zephyr_bt_uart_ORD' undeclared here (not in a function)

       83 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)

          |                                         ^~~~~~~~~

    C:\Users\ruve\ncs\v2.2.0\zephyr\include\zephyr\device.h:209:37: note: in expansion of macro 'DEVICE_NAME_GET'

      209 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id))

          |                                     ^~~~~~~~~~~~~~~

    C:\Users\ruve\ncs\v2.2.0\zephyr\include\zephyr\device.h:226:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'

      226 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))

          |                                  ^~~~~~~~~~~~~~~~~~

    C:\Users\ruve\ncs\v2.2.0\zephyr\drivers\bluetooth\hci\h4.c:73:44: note: in expansion of macro 'DEVICE_DT_GET'

       73 | static const struct device *const h4_dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_bt_uart));

          |                                            ^~~~~~~~~~~~~

    [38/60] Building C object zephyr/kernel/CMakeFiles/kernel.dir/sched.c.obj

    ninja: build stopped: subcommand failed.

     

    Please advice

    Br

    Rune

Reply
  • Hi Vidar,

    I monitor the pheriperal_uart data and len before ble_send and it always has a len less than 15. While I monitor on the central_uart ble receive  data = msg1,msg2.. and len =40. However I am only able to monitor one at the time not both simultaneously.  I will move to sdk 2.2.0 on both sides and see if it solves the problem.

    I use the Central_uart example on Thingy91_nrf52840 and tried to built it with sdk 2.2.0 and board Thingy91_nrf52840. It wont build, it gives me the error:

    In file included from C:\Users\ruve\ncs\v2.2.0\zephyr\include\zephyr\toolchain\gcc.h:88,

                     from C:\Users\ruve\ncs\v2.2.0\zephyr\include\zephyr\toolchain.h:50,

                     from C:\Users\ruve\ncs\v2.2.0\zephyr\include\zephyr\sys\errno_private.h:10,

                     from C:\Users\ruve\ncs\v2.2.0\zephyr\lib\libc\minimal\include\errno.h:32,

                     from C:\Users\ruve\ncs\v2.2.0\zephyr\drivers\bluetooth\hci\h4.c:9:

    C:\Users\ruve\ncs\v2.2.0\zephyr\include\zephyr\device.h:83:41: error: '__device_dts_ord_DT_CHOSEN_zephyr_bt_uart_ORD' undeclared here (not in a function)

       83 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)

          |                                         ^~~~~~~~~

    C:\Users\ruve\ncs\v2.2.0\zephyr\include\zephyr\device.h:209:37: note: in expansion of macro 'DEVICE_NAME_GET'

      209 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id))

          |                                     ^~~~~~~~~~~~~~~

    C:\Users\ruve\ncs\v2.2.0\zephyr\include\zephyr\device.h:226:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'

      226 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))

          |                                  ^~~~~~~~~~~~~~~~~~

    C:\Users\ruve\ncs\v2.2.0\zephyr\drivers\bluetooth\hci\h4.c:73:44: note: in expansion of macro 'DEVICE_DT_GET'

       73 | static const struct device *const h4_dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_bt_uart));

          |                                            ^~~~~~~~~~~~~

    [38/60] Building C object zephyr/kernel/CMakeFiles/kernel.dir/sched.c.obj

    ninja: build stopped: subcommand failed.

     

    Please advice

    Br

    Rune

Children
  • Hi Rune,

    I monitor the pheriperal_uart data and len before ble_send and it always has a len less than 15. While I monitor on the central_uart ble receive  data = msg1,msg2.. and len =40. However I am only able to monitor one at the time not both simultaneously.

    You could consider adding an assert to trigger a fault when len == 40 when you don't have logging on the peripheral. The fault handler will trigger a system reset which will show up as a disconnect on the central. 

    I use the Central_uart example on Thingy91_nrf52840 and tried to built it with sdk 2.2.0 and board Thingy91_nrf52840. It wont build, it gives me the error:

    Did you try the central_uart sample included in this SDK? I do not think it makes sense to port the sample from an older SDK unless you have made significant changes to the original implementation.

    Best regards,

    Vidar

  • Yes i used the Central_uart example included in the sdk.

    Br

    Rune

  • Thanks for confirming. So, the reason the build fails is that the Bluetooth controller does not get enabled by default like it does for the supported boards. You can enable the controller by adding CONFIG_BT_CTLR=y to your prj.conf file.

    Here are the boards we are testing with the peripheral_uart sample:

    And here is the default config for the 'nrf52840dk_nrf52840' board for comparison:

    Best regards,

    Vidar

  • Hi Vidar,

    I have moved to sdk 2.2.0 on central and peripheral_uart.

    It looks now that my problem is in the peripheral_uart example and in uart cb.

    To make this example to work I had to modify the line:

    #define UART_WAIT_FOR_RX CONFIG_BT_NUS_UART_RX_WAIT_TIME

    To

    #define UART_WAIT_FOR_RX  50000 //CONFIG_BT_NUS_UART_RX_WAIT_TIME

    As I read in one other thread that the value should be in uS. Not in mS?

    This makes it run ok for 10- 15 min before it start to trigger on uart when buffer is full (40bytes)

    See in the end of the enclosed log.

     

    Br

    Rune

    /���ȁķ���V+�xG��
    
    [00:03:15.955,017] <inf> peripheral_uart: bt_send:17:ppg,0.0,0.0,0.0
    ART service example
    
    [00:03:21.813,903] <inf> peripheral_uart: bt_data_received: 13:MES,0,10000
    �
    [00:03:21.814,117] <inf> peripheral_uart: TX_DATA:13,MES,0,10000
    .0
    ART service example
    
    [00:03:22.181,701] <inf> peripheral_uart: bt_send:14:mes,00,34.83
    0
    /���ȁķ���V+�xG��
    [00:03:26.862,640] <inf> peripheral_uart: bt_data_received: 12:MES,1,2000
    
    �
    [00:03:26.862,884] <inf> peripheral_uart: TX_DATA:12,MES,1,2000
    
    0
    /���ȁķ���V+�xG��
    
    [00:03:27.207,244] <inf> peripheral_uart: bt_send:14:mes,01,22.51
    0
    ART service example
    
    [00:03:31.911,407] <inf> peripheral_uart: bt_data_received: 11:PPG,2,200
    
    
    �
    [00:03:31.911,621] <inf> peripheral_uart: TX_DATA:11,PPG,2,200
    1
    0
    ART service example
    
    [00:03:36.126,556] <inf> peripheral_uart: bt_send:17:ppg,0.0,0.0,0.0
    /���ȁķ���V+�xG��
    [00:03:41.958,953] <inf> peripheral_uart: bt_data_received: 13:MES,0,10000
    �
    [00:03:41.959,167] <inf> peripheral_uart: TX_DATA:13,MES,0,10000
    .0
    /���ȁķ���V+�xG��
    [00:03:42.343,261] <inf> peripheral_uart: bt_send:14:mes,00,34.83
    0
    ART service example
    
    [00:03:47.007,690] <inf> peripheral_uart: bt_data_received: 12:MES,1,2000
    
    �
    [00:03:47.007,965] <inf> peripheral_uart: TX_DATA:12,MES,1,2000
    
    0
    ART service example
    
    [00:03:47.368,804] <inf> peripheral_uart: bt_send:14:mes,01,22.54
    0
    /���ȁķ���V+�xG��
    [00:03:52.056,457] <inf> peripheral_uart: bt_data_received: 11:PPG,2,200
    
    
    �
    [00:03:52.056,671] <inf> peripheral_uart: TX_DATA:11,PPG,2,200
    4
    0
    /���ȁķ���V+�xG��
    
    [00:03:56.348,205] <inf> peripheral_uart: bt_send:17:ppg,0.0,0.0,0.0
    ART service example
    
    [00:04:02.104,064] <inf> peripheral_uart: bt_data_received: 13:MES,0,10000
    �
    [00:04:02.104,278] <inf> peripheral_uart: TX_DATA:13,MES,0,10000
    .0
    ART service example
    
    [00:04:02.464,813] <inf> peripheral_uart: bt_send:14:mes,00,34.85
    0
    /���ȁķ���V+�xG��
    [00:04:07.152,740] <inf> peripheral_uart: bt_data_received: 12:MES,1,2000
    
    �
    [00:04:07.152,954] <inf> peripheral_uart: TX_DATA:12,MES,1,2000
    
    0
    /���ȁķ���V+�xG��
    
    [00:04:07.490,356] <inf> peripheral_uart: bt_send:14:mes,01,22.52
    0
    ART service example
    
    [00:04:12.201,507] <inf> peripheral_uart: bt_data_received: 11:PPG,2,200
    
    
    �
    [00:04:12.201,721] <inf> peripheral_uart: TX_DATA:11,PPG,2,200
    2
    0
    ART service example
    
    [00:04:16.509,765] <inf> peripheral_uart: bt_send:17:ppg,0.0,0.0,0.0
    /���ȁķ���V+�xG��
    [00:04:22.249,053] <inf> peripheral_uart: bt_data_received: 13:MES,0,10000
    �
    [00:04:22.249,267] <inf> peripheral_uart: TX_DATA:13,MES,0,10000
    .0
    /���ȁķ���V+�xG��
    [00:04:22.626,373] <inf> peripheral_uart: bt_send:14:mes,00,34.85
    0
    ART service example
    
    [00:04:27.297,790] <inf> peripheral_uart: bt_data_received: 12:MES,1,2000
    
    �
    [00:04:27.298,004] <inf> peripheral_uart: TX_DATA:12,MES,1,2000
    
    0
    ART service example
    
    [00:04:27.651,916] <inf> peripheral_uart: bt_send:14:mes,01,22.58
    0
    /���ȁķ���V+�xG��
    [00:04:32.346,618] <inf> peripheral_uart: bt_data_received: 11:PPG,2,200
    
    
    �
    [00:04:32.346,832] <inf> peripheral_uart: TX_DATA:11,PPG,2,200
    8
    0
    /���ȁķ���V+�xG��
    
    [00:04:36.711,395] <inf> peripheral_uart: bt_send:17:ppg,0.0,0.0,0.0
    ART service example
    
    [00:04:42.394,104] <inf> peripheral_uart: bt_data_received: 13:MES,0,10000
    �
    [00:04:42.394,317] <inf> peripheral_uart: TX_DATA:13,MES,0,10000
    .0
    ART service example
    
    [00:04:42.737,915] <inf> peripheral_uart: bt_send:14:mes,00,34.87
    0
    /���ȁķ���V+�xG��
    [00:04:47.442,901] <inf> peripheral_uart: bt_data_received: 12:MES,1,2000
    
    �
    [00:04:47.443,115] <inf> peripheral_uart: TX_DATA:12,MES,1,2000
    
    0
    /���ȁķ���V+�xG��
    
    [00:04:47.753,448] <inf> peripheral_uart: bt_send:14:mes,01,22.56
    0
    ART service example
    
    [00:04:52.491,607] <inf> peripheral_uart: bt_data_received: 11:PPG,2,200
    
    
    �
    [00:04:52.491,821] <inf> peripheral_uart: TX_DATA:11,PPG,2,200
    6
    0
    ART service example
    
    [00:04:56.632,751] <inf> peripheral_uart: bt_send:17:ppg,0.0,0.0,0.0
    /���ȁķ���V+�xG��
    [00:05:02.489,166] <inf> peripheral_uart: bt_data_received: 13:MES,0,10000
    �
    [00:05:02.489,379] <inf> peripheral_uart: TX_DATA:13,MES,0,10000
    .0
    /���ȁķ���V+�xG��
    [00:05:02.859,466] <inf> peripheral_uart: bt_send:14:mes,00,34.85
    0
    ART service example
    
    [00:05:07.537,902] <inf> peripheral_uart: bt_data_received: 12:MES,1,2000
    
    �
    [00:05:07.538,116] <inf> peripheral_uart: TX_DATA:12,MES,1,2000
    
    0
    ART service example
    
    [00:05:07.885,009] <inf> peripheral_uart: bt_send:14:mes,01,22.57
    0
    /���ȁķ���V+�xG��
    [00:05:12.586,669] <inf> peripheral_uart: bt_data_received: 11:PPG,2,200
    
    
    �
    [00:05:12.586,883] <inf> peripheral_uart: TX_DATA:11,PPG,2,200
    7
    0
    /���ȁķ���V+�xG��
    
    [00:05:16.824,371] <inf> peripheral_uart: bt_send:17:ppg,0.0,0.0,0.0
    ART service example
    
    [00:05:22.634,216] <inf> peripheral_uart: bt_data_received: 13:MES,0,10000
    �
    [00:05:22.634,429] <inf> peripheral_uart: TX_DATA:13,MES,0,10000
    .0
    ART service example
    
    [00:05:22.940,979] <inf> peripheral_uart: bt_send:14:mes,00,34.87
    0
    /���ȁķ���V+�xG��
    [00:05:27.682,952] <inf> peripheral_uart: bt_data_received: 12:MES,1,2000
    
    �
    [00:05:27.683,166] <inf> peripheral_uart: TX_DATA:12,MES,1,2000
    
    0
    /���ȁķ���V+�xG��
    
    [00:05:28.066,619] <inf> peripheral_uart: bt_send:14:mes,01,22.56
    0
    ART service example
    
    [00:05:32.731,719] <inf> peripheral_uart: bt_data_received: 11:PPG,2,200
    
    
    �
    [00:05:32.731,933] <inf> peripheral_uart: TX_DATA:11,PPG,2,200
    6
    0
    ART service example
    
    [00:05:37.036,010] <inf> peripheral_uart: bt_send:17:ppg,0.0,0.0,0.0
    /���ȁķ���V+�xG��
    [00:05:42.779,266] <inf> peripheral_uart: bt_data_received: 13:MES,0,10000
    �
    [00:05:42.779,479] <inf> peripheral_uart: TX_DATA:13,MES,0,10000
    .0
    /���ȁķ���V+�xG��
    [00:05:43.152,618] <inf> peripheral_uart: bt_send:14:mes,00,34.87
    0
    ART service example
    
    [00:05:47.828,002] <inf> peripheral_uart: bt_data_received: 12:MES,1,2000
    
    �
    [00:05:47.828,216] <inf> peripheral_uart: TX_DATA:12,MES,1,2000
    
    0
    ART service example
    
    [00:05:48.178,161] <inf> peripheral_uart: bt_send:14:mes,01,22.55
    0
    /���ȁķ���V+�xG��
    [00:05:52.876,770] <inf> peripheral_uart: bt_data_received: 11:PPG,2,200
    
    
    �
    [00:05:52.876,983] <inf> peripheral_uart: TX_DATA:11,PPG,2,200
    5
    0
    /���ȁķ���V+�xG��
    
    [00:05:57.197,601] <inf> peripheral_uart: bt_send:17:ppg,0.0,0.0,0.0
    ART service example
    
    [00:06:02.924,316] <inf> peripheral_uart: bt_data_received: 13:MES,0,10000
    �
    [00:06:02.924,530] <inf> peripheral_uart: TX_DATA:13,MES,0,10000
    .0
    ART service example
    
    [00:06:03.224,182] <inf> peripheral_uart: bt_send:14:mes,00,34.85
    0
    /���ȁķ���V+�xG��
    [00:06:07.973,052] <inf> peripheral_uart: bt_data_received: 12:MES,1,2000
    
    �
    [00:06:07.973,266] <inf> peripheral_uart: TX_DATA:12,MES,1,2000
    
    0
    /���ȁķ���V+�xG��
    
    [00:06:08.339,813] <inf> peripheral_uart: bt_send:14:mes,01,22.58
    0
    ART service example
    
    [00:06:13.021,820] <inf> peripheral_uart: bt_data_received: 11:PPG,2,200
    
    
    �
    [00:06:13.022,033] <inf> peripheral_uart: TX_DATA:11,PPG,2,200
    8
    0
    ART service example
    
    [00:06:17.389,282] <inf> peripheral_uart: bt_send:17:ppg,0.0,0.0,0.0
    /���ȁķ���V+�xG��
    [00:06:23.069,366] <inf> peripheral_uart: bt_data_received: 13:MES,0,10000
    �
    [00:06:23.069,580] <inf> peripheral_uart: TX_DATA:13,MES,0,10000
    .0
    /���ȁķ���V+�xG��
    [00:06:23.415,802] <inf> peripheral_uart: bt_send:14:mes,00,34.87
    0
    ART service example
    
    [00:06:28.118,103] <inf> peripheral_uart: bt_data_received: 12:MES,1,2000
    
    �
    [00:06:28.118,347] <inf> peripheral_uart: TX_DATA:12,MES,1,2000
    
    0
    ART service example
    
    [00:06:28.441,345] <inf> peripheral_uart: bt_send:14:mes,01,22.58
    0
    /���ȁķ���V+�xG��
    [00:06:33.166,870] <inf> peripheral_uart: bt_data_received: 11:PPG,2,200
    
    
    �
    [00:06:33.167,083] <inf> peripheral_uart: TX_DATA:11,PPG,2,200
    8
    0
    /���ȁķ���V+�xG��
    
    [00:06:37.340,698] <inf> peripheral_uart: bt_send:17:ppg,0.0,0.0,0.0
    ART service example
    
    [00:06:53.212,005] <inf> peripheral_uart: bt_data_received: 19:MES,0,10000
    MES,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:06:53.212,219] <inf> peripheral_uart: TX_DATA:19,MES,0,10000
    MES,1,T service example
    
    [00:06:53.312,042] <inf> peripheral_uart: bt_data_received: 4:L�0,10000
    MES,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:06:53.312,255] <inf> peripheral_uart: TX_DATA:4,L�0,10000
    MES,1,T service example
    
    [00:07:03.259,490] <inf> peripheral_uart: bt_data_received: 11:PPG,2,200
    
    MES,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:07:03.259,704] <inf> peripheral_uart: TX_DATA:11,PPG,2,200
    
    MES,1,T service example
    
    [00:07:03.626,983] <inf> peripheral_uart: bt_send:14:mes,00,34.87
    0
    /���ȁķ���V+�xG��
    [00:07:13.307,037] <inf> peripheral_uart: bt_data_received: 13:MES,0,10000
    MES,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:07:13.307,250] <inf> peripheral_uart: TX_DATA:13,MES,0,10000
    
    0
    /���ȁķ���V+�xG��
    [00:07:13.637,390] <inf> peripheral_uart: bt_send:14:mes,00,34.87
    ES,1,T service example
    
    [00:07:18.355,773] <inf> peripheral_uart: bt_data_received: 12:MES,1,2000
    
    MES,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:07:18.355,987] <inf> peripheral_uart: TX_DATA:12,MES,1,2000
    
    ES,1,T service example
    
    [00:07:18.662,933] <inf> peripheral_uart: bt_send:14:mes,01,22.60
    0
    /���ȁķ���V+�xG��
    [00:07:23.404,541] <inf> peripheral_uart: bt_data_received: 11:PPG,2,200
    
    
    MES,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:07:23.404,754] <inf> peripheral_uart: TX_DATA:11,PPG,2,200
    0
    0
    /���ȁķ���V+�xG��
    
    [00:07:27.682,373] <inf> peripheral_uart: bt_send:17:ppg,0.0,0.0,0.0
    1,T service example
    
    [00:07:33.452,087] <inf> peripheral_uart: bt_data_received: 13:MES,0,10000
    MES,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:07:33.452,301] <inf> peripheral_uart: TX_DATA:13,MES,0,10000
    .0
    1,T service example
    
    [00:07:33.808,990] <inf> peripheral_uart: bt_send:14:mes,00,34.87
    0
    /���ȁķ���V+�xG��
    [00:07:38.500,823] <inf> peripheral_uart: bt_data_received: 12:MES,1,2000
    
    MES,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:07:38.501,068] <inf> peripheral_uart: TX_DATA:12,MES,1,2000
    
    0
    /���ȁķ���V+�xG��
    
    [00:07:38.834,533] <inf> peripheral_uart: bt_send:14:mes,01,22.57
    0
    1,T service example
    
    [00:07:43.549,652] <inf> peripheral_uart: bt_data_received: 11:PPG,2,200
    
    
    MES,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:07:43.549,865] <inf> peripheral_uart: TX_DATA:11,PPG,2,200
    7
    0
    1,T service example
    
    [00:07:47.863,983] <inf> peripheral_uart: bt_send:17:ppg,0.0,0.0,0.0
    /���ȁķ���V+�xG��
    [00:07:53.597,137] <inf> peripheral_uart: bt_data_received: 13:MES,0,10000
    MES,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:07:53.597,351] <inf> peripheral_uart: TX_DATA:13,MES,0,10000
    .0
    /���ȁķ���V+�xG��
    [00:07:53.980,590] <inf> peripheral_uart: bt_send:14:mes,00,34.87
    0
    1,T service example
    
    [00:07:58.645,904] <inf> peripheral_uart: bt_data_received: 12:MES,1,2000
    
    MES,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:07:58.646,118] <inf> peripheral_uart: TX_DATA:12,MES,1,2000
    
    0
    1,T service example
    
    [00:07:59.006,134] <inf> peripheral_uart: bt_send:14:mes,01,22.60
    0
    /���ȁķ���V+�xG��
    [00:08:03.694,641] <inf> peripheral_uart: bt_data_received: 11:PPG,2,200
    
    
    MES,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:08:03.694,854] <inf> peripheral_uart: TX_DATA:11,PPG,2,200
    0
    0
    /���ȁķ���V+�xG��
    
    [00:08:08.035,583] <inf> peripheral_uart: bt_send:17:ppg,0.0,0.0,0.0
    1,T service example
    
    [00:08:13.742,187] <inf> peripheral_uart: bt_data_received: 13:MES,0,10000
    MES,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:08:13.742,401] <inf> peripheral_uart: TX_DATA:13,MES,0,10000
    .0
    1,T service example
    
    [00:08:14.052,062] <inf> peripheral_uart: bt_send:14:mes,00,34.87
    0
    /���ȁķ���V+�xG��
    [00:08:18.790,924] <inf> peripheral_uart: bt_data_received: 12:MES,1,2000
    
    MES,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:08:18.791,168] <inf> peripheral_uart: TX_DATA:12,MES,1,2000
    
    0
    /���ȁķ���V+�xG��
    
    [00:08:19.177,703] <inf> peripheral_uart: bt_send:14:mes,01,22.56
    0
    1,T service example
    
    [00:08:23.839,691] <inf> peripheral_uart: bt_data_received: 11:PPG,2,200
    
    
    MES,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:08:23.839,904] <inf> peripheral_uart: TX_DATA:11,PPG,2,200
    6
    0
    1,T service example
    
    [00:08:28.207,153] <inf> peripheral_uart: bt_send:17:ppg,0.0,0.0,0.0
    /���ȁķ���V+�xG��
    [00:08:33.887,237] <inf> peripheral_uart: bt_data_received: 13:MES,0,10000
    MES,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:08:33.887,451] <inf> peripheral_uart: TX_DATA:13,MES,0,10000
    .0
    /���ȁķ���V+�xG��
    [00:08:34.223,663] <inf> peripheral_uart: bt_send:14:mes,00,34.87
    0
    1,T service example
    
    [00:08:38.936,004] <inf> peripheral_uart: bt_data_received: 12:MES,1,2000
    
    MES,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:08:38.936,218] <inf> peripheral_uart: TX_DATA:12,MES,1,2000
    
    0
    1,T service example
    
    [00:08:39.249,206] <inf> peripheral_uart: bt_send:14:mes,01,22.58
    0
    /���ȁķ���V+�xG��
    [00:08:58.981,079] <inf> peripheral_uart: bt_data_received: 18:PPG,2,200
    MES,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����    ������
    [00:08:58.981,323] <inf> peripheral_uart: TX_DATA:18,PPG,2,200
    MES,0,1���ȁķ���V+�xG��
    [00:08:59.081,146] <inf> peripheral_uart: bt_data_received: 3:�
    ,2,200
    MES,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����    ������
    [00:08:59.081,359] <inf> peripheral_uart: TX_DATA:3,�
    ,2,200
    MES,0,1���ȁķ���V+�xG��
    [00:09:03.403,411] <inf> peripheral_uart: bt_send:17:ppg,0.0,0.0,0.0
    1,T service example
    
    [00:09:04.029,815] <inf> peripheral_uart: bt_data_received: 12:MES,1,2000
    ES,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����     ������
    [00:09:04.030,029] <inf> peripheral_uart: TX_DATA:12,MES,1,2000
    0.0
    1,T service example
    
    [00:09:04.334,960] <inf> peripheral_uart: bt_send:14:mes,01,22.62
    ,0,1���ȁķ���V+�xG��
    [00:09:09.078,582] <inf> peripheral_uart: bt_data_received: 11:PPG,2,200
    
    ES,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����     ������
    [00:09:09.078,796] <inf> peripheral_uart: TX_DATA:11,PPG,2,200
    2
    ,0,1���ȁķ���V+�xG��
    
    [00:09:13.364,410] <inf> peripheral_uart: bt_send:17:ppg,0.0,0.0,0.0
    1,T service example
    
    [00:09:19.126,129] <inf> peripheral_uart: bt_data_received: 13:MES,0,10000
    S,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:09:19.126,342] <inf> peripheral_uart: TX_DATA:13,MES,0,10000
    .0
    1,T service example
    
    [00:09:19.491,027] <inf> peripheral_uart: bt_send:14:mes,00,34.87
    ,0,1���ȁķ���V+�xG��
    [00:09:24.174,865] <inf> peripheral_uart: bt_data_received: 12:MES,1,2000
    
    S,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:09:24.175,079] <inf> peripheral_uart: TX_DATA:12,MES,1,2000
    
    ,0,1���ȁķ���V+�xG��
    
    [00:09:24.516,571] <inf> peripheral_uart: bt_send:14:mes,01,22.58
    0
    1,T service example
    
    [00:09:29.223,632] <inf> peripheral_uart: bt_data_received: 11:PPG,2,200
    
    
    S,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:09:29.223,846] <inf> peripheral_uart: TX_DATA:11,PPG,2,200
    8
    0
    1,T service example
    
    [00:09:33.545,989] <inf> peripheral_uart: bt_send:17:ppg,0.0,0.0,0.0
    1���ȁķ���V+�xG��
    [00:09:39.271,179] <inf> peripheral_uart: bt_data_received: 13:MES,0,10000
    S,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:09:39.271,392] <inf> peripheral_uart: TX_DATA:13,MES,0,10000
    .0
    1���ȁķ���V+�xG��
    [00:09:39.562,500] <inf> peripheral_uart: bt_send:14:mes,00,34.89
    0
    1,T service example
    
    [00:09:44.319,915] <inf> peripheral_uart: bt_data_received: 12:MES,1,2000
    
    S,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:09:44.320,159] <inf> peripheral_uart: TX_DATA:12,MES,1,2000
    
    0
    1,T service example
    
    [00:09:44.688,140] <inf> peripheral_uart: bt_send:14:mes,01,22.62
    0
    1���ȁķ���V+�xG��
    [00:09:49.368,682] <inf> peripheral_uart: bt_data_received: 11:PPG,2,200
    
    
    S,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:09:49.368,896] <inf> peripheral_uart: TX_DATA:11,PPG,2,200
    2
    0
    1���ȁķ���V+�xG��
    
    [00:09:53.707,580] <inf> peripheral_uart: bt_send:17:ppg,0.0,0.0,0.0
    1,T service example
    
    [00:09:59.416,229] <inf> peripheral_uart: bt_data_received: 13:MES,0,10000
    S,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:09:59.416,442] <inf> peripheral_uart: TX_DATA:13,MES,0,10000
    .0
    1,T service example
    
    [00:09:59.734,100] <inf> peripheral_uart: bt_send:14:mes,00,34.89
    0
    1���ȁķ���V+�xG��
    [00:10:04.464,965] <inf> peripheral_uart: bt_data_received: 12:MES,1,2000
    
    S,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:10:04.465,179] <inf> peripheral_uart: TX_DATA:12,MES,1,2000
    
    0
    1���ȁķ���V+�xG��
    
    [00:10:04.759,643] <inf> peripheral_uart: bt_send:14:mes,01,22.56
    0
    1,T service example
    
    [00:10:09.513,732] <inf> peripheral_uart: bt_data_received: 11:PPG,2,200
    
    
    S,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:10:09.513,946] <inf> peripheral_uart: TX_DATA:11,PPG,2,200
    6
    0
    1,T service example
    
    [00:10:13.919,189] <inf> peripheral_uart: bt_send:17:ppg,0.0,0.0,0.0
    1���ȁķ���V+�xG��
    [00:10:19.561,279] <inf> peripheral_uart: bt_data_received: 13:MES,0,10000
    S,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:10:19.561,492] <inf> peripheral_uart: TX_DATA:13,MES,0,10000
    .0
    1���ȁķ���V+�xG��
    [00:10:19.945,709] <inf> peripheral_uart: bt_send:14:mes,00,34.89
    0
    1,T service example
    
    [00:10:24.610,015] <inf> peripheral_uart: bt_data_received: 12:MES,1,2000
    
    S,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:10:24.610,290] <inf> peripheral_uart: TX_DATA:12,MES,1,2000
    
    0
    1,T service example
    
    [00:10:24.971,252] <inf> peripheral_uart: bt_send:14:mes,01,22.56
    0
    1���ȁķ���V+�xG��
    [00:10:29.658,782] <inf> peripheral_uart: bt_data_received: 11:PPG,2,200
    
    
    S,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:10:29.658,996] <inf> peripheral_uart: TX_DATA:11,PPG,2,200
    6
    0
    1���ȁķ���V+�xG��
    
    [00:10:33.860,565] <inf> peripheral_uart: bt_send:17:ppg,0.0,0.0,0.0
    1,T service example
    
    [00:10:39.706,390] <inf> peripheral_uart: bt_data_received: 13:MES,0,10000
    S,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:10:39.706,604] <inf> peripheral_uart: TX_DATA:13,MES,0,10000
    .0
    1,T service example
    
    [00:10:40.077,270] <inf> peripheral_uart: bt_send:14:mes,00,34.89
    0
    1���ȁķ���V+�xG��
    [00:10:44.755,065] <inf> peripheral_uart: bt_data_received: 12:MES,1,2000
    
    S,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:10:44.755,310] <inf> peripheral_uart: TX_DATA:12,MES,1,2000
    
    0
    1���ȁķ���V+�xG��
    
    [00:10:45.102,813] <inf> peripheral_uart: bt_send:14:mes,01,22.64
    0
    1,T service example
    
    [00:10:49.753,845] <inf> peripheral_uart: bt_data_received: 11:PPG,2,200
    
    
    S,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:10:49.754,058] <inf> peripheral_uart: TX_DATA:11,PPG,2,200
    4
    0
    1,T service example
    
    [00:10:54.052,276] <inf> peripheral_uart: bt_send:17:ppg,0.0,0.0,0.0
    1���ȁķ���V+�xG��
    [00:10:59.801,391] <inf> peripheral_uart: bt_data_received: 13:MES,0,10000
    S,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:10:59.801,605] <inf> peripheral_uart: TX_DATA:13,MES,0,10000
    .0
    1���ȁķ���V+�xG��
    [00:11:00.178,833] <inf> peripheral_uart: bt_send:14:mes,00,34.89
    0
    1,T service example
    
    [00:11:04.850,128] <inf> peripheral_uart: bt_data_received: 12:MES,1,2000
    
    S,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:11:04.850,372] <inf> peripheral_uart: TX_DATA:12,MES,1,2000
    
    0
    1,T service example
    
    [00:11:05.204,376] <inf> peripheral_uart: bt_send:14:mes,01,22.64
    0
    1���ȁķ���V+�xG��
    [00:11:09.898,956] <inf> peripheral_uart: bt_data_received: 11:PPG,2,200
    
    
    S,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:11:09.899,169] <inf> peripheral_uart: TX_DATA:11,PPG,2,200
    4
    0
    1���ȁķ���V+�xG��
    
    [00:11:14.233,825] <inf> peripheral_uart: bt_send:17:ppg,0.0,0.0,0.0
    1,T service example
    
    [00:11:19.946,441] <inf> peripheral_uart: bt_data_received: 13:MES,0,10000
    S,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:11:19.946,655] <inf> peripheral_uart: TX_DATA:13,MES,0,10000
    .0
    1,T service example
    
    [00:11:20.260,314] <inf> peripheral_uart: bt_send:14:mes,00,34.91
    0
    1���ȁķ���V+�xG��
    [00:11:24.995,239] <inf> peripheral_uart: bt_data_received: 12:MES,1,2000
    
    S,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:11:24.995,483] <inf> peripheral_uart: TX_DATA:12,MES,1,2000
    
    0
    1���ȁķ���V+�xG��
    
    [00:11:25.385,955] <inf> peripheral_uart: bt_send:14:mes,01,22.62
    0
    1,T service example
    
    [00:11:30.043,945] <inf> peripheral_uart: bt_data_received: 11:PPG,2,200
    
    
    S,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:11:30.044,158] <inf> peripheral_uart: TX_DATA:11,PPG,2,200
    2
    0
    1,T service example
    
    [00:11:34.405,395] <inf> peripheral_uart: bt_send:17:ppg,0.0,0.0,0.0
    1���ȁķ���V+�xG��
    [00:11:40.091,491] <inf> peripheral_uart: bt_data_received: 13:MES,0,10000
    S,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:11:40.091,705] <inf> peripheral_uart: TX_DATA:13,MES,0,10000
    .0
    1���ȁķ���V+�xG��
    [00:11:40.421,905] <inf> peripheral_uart: bt_send:14:mes,00,34.91
    0
    1,T service example
    
    [00:11:45.140,258] <inf> peripheral_uart: bt_data_received: 12:MES,1,2000
    
    S,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:11:45.140,472] <inf> peripheral_uart: TX_DATA:12,MES,1,2000
    
    0
    1,T service example
    
    [00:11:45.447,448] <inf> peripheral_uart: bt_send:14:mes,01,22.60
    0
    1���ȁķ���V+�xG��
    [00:11:50.188,995] <inf> peripheral_uart: bt_data_received: 11:PPG,2,200
    
    
    S,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:11:50.189,208] <inf> peripheral_uart: TX_DATA:11,PPG,2,200
    0
    0
    1���ȁķ���V+�xG��
    
    [00:11:54.576,995] <inf> peripheral_uart: bt_send:17:ppg,0.0,0.0,0.0
    1,T service example
    
    [00:12:00.236,541] <inf> peripheral_uart: bt_data_received: 13:MES,0,10000
    S,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:12:00.236,755] <inf> peripheral_uart: TX_DATA:13,MES,0,10000
    .0
    1,T service example
    
    [00:12:00.603,515] <inf> peripheral_uart: bt_send:14:mes,00,34.91
    0
    1���ȁķ���V+�xG��
    [00:12:05.285,308] <inf> peripheral_uart: bt_data_received: 12:MES,1,2000
    
    S,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:12:05.285,522] <inf> peripheral_uart: TX_DATA:12,MES,1,2000
    
    0
    1���ȁķ���V+�xG��
    
    [00:12:05.629,058] <inf> peripheral_uart: bt_send:14:mes,01,22.64
    0
    1,T service example
    
    [00:12:10.334,106] <inf> peripheral_uart: bt_data_received: 11:PPG,2,200
    
    
    S,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:12:10.334,320] <inf> peripheral_uart: TX_DATA:11,PPG,2,200
    4
    0
    1,T service example
    
    [00:12:14.548,400] <inf> peripheral_uart: bt_send:17:ppg,0.0,0.0,0.0
    1���ȁķ���V+�xG��
    [00:12:20.381,591] <inf> peripheral_uart: bt_data_received: 13:MES,0,10000
    S,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:12:20.381,805] <inf> peripheral_uart: TX_DATA:13,MES,0,10000
    .0
    1���ȁķ���V+�xG��
    [00:12:20.775,115] <inf> peripheral_uart: bt_send:14:mes,00,34.91
    0
    1,T service example
    
    [00:12:25.430,358] <inf> peripheral_uart: bt_data_received: 12:MES,1,2000
    
    S,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:12:25.430,572] <inf> peripheral_uart: TX_DATA:12,MES,1,2000
    
    0
    1,T service example
    
    [00:12:25.800,659] <inf> peripheral_uart: bt_send:14:mes,01,22.60
    0
    1���ȁķ���V+�xG��
    [00:12:45.475,433] <inf> peripheral_uart: bt_data_received: 18:PPG,2,200
    MES,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����    ������
    [00:12:45.475,677] <inf> peripheral_uart: TX_DATA:18,PPG,2,200
    MES,0,1���ȁķ���V+�xG��
    [00:12:45.575,500] <inf> peripheral_uart: bt_data_received: 4:L�2,200
    MES,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����    ������
    [00:12:45.575,714] <inf> peripheral_uart: TX_DATA:4,L�2,200
    MES,0,1���ȁķ���V+�xG��
    [00:12:55.522,949] <inf> peripheral_uart: bt_data_received: 12:MES,1,2000
    ES,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����     ������
    [00:12:55.523,162] <inf> peripheral_uart: TX_DATA:12,MES,1,2000
    ES,0,1���ȁķ���V+�xG��
    
    [00:13:05.570,495] <inf> peripheral_uart: bt_data_received: 11:PPG,2,200
    
    ES,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����     ������
    [00:13:05.570,709] <inf> peripheral_uart: TX_DATA:11,PPG,2,200
    
    ES,0,1���ȁķ���V+�xG��
    
    [00:13:20.616,790] <inf> peripheral_uart: bt_data_received: 13:MES,0,10000
    S,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:13:20.617,004] <inf> peripheral_uart: TX_DATA:13,MES,0,10000
    S,0,1���ȁķ���V+�xG��
    [00:13:20.859,100] <inf> peripheral_uart: bt_send:40:ppg,0.0,0.0,0.0
    ppg,0.0,0.0,0.0
    mes,00(
    [00:13:25.665,557] <inf> peripheral_uart: bt_data_received: 12:MES,1,2000
    
    S,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:13:25.665,771] <inf> peripheral_uart: TX_DATA:12,MES,1,2000
    0.0
    ppg,0.0,0.0,0.0
    mes,00
    
    [00:13:35.713,073] <inf> peripheral_uart: bt_data_received: 11:PPG,2,200
    
    
    S,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:13:35.713,287] <inf> peripheral_uart: TX_DATA:11,PPG,2,200
    
    0.0
    ppg,0.0,0.0,0.0
    mes,00
    
    [00:13:50.759,399] <inf> peripheral_uart: bt_data_received: 13:MES,0,10000
    S,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:13:50.759,613] <inf> peripheral_uart: TX_DATA:13,MES,0,10000
    .0
    ppg,0.0,0.0,0.0
    mes,00
    [00:13:51.017,364] <inf> peripheral_uart: bt_send:40:,34.90
    mes,01,22.64
    ppg,0.0,0.0,0.0
    m(
    [00:13:55.808,135] <inf> peripheral_uart: bt_data_received: 12:MES,1,2000
    
    S,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:13:55.808,349] <inf> peripheral_uart: TX_DATA:12,MES,1,2000
    01,22.64
    ppg,0.0,0.0,0.0
    m
    
    [00:14:05.855,682] <inf> peripheral_uart: bt_data_received: 11:PPG,2,200
    
    
    S,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:14:05.855,895] <inf> peripheral_uart: TX_DATA:11,PPG,2,200
    
    01,22.64
    ppg,0.0,0.0,0.0
    m
    
    [00:14:10.152,404] <inf> peripheral_uart: bt_send:40:es,00,34.90
    mes,01,22.62
    ppg,0.0,0.0,0(
    [00:14:15.903,198] <inf> peripheral_uart: bt_data_received: 13:MES,0,10000
    S,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:14:15.903,411] <inf> peripheral_uart: TX_DATA:13,MES,0,10000
    mes,01,22.62
    ppg,0.0,0.0,0
    [00:14:25.950,744] <inf> peripheral_uart: bt_data_received: 12:MES,1,2000
    
    S,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:14:25.950,958] <inf> peripheral_uart: TX_DATA:12,MES,1,2000
    
    mes,01,22.62
    ppg,0.0,0.0,0
    
    [00:14:35.998,260] <inf> peripheral_uart: bt_data_received: 11:PPG,2,200
    
    
    S,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:14:35.998,474] <inf> peripheral_uart: TX_DATA:11,PPG,2,200
    
    
    mes,01,22.62
    ppg,0.0,0.0,0
    
    [00:14:40.299,743] <inf> peripheral_uart: bt_send:40:.0
    mes,00,34.90
    mes,01,22.66
    ppg,0.0,(
    [00:14:46.045,867] <inf> peripheral_uart: bt_data_received: 13:MES,0,10000
    S,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:14:46.046,081] <inf> peripheral_uart: TX_DATA:13,MES,0,10000
    .90
    mes,01,22.66
    ppg,0.0,
    [00:14:56.093,322] <inf> peripheral_uart: bt_data_received: 12:MES,1,2000
    
    S,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:14:56.093,536] <inf> peripheral_uart: TX_DATA:12,MES,1,2000
    
    .90
    mes,01,22.66
    ppg,0.0,
    
    [00:15:06.140,838] <inf> peripheral_uart: bt_data_received: 11:PPG,2,200
    
    
    S,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:15:06.141,082] <inf> peripheral_uart: TX_DATA:11,PPG,2,200
    
    
    .90
    mes,01,22.66
    ppg,0.0,
    
    [00:15:10.458,709] <inf> peripheral_uart: bt_send:40:0.0,0.0
    mes,00,34.94
    mes,01,22.66
    ppg(
    [00:15:16.188,385] <inf> peripheral_uart: bt_data_received: 13:MES,0,10000
    S,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:15:16.188,598] <inf> peripheral_uart: TX_DATA:13,MES,0,10000
    00,34.94
    mes,01,22.66
    ppg
    [00:15:26.235,900] <inf> peripheral_uart: bt_data_received: 12:MES,1,2000
    
    S,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:15:26.236,145] <inf> peripheral_uart: TX_DATA:12,MES,1,2000
    
    00,34.94
    mes,01,22.66
    ppg
    
    [00:15:26.500,579] <inf> peripheral_uart: bt_send:40:,0.0,0.0,0.0
    mes,00,34.92
    mes,01,22.62(
    [00:15:31.284,667] <inf> peripheral_uart: bt_data_received: 11:PPG,2,200
    
    
    S,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:15:31.284,881] <inf> peripheral_uart: TX_DATA:11,PPG,2,200
    0
    mes,00,34.92
    mes,01,22.62
    
    [00:15:46.330,993] <inf> peripheral_uart: bt_data_received: 13:MES,0,10000
    S,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:15:46.331,207] <inf> peripheral_uart: TX_DATA:13,MES,0,10000
    
    mes,00,34.92
    mes,01,22.62
    [00:15:56.378,509] <inf> peripheral_uart: bt_data_received: 12:MES,1,2000
    
    S,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:15:56.378,723] <inf> peripheral_uart: TX_DATA:12,MES,1,2000
    
    
    mes,00,34.92
    mes,01,22.62
    
    [00:15:56.619,720] <inf> peripheral_uart: bt_send:40:
    ppg,0.0,0.0,0.0
    mes,00,34.94
    mes,01,(
    [00:16:01.427,276] <inf> peripheral_uart: bt_data_received: 11:PPG,2,200
    
    
    S,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:16:01.427,490] <inf> peripheral_uart: TX_DATA:11,PPG,2,200
    .0,0.0
    mes,00,34.94
    mes,01,
    
    [00:16:16.473,571] <inf> peripheral_uart: bt_data_received: 13:MES,0,10000
    S,0,1,n%N�Mm�2T�75D�����������B��F&a�%>��X���o����      ������
    [00:16:16.473,785] <inf> peripheral_uart: TX_DATA:13,MES,0,10000
    ,0.0
    mes,00,34.94
    mes,01,

  • Hi Rune

    Yes, the timeout is given in microseconds, not milliseconds like it used to. But how did it fail when you used the default value (50 us)? For me it works with both configurations.

    On the peripheral, can you set CONFIG_LOG_DEFAULT_LEVEL=4 to get the debug logs from the UART callback? The only reason the notification should become 40 bytes is if the UART_RX_BUF_RELEASED event is not triggered after you receive your test string, but only after the uart buffer is full.

    BR

    Vidar

Related