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

nrf51822 s120 Multi-link add s110 ble_uart NUS service doesn't work ?

Hi,

As title , I try to add the NUS service that show on the ble_app_uart project into Multi-link project. But it doesn't work .

I want to a central connected to at least two peripheral.what should I do ? the Operation is under SDK10 & s120 .

Thanks .

After changing the program ,I can find the NUS service.Thanks. image description

But I still have some problems. First , I can't connect it ,so i add the "ble_conn_params.h" and something setting. After this operation , I can connect it . Second, Rx service can be used , but Tx service are not lucky. image description

Parents
  • It does not stop at power_manage, it waits for an application event.

    Anyways, I had a look at your application.

    In advertising_init() you are adding the NUS UUID to scanrsp struct, but you are not providing it to ble_advertising_init(&advdata, NULL, &options, on_adv_evt, NULL);

    I changed this to

    err_code = ble_advertising_init(&advdata, &scanrsp, &options, on_adv_evt, NULL);

    But this returns the 0x00000007 error, NRF_ERROR_INVALID_PARAM.

    This is because you are giving it an UUID type that we haven't added to the stack with sd_ble_uuid_vs_add(), this is giving to the stack in services_init(), which is called after advertising_init(). Change the order of services_init() and advertising_init() and see if you get the result you want.

Reply
  • It does not stop at power_manage, it waits for an application event.

    Anyways, I had a look at your application.

    In advertising_init() you are adding the NUS UUID to scanrsp struct, but you are not providing it to ble_advertising_init(&advdata, NULL, &options, on_adv_evt, NULL);

    I changed this to

    err_code = ble_advertising_init(&advdata, &scanrsp, &options, on_adv_evt, NULL);

    But this returns the 0x00000007 error, NRF_ERROR_INVALID_PARAM.

    This is because you are giving it an UUID type that we haven't added to the stack with sd_ble_uuid_vs_add(), this is giving to the stack in services_init(), which is called after advertising_init(). Change the order of services_init() and advertising_init() and see if you get the result you want.

Children
Related