summaryrefslogtreecommitdiffstatshomepage
path: root/examples/bluetooth/ble_uart_peripheral.py
diff options
context:
space:
mode:
authorJim Mussared <jim.mussared@gmail.com>2019-10-28 17:33:29 +1100
committerDamien George <damien.p.george@gmail.com>2019-10-29 23:11:11 +1100
commit25946d1ef4c20439368b37ec27acf2184b25be28 (patch)
tree8f901bc2a09f4ae3e23c25f79afb9a8843f151c5 /examples/bluetooth/ble_uart_peripheral.py
parentca3d4c84e4722edefde586d7978f5a216c8febad (diff)
downloadmicropython-25946d1ef4c20439368b37ec27acf2184b25be28.tar.gz
micropython-25946d1ef4c20439368b37ec27acf2184b25be28.zip
examples/bluetooth/ble_uart_peripheral: Use append mode for RX char.
Diffstat (limited to 'examples/bluetooth/ble_uart_peripheral.py')
-rw-r--r--examples/bluetooth/ble_uart_peripheral.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/bluetooth/ble_uart_peripheral.py b/examples/bluetooth/ble_uart_peripheral.py
index 90cdbcaf52..14f7102725 100644
--- a/examples/bluetooth/ble_uart_peripheral.py
+++ b/examples/bluetooth/ble_uart_peripheral.py
@@ -22,8 +22,8 @@ class BLEUART:
self._ble.active(True)
self._ble.irq(handler=self._irq)
((self._tx_handle, self._rx_handle,),) = self._ble.gatts_register_services((_UART_SERVICE,))
- # Increase the size of the rx buffer.
- self._ble.gatts_write(self._rx_handle, bytes(rxbuf))
+ # Increase the size of the rx buffer and enable append mode.
+ self._ble.gatts_set_buffer(self._rx_handle, rxbuf, True)
self._connections = set()
self._rx_buffer = bytearray()
self._handler = None