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 Reply Children
No Data
Related