⚠️
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 https://www.dialog-semiconductor.com/support . We’ll be fixing bugs / optimising the searching and tagging over the coming days.
21 posts / 0 new
Last post
karanshah28
Offline
Last seen: 1 year 11 months ago
Joined: 2018-07-14 11:10
Connection current queries

Dear Dialog Team,

I tried to play around with the connection current as suggested in last and third last comment in thread:-

https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bl...

 

Observations:-

1. I found connection current to be 210uA in default connection interval configuration. (min_interval =10ms, max_interval = 20ms)

2. I found connection current to be ~25uA when min_interval = 300ms, max_interval = 310ms

3. Initially the current is 100uA regardless of connection interval (for 2-3 seconds). After that based on the connection interval configuation, the current takes effect.

 

Queries:-

1. What are the adverse effect of moving to connection interval 300ms from default configured 10ms?

2. I understand that it can affect throughput, but if my usecase is transferring a few bytes per day (400 bytes max. per day, max. 40 bytes at a time), what time I connection interval I should configure?

3. Is it possible to change connection intervals runtime? If yes, can you point us the apis/places in the code?

4. What are possible reasons of more current as compared to 120uA suggested in third last comment in:-

    https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bl...

5. Can you elaborate on causes of observation 3?

 

Let me know if you need any other detail.

 

Thanks in advance,

Karan

Device: 
PM_Dialog
Offline
Last seen: 1 month 5 days ago
Staff
Joined: 2018-02-08 11:03
Hi karanshah28,

Hi karanshah28,

Can you please indicate the procedure you are following for the current consumption measurements? I assume that you are getting an average current consumption. The system goes into sleep mode between advertising or connection intervals. So, having bigger connection or advertising intervals means that the system is in sleep mode more time and as a result the power consumption will be lower.

The amount of data that the device sends during a connection interval depends on the packets that the central allows to a peripheral to send. The payload for each packet with the standard MTU selection is 20 bytes. So each data that you send can carry up to 20 bytes. You can't control the how many packets the BLE will send during a connection interval because is up to the master of the connection, if he doesn't want to accept the data he just won’t accept it even if you indicate that you have more data to send. In addition, there are is not a fixed connection interval regarding your application.

Let me quickly describe you the Connection Parameters Update procedure:

The peripheral device, which is advertising, assumes the role of a slave device, while the scanner device, which is searching for a device to connect to, assumes the role of a master device upon a connection process. The latter, is responsible for performing various mandatory actions including which channel to transmit and what event interval to use. However, following a successful connection, the slave device can propose its own preferred parameters (connection interval, supervision time-out etc) via an update connection parameter request. After that, the master responds to the slave if its demands has been approved. To do so, the peripheral device sends connection parameter update request, the negotiation procedure will happen over the air, if the commend is approved, a connection parameter updated event will take place. Please refer to Bluetooth LE specifications for getting more information regarding Update Connection Parameters.

The user_gapm_conf structure keeps the user’s configurations and the device upon connection will have the connection interval from this structure. The user_connection_param_conf keeps the connection parameter update configuration. The connection intervals are defined by the central, so what you can do, is to issue a connection update request and the central will decide if it will accept the connection parameters that you have requested. If the current parameters don’t match will send a request to the central in order to update the connection parameters (the request is sent 10 seconds after the connection is established), so if the central accepts the parameters the connection will change to the specified values in the user_connection_param_conf structure.

Regarding the 1 connection event, how you are measuring it? You should measure it like the attached imaged. This is 1 connection event. I power analyzer for this measurement.

Thanks, PM_Dialog

Attachment: 
karanshah28
Offline
Last seen: 1 year 11 months ago
Joined: 2018-07-14 11:10
Thanks for the brief

Thanks for the brief explanation. 

We will share you the details how we measure current shortly. 

 

In our testing, we found that when we set connection interval above 100ms, we are seeing disconnections between central device and da14586. 

 

What are your comments on this? Is this expected behavior? Or device should remain connected? 

Also, is there a way to improve this? 

karanshah28
Offline
Last seen: 1 year 11 months ago
Joined: 2018-07-14 11:10
Hi Dialog Team,

Hi Dialog Team,

Waiting for your response.

Thanks, Karan 

PS_Dialog
Offline
Last seen: 1 year 1 month ago
Joined: 2018-01-15 10:36
Hi Karan,

Hi Karan,

Which is the central device you are connecting to?

BR, Paolo

karanshah28
Offline
Last seen: 1 year 11 months ago
Joined: 2018-07-14 11:10
Hi Paolo,

Hi Paolo,
We are trying to connect with Android mobile phone.
Thanks, karan

PS_Dialog
Offline
Last seen: 1 year 1 month ago
Joined: 2018-01-15 10:36
Hi,

Hi,

I saw in the previous thread you talked about a range extender, are you using it also here?

Are you using a custom PCB or one of our Pro starter kit + our Daugther Board?

At which distance is the Android phone from the board?

BR, Paolo

karanshah28
Offline
Last seen: 1 year 11 months ago
Joined: 2018-07-14 11:10
Hi,

Hi,

We are using range extender.
We are using custom pcb. 
And distance is 3m.

Thanks, Karan

karanshah28
Offline
Last seen: 1 year 11 months ago
Joined: 2018-07-14 11:10
Hi, 

Hi, 

We are even getting disconnected when min interval is 10ms and max interval is 300ms

 

Can you provide the Connection settings other than 10ms min interval and 20 ms max interval which reduces  current? 

CYibin
Offline
Last seen: 1 year 3 months ago
Staff
Joined: 2017-12-14 02:48
Hi karanshah28,

Hi karanshah28,

 

As the high throughtput is not required, maybe you can try:

intv_min: 300ms

intv_max: 400ms

latency: 0

connect_timeout: 5s

 

Br

Yibin

karanshah28
Offline
Last seen: 1 year 11 months ago
Joined: 2018-07-14 11:10
Hi,

Hi,

We tested with your parameters, but device disconnects. 

We tested this with multiple central devices and with light blue application. 

Can you suggest us any new settings that would enable us to have continous connection and connection intervals other than 10ms and 20 ms

- karan

karanshah28
Offline
Last seen: 1 year 11 months ago
Joined: 2018-07-14 11:10
I mistakenly clicked "accept

I mistakenly clicked "accept answer" Link. Please ignore it

- karan

karanshah28
Offline
Last seen: 1 year 11 months ago
Joined: 2018-07-14 11:10
Hi Dialog Team,

Hi Dialog Team,

Can we have quick resolution to disconnection issue? 

Our purpose is to stay connected to Central device which in this case can be android or iOS phone. Once connected, we never disconnect. We only get disconnected if either central or peripheral are moved away from ble range. Appreciate your timely help on this.

Regards,Karan

CYibin
Offline
Last seen: 1 year 3 months ago
Staff
Joined: 2017-12-14 02:48
Hi Karan,

Hi Karan,

Can you confirm that different connection parameters will lead to different results? What the connection parameters is good for this use case?

Can you tell the disconnect reason code? You can print it out in the disconnect event callback function ( user_app_on_disconnect() ). 

 

Br

Yibin

 

karanshah28
Offline
Last seen: 1 year 11 months ago
Joined: 2018-07-14 11:10
Hi,

Hi,

For same connection parameters we seen different observation..

The first time device got disconnect after 1 hour and 5 min and second time device got disconnect in 17minutes.

 

And both the time the disconnection reason was 0x13 in disconnect callback.

 

Let us know if more information is required.

 

What can be the issue of disconnection?

Is there anything we can tune connection parameters and can solve the issue ?

Regards,

Karan

CYibin
Offline
Last seen: 1 year 3 months ago
Staff
Joined: 2017-12-14 02:48
Hi Karanshah28,

Hi Karanshah28,

 

0x13 means timeout disconnection.

 

Here are all the possible causes i could think of:

1. The app ( central device ) is killed by mobile phone system.

2. In the firmware, the ble event can not be handled timely. That means, there is a long time process in you firmware, which blocks your main process.

3. The RF perfomance is not good. For example, the power of RF TX is weak, or the frequency offset is large etc.

4. There is a compatibility probem between your mobile phone and your device. Try another mobile phone for testing in this case.

 

Br

Yibin

 

 

karanshah28
Offline
Last seen: 1 year 11 months ago
Joined: 2018-07-14 11:10
Dear Support Team,

Dear Support Team,

 

Thanks for the update.

So out of 4 reasons we have to find out the actual reason. For that we did following experiment.

 

We flash ble_all_in_one project binary into board and connected board with mobile phone.

 

The connection was established and connected till 7 Hours and 2 min and after that device got disconnected with disconnection reason 0x8.

 

However the performance is good in ble_all_in_one firmware but still the device got disconnected.

 

So what can be the reason here ?

 

1) Mobile application did not crashed because I received disconnection message in application. I have attached screenshot for the same.

 

2) Now I guess we can say it's not because of long process in firmware, as we used ble_all_in_one. Please correct me if I am wrong.

 

3) The rf performance is not good. Not sure about this. Please note we have used range extender SKY66111-11 in our board. Is there any way to check is rf performance is the issue or not ?

 

Is there any other method or suggestions to find out the root cause of the issue ?

 

Regards,

Karan

PM_Dialog
Offline
Last seen: 1 month 5 days ago
Staff
Joined: 2018-02-08 11:03
Hi karanshah28,

Hi karanshah28,

There are various reasons that can broken a connection down, such as moving the peer device out of the range, power failure conditions, several interferences etc. According to Bluetooth LE specifications, since the aforementioned reasons may happen without any prior warning, it is important for both the

master and the slave to monitor the status of the connection. To do so, both Central and Peripheral shall use a Link Layer connection supervision timer, in order to detect a link loss. Refer to Bluetooth core specifications for getting more information on this topic. In user_connection_param_conf configuration structure of the SDK, there is a parameter named. time_out. This is the Connection supervision timeout which defined the maximum time between two received Data Packet PDUs before the

connection is considered lost. According to the core specifications, the Connection supervision timeout shall be a multiple of 10 ms in the range of 100 ms to 32.0 sec  and it shall be larger than

(1 + connection_latency) * connection_interval * 2.  What is the supervision timeout that you have set to the device? If you set a longer timeout, the device will take more time to disconnect or is cannot disconnect? The CO_ERROR_CON_TIMEOUT = 0x08 error is the Connection Timeout error code indicates that the link supervision timeout has expired for a given connection.

Thanks, PM_Dialog

karanshah28
Offline
Last seen: 1 year 11 months ago
Joined: 2018-07-14 11:10
Dear Suport Team,

Dear Suport Team,

We are using ble_all_in_one as our base code and added some changes(Range extender chip driver  https://www.dialog-semiconductor.com/sites/default/files/rext_sky66111-1... + some product level changes) on top of that code.
And we have observed disconnection within 2 hours and some times within 15 minutes with our firmware.

To debug further this issue we did following experiments:
Please note we are using range extender chip in our design :  SkY66111.

Here is the summary of all observation:
1) We flashed our firmware in our board and observed disconnection within 2Hours of time and sometimes within 15 minutes also.
   Our firmware is ble_all_in_one + Range extender driver + Some product regarding change.
   
2) Then to find the issue of disconnection, we flashed ble_all_in_one firware binary into DA14586 EVM board and did not observed disconnection for 10 hours.

3) Then, we flashed ble_all_in_one firware binary into our board, and observed same result, i.e. did not observed disconnection for 10 hours.

4) Then we assumed that there is some issue in our firmware as we have not observed disconnection with ble_all_in_one code with our board.

5) Then we removed Range extender driver support from our firmware code i.e our firmware code will be ble_all_in_one + Some product regarding changes.
   In this case also we did not observed disconnection with mobile phone for more than 9 hours.
   
So based on this experiments we concluded that there is some issue with range extender driver.

What can be the root cause of this issue ?
Is this issue of disconnection with range extender chip is known issue ?
Is there any solution available for this ?

FYI, mobile is always next to the pcb which we are testing. we can share the code if required.

Thanks and Regards,
Karan 

karanshah28
Offline
Last seen: 1 year 11 months ago
Joined: 2018-07-14 11:10
Hi Support Team,

Hi Support Team,

Can you please update on this? This is blocking issue for us.

Regards, Karan

PM_Dialog
Offline
Last seen: 1 month 5 days ago
Staff
Joined: 2018-02-08 11:03
Hi karanshah28,

Hi karanshah28,

Can you please check if the code Is running after the disconnection or is gets somewhere stuck? For example, after the disconnection, what is the application doing? Does the device start advertising again after the disconnection? Are you able to detect it in the air after the disconnection and without resetting the board? Is it possible for you to use a BLE sniffer in order to check the packets that are transmitted over the air?

Which is the disconnection reason code? You can print it out in the disconnect event callback function ( user_app_on_disconnect() ) as it is already mentioned in the post.

I read again your post, and I found that the disconnection reason is 0x13. Can you please make sure for that?

“And both the time the disconnection reason was 0x13 in disconnect callback.”

The 0x13 ( CO_ERROR_REMOTE_USER_TERM_CON ) error code, named REMOTE USER TERMINATED CONNECTION and indicates that the user on the remote device terminated the connection. Do you have a custom mobile application?

“We flashed our firmware in our board and observed disconnection within 2Hours of time and sometimes within 15 minutes also. Our firmware is ble_all_in_one + Range extender driver + Some product regarding change.”

Do you have the Range extender reference design in order to try to replicate this issue? Have you done any modifications in the ble_all_in_one?  

“Then to find the issue of disconnection, we flashed ble_all_in_one firware binary into DA14586 EVM board and did not observed disconnection for 10 hours. “

Can you please clarify the board? Do you mean Pro DK or the 585 Range Extender?

Then, we flashed ble_all_in_one firware binary into our board, and observed same result, i.e. did not observed disconnection for 10 hours.

The same result as below? Disconnection not happened.? Also, with or without the SkY66111?

“Then we removed Range extender driver support from our firmware code i.e our firmware code will be ble_all_in_one + Some product regarding changes.

   In this case also we did not observed disconnection with mobile phone for more than 9 hours. “

Can you please share more clarification regarding the driver that you mentioned?

It would be better to create a new forum post in order to best track the issue of the disconnection, as the initial post was related to the connection current consumption. But it is up to you.

Thanks, PM_Dialog