Peripheral device has 2 services,but central can find only 1 service(0x1001）.
I want to find other service(0x0001)
According to the message seems to be looking for 0x1001,but ! want to looking for every services.
I don not know why this program look for only 0x1001.
Incidentally Central program is based ble_app_uart_c.
Please tell me how to find every services.
I Hope to have a central sample program that handles multiple services
Starting discovery of service with UUID 0x1001 on connection handle 0x0.
Found service UUID 0x1001.
Discovery of service with UUID 0x1001 completed with success on connection handle 0x0
uart_uuid.type = p_ble_nus_c -> uuid_type;
uart_uuid.uuid = 0x0001;
err_code = ble_db_discovery_evt_register (& uart_uuid);
Was added to the function ble_nus_c_init
A service of 0x0001 was also found
However, the message
"BLE_DB_DISC: DEBUG: Discovery of service wit  SDH: DEBUG: RAM start at 0x200020c8.
Reset is applied after.
Do not know why resetting will take place?
Have you tested your peripheral with for example nRF Connect? Are you able to find both services there?
If you get a reset you probably have a call to APP_ERROR_CHECK() with an error code somewhere.
I'm not sure what SDK you are using, but you should turn off compiling optimizations, define DEBUG, and put a breakpoint in the app_error_handler(). Then you can see an error code, a line number and a file name.
See this for more information.
I found both services by LightBlue application of android.
I will try to do your advise later.
Thank you for your help.
I knew the reason of reset.
p_ble_nus_evt->handles is NULL in function ble_nus_c_evt_handler
But I do not know why p_ble_nus_evt->handles is NULL.
Exactly which function returns the error? ble_nus_c_handles_assign()?