Dear Sirs,
我正在SDK5.0.3中为灯架创建一个农场。
我设计了FW,每隔几秒钟改变广告数据的一部分。
FW will for a while operating, but FW will stop the advertising.
I dont want that advertised stops.
当FW停止广告时,在User_PeripherAl.cn的User_App_Adv_Undirect_Complete()中,它已接收了一个GAP_ERR_NO_ERROR或GAP_ERR_COMMAND_DISALLED作为状态。
(Normally, it has received a GAP_ERR_CANCELED.)
另外,当广告停止传输时,user_catch_rest_hndl()正在处理。
1.Do you know the reason for GAP_ERR_NO_ERROR and GAP_ERR_COMMAND_DISALLOWED occurs?
I have not seen other than GAP_ERR_NO_ERROR and GAP_ERR_COMMAND_DISALLOWED.
这两个错误总是发生在同一时间。
2. I do not want to stop the advertise. Is there a better way?
我对FW做了以下措施。
1.If the FW has received a non-GAP_ERR_CANCELED, FW will stop advertising.
(FW将使用ADV_DATA_UPDATE_TIMER_CB()的处理。)
2.Then, FW is resuming advertised in user_app_adv_start ().
我在FW中进行这种翻新,它被允许运行10小时。
GAP_ERR_COMMAND_DISALLOWED发生,但advertisements are not stopped.
此致。
Hi Coral0310,
I assume that you are operating under fully hosted mode. You can check the barebone example in the SDK5 that does exactly what you want, it advertises and changes the advertising string whenever the kernel timer elapses. In order to change the advertising string there is no other way, you have to stop advertising, change the advertising string and issue an advertising command once more. When you terminate the advertising procedure then you should get a GAP_ERR_CANCELED, if for example you issue an advertising command while you are allready advertising then you will get a GAP_ERR_COMMAND_DISALLOWED.
Thanks MT_dialog
Hi Dialog Staff,
Thank you for your reply.
我将检查SDK5中的鞍骨筒。
I would like to review the code of my project.
Thank you.
Dear Sirs,
>When you terminate the advertising procedure then you should get a GAP_ERR_CANCELED, if you start advertising while >you are allready advertising then you will get a GAP_ERR_COMMAND_DISALLOWED.
我有个问题。
I want to know the conditions under which user_app_adv_undirect_complete() is called.
I think that user_app_adv_undirect_complete() is called after FW stops advertising.
但是,我对自己的思想没有信心。
Please tell me the conditions under which user_app_adv_undirect_complete() is called.
Thank you.
Hi Coral0310,
If you are advertising and you援引app_easy_gap_advertise_stop()它发出gapm_cancel_cmd,以取消播出的空气运行,this will cancel the advertising procedure. When the GAPM_CANCEL_CMD is completed (meaning that you wont be advertising anymore) theGAPM_CANCEL_CMD will give a GAPM_CMP_EVT (complete event) as an indication that the cancelation for the on going operation has completed. The GAPM_CMP_EVT will be handled by thegapm_cmp_evt_handler() and regarding the completed operation it will go to the appropriate case, the appropriate case then will call the appropriate callback, in the case of the advertising cancelation the app_on_adv_undirect_complete callback is called which is mapped to your custom callback.
Thanks MT_dialog
Dear Dialog staff,
Thank you for your reply.
>>If you are advertising and you invoke the app_easy_gap_advertise_stop() it issues a GAPM_CANCEL_CMD in order to cancel the on going air operation,this will cancel the advertising procedure.
I understand that "app_on_adv_undirect_complete callback"
is not called If FW do not run the app_easy_gap_advertise_stop().
(Please let me know if my thinking is wrong.)
Once again, I checked the operation of my projects.
a. In the case of normal,
"app_on_adv_undirect_complete callback" has been called after app_easy_gap_advertise_stop() has been executed.
b. In the case of GAP_ERR_COMMAND_DISALLOWED,
在调用“app_od_undirect_complete回调”之前,在调用“app_on_adv_undirect_complacke之前,执行此案例并不具有app_easy_gap_advertise_stop()。
I do not understand the reason why this happens.
如果你知道的话,请告诉我。
Thank you.
Dear Dialog staff,
对不起,我是错误的问题。
>>I assume that you are operating under fully hosted mode.
Please let me more about “fully hosted mode".
Today, I was allowed to run the “blue_app_barebone” example in SDK5, Then GAP_ERR_NO_ERROR error has occurred, FW was stopped advertise.
(我没有做出更改以外的是发出登录。)
My Project and “blue_app_barebone” example is different, but stops the way is very similar.
I think that my project has not been to the “fully hosted mode”.
sorry to hear many times.
Thank you.
Hi Coral0310,
The fully hosted mode means that the application runs in the 580 internal processor, in fully embedded mode the application runs on an external proccesor. The GAP_ERR_NO_ERROR that you see on the barebone example its no error state, you should get aGAP_ERR_NO_ERROR when the device has reseted successfully and another similar message when the device has completed the configuration succesfully.
Thanks MT_dialog
Thank you for your reply.
1.
>>The fully hosted mode means that the application runs in the 580 internal processor, in fully embedded mode the application runs on an external proccesor.
Excuse me. Not well understood…
How do I can judge whether internal processor or external processor?
Hope that helps.
I am using a development kit of TypeZY(by murata corporation).
TypeZY is Downloading FW to via UART from MDK-ARM.
2.
>>您在鞍骨筒示例中看到的Gap_err_no_error无错误状态,当设备已成功重置时,您应该得到一个Gap_Err_No_Error,并且当设备已成功完成配置时,该设备已成功重置和其他类似的消息。
Thank you.
I was able to understand GAP_ERR_NO_ERROR.
However, I do not understand about GAP_ERR_COMMAND_DISALLOWED.
I understand that "app_on_adv_undirect_complete callback” is not called If FW do not run the app_easy_gap_advertise_stop().
(Please let me know if my thinking is wrong.)
Once again, I checked the operation of my projects.
a. In the case of normal,
"app_on_adv_undirect_complete callback" has been called after app_easy_gap_advertise_stop() has been executed.
b. In the case of GAP_ERR_COMMAND_DISALLOWED,
在调用“app_od_undirect_complete回调”之前,在调用“app_on_adv_undirect_complacke之前,执行此案例并不具有app_easy_gap_advertise_stop()。
I do not understand the reason why this happens.
如果你知道的话,请告诉我。
Thank you.
Hi Coral0310,
1. If you have an external pc code and communicates with the 580 over an interface, UART for example (as the proximity_reporter_ext) in order to send command (advertise, connect etc) then you are operating under fully embeded configuration, if your program runs exclusively on the 580 then you have a fully hosted configuration (most of dialogs projects are this way).
2. Yes, if you do not call the app_easy_gap_advertise_stop() the app_on_adv_undirect_complete() callback shall not be called. Regarding the command disallowed as i allready mentioned should not be called in normal operation and it is returned when you issue a start advertise before stopping the ongoing advertising procedure. In the app_ble_barebone i haven't seen this message occur. Please check the example.
Thanks MT_dialog
Dear dialog staff,
Thank you for your reply.
1. Thank you.
I was running in a fully embedded mode.
2. Thank you.
I will re-check my project and app-ble-barebone.
I want to first resolve the GAP_ERR_NO_ERROR.
即使在发生了Gap_Err_No_Error之后,
I want to continue the broadcast of advertising.
Please let me a good way.
I'm glad when there is a sample project that would be helpful.
sorry to hear many times.
Thank you.
Hi Coral0310,
没有问题,只需遵循鞍骨子示例并检查顺序使用的过程,然后设置设备,然后更改广告字符串,使合适的比较与您的程序进行比较。
Thanks MT_dialog
Dear Dialog staff,
Thank you for your reply.
I checked the operation of the FW again.
在调用“app_on_connection回调”之后显示Gap_err_no_error状态。
I want to make “app_on_connection callback" does not occur,
Because My FW does not need to be a connection.
Is there something a good way?
(I’m thinking of changing the advertise type from “undirect" to “non_connection".)
Thank you.
Hi Coral0310,
If you dont want connections on your peripheral, turning your device to non-connectable is a way, you can have a look at the beacon reference design on SDK3 which advertises in non-connectable mode. You can find the beacon in the Reference design section of the support site.
Thanks MT_dialog
Dear Dialog staff,
Thank you for your reply.
I have a two questions.
1.Sorry,我正在使用SDK5.0.3。
有样本将有助于SDK5吗?
I think I just change the setting(e.g. user_config.h) or the advertise start method.
For example, please let me how to change the advertising mode of “ble_app_barebone sample" to "non-connectable mode".
我选择了SDK5。
However, I can’t decide which choice to SDK5 or SDK3.
At the moment, Which do you think is better choice?
If the support of SDK3 continues, I might consider the use of SDK3.
Sorry to hear many times.
Thank you.
Hi Coral0310,
1) There isn't any official beacon example for the SDK 5 on the portal, you can change the user_config.h file in the non-connectable section and make your device non-connectable in the barebone example by using the app_easy_gap_non_connectable_advertise_start() function in order to start advertising.
2)仍然支持SDK3,但对话框建议新设计使用SDK5,因为它更容易使用,并且大多数错误都是固定的。
Thanks MT_dialog
Thank you for your reply.
1.
>you can change the user_config.h file in the non-connectable section and make your device non-connectable in the barebone example by using the app_easy_gap_non_connectable_advertise_start() function in order to start advertising.
请告诉我关于“user_config.h”文件的更多信息。
我想知道要在“user_config.h”文件中要修改的值。
Thank you.
Hi Coral0310,
There is no value you should change in the user_config.h file, the struct that handles the non-connectable advertising is user_non_connectable_advertise_conf, you can configure the interval, etc and after that you need to invoke app_easy_gap_non_connectable_advertise_get_active(); and app_easy_gap_non_connectable_advertise_start(); in order to start advertise in non-connectable mode.
Thanks MT_dialog
Thank you for your reply.
我一直在使用“BLE_APP_BAREBONE”示例。
I changed the code of user_barebone.c.
//before
void user_app_adv_start(void)
{
…
struct gapm_start_advertise_cmd* cmd;
cmd = app_easy_gap_undirected_advertise_get_active();
…
app_easy_gap_undircated_advertise_start();
}
//after
void user_app_adv_start(void)
{
…
struct gapm_start_advertise_cmd* cmd;
cmd = app_easy_gap_non_connectable_advertise_get_active();
…
app_easy_gap_non_connectable_advertise_start();
}
它无法构建,因为app_easy_gap_non_connectable_advertise_get_active()
is not defined.
I have defined the app_easy_gap_non_connectable_advertise_get_active()
到“app_easy_gap.h”文件。
(I was referring to the app_easy_gap_undirected_advertise_get_active().)
Build came to pass. However, FW is can’t advertise the update, advertise stops.
Maybe, I'm wrong how to define the app_easy_gap_non_connectable_advertise_get_active().
Is there something a good way?
(I would like some code, please.)
Thank you.
Hi Coral0310,
Most probably you do advertise but your advertising stops since the timer that stops the advertising is triggered, there is no default callback for catching the non connectable advertising ending, but you can implement one by using the catch rest function, please follow the link below for the code that should be implemented:
http://support.dialog-semiconductor.com/advertisement-complete-callback-...
Thanks MT_dialog
Hi Dialog Staff,
Thank you for your reply.
It was able to to continue to advertise for FW.
Today, I did a test, but there was no problem.
Maybe, I think that this matter has been resolved.
非常感谢。