This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

S130 Example Doesn't Work Out Of Box (Un touched)

I'm using the nRF51 DK (pca10028) with the S130 0.9.0-1 ALPHA release and the experimental_ble_app_s130 example from Keil 5 doesn't work out of the box. Also I'm running 7.2 SDK.

It'll compile and run, but the uart output shows the following:

S130_DEMO_LOG: ....\src\main.c: 1321: board_configure: Hardware initiated. Usign PCA100xx (Dev. kit) S130_DEMO_LOG: ....\src\main.c: 1232: main: Enabling SoftDevice... #########################

S130 Demo application

######################### INFO: Press button 0 to connect to peripherals. INFO: Press button 1 to see the buffered data INFO: Press both 0 and 1 buttons to quit demo. S130_DEMO_LOG: ....\src\main.c: 709: sd_ble_uuid_vs_add() error code 0x3001 S130_DEMO_LOG: ....\src\main.c: 1279: app_assert_callback: APP ASSERT: line = 710 file = ....\src\main.c

Any input that could be helpful would be amazing. Below is a snippet of the function being called with the error message:

static void own_service_setup(void) { uint32_t error_code = NRF_ERROR_NOT_FOUND; ble_uuid_t own_service_uuid = {0}; ble_uuid_t attr_uuid = {0}; ble_uuid_t desc_uuid = {0}; ble_gatts_char_md_t char_md = {0}; ble_gatts_attr_t attr = {0}; ble_gatts_attr_md_t attr_md = {0}; ble_gatts_attr_md_t cccd_md = {0};

uint8_t                 characteristic_value[]  = SERVICE_CHARACTERISTIC_VALUE;
ble_gatts_attr_md_t     desc_md                 = {0};
ble_gatts_attr_t        desc                    = {0};
uint8_t                 uuid_type               = 0;
ble_uuid128_t           uuid128                 = {SERVICE_UUID128};
uint16_t                own_desc_handle         = 0;    
uint8_t                 own_desc_value[]        = SERVICE_CHARACTERISTIC_DESC_VALUE;
uint16_t                own_service_handle      = 0;

if ((error_code = sd_ble_uuid_vs_add(&uuid128, &uuid_type)) != NRF_SUCCESS)
{
    LOG_DEBUG("sd_ble_uuid_vs_add() error code 0x%x", error_code);
    APP_ASSERT (false);
}

own_service_uuid.type = uuid_type;

if ((error_code = sd_ble_gatts_service_add(BLE_GATTS_SRVC_TYPE_PRIMARY, &own_service_uuid, &own_service_handle)) != NRF_SUCCESS)
{
    LOG_DEBUG("sd_ble_gatts_service_add() error code 0x%x", error_code);
    APP_ASSERT (false);
}
Parents
  • Also, this is the UUID it's trying to use:

                                               /* Service exposed to Central to be used for sending average values - of data collected from peer peripherals - as notifications. */
    

    #define SERVICE_UUID128 0x1b, 0xc5, 0xd5, 0xa5, 0x02, 0x00, 0xbe, 0xa1, 0xe3, 0x11, 0x6b, 0xed, 0x40, 0xfe, 0x0b, 0x31 /* UUID 128: 310bfe40-ed6b-11e3-a1be-0002a5d5c51b */ #define SERVICE_CHARACTERISTIC_UUID 0x9001 #define SERVICE_CHARACTERISTIC_VALUE {0,0,0} #define SERVICE_CHARACTERISTIC_DESCRIPTOR_UUID 0x9002 #define SERVICE_CHARACTERISTIC_DESC_VALUE "Average"

Reply
  • Also, this is the UUID it's trying to use:

                                               /* Service exposed to Central to be used for sending average values - of data collected from peer peripherals - as notifications. */
    

    #define SERVICE_UUID128 0x1b, 0xc5, 0xd5, 0xa5, 0x02, 0x00, 0xbe, 0xa1, 0xe3, 0x11, 0x6b, 0xed, 0x40, 0xfe, 0x0b, 0x31 /* UUID 128: 310bfe40-ed6b-11e3-a1be-0002a5d5c51b */ #define SERVICE_CHARACTERISTIC_UUID 0x9001 #define SERVICE_CHARACTERISTIC_VALUE {0,0,0} #define SERVICE_CHARACTERISTIC_DESCRIPTOR_UUID 0x9002 #define SERVICE_CHARACTERISTIC_DESC_VALUE "Average"

Children
No Data
Related