17 posts / 0 new
Last post
Alex Luo
Offline
Last seen:1 year 2 months ago
Expert
加入:2014-02-28 19:16
extend sleep mode

Hi Support Team,

I modified template sample128 with active mode, it works well. I changed it to extend sleep mode by #define CFG_EXT_SLEEP in da14580_config.h. it works, but when connecting it with lightblue or my app, it broken. But it can be rescanned. my questions:
1. for ext_sleep, it's ok for only define CFG_EXT_SLEEP or need to set the timer to week it up? I supposed that the ble stack can weak it up. If need to setup others, please advise or have any examples. For advertising data, it will send more bytes which need to set advertising interval acclrdingly ?
2. I tried peoximity report, it works on basic DVB, but it always breaks when burnt onto my board (using eeprom). Is it conflicted by button definition or something else?

please advise,
Thanks

RvA
Offline
Last seen:1 day 14 hours ago
Staff
加入:2014-02-07 14:10
Hi Alex,

Hi Alex,

We will take a look at your questions and answer shortly.

Best regards,

RvA (Dialog)

RvA
Offline
Last seen:1 day 14 hours ago
Staff
加入:2014-02-07 14:10
Hi Alex,

Hi Alex,

For extended sleep mode, the only setup to do is: #define CFG_EXT_SLEEP. The DA14580 will go to this mode automatically during the advertising interval. In order to put the DA14580 into sleep mode for some times, you have to stop advertising first. The EEPROM does not bring any conflict with DA14580. for more info, please see application note AN-B-023.

Best regards, RvA(Dialog)

Alex Luo
Offline
Last seen:1 year 2 months ago
Expert
加入:2014-02-28 19:16
Thanks RvA.

Thanks RvA.

I also only set: #define CFG_EXT_SLEEP. I want DA14580 to go to extend sleep mode automatically during the advertising interval. But the app is disconnected when I got into CONNECTION. I didn't stop advertising, which is automatically processed by stack or I have to do it, and how?
Is it needed to set proper parameters of max and min advertising/connection interval?

Thanks,

Alex Luo
Offline
Last seen:1 year 2 months ago
Expert
加入:2014-02-28 19:16
Any comments and advice?

Any comments and advice?

广告和连接,我认为the ble stack handle it directly and not need user to set its advetising stop or start, please conform.

look forward to hearing from you,
Thanks!

RvA
Offline
Last seen:1 day 14 hours ago
Staff
加入:2014-02-07 14:10
Hi Alex,

Hi Alex,

Yes that is correct. This is all handled by the BLE stack and no user application actions are required.

Best regards, RvA(Dialog)

Alex Luo
Offline
Last seen:1 year 2 months ago
Expert
加入:2014-02-28 19:16
Hi RvA,

Hi RvA,

I did the same, and tried again. I can use light blue to find my device, and can connected, but it will be broken for a while and reported the data slate...
My adv inteval and con_interval not be changed as below:
1. ADV_DATA_TAG_LEN = 28
SCAN_RESP_DATA_TAG_LEN =10

2. in app.h, in local address type
#define APP_ADV_INT_MIN 1100;
#define APP_ADV_INT_MAX 1100;
3. in app_template_project.c, in function app_configuration_func ()
cmd->con_intv_min = 8;
cmd->con_intv_max= 16;
cmd->con_superv_to = 100;

please help to verify if those parameters wrong?

Thanks,

Alex Luo
Offline
Last seen:1 year 2 months ago
Expert
加入:2014-02-28 19:16
I changed the con_intv_min

I changed the con_intv_min and _max, but can't fix it. The app still reported disconnected data slate, the peripheral disconnected....
Sometimes the connction broken soon after connected, sometimes can get into the sevice for a while (10-20s) then disconnected. Is there conflict when sleep? please advise.

Thanks,

RvA
Offline
Last seen:1 day 14 hours ago
Staff
加入:2014-02-07 14:10
Hi Alex,

Hi Alex,

Are you using one of our DVKs? Can you also check what is the RSSI value with Light Blue?

I will check on the parameters.

Best regards,

RvA(Dialog)

Alex Luo
Offline
Last seen:1 year 2 months ago
Expert
加入:2014-02-28 19:16
Hi RvA,

Hi RvA,
Yes, I used DA14580EVKT-B, 078_30_B.
The RSSI is about 50 showed with Light Blue. For avertising, it's ok and always be scanned by Light Blue. But sometimes can't br cpnnected and sometimes not. When connected, it can lasted about 10-20seconds for maximium. scanning.
I used the same EVK to run Prximity Reporr, it works well.
By the way, I used ble timers for date update which can be affacted tp break connections?

Thanks,

Alex Luo
Offline
Last seen:1 year 2 months ago
Expert
加入:2014-02-28 19:16
any idea?

any idea?

RvA
Offline
Last seen:1 day 14 hours ago
Staff
加入:2014-02-07 14:10
Hi Alex,

Hi Alex,

I will get back to you as soon as possible on this one after I have consulted with the applications team. Thanks and best regards,

RvA(Dialog)

RvA
Offline
Last seen:1 day 14 hours ago
Staff
加入:2014-02-07 14:10
Hi Alex,

Hi Alex,

which project are you using?
if you use the project out of the box, it should work. in case you change the data length and scan response length, you must fill in these 2 structures too.
this is done in different files according to the project used.
Setup the connection interval will ot help. This is setup from the Central. In order to have a conenction interval from Peripheral, the peripheral must send a parameter update request to the Central first.

Best regards,

RvA(Dialog)

Alex Luo
Offline
Last seen:1 year 2 months ago
Expert
加入:2014-02-28 19:16
Thanks RvA,

Thanks RvA,
The project I used is fh_project_template.uvproj, sample128. The SDK vertion is 3.2.0.1.
I changed the app_adv_data_len to 0, and app_scnrsp_data_length stays at 9 (orginal) in file app_template_proj.h . please advise and that is what you said to fill in the 2 structure?
Setting up connection interval, please advise more specifically. whatever I modified it or not, it seems not to solve the problem. Also let me know how to send the parameter update to central!
I reviewed and followed proximity reporter_fh. Using Light Blue, reporter_fh works well, but my code always disconnected by peripheral everytime after connecting. Light Blue reported that the peripheral disconnected. The bad thing is that debug doesn't work for sleep mode. Iused to characteristics for data update with Read and Notify. After removing Notify and remove app_ timer_set, it can't fix the problem either.

Thanks.

thomasburton
Offline
Last seen:3 years 3 months ago
加入:2016-01-13 14:46
Dear Joaquin,

Dear Joaquin,

我想知道如果你有任何其他的想法,我have defined extended sleep mode in my version of the ble_app_peripheral demo in sdk5.0.3 and while I can see the advertising data being updated I still can't connect to the device and get a GATT error from my ble scanner every time I try.

Best wishes,

Thomas

MT_dialog
Offline
Last seen:4 weeks 1 day ago
Staff
加入:2015-06-08 11:34
Hi thomasburton,

Hi thomasburton,

Have you tried to connect with a different ble android application ? When the device isn't in sleep mode are you able to connect with a central ? i cant see any reason why not being able to connect with a ble_example project, since its advertising you should be able to connect, unless if the device advertises for a small period and then stalls (while the system starts, the device doesn't fall in sleep mode immidiatelly but waits for a couple of seconds). So perhaps the device is advertising while awake so you can track it, but its not there anymore after that 2 seconds delay so you cant issue a connection. You can check this via smart snippets or you can refresh your scanning screen on the phone and check if the device is still there (some applications keep devices even if they are not present). The reason for not being able to wake up is probably the selection of your low power clock, all the reference designs and examples have the XTAL32 if you are in buck mode and with no XTAL you should select the RCX. Apart from the above check if your are advertising in non-connectable mode (you have changed the app_ble_peripheral) and also check if the app_on_conection function is triggered.

Thanks MT_dialog

thomasburton
Offline
Last seen:3 years 3 months ago
加入:2016-01-13 14:46
Hi MT_dialog,

Hi MT_dialog,

Thank you for your reply. I went back to the app_ble_peripheral demo and just set that to extended_sleep and that worked fine, eventually tracked it down to an i2c bus error when the device was waking up to connect. Thanks for your help,

Thomas

Topic locked