Hey There,
I have a question regarding the Throughput Sample. If I just run it normally (with 2 5340dk) then I reach a Throughput of about 1'300kbps, which is what I would expect. However, for my Setup I want to log everytime a packet has been successfully sent, so I wanted to use the same write-without-ack, however with the callback. If I use this callback with the same setup as before except the change in the write function, I still get the same throughput as expected. If I now however send 247 in every Gatt write (so the maximum which is possible per packet) instead of the 495, i get a much lower throughput, in the range of 9 kbps. Is this a bug? Shouldn't it result in the same throughput? In my understanding, it would just send more Gatt Write, but still the same data. The code I changed is the following:
/* a dummy data buffer */
/*The number i changed from 495 to 247*/
static char dummy[247];
if (!default_conn) {
shell_error(shell, "Device is disconnected %s",
"Connect to the peer device before running test");
return -EFAULT;
}
if (IS_ENABLED(CONFIG_BT_THROUGHPUT_FILE)) {
while (*img_ptr) {
err = bt_throughput_write(&throughput, dummy, 247);
if (err) {
shell_error(shell, "GATT write failed (err %d)", err);
break;
}
/* print graphics */
str_len = (*img_ptr == '\x1b') ? 6 : 1;
memcpy(str_buf, img_ptr, str_len);
str_buf[str_len] = '\0';
img_ptr += str_len;
printk("%s", str_buf);
data += 247;
}