Commit graph

206 commits

Author SHA1 Message Date
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
Ayke van Laethem
03d77ace1c Makefile: add examples/stop-advertisement
This example wasn't included in the smoke tests, and because of that I
initially missed the use of Addresser here.
2023-04-26 23:37:36 +02:00
Ayke van Laethem
e0e261e166 softdevice: avoid a heap allocation in the SoftDevice event handler
Events are delivered using interrupts. But there was an accidental heap
allocation in the interrupt.

Fix it by using a global instead. This is safe (and doesn't need
volatile accesses), as the global is only ever accessed from that
particular interrupt.
2023-04-26 23:37:36 +02:00
Alex
3f79b9e4e8 Added Indicate support to Windows driver 2023-02-26 22:29:27 +01:00
deadprogram
4c798a1e7d docs: correct badge link for GH actions
Signed-off-by: deadprogram <ron@hybridgroup.com>
2023-02-17 23:39:06 +01:00
deadprogram
570c0ce6e6 build: work around for CVE-2022-24765
Signed-off-by: deadprogram <ron@hybridgroup.com>
2023-02-12 08:40:03 +01:00
deadprogram
0bc6805828 build: update to actions/checkout@v3
Signed-off-by: deadprogram <ron@hybridgroup.com>
2023-02-12 08:40:03 +01:00
Bram van Neerven
50f176c7c8 delete old data folder 2023-01-29 23:54:12 +01:00
Bram van Neerven
34cb58db57 update uuid generation 2023-01-29 23:54:12 +01:00
Jagoba Gascón
be99863ef5 winrt-go: bump to latest
The latest winrt-go version fixes an access violation error caused by
some Go pointers being referenced in non-Go memory. More info:
https://github.com/saltosystems/winrt-go/issues/63
2023-01-25 13:02:48 +01:00
Jagoba Gascón
d0178d95f6 mtu-{darwin,linux,windows,sd}: add get mtu function 2022-10-19 20:02:55 +02:00
nv-h
c85b6cc9d3 windows: support empty manufacturer data
Fixed a runtime error when `manufacturerData` is empty.
2022-10-19 08:48:34 +02:00
deadprogram
e79ea1e4e9 release: updates for v0.6.0
Signed-off-by: deadprogram <ron@hybridgroup.com>
2022-10-02 10:55:42 +02:00
deadprogram
792f4f079e all: update dependencies before release
Signed-off-by: deadprogram <ron@hybridgroup.com>
2022-10-02 10:55:07 +02:00
deadprogram
79bbc2ed6d gap/linux: add helpful comment
Signed-off-by: deadprogram <ron@hybridgroup.com>
2022-09-29 10:49:08 +02:00
deadprogram
57f82b6241 gap/linux: workaround for https://github.com/muka/go-bluetooth/issues/163
Signed-off-by: deadprogram <ron@hybridgroup.com>
2022-09-29 10:49:08 +02:00
deadprogram
39e6a357ea linux: update to latest muka/go-bluetooth
Signed-off-by: deadprogram <ron@hybridgroup.com>
2022-09-29 10:49:08 +02:00
Jagoba Gascón Sánchez
e4e6976c64 windows: disable cache when reading characteristics 2022-09-26 09:17:55 +02:00
deadprogram
8fae597745 docs: update README with info on Windows support
Signed-off-by: deadprogram <ron@hybridgroup.com>
2022-09-25 15:23:24 +02:00
Jagoba Gascón
e843ce91a6 windows: add characteristic read, write and notify operations 2022-09-15 19:35:42 +02:00
Jagoba Gascón
1b30ec4619 windows: add characteristic discovery 2022-09-15 15:51:38 +02:00
Jagoba Gascón
2784a6b2d9 windows: add service discovery 2022-09-14 19:11:47 +02:00
Jagoba Gascón Sánchez
7113f8c021 windows: add device connection and disconnection 2022-09-12 11:07:57 +02:00
Jagoba Gascón Sánchez
8f13d06111 windows: add winrt-go dependency and remove manually generated code 2022-09-08 14:07:46 +02:00
deadprogram
7ec948bf3f macos: update to tinygo-org fork of cbgo v0.0.4
Signed-off-by: deadprogram <ron@hybridgroup.com>
2022-09-05 15:58:01 +02:00
deadprogram
79285321af all: unify UUID16 creation for all platforms
Signed-off-by: deadprogram <ron@hybridgroup.com>
2022-09-05 15:58:01 +02:00
deadprogram
0b701c55ca macos: use the same UUID format as expected by other standard
Signed-off-by: deadprogram <ron@hybridgroup.com>
2022-09-05 15:58:01 +02:00
deadprogram
cc5adf3789 macos: update to point to tinygo-org fork 2022-09-05 15:58:01 +02:00
Bart Meuris
948ea8c7ee
Improve UUID (#107)
Improvements to UUID:
* uuid now works with upper and lowercase
* sped up UUID.String() using stringbuilder, added benchmark
* UUID.String(): grow builder to prevent allocs
* make test in cicd happy
2022-08-25 14:22:52 +02:00
Ron Evans
25349d381e
build: add Github Action based CI build (#108)
* build: add Github Action based CI build
2022-07-12 17:16:21 +02:00
deadprogram
e7671110ad linux: update to latest go-bluetooth package
Signed-off-by: deadprogram <ron@hybridgroup.com>
2022-05-22 14:39:13 +02:00
Jagoba Gascón
9b9512fbc9 advertising: add manufacturer data field to advertisement payload 2022-05-22 14:36:27 +02:00
Yurii Soldak
20f0ce6119 gap: stop advertising 2022-05-22 08:59:22 +02:00
deadprogram
8dc1e155a0 all: prepare for release 0.5.0
Signed-off-by: deadprogram <ron@hybridgroup.com>
2022-04-29 13:47:49 +02:00
deadprogram
02fb2457d9 docs: update license year
Signed-off-by: deadprogram <ron@hybridgroup.com>
2022-04-29 13:47:18 +02:00
deadprogram
25d288fd10 all: update to drivers 0.20.0
Signed-off-by: deadprogram <ron@hybridgroup.com>
2022-04-29 11:53:23 +02:00
deadprogram
8cab553c59 all: update modules to use dev branch with TinyGo 0.23-pre compatible drivers
Signed-off-by: deadprogram <ron@hybridgroup.com>
2022-04-21 18:13:49 +02:00
Nicholas Page
7dee8d4d82 Fix ParseMAC bug 2022-04-19 13:44:36 +02:00
Ayke van Laethem
96a2be1571 Add //go:build lines for Go 1.18
This will be needed eventually, so add them now already.
2022-04-19 11:00:08 +02:00
Ayke van Laethem
4c0df2892d nrf: fix CGo errors after TinyGo update
For details, see: https://github.com/tinygo-org/tinygo/pull/2774
2022-04-13 18:59:12 +02:00
deadprogram
e75811786c release: update for v0.4.0
Signed-off-by: deadprogram <ron@hybridgroup.com>
2021-11-18 18:45:24 +01:00
David Barroso
bd75a42694 gattc/linux: DiscoverServices times out in 10s 2021-11-05 19:24:02 +01:00
Yurii Soldak
7f3b96cff9 adapter: address 2021-11-05 19:16:52 +01:00
Yurii Soldak
501b0aeecc nrf: update s140v7 SoftDevice version to latest, 7.3.0 2021-11-05 19:11:32 +01:00
deadprogram
899467bab3 modules: update muka/go-bluetooth to latest version
Signed-off-by: deadprogram <ron@hybridgroup.com>
2021-09-03 15:07:01 +02:00
James Lawrence
d985dcb55c fixes bluez 0.55 service registration.
muka/go-bluetooth does some magic so you can use short UUIDs and it'll auto
expand them to the full 128 bit uuid. setting these flags disables that behavior.

related issues:
- allows updating muka library to resolve https://github.com/tinygo-org/bluetooth/issues/35
- fixes the regression the upgrade caused https://github.com/tinygo-org/bluetooth/issues/46
- commit causing the regression in upstream 1c4c1c8613
2021-09-03 15:05:44 +02:00
deadprogram
ab40fc77fe examples: add scanner for Adafruit Clue
Signed-off-by: deadprogram <ron@hybridgroup.com>
2021-07-21 22:18:58 +02:00
deadprogram
d472af8a8e modules: add tinyterm package for clue example
Signed-off-by: deadprogram <ron@hybridgroup.com>
2021-07-21 22:18:58 +02:00
deadprogram
3cbf47cc61 macos: update xcode in use to 10.3.0
Signed-off-by: deadprogram <ron@hybridgroup.com>
2021-07-21 00:36:28 +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