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

MIN_CONN_INTERVAL MAX_CONN_INTERVAL SLAVE_LATENCY CONN_SUP_TIMEOUT parameters values for Android and iOS

MIN_CONN_INTERVAL

MAX_CONN_INTERVAL

SLAVE_LATENCY

CONN_SUP_TIMEOUT

Hey guys, I want use my device with Android as well as iOS, but i am facing some issues for data sending over BLE... I am getting errors like 0x3401, 0x3004...

Anyone can help me for this, what will be the parameters value, which can be suitable for android as well as iOS.

In android app, i have set latency on High... And in nRF device it is 3... Please suggest if any changes is necessary...

If any changes necessary from iOS App or Android App please suggest.

error_code_status = ble_gyro_string_send_(&m_gyro, read_buffer_life, 14);

i getting this errors on above function or service calling... (In this variable "error_code_status")

My maximum data sending rate is 1-Frame/50ms.(20-Frame per 1-Second)

  • For iOS I would recommend following apples bluetooth asseory design guidelines. But if your maximum datarate is 1 packet/50 ms I guess that should could be your maximum. Then use maybe 30 as min. The default connection interval for iOS is usually within this range. For Android it can vary a bit. But Android would normally accept the range.

    0x3004 = BLE_ERROR_NO_TX_PACKETS. So you have to wait until a buffer is freed. The number of buffers available depends on your softdevice throughput settings.

    0x3401= BLE_ERROR_GATTS_SYS_ATTR_MISSING. System attributes missing, use sd_ble_gatts_sys_attr_set to set them to a known value.

    Look at the documentation for sd_ble_gatts_hvx for details on how to use this.

  • Probably not, as that won't be accepted by iOS. Min = 20 and max = 40 should work. It migth be possible to get faster intervals as well, e.g. by using min = 12.5 and max = 22.5. But it might not be accepted by the master, which in case you will have to retry using more relaxed parameters.

  • but my i am sending 1 packet in 50ms then it's working min 20 and max 40???

  • I guess you could set max to 50, but you should make sure you have medium to high bandwidth, so you are able to send multiple packets in one connection event in case a packet is lost in the previous event. Note that the interval is decided by the master, the peripheral can only request to change the intervals and choose to disconnet if it doesn't work with the given interval. Because of the way the protocol I don't think you can rely on sending a packet exactly every 50th ms. Lets say you want to send sensor data; in this case I would enable radio notifications so I can check the sensor value just prior to the connection event so i know the data is fresh. But even in this case some packets will have errors, so a retransmitt every now and then is expected. So in some connection events you might notreceive anything, while in the next you'll receive two values.

Related