GAP\u ERR\u COMMAND\u DISALLOWED发生时,FW将停止广告。

21 posts / 0 new
Last post
Coral0310
离线
Last seen:5年2周前
Joined:2016-03-10 06:12
GAP\u ERR\u COMMAND\u DISALLOWED发生时,FW将停止广告。

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.您是否知道发生GAP\u ERR\u NO\u ERROR和GAP\u ERR\u COMMAND\u DISALLOWED的原因?

除了GAP\u ERR\u NO\u ERROR和GAP\u ERR\u COMMAND\u DISALLOWED之外,我没有看到其他错误。
这两个错误总是发生在同一时间。

2. I do not want to stop the advertise. Is there a better way?
我对FW做了以下措施。

1.如果FW收到取消的非GAP错误,FW将停止广告。
(FW将使用ADV_DATA_UPDATE_TIMER_CB()的处理。)
2.然后,FW正在恢复在用户app adv start()中播发。

我在FW中进行这种翻新,它被允许运行10小时。
GAP_ERR_COMMAND_DISALLOWED发生,但advertisements are not stopped.

此致。

Device:
MT_dialog
离线
Last seen:2 months 2 weeks ago
Staff
Joined:2015-06-08 11:34
你好,科拉尔0310,

你好,科拉尔0310,

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

Coral0310
离线
Last seen:5年2周前
Joined:2016-03-10 06:12
Hi Dialog Staff,

Hi Dialog Staff,

Thank you for your reply.

我将检查SDK5中的鞍骨筒。
I would like to review the code of my project.

Thank you.

Coral0310
离线
Last seen:5年2周前
Joined:2016-03-10 06:12
Dear Sirs,

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.
我认为在FW停止广告后会调用user\u app\u adv\u undirect\u complete()。
但是,我对自己的思想没有信心。

请告诉我调用user\u app\u adv\u undirect\u complete()的条件。
Thank you.

MT_dialog
离线
Last seen:2 months 2 weeks ago
Staff
Joined:2015-06-08 11:34
你好,科拉尔0310,

你好,科拉尔0310,

If you are advertising and you援引app_easy_gap_advertise_stop()它发出gapm_cancel_cmd,以取消播出的空气运行,这将取消广告程序。当GAPM\u CANCEL\u CMD完成时(意味着你将不再做广告)GAPM\u CANCEL\u CMD将给出一个GAPM\u CMP\u EVT(完成事件),作为正在进行的操作的取消已完成的指示。GAPM\U CMP\U EVT将由gapm_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

Coral0310
离线
Last seen:5年2周前
Joined:2016-03-10 06:12
尊敬的Dialog员工:,

尊敬的Dialog员工:,

Thank you for your reply.

>>如果你正在做广告,并且你调用了app\u easy\u gap\u advertise\u stop(),它会发出一个GAPM\u CANCEL\u CMD来取消正在进行的广播操作,这将取消广告程序。

I understand that "app_on_adv_undirect_complete callback"
is not called If FW do not run the app_easy_gap_advertise_stop().
(如果我的想法错了,请告诉我。)

我再次检查了我的项目的运作情况。

a. In the case of normal,
在执行app\u easy\u gap\u advanced\u stop()之后,调用了“app\u on\u adv\u undirect\u complete callback”。

b。如果GAP\u ERR\u COMMAND\u 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.

Coral0310
离线
Last seen:5年2周前
Joined:2016-03-10 06:12
尊敬的Dialog员工:,

尊敬的Dialog员工:,

对不起,我是错误的问题。

>>I assume that you are operating under fully hosted mode.
Please let me more about “fully hosted mode".

今天,我被允许运行SDK5中的“blue\u app\u barebone”示例,然后GAP\u ERR\u NO\u ERROR发生错误,FW被停止。
(我没有做出更改以外的是发出登录。)

My Project and “blue_app_barebone” example is different, but stops the way is very similar.
我认为我的项目还没有进入“完全托管模式”。

很抱歉听到很多次。
Thank you.

MT_dialog
离线
Last seen:2 months 2 weeks ago
Staff
Joined:2015-06-08 11:34
你好,科拉尔0310,

你好,科拉尔0310,

完全托管模式意味着应用程序在580内部处理器中运行,在完全嵌入式模式下,应用程序在外部处理器上运行。在barebone示例中看到的GAP\u ERR\u NO\u ERROR如果是NO ERROR状态,您应该得到当设备成功重置时,显示GAP\ U ERR\ U NO\错误;当设备成功完成配置时,显示另一条类似消息。

Thanks MT_dialog

Coral0310
离线
Last seen:5年2周前
Joined:2016-03-10 06:12
Thank you for your reply.

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?

希望有帮助。
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.
但是,我不了解GAP\u ERR\u COMMAND\u DISALLOWED。

我知道如果FW不运行app\u easy\u gap\u advertive\u stop(),则不会调用“app\u on\u adv\u undirect\u complete callback”。
(如果我的想法错了,请告诉我。)

我再次检查了我的项目的运作情况。

a. In the case of normal,
在执行app\u easy\u gap\u advanced\u stop()之后,调用了“app\u on\u adv\u undirect\u complete callback”。

b。如果GAP\u ERR\u COMMAND\u 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.

MT_dialog
离线
Last seen:2 months 2 weeks ago
Staff
Joined:2015-06-08 11:34
你好,科拉尔0310,

你好,科拉尔0310,

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.是的,如果您不调用app\u easy\u gap\u advertized\u stop(),则不会调用app\u on\u adv\u undirect\u complete()回调。关于如我allready提到的不允许的命令,在正常操作中不应调用,并且在停止正在进行的播发过程之前,当您发出开始播发时将返回该命令。在应用程序\u ble\u barebone中,我没有看到出现此消息。请检查一下这个例子。

Thanks MT_dialog

Coral0310
离线
Last seen:5年2周前
Joined:2016-03-10 06:12
尊敬的dialog员工:,

尊敬的dialog员工:,

Thank you for your reply.

1. Thank you.
我在完全嵌入式模式下运行。

2. Thank you.
I will re-check my project and app-ble-barebone.

我想先解决差距\u ERR \u NO \u ERROR。

即使在发生了Gap_Err_No_Error之后,
我想继续播放广告。

请给我一个好办法。
我很高兴当有一个样本项目,将是有益的。

很抱歉听到很多次。
Thank you.

MT_dialog
离线
Last seen:2 months 2 weeks ago
Staff
Joined:2015-06-08 11:34
你好,科拉尔0310,

你好,科拉尔0310,

没有问题,只需遵循鞍骨子示例并检查顺序使用的过程,然后设置设备,然后更改广告字符串,使合适的比较与您的程序进行比较。

Thanks MT_dialog

Coral0310
离线
Last seen:5年2周前
Joined:2016-03-10 06:12
尊敬的Dialog员工:,

尊敬的Dialog员工:,

Thank you for your reply.

I checked the operation of the FW again.
在调用“app_on_connection回调”之后显示Gap_err_no_error状态。

我想使“app\u on\u connection callback”不发生,
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.

MT_dialog
离线
Last seen:2 months 2 weeks ago
Staff
Joined:2015-06-08 11:34
你好,科拉尔0310,

你好,科拉尔0310,

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

Coral0310
离线
Last seen:5年2周前
Joined:2016-03-10 06:12
尊敬的Dialog员工:,

尊敬的Dialog员工:,

Thank you for your reply.
I have a two questions.

1.Sorry,我正在使用SDK5.0.3。
Is there a sample that would be helpful in SDK5?

我想我只是更改了设置(例如user\ config.h)或advertizestart方法。

例如,请告诉我如何将“ble\u app\u barebone sample”的广告模式更改为“non connectable mode”。

我选择了SDK5。
但是,我无法决定选择SDK5还是SDK3。

At the moment, Which do you think is better choice?
如果继续支持SDK3,我可能会考虑使用SDK3。

Sorry to hear many times.
Thank you.

MT_dialog
离线
Last seen:2 months 2 weeks ago
Staff
Joined:2015-06-08 11:34
你好,科拉尔0310,

你好,科拉尔0310,

1) 在门户网站上没有任何SDK 5的官方信标示例,您可以在non-connectable部分更改user\u config.h文件,并在barebone示例中使用app\u easy\u gap\u non\u connectable\u adversed\u start()函数使您的设备不可连接,以便启动广告。

2)仍然支持SDK3,但对话框建议新设计使用SDK5,因为它更容易使用,并且大多数错误都是固定的。

Thanks MT_dialog

Coral0310
离线
Last seen:5年2周前
Joined:2016-03-10 06:12
Thank you for your reply.

Thank you for your reply.

1.
>通过使用app\u easy\u gap\u non\u connectable\u advertise\u start()函数来启动播发,您可以在non connectable部分更改user\u config.h文件,并在barebone示例中使设备不可连接。

请告诉我关于“user_config.h”文件的更多信息。
我想知道要在“user_config.h”文件中要修改的值。

Thank you.

MT_dialog
离线
Last seen:2 months 2 weeks ago
Staff
Joined:2015-06-08 11:34
你好,科拉尔0310,

你好,科拉尔0310,

在user\u config.h文件中没有您应该更改的值,处理不可连接广告的结构是user\u non\u connectable\u adversed\u conf,您可以配置间隔等,然后需要调用app\u easy\u gap\u non\u connectable\u adversed\u get\u active();和app_easy_gap_non_connectable_advertise_start();以便在不可连接模式下开始播发。

Thanks MT_dialog

Coral0310
离线
Last seen:5年2周前
Joined:2016-03-10 06:12
Thank you for your reply.

Thank you for your reply.

我一直在使用“BLE_APP_BAREBONE”示例。
I changed the code of user_barebone.c.

//之前
void user_app_adv_start(void)
{

结构gapm\u开始\u广告\u cmd*cmd;
cmd = app_easy_gap_undirected_advertise_get_active();

app_easy_gap_undircated_advertise_start();
}

//after
void user_app_adv_start(void)
{

结构gapm\u开始\u广告\u 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()
未定义。

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().)

建造成功了。但是,FW无法播发更新,播发停止。
Maybe, I'm wrong how to define the app_easy_gap_non_connectable_advertise_get_active().

Is there something a good way?
(请给我一些代码。)

Thank you.

MT_dialog
离线
Last seen:2 months 2 weeks ago
Staff
Joined:2015-06-08 11:34
你好,科拉尔0310,

你好,科拉尔0310,

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

Coral0310
离线
Last seen:5年2周前
Joined:2016-03-10 06:12
Hi Dialog Staff,

Hi Dialog Staff,
Thank you for your reply.

它能够继续为FW做广告。
Today, I did a test, but there was no problem.

Maybe, I think that this matter has been resolved.
非常感谢。

Topic locked