How to slow down the speed of suota

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
5 posts / 0 new
Last post
xuguizhong
Offline
Last seen:3 years 4 days ago
Joined:2017-06-30 02:46
How to slow down the speed of suota

Hi Dialog,

My software can work in suota.
During firmware upgrading, I catch the period between DA14580 and phone is about 10ms.
It means DA14580 get firmware from phone by 100HZ.

But I want to slow down it. Say, down to 10HZ.
How can I modify SDK software?
Could you show it ?

Thank you

Device:
vlad
Offline
Last seen:5 months 2 weeks ago
Joined:2017-05-17 10:22
Hi. Connection parameters

Hi. Connection parameters update reuqest is initiated by SUOTA application. So if you have SUOTA app source code, you can modify it. For Android application it is in SuotaApplication.java file:

BluetoothGattSingleton.getGatt().requestConnectionPriority(BluetoothGatt.CONNECTION_PRIORITY_HIGH);

change to CONNECTION_PRIORITY_BALANCED or CONNECTION_PRIORITY_LOW_POWER

If you'd like to use a "stock" SUOTA app as is, you can send connection parameter request from firmware side. Look for reference project ble_app_barebone/../user_barebone.c app_easy_gap_param_update_start(app_connection_idx);

MT_dialog
Offline
Last seen:2 months 3 weeks ago
Staff
Joined:2015-06-08 11:34
Hi xuguizhong,

Hi xuguizhong,

A vlad kindly mentioned, when connected and while the update has started, the SUOTA application from the central will request a parameter update request in order for the connection events to become as short as possible (how short it depends on the phone). So you cannot do much from the peripheral in order to change that and force the central to change the connection intervals (even with an additional connection parameter update from the peripheral side i dont think that it will do the trick, especially while the fw is updating, never tried it though). The most solid option is to change the SUOTA application in order not to send the parameter update request or change the connection priority that the central sends.

Thanks MT_dialog

vlad
Offline
Last seen:5 months 2 weeks ago
Joined:2017-05-17 10:22
"So you cannot do much from

"So you cannot do much from the peripheral in order to change that and force the central to change the connection intervals"
If the connection parameters request doesn't contradict BLE Core specification and specific device rules, usually master accepts it. For instance, for IoS devices:

Slave Latency ≤ 30
2 seconds ≤ connSupervisionTimeout ≤ 6 seconds
Interval Min modulo 15 ms == 0
Interval Min ≥ 15 ms
One of the following:
Interval Min + 15 ms ≤ Interval Max
Interval Min == Interval Max == 15 ms
Interval Max * (Slave Latency + 1) ≤ 2 seconds
Interval Max * (Slave Latency + 1) * 3 < connSupervisionTimeout

https://developer.apple.com/hardwaredrivers/BluetoothDesignGuidelines.pdf
Android rules are way more democratic but not standardized.
And if DA14580 sends connection parameters request according this rules, IoS accepts it. I'm not a mobile developer, but AFAIK, this is the only way to control connection parameters in IoS - because IoS API doesn't provide it. Android API supports a limited number of connection parameters since API v23 (or 25). So the most natural way when peripheral asks for preferred connection parameters.

xuguizhong
Offline
Last seen:3 years 4 days ago
Joined:2017-06-30 02:46
Thank you

Thank you