Hi Chris,

You are 100% right, and I realized after I had just it send, it was a
copy/paste error.

With the code you have there, I still have the issue I described - I just
copied and tested it.

Cheers
James


On Wed, May 18, 2016 at 8:23 PM, Christopher Collins <[email protected]>
wrote:

> Hi James,
>
> On Wed, May 18, 2016 at 07:40:50PM -0700, James Howarth wrote:
> > #define GATT_SVR_CHR_TXPWR_TXPWRLVL_SET 0x2A08
> > ....
> >
> >   },
> >
> >     [3] = {
> >         /*** Service: TXPWR */
> >         .type = BLE_GATT_SVC_TYPE_PRIMARY,
> >         .uuid128 = BLE_UUID16(GATT_SVR_SVC_TXPWR_UUID),
> >         .characteristics = (struct ble_gatt_chr_def[]) { {
> >             .uuid128 = BLE_UUID16(GATT_SVR_CHR_TXPWR_TXPWRLVL),
> >             .access_cb = gatt_svr_chr_txpwrlvl_cb,
> >             .flags = BLE_GATT_CHR_F_READ,
> >         }, {
> >         .characteristics = (struct ble_gatt_chr_def[]) { {
> >             .uuid128 = BLE_UUID16(GATT_SVR_CHR_TXPWR_TXPWRLVL_SET),
> >             .access_cb = gatt_svr_chr_txpwrlvl_cb,
> >             .flags = BLE_GATT_CHR_F_READ,
> >         }, {
> >             0, /* No more characteristics in this service. */
> >         } },
> >     },
> >
> >   {
> >         0, /* No more services. */
> >     },
> > };
>
> Are you sure that is the code you used?  I would not expect that to
> compile due to extra ".characteristics = ..." line.  If that is indeed
> the correct code, then try removing that line (and shame on gcc :)) as
> follows:
>
>      [3] = {
>          /*** Service: TXPWR */
>          .type = BLE_GATT_SVC_TYPE_PRIMARY,
>          .uuid128 = BLE_UUID16(GATT_SVR_SVC_TXPWR_UUID),
>          .characteristics = (struct ble_gatt_chr_def[]) { {
>              .uuid128 = BLE_UUID16(GATT_SVR_CHR_TXPWR_TXPWRLVL),
>              .access_cb = gatt_svr_chr_txpwrlvl_cb,
>              .flags = BLE_GATT_CHR_F_READ,
>          }, {
>              .uuid128 = BLE_UUID16(GATT_SVR_CHR_TXPWR_TXPWRLVL_SET),
>              .access_cb = gatt_svr_chr_txpwrlvl_cb,
>              .flags = BLE_GATT_CHR_F_READ,
>          }, {
>              0, /* No more characteristics in this service. */
>          } },
>      },
>
>    {
>          0, /* No more services. */
>      },
>  };
>
> Chris
>

Reply via email to