summaryrefslogtreecommitdiff
path: root/examples/bluetooth/ble_temperature_central.py
AgeCommit message (Collapse)Author
2023-09-01examples/bluetooth: Link to aioble in BLE examples.Jim Mussared
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-04-26examples/bluetooth/ble_temperature_central.py: Remove service tuple.Jim Mussared
This is unused in the client, only needed in the server. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-02-15examples/bluetooth: Fix check for _conn_handle being None.Damien George
Fixes issue #10755. Signed-off-by: Damien George <damien@micropython.org>
2020-09-26examples/bluetooth: Update to use positional-only args to irq().Jim Mussared
To match 6a6a5f9e151473bdcc1d14725d680691ff665a82.
2020-08-29all: Update Python code to conform to latest black formatting.Damien George
Updating to Black v20.8b1 there are two changes that affect the code in this repository: - If there is a trailing comma in a list (eg [], () or function call) then that list is now written out with one line per element. So remove such trailing commas where the list should stay on one line. - Spaces at the start of """ doc strings are removed. Signed-off-by: Damien George <damien@micropython.org>
2020-06-10examples/bluetooth: Fix event code in ble_temperature_central.py.Jim Mussared
2020-06-05extmod/modbluetooth: Ensure status=0 always on success.Jim Mussared
This commit makes sure that all discovery complete and read/write status events set the status to zero on success. The status value will be implementation-dependent on non-success cases.
2020-06-05extmod/modbluetooth: Implement read done event.Jim Mussared
On btstack there's no status associated with the read result, it comes through as a separate event. This allows you to detect read failures or timeouts.
2020-06-05extmod/modbluetooth: Add discover complete events for svc/char/desc.Jim Mussared
Without this it's difficult to implement a state machine correctly if the desired services are not found.
2020-06-05extmod/modbluetooth: Make modbluetooth event not a bitfield.Jim Mussared
There doesn't appear to be any use for only triggering on specific events, so it's just easier to number them sequentially. This makes them smaller values so they take up only 1 byte in the ringbuf, only 1 byte for the opcode in the bytecode, and makes room for more events. Also add a couple of new event types that need to be implemented (to avoid re-numbering later). And rename _COMPLETE and _STATUS to _DONE for consistency. In the future the "trigger" keyword argument can be reinstated by requiring the user to compute the bitmask, eg: ble.irq(handler, 1 << _IRQ_SCAN_RESULT | 1 << _IRQ_SCAN_DONE)
2020-03-12examples/bluetooth: Replace "connectable" parameter with "adv_type".Thomas Friebel
Follow up to dd0bc26e65734b8a4fafa3769008e92e2ec6645d which changed the parameter list of the IRQ_SCAN_RESULT event. Adapt ble_temperature_central.py accordingly.
2020-02-28all: Reformat C and Python source code with tools/codeformat.py.Damien George
This is run with uncrustify 0.70.1, and black 19.10b0.
2020-02-28examples/bluetooth/ble_temperature_central.py: Shorten comment.Damien George
So the line length is less than 100 characters.
2019-11-25examples/bluetooth: Add example for reading temperature sensor.Jim Mussared