aboutsummaryrefslogtreecommitdiff
path: root/docs/library/ubluetooth.rst
AgeCommit message (Collapse)Author
2020-12-02docs/library/ubluetooth.rst: Add passkey docs.Jim Mussared
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2020-12-02docs/library/ubluetooth.rst: Add bonding docs.Jim Mussared
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2020-12-02docs/library/ubluetooth.rst: Add gap_pair() docs.Jim Mussared
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2020-12-02docs/library/ubluetooth.rst: Add pairing/bonding config docs.Jim Mussared
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2020-12-02extmod/modbluetooth: Add _IRQ_ENCRYPTION_UPDATE event.Andrew Leech
This allows the application to be notified if any of encrypted, authenticated and bonded state change, as well as the encryption key size. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2020-12-02docs/library/ubluetooth.rst: Update read request IRQ docs.Jim Mussared
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2020-12-02docs/library/ubluetooth.rst: Update char/desc flags.Jim Mussared
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2020-12-02docs/library/ubluetooth.rst: Add _IRQ_CONNECTION_UDPATE docs.Jim Mussared
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2020-11-24docs/library/ubluetooth.rst: Add docs for L2CAP channels.Jim Mussared
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2020-09-25extmod/modbluetooth: Change module-owned bytes objects to memoryview.Damien George
A read-only memoryview object is a better representation of the data, which is owned by the ubluetooth module and may change between calls to the user's irq callback function. Signed-off-by: Damien George <damien@micropython.org>
2020-09-18docs/library/ubluetooth.rst: Add docs for MTU API.Jim Mussared
2020-09-15docs/library/ubluetooth.rst: Clarify peripheral/central vs server/clientJim Mussared
Previously this documentation assumed peripheral=server and central=client, but this is not accurate or true to the implementation.
2020-09-15docs/library/ubluetooth.rst: Clarify position/kw arguments.Jim Mussared
Almost all ubluetooth functions are positional-only, but some have optional args. Make this clearer and show what the defaults are.
2020-09-08docs/library/ubluetooth.rst: Document BLE address modes.Jim Mussared
2020-08-26extmod/bluetooth: Support active scanning in BLE.gap_scan().Andrew Leech
This adds an additional optional parameter to gap_scan() to select active scanning, where scan responses are returned as well as normal scan results. This parameter is False by default which retains the existing behaviour.
2020-07-20docs/library: For ubluetooth, add docs for _IRQ_GATTS_INDICATE_DONE.Jim Mussared
2020-07-18docs/library: Add gatts_indicate() doc to ubluetooth.rst.Jim Mussared
Also clarify behavior of `gatts_notify` and add some TODOs about adding an event for indication acknowledgement.
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-05docs/library: Update ubluetooth for new events and discover by uuid.Jim Mussared
2020-05-11extmod/modbluetooth: Add support for changing the GAP device name.Damien George
This commit allows the user to set/get the GAP device name used by service 0x1800, characteristic 0x2a00. The usage is: BLE.config(gap_name="myname") print(BLE.config("gap_name")) As part of this change the compile-time setting MICROPY_PY_BLUETOOTH_DEFAULT_NAME is renamed to MICROPY_PY_BLUETOOTH_DEFAULT_GAP_NAME to emphasise its link to GAP and this new "gap_name" config value. And the default value of this for the NimBLE bindings is changed from "PYBD" to "MPY NIMBLE" to be more generic.
2020-04-29unix: Add support for modbluetooth and BLE using btstack.Jim Mussared
This commit adds full support to the unix port for Bluetooth using the common extmod/modbluetooth Python bindings. This uses the libusb HCI transport, which supports many common USB BT adaptors.
2020-04-19docs/library: Document that char_data/notify_data are also references.Thomas Friebel
2020-03-11extmod/modbluetooth: Change scan result's "connectable" to "adv_type".Damien George
This commit changes the BLE _IRQ_SCAN_RESULT data from: addr_type, addr, connectable, rssi, adv_data to: addr_type, addr, adv_type, rssi, adv_data This allows _IRQ_SCAN_RESULT to handle all scan result types (not just connectable and non-connectable passive scans), and to distinguish between them using adv_type which is an integer taking values 0x00-0x04 per the BT specification. This is a breaking change to the API, albeit a very minor one: the existing connectable value was a boolean and True now becomes 0x00, False becomes 0x02. Documentation is updated and a test added. Fixes #5738.
2020-02-18extmod/modbluetooth: Implement config getter for BLE rxbuf size.Thomas Friebel
Knowing the buffer size can be important, to ensure that valid data will be received.
2020-01-12docs/library: Add / to indicate positional-only args in library docs.Jason Neal
Removes the confusion of positional-only arguments which have defaults that look like keyword arguments.
2019-12-10docs/library/ubluetooth: Add note about API being under development.Damien George
2019-12-05extmod/modbluetooth: Allow setting ringbuf size via BLE.config(rxbuf=).Damien George
The size of the event ringbuf was previously fixed to compile-time config value, but it's necessary to sometimes increase this for applications that have large characteristic buffers to read, or many events at once. With this commit the size can be set via BLE.config(rxbuf=512), for example. This also resizes the internal event data buffer which sets the maximum size of incoming data passed to the event handler.
2019-12-04extmod/modbluetooth: Add optional 4th arg to gattc_write for write mode.Damien George
This allows the user to explicitly select the behaviour of the write to the remote peripheral. This is needed for peripherals that have characteristics with WRITE_NO_RESPONSE set (instead of normal WRITE). The function's signature is now: BLE.gattc_write(conn_handle, value_handle, data, mode=0) mode=0 means write without response, while mode=1 means write with response. The latter was the original behaviour so this commit is a change in behaviour of this method, and one should specify 1 as the 4th argument to get back the old behaviour. In the future there could be more modes supported, such as long writes.
2019-11-25extmod/modbluetooth: Simplify management of pre-allocated event data.Jim Mussared
The address, adv payload and uuid fields of the event are pre-allocated by modbluetooth, and reused in the IRQ handler. Simplify this and move all storage into the `mp_obj_bluetooth_ble_t` instance. This now allows users to hold on to a reference to these instances without crashes, although they may be overwritten by future events. If they want to hold onto the values longer term they need to copy them.
2019-11-12docs/library/ubluetooth: Fix name and link to FLAG_xxx constants.Damien George
2019-10-29docs/library/ubluetooth: Add docs for gatts_set_buffer.Jim Mussared
2019-10-22docs/library/bluetooth: Rename to "ubluetooth".Jim Mussared