On Wed, Jun 01, 2016 at 07:24:01PM +0200, Stephane D'Alu wrote:
> Hello again,
>
> I was trying to add a service/characteristic to the bleprph example, and
> thought it would be as simple as:
>
> * add a gatt_svr_chr_access_ function
> * add the service definition in gatt_svr_svcs
> * increase some configuration values (max_services, max_attrs)
> to be safe
>
> Once done, I'm not able to discover services anymore.
> Did I miss something?
>
> (Using gcc 4.9.2, and newt 0.9.0)
Hi Stephane,
It looks like you found a bug in the nimble host read-group-type
request handler. With the rearranged registered attributes, the host
fails to send the response to the client's initial service discovery
request.
I have pushed the attached commit to the develop branch. If you want to
use the develop branch, you'll need to do the following:
1. Make the following change to your project.yml file:
FROM:
repository.apache-mynewt-core:
type: github
vers: 0-latest
user: apache
repo: incubator-mynewt-core
TO:
repository.apache-mynewt-core:
type: github
vers: 0-dev
user: apache
repo: incubator-mynewt-core
(change the "vers" field).
2. Upgrade your packages with "newt upgrade", e.g.,
[ccollins@iori:~/tmp/myproj]$ newt upgrade
apache-mynewt-core
Would you like to upgrade repository apache-mynewt-core from 0.7.9-none to
0.0.0-none ? [Yn] y
Thanks!
Chris
commit 43143c9027aef473c22b2b6a6accaa4cfe1237c5
Author: Christopher Collins <[email protected]>
Date: Wed Jun 1 11:18:56 2016 -0700
BLE Host - Handle oddly sized read-group-type rsp.
diff --git a/net/nimble/host/src/ble_att_svr.c b/net/nimble/host/src/ble_att_svr.c
index 49238ac..7f064db 100644
--- a/net/nimble/host/src/ble_att_svr.c
+++ b/net/nimble/host/src/ble_att_svr.c
@@ -1957,6 +1957,7 @@ done:
ble_att_read_group_type_rsp_write(rsp_buf,
BLE_ATT_READ_GROUP_TYPE_RSP_BASE_SZ,
&rsp);
+ rc = 0;
}
*out_txom = txom;