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