Hi all,
I'm using nRF52 DK.
I'm developing a program based on 'ble_app_uart_c' example with custom UUID.
When I type command using UART, central device send signal to peripheral.
Then, peripheral device starts to send data to central device continuously. (For 1 transmission, uint8_t array with data_len=243 is sent)
BLE data transmission rate is 80kbps.
My purpose is to save those data in PC real-time.
That's why I'm using this example.
While nRF52-DK prints data, my custom python program will read data, plot data, and save data in real-time.
By the way, I want to know how to transport received data to PC rapidly using serial port.
Now, I'm using NRF_LOG_INFO. Below is the modified function: ble_nus_chars_received_uart_print.
static void ble_nus_chars_received_uart_print(uint8_t * p_data, uint16_t data_len) { //ret_code_t ret_val; NRF_LOG_HEXDUMP_DEBUG(p_data, data_len); //printf("%d\r\n", data_len); //data_len == 243 int i = 0; for (i = 1; i < data_len-1; i=i+2) { NRF_LOG_RAW_INFO("%02x%02x", p_data[i], p_data[i-1]); } NRF_LOG_RAW_INFO("%02x\r\n", p_data[i-1]); }
However, I saw that this makes error often: I guess the reason of this is it cannot print all data before the next BLE packet comes.
So, I want to ask the best way to print fast.
All solutions are welcome.
Thanks!!