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