By keeping track of run-time ATT MTU of all connected peers, it's
possible to increase the notification payload size; thus increasing
data-throughput sent over Bluetooth.
Note that this assumes the Bluetooth connection is properly configured
(with the corresponding connection parameters) to optimize performance.
This is application-specific and shall be examined on each scenario for
optimal performance.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Default priority set to Main Thread's and Stack-size set to 1KiB. This
should still allow for the System work-queue, considering this
Work-queue could be temporarily blocked on BT TX commands.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Stop relying on the system workqueue, as the BT TX APIs should
potentially block and now by design this will not work with the
Bluetooth Stack (for good reasons). Now the UART NUS driver has a
dedicated workqueue, which all NUS instances share.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
To prevent postponing data flush until filling fifo. Now the flush will
occur at the scheduled time, regardless of subsequent poll_out reqs.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
As correctly pointed during the initial PR Review, when the MTU-size is
23 the effective payload that can be transferred is MTU-3 = 20. Thus,
this change to be consistent.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Enables usage Bluetooth LE GATT as a serial endpoint to exchange data
using UART APIs. This implementation is compatible with UART Interrupt
Driven APIs and uses the nus-uart device-tree node properties to
configure FIFO buffers for transmitting and receiving. Defining
multiple instances of the driver is possible and it allows implementing
multiple GATT NUS service instances to exchange data as separate serial
endpoints.
Signed-off-by: Luis Ubieda <luisf@croxel.com>