Commit graph

20 commits

Author SHA1 Message Date
Carter Melnychuk
314ca89209
Winrt full support (#266)
windows: full functionality
2024-05-09 18:34:24 +02:00
Elara
6b08161955 Add Address field to Windows Device struct 2024-04-24 19:53:59 +02:00
Jagoba Gascón
52c3c068e2 winrt: bump to latest
The latest version of winrt-go fixes an error that could cause function
name collisions for static methods. Diff:
43a71786fb...a2e4fc03f5
2024-03-21 20:00:59 +01:00
Ayke van Laethem
852fa4ab6a windows: check for error when scanning
This was my attempt to figure out why scanning doesn't work on my
system. Sadly it still doesn't work, but at least I know there's no
error in this place.

(Note: I'm doing this on Windows ARM in a VM, so it's a rather special
setup).
2024-03-21 06:46:36 +01:00
Ayke van Laethem
0087e0549b all: change ManufacturerData from a map to a slice
This is a breaking change, but I believe it is necessary for
correctness. Because maps have an undefined iteration order, the actual
advertised packet could change each time which I think is a bad thing.
In addition to that, using a slice should be much more lightweight than
using a map.

I've also added some tests (that should have been there in the first
place) and added some manufacturer data to the advertisement example.

Furthermore, I've optimized the code that constructs manufacturer data
for raw advertisement payloads, it should now be entirely free of heap
allocations.
2024-02-21 12:39:24 +01:00
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
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
A.J. Lucas
cf51caa6ad gap/windows: Scan should set scanning mode to active to match other platforms 2023-05-11 13:54:22 +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
nv-h
c85b6cc9d3 windows: support empty manufacturer data
Fixed a runtime error when `manufacturerData` is empty.
2022-10-19 08:48:34 +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
Jagoba Gascón
9b9512fbc9 advertising: add manufacturer data field to advertisement payload 2022-05-22 14:36:27 +02:00
deadprogram
a55e2194c5 domain: use custom domain for all uses of winbt subpackage
Signed-off-by: deadprogram <ron@hybridgroup.com>
2020-09-09 16:04:40 +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
56c0c2ecda windows: use Addresser interface for the MAC address for a peripheral
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
Ayke van Laethem
d07cf38d66
all: distinguish between public and random addresses
This is necessary when connecting to a device when using the SoftDevice.
The information is not set on Linux and Windows and is ignored on those
platform when connecting.
2020-06-04 14:12:14 +02:00
Ayke van Laethem
518debbbfe
Move to github.com/tinygo-org/bluetooth 2020-05-31 16:45:26 +02:00
Ayke van Laethem
22553053ff Add initial Windows support
Only scanning has been implemented so far. The most work was really just
understanding WinRT well enough to get to this point.
2020-05-30 21:51:27 +02:00