From 82c023c4a93e03f6271f70c3fe43e6478a6891e2 Mon Sep 17 00:00:00 2001 From: Paul Wratt Date: Tue, 5 Jul 2022 03:08:45 +1200 Subject: [PATCH] fix wording "very my good friends" => "my very good friends" - sorry I ment to post this PR many months ago --- part8-breakout-ble/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/part8-breakout-ble/README.md b/part8-breakout-ble/README.md index 0ad6fbc..643bdaa 100644 --- a/part8-breakout-ble/README.md +++ b/part8-breakout-ble/README.md @@ -70,7 +70,7 @@ Instead of advertising, `run_search()` puts the Bluetooth controller into scanni We send a `connect()` request to that address (LE Create Connection in the TI docs) and now call `bt_conn()` repeatedly until we're notified that the connection has completed successfully. When this happens, we get a non-zero `connection_handle`. We'll use this to identify communications from/to the echo service from now on. -Next we send a subscription request to the service using that handle in `sendACLsubscribe()` in _bt.c_. We tell it that we're interested in receiving updates to its stored value (or "characteristic"). I actually did a lot of reverse-engineering to get to this code. ACL data packets over HCI are not widely documented. Have a read of [this forum thread](https://www.raspberrypi.org/forums/viewtopic.php?t=233140) to see the kind of things I did to succeed. `gatttool` and `hcitool` on Raspbian turned out to be very my good friends! +Next we send a subscription request to the service using that handle in `sendACLsubscribe()` in _bt.c_. We tell it that we're interested in receiving updates to its stored value (or "characteristic"). I actually did a lot of reverse-engineering to get to this code. ACL data packets over HCI are not widely documented. Have a read of [this forum thread](https://www.raspberrypi.org/forums/viewtopic.php?t=233140) to see the kind of things I did to succeed. `gatttool` and `hcitool` on Raspbian turned out to be my very good friends! Finally, we call `acl_poll()` repeatedly to see if there are any updates waiting. The data comes to us in the form of an ACL packet, which identifies, amongst other things, the connection handle it was sent to/using (worth checking against our recorded handle so we know it's for us) as well as data length and an opcode.