Skip to content

Write in chunks of 20 bytes or less #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 23, 2019

Conversation

dhalbert
Copy link
Collaborator

@dhalbert dhalbert commented Apr 22, 2019

Fixes #10.

@dastels Could you test this? The sending now appears to be correct: it will send no more than 20 bytes at a time.

A BLE notification is sent after each write. If the receiver does not handle the writes fast enough, bytes will be dropped. I tested by sending 200 bytes to the Bluefruit LE Connect app, and it received all 200. But a slower receiver may need to implement some kind of flow control.

@dhalbert dhalbert requested a review from dastels April 22, 2019 16:33
@dhalbert dhalbert merged commit 04c84be into adafruit:master Apr 23, 2019
@dhalbert dhalbert deleted the buffered-writes branch April 23, 2019 12:32
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Apr 23, 2019
Updating https://github.com/adafruit/Adafruit_CircuitPython_BLE to 1.0.2 from 1.0.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_BLE#11 from dhalbert/buffered-writes

Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA:
  > Added the following libraries: Adafruit_CircuitPython_HX8357, Adafruit_CircuitPython_ILI9341, Adafruit_CircuitPython_SSD1331, Adafruit_CircuitPython_SSD1351, Adafruit_CircuitPython_ST7735, Adafruit_CircuitPython_ST7735R, Adafruit_CircuitPython_ST7789, Adafruit_CircuitPython_Hue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UARTServer does not handle writes of >20 bytes
1 participant