Ayke van Laethem
d74f6a1009
all: add RequestConnectionParams to request new connection parameters
...
This allows changing the connection latency, slave latency, and
connection timeout of an active connection - whether in the central or
peripheral role. This is especially helpful on battery operated BLE
devices that don't have a lot of power and need to lower the connection
latency for improved speed. It might also be useful for devices that
need high speed, as the defaults might be too low.
2024-01-11 15:53:20 +01:00
Ayke van Laethem
5d805a929c
all: use Device instead of Address in SetConnectHandler
...
This makes it possible to discover services on a connected central while
in peripheral mode, for example.
2024-01-11 15:53:20 +01:00
Ayke van Laethem
c9eafaff20
all: make Device a value instead of a pointer
...
This is a refactor that is necessary to make it easier to work with
connected central devices on a SoftDevice.
2024-01-11 15:53:20 +01:00
Fabianexe
190c4be423
darwin: add Write command to the gattc implementation
2024-01-05 14:03:30 +01:00
Baden Parr
3c9cf83de2
macos: enable support for duplicate chars by moving from a map to a slice
2023-07-16 20:53:17 +02:00
Baden Parr
eb782c5841
macos: remove unnecessary pointer indirection on service and char maps
2023-06-06 21:02:06 +02:00
Baden Parr
a341e8f543
macos: fixed reentrant service discovery
2023-06-06 21:02:06 +02:00
Baden Parr
51dff6faa7
linux: implement disconnect handeling
...
linux: remove unnecessary sending of nil prop change
linux: first pass at watching connection events
linux: remove unneeded debug prints
linux: fix spelling
linux: fix pointer address references
2023-05-04 14:02:39 +02:00
Baden Parr
3523e14bfc
macos: implement disconnect handeling
...
macos: add disconnect handler
macos: add default timeout and params.ConnectionTimeout handling
macos: add central manager CancelConnect call on connection timeout
macos: added address to connectHanndler call upon successful connection
macos: remove printing error on peripheral disconnection
macos: move and rename default connection timeout
macos: wait for disconnection upon timed out connection attempt
2023-05-04 14:02:39 +02:00
Ayke van Laethem
71f17598be
gap: Set and SetRandom methods should have a pointer receiver
...
Without it, these calls are a no-op.
Fixes: https://github.com/tinygo-org/bluetooth/issues/144
In particular, this fixes a problem where IsRandom() would always return
false on Linux. With this fix, it correctly returns whether the address
is a random address.
2023-04-29 22:13:00 +02:00
Ayke van Laethem
b06d666dbf
all: remove Addresser
...
Remove the Addresser type. It isn't really necessary (the Address type
can change between OSes) and makes it difficult to fix a heap allocation
in interrupts (on the Nordic SoftDevices).
This is a backwards incompatible change, but only programs that use
SetConnectHandler should notice this.
2023-04-26 23:37:36 +02:00
deadprogram
cc5adf3789
macos: update to point to tinygo-org fork
2022-09-05 15:58:01 +02:00
Erik Price
cf63949412
darwin: make Adapter.Connect thread-safe
...
This change allows multiple concurrent goroutines to call
`Adapter.Connect` without racing.
Fixes #57
2021-07-21 00:09:35 +02:00
Ron Evans
266de9824a
gattc/*: DeviceCharacteristic Read() implementation
...
Signed-off-by: deadprogram <ron@hybridgroup.com>
2020-10-22 19:04:47 +02:00
Linus Wallgren
c27b1cb3be
Document async Disconnect behaviour
...
This was mentioned by @aykevl in https://github.com/tinygo-org/bluetooth/pull/32#issuecomment-698313299
2020-10-07 07:32:17 +02:00
deadprogram
a2662956b8
gap/all: add Disconnect() to Driver
...
Signed-off-by: deadprogram <ron@hybridgroup.com>
2020-09-24 14:30:13 +02:00
deadprogram
281d195e75
gap: change signature for Addresser interface Set() function to accept string and then parse it as needed
...
Signed-off-by: deadprogram <ron@hybridgroup.com>
2020-09-20 14:56:48 +02:00
Ron Evans
6dc1dff711
gap: add connection handler to be called on adapter connect/disconnect
...
Signed-off-by: deadprogram <ron@hybridgroup.com>
2020-09-10 17:17:45 +02:00
Ron Evans
95cabe86a1
macos: added characteristic notifications
...
Signed-off-by: Ron Evans <ron@hybridgroup.com>
2020-09-02 08:37:04 +02:00
Ron Evans
a7844e1734
macos: remove unneeded functions to export internal implementaions.
...
Signed-off-by: Ron Evans <ron@hybridgroup.com>
2020-09-02 08:37:04 +02:00
Ron Evans
ea7ed874af
gap: switch to use MACAddress struct when possible for shared implementation
...
Signed-off-by: Ron Evans <ron@hybridgroup.com>
2020-09-02 08:37:04 +02:00
Ron Evans
dc738f9c47
macos: able to discover services and characteristics for a device
...
Signed-off-by: Ron Evans <ron@hybridgroup.com>
2020-09-02 08:37:04 +02:00
Ron Evans
5f44bb4a96
macos: completed initial implementation
...
Signed-off-by: Ron Evans <ron@hybridgroup.com>
2020-09-02 08:37:04 +02:00
Ron Evans
c1114ad708
all: use Addresser interface to handle fact that macOS uses UUID instead of MAC as the BLE address for a peripheral
...
Signed-off-by: Ron Evans <ron@hybridgroup.com>
2020-09-02 08:37:04 +02:00
Ron Evans
a620bacdb8
macos: able to retrieve some of the info when scanning
...
Signed-off-by: Ron Evans <ron@hybridgroup.com>
2020-09-02 08:37:04 +02:00
Ron Evans
51b2b4c2b2
macos: starting point for adding macOS support
...
Signed-off-by: Ron Evans <ron@hybridgroup.com>
2020-09-02 08:37:04 +02:00