⚠️
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.
6 posts / 0 new
Last post
afrid
Offline
Last seen:1 year 2 months ago
加入:2019-03-12发布活动
BLE advertising on /off

Hi,

I want to control BLE radio i mean turn on of BLE connectivity.

where i can control the radio(advtising) in SDK.some flag responsible for that

please help me in these context

Device:
PM_Dialog
Offline
Last seen:13 hours 20 min ago
工作人员
加入:2018-02-08 11:03
Hi afrid,

Hi afrid,

Can you please clarify your question a little bit more? Would you like to start/stops advertising or enabling/disabling the radio? Also, you are working on SDK5.0.4, aren’t you?

Thanks, PM_Dialog

afrid
Offline
Last seen:1 year 2 months ago
加入:2019-03-12发布活动
Hi,

Hi,

yes.i like to start/stops advertising or enabling/disabling the radio?

我工作在SDK5.0.4.

PM_Dialog
Offline
Last seen:13 hours 20 min ago
工作人员
加入:2018-02-08 11:03
Hi afrid,

Hi afrid,

I would suggest you to take a look at the ble_app_sleepmode example of SDK5.0.4. The example starts advertising by default, and after a predefined amount of time, it will stop advertising and the system will go into sleep mode. Let me try to explain you the API which are used in order to start/stop advertising. Please check user_app_adv_start() function for start advertising. The app_easy_gap_undirected_advertise_get_active() is used for getting undirected connectable advertising message with filled parameters. The app_easy_gap_undirected_advertise_start() is the appropriate API for undirected advertising and it will send a GAPM_START_ADVERTISE_CMD towards to the BLE stack. Also, In user_app_adv_start() a timer is set up and as soon as elapses, the adv_data_update_timer_cb() callabk function will be triggered in order to stop advertising. The API which is used is the app_easy_gap_advertise_stop() and it will send a GAPM_CANCEL_CMD message to the stack. The BLE will stay awake as long as it is needed, if there are pending BLE events the kernel will switch on the BLE core serve the pending events schedule the incoming events and then will switch off the BLE core. You don’t have to do anything extra in order to turn off the radio and the BLE, the SDK takes a good care of that.

Thanks, PM_Dialog

afrid
Offline
Last seen:1 year 2 months ago
加入:2019-03-12发布活动
Hi,

Hi,

thank you for the information.it is help ful.

i need some more information.

Imagine i m using BLE as slave,i need to turn on it using command from master.

so in default the BLE is turn on after the chip powered on right.i need to turn on it based on the command.

imagine a flag in SDK controls the BLE turnon/off.

imagine #define BLE if its 1 then ble should on and if its 0 it is off.like that control i need.for that where i have to modify in SDK please help me in detail

PM_Dialog
Offline
Last seen:13 hours 20 min ago
工作人员
加入:2018-02-08 11:03
Hi afrid,

Hi afrid,

Could you please clarify which is the master that you would like to control the BLE? Also, I assume that you would like to start/stop advertising using a command from the master. I would suggest you to have a look at the CodeLess reference application code, in which you could send command over UART and control BLE functionalities. The CodeLess AT commands platform allows control over a local UART connected device as well as a remote device via BLE. The comprehensive set of AT-Commands enables control of the BLE connectivity.

//www.xmece.com/products/smartbondtm-codeless-commands

Keep in mind that the DA14585 and DA14586 are recommended for new designs.

Thanks, PM_Dialog