Riffing on "pip", "mip installs packages".
This is a replacement for the previous `upip` tool for on-device
installation of packages.
This work was funded through GitHub Sponsors.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This replaced the per-characteristic queues with a single shared queue,
which means that the characteristics will return from `written()` in the
exact order that the original writes arrived, even if the writes are
occuring across multiple different characteristics.
This work was funded by Planet Innovation.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This provides an async REPL with the following features:
- Run interactive REPL in the background.
- Execute statements using await.
- Simple history.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
The `bluetooth` module replaced the def_handle field with end_handle
in the characteristic result IRQ. Use this when querying for
descriptors.
In the case where this is not available (older versions of micropython)
continue the existing behavior of searching just past the value handle,
although decrease this to +2 to avoid finding other characteristic's
descriptors.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
With the dependencies captured in manifest.py, several packages in
python-stdlib were still unix-only due to direct or transitive dependencies
on unix-only or ffi modules. Or they just make no sense to run on
microcontroller targets.
In a few cases (e.g. base64) where possible, the unix dependency could be
removed.
Updates manifest.py to use the `unix_ffi=True` arg to `require()` for these
libraries.
Rename re-pcre to re now that unix-ffi is effectively its own namespace.
Update unix-ffi/README.md, and strengthen the wording that the unix
libraries are unmaintained.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Uses the new require()/package()/module() functions from manifestfile.py.
Add manifest.py for iperf3 and pyjwt.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This is unmaintained and not the one installed by default on boards
(see github.com/micropython/micropython/blob/master/tools/upip.py).
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2015-01-01 07:45:46.790 INFO Received OLCP_OP_FIRST
2015-01-01 07:45:46.979 ERROR Error in ble_write_listener
Traceback (most recent call last):
File "aioble/server.py", line 223, in indicate
NameError: name 'GattError' isn't defined
A number of fields (services, appearance, manufacturer, name) can appear
when a scan is requested. However there is only so much space in the
header so, if a user has configured multiple fields, some may be 'pushed'
into the active scan response which requires additional communication.
When iOS scans for BLE devices it can filter by services, and so services
must be in the advertising (as opposed to scan response) payload.
- 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.
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>
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>
This allows a server to write a characteristic and automatically
notify/indicate all subscribed clients.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
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>
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>