Wykres commitów

119 Commity (9d09cdd4af3000d8fd79dca81f9fa2eb6b71d40e)

Autor SHA1 Wiadomość Data
robert-hh 760bfefd9d micropython/upysh: Add the cp() function and improve ls and rm.
- cp() copies a file. If the target is a directory, the file is copied
  into that directory.  It uses a small buffer, so it's not fast.
- ls uses ilistdir and creates a sorted output with directories listed as
  the first group.
- rm optionally deletes recursive, if the target is a directory.
2022-03-24 10:37:48 +11:00
Jim Mussared cdd260f079 aioble/multitests: Add multitest for shutdown handlers.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-11-12 13:36:18 +11:00
Jim Mussared 10ec742baa aioble: Add a shutdown handler for cleanup.
This allows `aioble.stop()` to reset all internal state.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-11-12 13:35:52 +11:00
Jim Mussared a61bfc1460 aioble/README.md: Add l2cap example.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-11-12 13:35:50 +11:00
Jim Mussared 3ea74867f3 aioble: Add l2cap channel disconnected().
Allows `await channel.disconnected()`.

This also fixes a bug where connection._l2cap_channel wasn't being set to
None on disconnect.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-11-12 13:35:45 +11:00
Jim Mussared dd9b783568 aioble/multitests: Add test for subscription and notification.
This replicates the failure described in #453 (which is fixed by #459.

Also adds a test for subscription.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-11-10 17:41:11 +11:00
Jim Mussared 9169ca6543 aioble: Add support for write-with-update.
This allows a server to write a characteristic and automatically
notify/indicate all subscribed clients.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-11-10 13:47:04 +11:00
Jim Mussared dc03b4af4d aioble: Fix notified/indicated event waiting.
After a client does a successful `await char.notified()`, then before the
next call to `notified()` a notification arrives, then they call
`notified()` twice before the _next_ notification, the second call will
return None rather than waiting.

This applies the same fix as in 5a86aa5866
which solved a similar problem for server-side `char.written()`. Using
a deque is slightly overkill here, but it's consistent with the server
side, and also makes it very easy to support having a notification queue
in the future.

Also makes the client characteristic properly flags/properties-aware (i.e.
explicitly fail operations that aren't supported).

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-11-08 17:34:08 +11:00
Jim Mussared 43cad17946 aioble/multitests/ble_write_capture.py: Add multitest for write capture.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-11-05 14:30:40 +11:00
Jim Mussared 23b3c7fe2d aioble/multitests: Fix existing multitests.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-11-05 14:30:31 +11:00
Jim Mussared 5a86aa5866 aioble: Add a write queue for gatt server.
This fixes a bug where an incoming write before `written` is awaited causes
`written` to return None.  It also introduces a mechanism for a server to
"capture" all incoming written values (instead of only having access to the
most recent value).

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-11-05 14:30:08 +11:00
Jim Mussared 3c383f6d28 aioble: Fix docs for subscribe (needs await).
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-07-12 13:38:33 +10:00
Jim Mussared 32684886ee micropython/bluetooth/aioble: subscribe must register the connection.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-07-08 15:15:47 +10:00
Jim Mussared 8631225b7f micropython/aioble: Add asyncio-based wrapper for ubluetooth.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-05-28 18:26:49 +10:00
Jim Mussared 35e3c9e4ff python-ecosys: Move urequests to python-ecosys.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-05-27 16:53:02 +10:00
Jim Mussared bc2b6b0b7f micropython/uasyncio: Remove uasyncio-v2.
Superceded by uasyncio-v3 in the main repo.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-05-27 16:52:16 +10:00
Jim Mussared fa13cbbc8b all: Run black over all code.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-05-27 15:50:04 +10:00
Jim Mussared af3e1aff9e all: Update READMEs. 2021-05-27 15:41:08 +10:00
Jim Mussared 1a28fe84e8 top: Move modules into python-stdlib, unix-ffi, or micropython. 2021-05-27 15:41:08 +10:00