I'm currently experimenting with the direction finding sample. I wanted to print the IQ-Samples to a serial port and used a code example that I found in a similar ticket. I added the lines 9-13 in the function cte_recv_cb.
static void cte_recv_cb(struct bt_le_per_adv_sync *sync, struct bt_df_per_adv_sync_iq_samples_report const *report) { printk("CTE[%u]: samples count %d, cte type %s, slot durations: %u [us], " "packet status %s, RSSI %i\n", bt_le_per_adv_sync_get_index(sync), report->sample_count, cte_type2str(report->cte_type), report->slot_durations, packet_status2str(report->packet_status), report->rssi); printk("#IQ-Samples: %d\n", report->sample_count); for(int i=0; i<report->sample_count; i++){ printk("[%d]: I:%d Q:%d,\n", i, report->sample[i].i, report->sample[i].q); } }
But when I read the data with the serial Terminal some lines are always skipped. I am using the all the default values in the configuration of the serial terminal (and Baudrate 115200).
Even if i do simpler prints like only the one from the sample + the sample count I get some uncomplete lines like you can see in the picture below.
Do you have any idea why this occurs?
Thanks for your help in advance!