Hi!
I'm working with nRF51DK with s110 soft device on it. I'm trying to write simple custom service which reads some data from sensors and send it over BLE to Android app. I wrote my service on the base of ble_app_template_s110_pca10028 and ble_lbs examples. I thought that I included all functions which are required to custom service working correctly, but when I run Master Control Panel on my smartphone, I can see that my application is advertising, but when i try to connect, according to logs, it hangs on discovering services for a few seconds and then it disconnects. Logs from Master Control Panel:
13:01:03.413 Connecting to EE:12:48:CC:D9:98...
13:01:03.418 gatt = device.connectGatt(autoConnect = false)
13:01:03.458 [Callback] Connection state changed with status: 0 and new state: CONNECTED (2)
13:01:03.467 [Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
13:01:03.472 Connected to EE:12:48:CC:D9:98
13:01:03.478 wait(600ms)
13:01:04.099 Discovering Services...
13:01:04.107 gatt.discoverServices()
13:01:16.338 [Callback] Connection state changed with status: 0 and new state: DISCONNECTED (0)
13:01:16.350 [Broadcast] Action received: android.bluetooth.device.action.ACL_DISCONNECTED
13:01:16.356 Disconnected
13:01:16.378 gatt.refresh()
It is my first time when i write application which uses bluetooth, so it is possible that i am making some major mistake, for example not implementing some basic function. So I would be greatful if someone could tell me what functions are required minimum to correctly discover custom service (for now i don't need this application to be optimalized, i just need it to work.)
I am using s110_nRF51_8.0.0 Soft Device and SDK_9.0.0. I attach my project:ekg_proj.rar
Thank You in advance, Ina