Commit graph

14 commits

Author SHA1 Message Date
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
Ayke van Laethem
7b36b3035c darwin: fix characteristic scan order
This fixes two bugs actually:

 1. The returned characteristics weren't in the order as given in the
    UUID slice.
 2. Duplicate characteristics weren't handled correctly.

I tested the first point, and it now works correctly.
I did not fully test the second point, it probably doesn't work
correctly yet because of the Device.characteristics map that is indexed
by UUID. This should be fixed in a separate change.
2023-05-07 12:32:40 +02:00
Jagoba Gascón
d0178d95f6 mtu-{darwin,linux,windows,sd}: add get mtu function 2022-10-19 20:02:55 +02:00
deadprogram
cc5adf3789 macos: update to point to tinygo-org fork 2022-09-05 15:58:01 +02:00
Ron Evans
b4b125480a darwin: properly handle 16-bit UUIDs for service and characteristics in the unique format used by macOS
Signed-off-by: Ron Evans <ron@hybridgroup.com>
2021-02-02 00:17:14 +01:00
Ron Evans
266de9824a
gattc/*: DeviceCharacteristic Read() implementation
Signed-off-by: deadprogram <ron@hybridgroup.com>
2020-10-22 19:04:47 +02:00
Ron Evans
ef90e5d337
gattc: use GetUUID() to allow for bare metal use of short UUID. (#14)
* gattc: use UUID() to allow for bare metal to permit clean use of short UUIDs

Signed-off-by: deadprogram <ron@hybridgroup.com>

* gattc/macos: correct usage of UUID wrapper type alias

Signed-off-by: Ron Evans <ron@hybridgroup.com>

* gattc/sd: correct usage of UUID wrapper type alias

Signed-off-by: Ron Evans <ron@hybridgroup.com>

* gattc/sd, uuid/sd: changes intended to reduce memory allocations for service and characteristic discovery

Signed-off-by: deadprogram <ron@hybridgroup.com>

* gattc/sd: partial improvements to DiscoverServices/DiscoverCharacteristics

Signed-off-by: deadprogram <ron@hybridgroup.com>

* gattc/sd: mostly getting uuid back for services in DiscoverServices

Signed-off-by: deadprogram <ron@hybridgroup.com>

* uuid/sd: correct way to calculate UUID from shortUUID

Signed-off-by: deadprogram <ron@hybridgroup.com>

* gattc/sd: able to discover services and characteristics

Signed-off-by: deadprogram <ron@hybridgroup.com>

* examples: updated discover example that can run with OS or bare metal

Signed-off-by: deadprogram <ron@hybridgroup.com>

* gattc/sd: ensure safe casts for length of returned struct when converting short UUID

Signed-off-by: deadprogram <ron@hybridgroup.com>
2020-09-13 20:21:38 +02:00
deadprogram
fd89ad24a8 linux: all for DiscoverServices and DiscoverCharacteristics to discover all when no specific list of UUIDs
Signed-off-by: deadprogram <ron@hybridgroup.com>
2020-09-03 15:26:43 +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
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