Hi,
I was trying to make nRF8001 peripheral device advertise the services and try to connect using an Android device that is having Nordic Master Control App.
I have based my code using the libraries github.com/.../ble-sdk-arduino and a services.h file generated from nrf studio attached here.
Most of the time this code waits forever in do_aci_setup and eventually timesout.
On rare occassion, I could find the device from Mobile phone and could connect and discover it's devices on that time. (log from MasterControl App was tailed to this question)
- I would like to know if there is something I was doing totally wrong ex: generating incorrect services etc
- Not establishing proper pipe's system in place for communication to happen?
- __packed macro I use from Keil (My developer studio) could be doing some wrong?
- Any other pointers you may give considering that when it works it works flawlessly?
As there is no way I could get debug logs on our chipset, all our debug is based on JTAG's now so if I need to check any command/event sequence to nail this down, please suggest one.
Worked time log from Mobile phone app:- nRF Master Control Panel, 2015-06-24 No name (54:88:40:18:53:4B) V 22:08:01.301 Connecting to 54:88:40:18:53:4B... D 22:08:01.315 gatt = device.connectGatt(autoConnect = false) D 22:08:02.570 [Callback] Connection state changed with status: 0 and new state: CONNECTED (2) I 22:08:02.594 Connected to 54:88:40:18:53:4B D 22:08:02.613 wait(600ms) V 22:08:03.232 Discovering Services... D 22:08:03.247 gatt.discoverServices() D 22:08:07.183 [Callback] Services discovered with status: 0 I 22:08:07.219 Services Discovered V 22:08:07.433 Generic Access (0x1800)
- Device Name [R] (0x2A00)
- Appearance [R] (0x2A01) Generic Attribute (0x1801)
- Service Changed [I] (0x2A05) Client Characteristic Configuration (0x2902) Unknown Service (d0611e78-bbb4-4591-a5f8-487910ae4366)
- Unknown Characteristic [E N W] (8667556c-9a37-4c91-84ed-54ee27d90049) Characteristic Extended Properties (0x2900) Client Characteristic Configuration (0x2902) Battery Service (0x180F)
- Battery Level [N R] (0x2A19) Client Characteristic Configuration (0x2902) Current Time Service (0x1805)
- Current Time [N R] (0x2A2B) Client Characteristic Configuration (0x2902)
- Local Time Information [R] (0x2A0F) Unknown Service (7905f431-b5ce-4e99-a40f-4b1e122d00d0)
- Unknown Characteristic [E W] (69d1d8f3-45e1-49a8-9821-9bbdfdaad9d9) Characteristic Extended Properties (0x2900)
- Unknown Characteristic [N] (9fbf120d-6301-42d9-8c58-25e699a21dbd) Client Characteristic Configuration (0x2902)
- Unknown Characteristic [N] (22eac6e9-24d6-4bb5-be44-b36ace7c7bfb) Client Characteristic Configuration (0x2902) Unknown Service (89d3502b-0f36-433a-8ef4-c502ad55f8dc)
- Unknown Characteristic [E N W] (9b3c81d8-57b1-4a8a-b8df-0e56f7ca51c2) Characteristic Extended Properties (0x2900) Client Characteristic Configuration (0x2902)
- Unknown Characteristic [E N W] (2f7cabce-808d-411f-9a0c-bb92ba96c102) Characteristic Extended Properties (0x2900) Client Characteristic Configuration (0x2902)
- Unknown Characteristic [E R W] (c6b2f38c-23ab-46d8-a6ab-a3a870bbd5d7) Characteristic Extended Properties (0x2900) D 22:08:37.939 [Callback] Connection state changed with status: 0 and new state: DISCONNECTED (0) I 22:08:37.958 Disconnected