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

S110 sticks for Service discovery from iPhone

Hello, Nordic stuff.

I've been working at S110 firmware and coming into a problem of service discovery from a central device(iPhone).

I'm using S110(v6.0), Keil(V4.73) and SKD(V5.2).

S110 supports one custom service which like a SPP profile and it provides a file transfer function as below.

S110 is connected with PC terminal(Tera Term) using UART port. The UART baud rate is 115200bps.

1.S110 starts advertising

2.iPhone(Lightblue) scans and finds S110

3.iPhone connect to S110 and starts service discovery

4.iPhone enables CCCD of S110

5.S110 starts transmitting data from PC with sd_ble_gatts_hvx()

6.iPhone disconnects at the end of transmission.

7.S110 restarts advertising again

8.iPhoen goes back to step 2

This works fine normally.

But when iPhone disconnects before end of transmssion and goes back to step 2, At step 3, As S110 dose not response to the "Read By Group Type Request"(see No. 3255 of sniffer log), re-connection from iPhone is failed.(see No. 4235)

S110 sends data(max. 20 bytes) from PC in the ble event handler using sd_ble_gatts_hvx() as below.

static void on_ble_evt(ble_evt_t * p_ble_evt)

{

....

case BLE_EVT_TX_COMPLETE:

    sd_ble_gatts_hvx(conn_handle, &hvx_params);

    break;

....

}

If S110 sends data in main loop context(not in event handler), it works fine.

I think it is the problem of ATT or GATTS of S110 side, but I cannot explain what's happeing inside and how can I manage this problem.

Please help me.

best regard.

Service_Discovry_by_iPhone(LightBlue)_after_disconnecting_from_iPhone_20160115_1.pcap

Parents
  • Hi, RK.

    Thanks for your reply. I'm handling BLE_GATTS_EVT_SYS_ATTR_MISSING event. But when the phenomenon occurs, BLE_GATTS_EVT_SYS_ATTR_MISSING event is not notified from the softdevice. When the phenomenon occurs and re-connection fails(1st re-connection fails), but 2nd re-connetion succeeds and I can confirm that BLE_GATTS_EVY_SYS_ATTR_MISSSING event is notified from the softdevice. Do you have any ideas what is happening in softdevice inside?

    best regards.

  • I read this thread(devzone.nordicsemi.com/.../) and changed the S110 version into v7.1.0 on trial. As a result, it works fine. I read the s110_nrf51822_7.1.0 release note and at BLE Buf fixes section it is written like this:Fixed an issue sending data after the link had been disconnected might lead to reduce maximum throughput for the next connection. I wonder if this bug has a relation with my problem. Dose anyone help me?

Reply Children
No Data
Related