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

nRF8001[server] Device disconnected after 10 minutes automatically?

"Hi Guys, my nRF8001 BLE is working perfectly, But recently i was performing regression testing to check BLE connection, their i faced one issue after 10 minutes from nRF8001[server] device disconnected message received on nRF master control Android APP. i tried this many times same issue came. i don't want device disconnection from server. How do i prevent this disconnecion. For power saving i have my own user API function to let server goto sleep.

regards, gbiradar"

  • Hi @David Edwin, actually once peer to server is established, i'm sending every minute 20 Bytes of data from server to peer using SendData API. Other then that nothing happening between peer and server. Even i tried to have continuos communication to and fro but still disconnection.

  • What we need in order to help further is a log of SPI messages received from the 8001 device leading up to the disconnect

  • Hi @David Edwin & @Anders Strand, this is the log which is generated in nRF Control APP,

    href="nRF Master Control Panel, 2016-06-01

    No name (F2:48:EC:8E:08:93)

    I 11:41:20.625 [Server] Server started

    V 11:41:20.654 Heart Rate (0x180D)

    • Heart Rate Measurement [N] (0x2A37)

       Client Characteristic Configuration (0x2902)

    • Body Sensor Location [R] (0x2A38)

    • Heart Rate Control Point [W] (0x2A39)

    User Data (0x181C)

    • Last Name [R W] (0x2A90)

    • Gender [R W] (0x2A8C)

    Link Loss (0x1803)

    • Alert Level [R W] (0x2A06)

    V 11:41:21.016 Connecting to F2:48:EC:8E:08:93...

    D 11:41:21.033 gatt = device.connectGatt(autoConnect = false)

    D 11:41:21.101 [Server callback] Connection state changed with status: 0 and new state:

    CONNECTED (2)

    I 11:41:21.116 [Server] Device with address F2:48:EC:8E:08:93 connected

    D 11:41:21.134 [Callback] Connection state changed with status: 0 and new state: CONNECTED

    (2)

    I 11:41:21.148 Connected to F2:48:EC:8E:08:93

    D 11:41:21.163 wait(600ms)

    V 11:41:21.777 Discovering services...

    D 11:41:21.798 gatt.discoverServices()

    D 11:41:24.336 [Callback] Services discovered with status: 0

    I 11:41:24.369 Services discovered

    V 11:41:24.516 Generic Access (0x1800)

    • Device Name [R] (0x2A00)

    • Appearance [R] (0x2A01)

    • Peripheral Preferred Connection Parameters [R] (0x2A04)

    Generic Attribute (0x1801)

    Unknown Service (00000001-0000-1000-8000-00805f9b34fb)

    • Unknown Characteristic [I R] (00001000-0000-1000-8000-00805f9b34fb)

       Client Characteristic Configuration (0x2902)

    • Unknown Characteristic [R W] (00001100-0000-1000-8000-00805f9b34fb)

    • Battery Level [R] (0x2A19)

    • Current Time [R W] (0x2A2B)

    • Intermediate Temperature [R W] (0x2A1E)

    • Temperature Measurement [R W] (0x2A1C)

    Nordic UART Service (6e400001-b5a3-f393-e0a9-e50e24dcca9e)

    • RX Characteristic (6e400002-b5a3-f393-e0a9-e50e24dcca9e)

    • TX Characteristic (6e400003-b5a3-f393-e0a9-e50e24dcca9e)

    • Unknown Characteristic [R] (6e400005-b5a3-f393-e0a9-e50e24dcca9e)

    • Unknown Characteristic (6e400004-b5a3-f393-e0a9-e50e24dcca9e)

    Battery Service (0x180F)

    • Battery Level [R] (0x2A19)

    Current Time Service (0x1805)

    • Current Time (0x2A2B)

    Health Thermometer (0x1809)

    • Temperature Measurement (0x2A1C)

    V 11:41:28.719 Enabling indications for 00001000-0000-1000-8000-00805f9b34fb

    D 11:41:28.738 gatt.writeDescriptor(00002902-0000-1000-8000-00805f9b34fb, value=0x0200)

    I 11:41:28.879 Data written to descr. 00002902-0000-1000-8000-00805f9b34fb, value: (0x) 02-

    00

    A 11:41:28.893 "Indications enabled" sent

    D 11:41:28.924 gatt.setCharacteristicNotification(00001000-0000-1000-8000-00805f9b34fb,

    true)

    V 11:41:28.938 Indications enabled for 00001000-0000-1000-8000-00805f9b34fb

    I 11:42:23.247 Indication received from 00001000-0000-1000-8000-00805f9b34fb, value: (0x)

    01-00-00-00-00-00-00-00-FF-00-00-00-0A-00-00-84-70-05-0D-0D

    A 11:42:23.290 "(0x) 01-00-00-00-00-00-00-00-FF-00-00-00-0A-00-00-84-70-05-0D-0D" received

    I 11:43:25.256 Indication received from 00001000-0000-1000-8000-00805f9b34fb, value: (0x)

    01-00-00-00-00-00-00-00-FF-00-00-00-0A-00-00-8D-E4-05-0D-0D

    A 11:43:25.291 "(0x) 01-00-00-00-00-00-00-00-FF-00-00-00-0A-00-00-8D-E4-05-0D-0D" received

    I 11:44:27.169 Indication received from 00001000-0000-1000-8000-00805f9b34fb, value: (0x)

    01-00-00-00-00-00-00-00-FF-00-00-00-0A-00-00-97-58-05-0D-0D

    A 11:44:27.203 "(0x) 01-00-00-00-00-00-00-00-FF-00-00-00-0A-00-00-97-58-05-0D-0D" received

    I 11:45:29.179 Indication received from 00001000-0000-1000-8000-00805f9b34fb, value: (0x)

    01-00-00-00-00-00-00-00-FF-00-00-00-0A-00-00-A0-CC-05-0D-0D

    A 11:45:29.224 "(0x) 01-00-00-00-00-00-00-00-FF-00-00-00-0A-00-00-A0-CC-05-0D-0D" received

    I 11:46:31.141 Indication received from 00001000-0000-1000-8000-00805f9b34fb, value: (0x)

    01-00-00-00-00-00-00-00-FF-00-00-00-0A-00-00-AA-40-05-0D-0D

    A 11:46:31.188 "(0x) 01-00-00-00-00-00-00-00-FF-00-00-00-0A-00-00-AA-40-05-0D-0D" received

    I 11:47:33.102 Indication received from 00001000-0000-1000-8000-00805f9b34fb, value: (0x)

    01-00-00-00-00-00-00-00-FF-00-00-00-0A-00-00-B3-B4-05-0D-0D

    A 11:47:33.142 "(0x) 01-00-00-00-00-00-00-00-FF-00-00-00-0A-00-00-B3-B4-05-0D-0D" received

    I 11:48:35.064 Indication received from 00001000-0000-1000-8000-00805f9b34fb, value: (0x)

    01-00-00-00-00-00-00-00-FF-00-00-00-0A-00-00-BD-28-05-0D-0D

    A 11:48:35.102 "(0x) 01-00-00-00-00-00-00-00-FF-00-00-00-0A-00-00-BD-28-05-0D-0D" received

    I 11:49:37.074 Indication received from 00001000-0000-1000-8000-00805f9b34fb, value: (0x)

    01-00-00-00-00-00-00-00-FF-00-00-00-0A-00-00-C6-9C-05-0D-0D

    A 11:49:37.142 "(0x) 01-00-00-00-00-00-00-00-FF-00-00-00-0A-00-00-C6-9C-05-0D-0D" received

    I 11:50:39.035 Indication received from 00001000-0000-1000-8000-00805f9b34fb, value: (0x)

    01-00-00-00-00-00-00-00-FF-40-00-00-0A-00-00-D0-10-05-0D-0D

    A 11:50:39.074 "(0x) 01-00-00-00-00-00-00-00-FF-40-00-00-0A-00-00-D0-10-05-0D-0D" received

    D 11:51:21.205 [Server callback] Connection state changed with status: 0 and new state:

    DISCONNECTED (0)

    I 11:51:21.240 [Server] Device disconnected

    D 11:51:21.278 [Callback] Connection state changed with status: 0 and new state:

    DISCONNECTED (0)

    I 11:51:21.306 Disconnected

    D 11:51:21.534 gatt.refresh()

    D 11:51:21.561 gatt.close()

    ">nRF Master Control Panel, 2016-06-01

    No name (F2:48:EC:8E:08:93)

    I 11:41:20.625 [Server] Server started

    V 11:41:20.654 Heart Rate (0x180D)

    • Heart Rate Measurement [N] (0x2A37)

       Client Characteristic Configuration (0x2902)

    • Body Sensor Location [R] (0x2A38)

    • Heart Rate Control Point [W] (0x2A39)

    User Data (0x181C)

    • Last Name [R W] (0x2A90)

    • Gender [R W] (0x2A8C)

    Link Loss (0x1803)

    • Alert Level [R W] (0x2A06)

    V 11:41:21.016 Connecting to F2:48:EC:8E:08:93...

    D 11:41:21.033 gatt = device.connectGatt(autoConnect = false)

    D 11:41:21.101 [Server callback] Connection state changed with status: 0 and new state:

    CONNECTED (2)

    I 11:41:21.116 [Server] Device with address F2:48:EC:8E:08:93 connected

    D 11:41:21.134 [Callback] Connection state changed with status: 0 and new state: CONNECTED

    (2)

    I 11:41:21.148 Connected to F2:48:EC:8E:08:93

    D 11:41:21.163 wait(600ms)

    V 11:41:21.777 Discovering services...

    D 11:41:21.798 gatt.discoverServices()

    D 11:41:24.336 [Callback] Services discovered with status: 0

    I 11:41:24.369 Services discovered

    V 11:41:24.516 Generic Access (0x1800)

    • Device Name [R] (0x2A00)

    • Appearance [R] (0x2A01)

    • Peripheral Preferred Connection Parameters [R] (0x2A04)

    Generic Attribute (0x1801)

    Unknown Service (00000001-0000-1000-8000-00805f9b34fb)

    • Unknown Characteristic [I R] (00001000-0000-1000-8000-00805f9b34fb)

       Client Characteristic Configuration (0x2902)

    • Unknown Characteristic [R W] (00001100-0000-1000-8000-00805f9b34fb)

    • Battery Level [R] (0x2A19)

    • Current Time [R W] (0x2A2B)

    • Intermediate Temperature [R W] (0x2A1E)

    • Temperature Measurement [R W] (0x2A1C)

    Nordic UART Service (6e400001-b5a3-f393-e0a9-e50e24dcca9e)

    • RX Characteristic (6e400002-b5a3-f393-e0a9-e50e24dcca9e)

    • TX Characteristic (6e400003-b5a3-f393-e0a9-e50e24dcca9e)

    • Unknown Characteristic [R] (6e400005-b5a3-f393-e0a9-e50e24dcca9e)

    • Unknown Characteristic (6e400004-b5a3-f393-e0a9-e50e24dcca9e)

    Battery Service (0x180F)

    • Battery Level [R] (0x2A19)

    Current Time Service (0x1805)

    • Current Time (0x2A2B)

    Health Thermometer (0x1809)

    • Temperature Measurement (0x2A1C)

    V 11:41:28.719 Enabling indications for 00001000-0000-1000-8000-00805f9b34fb

    D 11:41:28.738 gatt.writeDescriptor(00002902-0000-1000-8000-00805f9b34fb, value=0x0200)

    I 11:41:28.879 Data written to descr. 00002902-0000-1000-8000-00805f9b34fb, value: (0x) 02-

    00

    A 11:41:28.893 "Indications enabled" sent

    D 11:41:28.924 gatt.setCharacteristicNotification(00001000-0000-1000-8000-00805f9b34fb,

    true)

    V 11:41:28.938 Indications enabled for 00001000-0000-1000-8000-00805f9b34fb

    I 11:42:23.247 Indication received from 00001000-0000-1000-8000-00805f9b34fb, value: (0x)

    01-00-00-00-00-00-00-00-FF-00-00-00-0A-00-00-84-70-05-0D-0D

    A 11:42:23.290 "(0x) 01-00-00-00-00-00-00-00-FF-00-00-00-0A-00-00-84-70-05-0D-0D" received

    I 11:43:25.256 Indication received from 00001000-0000-1000-8000-00805f9b34fb, value: (0x)

    01-00-00-00-00-00-00-00-FF-00-00-00-0A-00-00-8D-E4-05-0D-0D

    A 11:43:25.291 "(0x) 01-00-00-00-00-00-00-00-FF-00-00-00-0A-00-00-8D-E4-05-0D-0D" received

    I 11:44:27.169 Indication received from 00001000-0000-1000-8000-00805f9b34fb, value: (0x)

    01-00-00-00-00-00-00-00-FF-00-00-00-0A-00-00-97-58-05-0D-0D

    A 11:44:27.203 "(0x) 01-00-00-00-00-00-00-00-FF-00-00-00-0A-00-00-97-58-05-0D-0D" received

    I 11:45:29.179 Indication received from 00001000-0000-1000-8000-00805f9b34fb, value: (0x)

    01-00-00-00-00-00-00-00-FF-00-00-00-0A-00-00-A0-CC-05-0D-0D

    A 11:45:29.224 "(0x) 01-00-00-00-00-00-00-00-FF-00-00-00-0A-00-00-A0-CC-05-0D-0D" received

    I 11:46:31.141 Indication received from 00001000-0000-1000-8000-00805f9b34fb, value: (0x)

    01-00-00-00-00-00-00-00-FF-00-00-00-0A-00-00-AA-40-05-0D-0D

    A 11:46:31.188 "(0x) 01-00-00-00-00-00-00-00-FF-00-00-00-0A-00-00-AA-40-05-0D-0D" received

    I 11:47:33.102 Indication received from 00001000-0000-1000-8000-00805f9b34fb, value: (0x)

    01-00-00-00-00-00-00-00-FF-00-00-00-0A-00-00-B3-B4-05-0D-0D

    A 11:47:33.142 "(0x) 01-00-00-00-00-00-00-00-FF-00-00-00-0A-00-00-B3-B4-05-0D-0D" received

    I 11:48:35.064 Indication received from 00001000-0000-1000-8000-00805f9b34fb, value: (0x)

    01-00-00-00-00-00-00-00-FF-00-00-00-0A-00-00-BD-28-05-0D-0D

    A 11:48:35.102 "(0x) 01-00-00-00-00-00-00-00-FF-00-00-00-0A-00-00-BD-28-05-0D-0D" received

    I 11:49:37.074 Indication received from 00001000-0000-1000-8000-00805f9b34fb, value: (0x)

    01-00-00-00-00-00-00-00-FF-00-00-00-0A-00-00-C6-9C-05-0D-0D

    A 11:49:37.142 "(0x) 01-00-00-00-00-00-00-00-FF-00-00-00-0A-00-00-C6-9C-05-0D-0D" received

    I 11:50:39.035 Indication received from 00001000-0000-1000-8000-00805f9b34fb, value: (0x)

    01-00-00-00-00-00-00-00-FF-40-00-00-0A-00-00-D0-10-05-0D-0D

    A 11:50:39.074 "(0x) 01-00-00-00-00-00-00-00-FF-40-00-00-0A-00-00-D0-10-05-0D-0D" received

    D 11:51:21.205 [Server callback] Connection state changed with status: 0 and new state:

    DISCONNECTED (0)

    I 11:51:21.240 [Server] Device disconnected

    D 11:51:21.278 [Callback] Connection state changed with status: 0 and new state:

    DISCONNECTED (0)

    I 11:51:21.306 Disconnected

    D 11:51:21.534 gatt.refresh()

    D 11:51:21.561 gatt.close()

  • As Ander said, we need the log of the SPI messages between the MCU And the nRF8001. The log of the nRF Control APP is good but need the nRF8001 SPI messages (commands and Events) to fix your problem.

  • Hi @Anders Strand & @David Edwin, before i can send some information related how communication between MCU and nRF8001. I have to ask my companies client. I will get back to that as soon as possible. Till then, can any of you tell me what is setup messages content in services.h.

    I need to analyse, what is the array of hex values corresponds to.

    #define SETUP_MESSAGES_CONTENT {
    {0x00,
    {
    0x07,0x06,0x00,0x00,0x03,0x02,0x41,0xfe,
    },
    },
    0x07 - Length of the array, 0x06 - system commands but after that i'm unable to interpret. A small help on this is quite helpful.

Related