Commit graph

35 commits

Author SHA1 Message Date
deadprogram
5c62ee4645 docs: complete README info about nina-fw support
Signed-off-by: deadprogram <ron@hybridgroup.com>
2024-01-15 22:57:46 -05:00
deadprogram
930a5c7a88 docs: a small mention of the NINA BLE support
Signed-off-by: deadprogram <ron@hybridgroup.com>
2024-01-04 14:35:20 +01:00
Ayke van Laethem
d77521461d linux: rewrite everything to use DBus directly
This is a big rewrite to use DBus calls directly instead of going
through go-bluetooth first.

This is a big change, but I believe it is an improvement. While the
go-bluetooth works for many cases, it's a layer in between that I
believe hurts more than it helps. Without it, we can just program
directly against the BlueZ D-Bus API. The end result is about 10% more
code.

With this rewrite, I fixed the following issues:

  * All MapToStruct warnings are gone, like in
    https://github.com/tinygo-org/bluetooth/issues/193.
  * Advertisements can be restarted after they were stopped. Previously
    this resulted in a panic.
  * Looking at the source code of go-bluetooth, it appears that it
    includes devices from a different Bluetooth adapter than the one
    that's currently scanning. This is fixed with the rewrite.
  * Fix a bug in Adapter.AddService where it would only allow adding a
    single service. Multiple services can now be added.
    This was actually the motivating bug that led me down to rewrite the
    whole thing because I couldn't figure out where the bug was in
    go-bluetooth (it's many layers deep).
  * The `WriteEvent` callback in a characteristic now also gets the
    'offset' parameter which wasn't provided by go-bluetooth.

This rewrite also avoids go-bluetooth specific workarounds like
https://github.com/tinygo-org/bluetooth/pull/74 and
https://github.com/tinygo-org/bluetooth/pull/121.

I have tested all examples in the smoketest-linux Makefile target. They
all still work with this rewrite.
2024-01-03 20:40:48 +01:00
deadprogram
0cc860c018 docs: update README to remove CGo requirement for Windows
Signed-off-by: deadprogram <ron@hybridgroup.com>
2023-09-21 12:54:07 +02:00
Ayke van Laethem
d4bca3e97f README: add note on macOS Big Sur and iTerm2
Also see: https://github.com/tinygo-org/bluetooth/issues/48
2023-04-27 17:14:19 +02: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
8fae597745 docs: update README with info on Windows support
Signed-off-by: deadprogram <ron@hybridgroup.com>
2022-09-25 15:23:24 +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
172569b0a1 docs: few details on newly supported boards
Signed-off-by: deadprogram <ron@hybridgroup.com>
2021-03-05 00:22:43 +01:00
deadprogram
f04c1cbe78 docs: set correct pkg.go.dev path in README badge
Signed-off-by: deadprogram <ron@hybridgroup.com>
2020-09-17 18:48:00 +02:00
deadprogram
a1e82ffa1f docs: adding go bluetooth gopher
Signed-off-by: deadprogram <ron@hybridgroup.com>
2020-09-16 22:46:42 +02:00
deadprogram
2e26f4cdc7 docs: update BBC micro:bit flash instructions
Signed-off-by: deadprogram <ron@hybridgroup.com>
2020-09-15 23:04:38 +02:00
Ron Evans
ca51250ccf
docs: a lot more information on how to install/use Go Bluetooth
Signed-off-by: deadprogram <ron@hybridgroup.com>
2020-09-15 15:26:45 +02:00
deadprogram
97532eaed4 domain: use custom domain for go.mod and examples
Signed-off-by: deadprogram <ron@hybridgroup.com>
2020-09-09 16:04:40 +02:00
Ron Evans
2d909712ee
docs: update README with lots of info/organization and also add CONTRIBUTING guidelines
Signed-off-by: deadprogram <ron@hybridgroup.com>
2020-09-03 15:40:52 +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
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
27cc0b725a docs: show that we can now scan on macOS
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
Ayke van Laethem
40e14a41fc nrf52: add support for S140 version 6
This is used on the Adafruit Circuit Playground Bluefruit bootloader,
for example.
2020-08-30 16:39:16 +02:00
Ayke van Laethem
54cb2b25bb
linux: add GATT client support 2020-06-28 00:22:19 +02:00
Ayke van Laethem
15b3e8e3e2
nrf: add GATT client
This is not entirely complete (some errors are not handled properly) but
it's a start.
2020-06-28 00:21:40 +02:00
Ayke van Laethem
ac6ef1697f
Update README 2020-06-04 13:59:42 +02:00
Ayke van Laethem
b568c93250
all: add support for sending notifications
This is done by enabling the Notify permission and writing to the
characteristics: writes will automatically notify connected centrals.
2020-06-03 19:42:21 +02:00
Ayke van Laethem
37eb64b519
linux: implement local characteristics 2020-06-02 23:57:51 +02:00
Ayke van Laethem
49f8082e4b
all: replace GAP events with auto-restarting advertisements
There used to be GAP events (connect/disconnect). The main purpose for
these events was to allow applications to re-start advertisement when a
connection was lost - on nrf. Unfortunately things work differently on
Linux, which already has this behavior and for which I haven't yet
implemented these events. Therefore I have removed these events and
instead added code to automatically restart advertisement on connection
loss.

Supporting multiple (incoming) connections as a peripheral would be
useful, but is not currently supported.
2020-06-01 23:29:31 +02:00
Ayke van Laethem
086c797e0f
all: simplify advertisement configuration
This changes the previous raw advertisement packets to structured
advertisement configuration. That means you can set the local name not
with a raw byte array but with a normal string.

While this departs a bit from the original low-level interface as is
often used on microcontroller BLE stacks, it is certainly easier to use
and better matches higher level APIs that are commonly provided by
general-purpose operating systems. If there is a need for raw BLE
packets (for baremetal systems only), this can easily be added in the
future.
2020-06-01 14:20:34 +02:00
Ayke van Laethem
d9d425504c
README: add note on API stability 2020-05-31 17:01:04 +02:00
Ayke van Laethem
47097f9d96
Add used API to README 2020-05-31 16:50:59 +02:00
Ayke van Laethem
518debbbfe
Move to github.com/tinygo-org/bluetooth 2020-05-31 16:45:26 +02:00
Ayke van Laethem
f91f73ede2
Add S110 version 8.0.0 SoftDevice for nrf51822
The nrf51822 chip is still widely available, for example in the BBC
micro:bit. Therefore it's a good idea to support it too.

Unfortunately, Nordic decided to change the API in some significant ways
so many parts are not compatible between S110 for nrf51 and the other
nrf52* SoftDevices.
2020-05-31 15:40:57 +02:00
Ayke van Laethem
c26709f8c6 Update README 2020-05-30 23:42:45 +02:00
Ayke van Laethem
f87fda3204
Add smoke tests that run in CI 2020-05-24 19:19:37 +02:00
Ayke van Laethem
0cabe28570
Initial commit 2019-11-08 10:58:02 +01:00