GAP_ERR_COMMAND_DISALLOWED occurs, FW will stop advertising.

21个帖子/ 0新
最后一篇
CORAL0310
Offline
最后一次露面:5 years 2 weeks ago
加入:2016-03-10 06:12
GAP_ERR_COMMAND_DISALLOWED occurs, FW will stop advertising.

敬启者,

I am creating a Farmware for the beacon in SDK5.0.3.
我已经设计了弗兰克-威廉姆斯改变的一部分dvertising data every few seconds.

FW将在运营时展示,但FW将停止广告。
我不希望广告停止。

When FW is stop the advertising, in user_app_adv_undirect_complete() of user_peripheral.c, it had received a GAP_ERR_NO_ERROR or GAP_ERR_COMMAND_DISALLOWED as status.
(通常,它已收到Gap_Err_Canceled。)

In addition, when the transmission of advertising stops, user_catch_rest_hndl() is handling.

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.
The two errors always has occurred at the same time.

我不想停止广告。有没有更好的办法?
I did the following measures to FW.

1。If the FW has received a non-GAP_ERR_CANCELED, FW will stop advertising.
(FW will use the processing of adv_data_update_timer_cb ().)
2。Then, FW is resuming advertised in user_app_adv_start ().

I do this renovation in FW, it was allowed to operate 10 hours.
GAP_ERR_COMMAND_DISALLED发生,但广告不会停止。

Best regards.

设备:
mt_dialog.
Offline
最后一次露面:2个月2周前
职员
加入:2015-06-08 11:34
Hi Coral0310,

Hi Coral0310,

我假设您在完全托管模式下运行。您可以在SDK5中检查鞍骨,并在内核定时器经过时广告并更改广告字符串。为了改变广告字符串,没有其他方式,您必须停止广告,更改广告字符串并再次发出广告命令。当您终止广告程序时,您应该得到一个GAP_ERR_CANCELED,如果例如,您在ALLREADY广告时发出广告命令,那么您将获得一个GAP_ERR_COMMAND_DISALLED。

谢谢mt_dialog.

CORAL0310
Offline
最后一次露面:5 years 2 weeks ago
加入:2016-03-10 06:12
嗨对话人员,

嗨对话人员,

感谢你的回复。

I'll check the barebone example in the SDK5.
我想查看我的项目代码。

谢谢你。

CORAL0310
Offline
最后一次露面:5 years 2 weeks ago
加入:2016-03-10 06:12
敬启者,

敬启者,

>当您终止广告程序时,您应该获得一个GAP_ERR_CANCELED,如果您开始广告>您是ALLREADY广告,那么您将获得一个GAP_ERR_COMMAND_DISALLED。

I have a question.

我想知道调用user_app_addured_complete()的条件。
I think that user_app_adv_undirect_complete() is called after FW stops advertising.
However, I do not have confidence in their own thinking.

Please tell me the conditions under which user_app_adv_undirect_complete() is called.
谢谢你。

mt_dialog.
Offline
最后一次露面:2个月2周前
职员
加入:2015-06-08 11:34
Hi Coral0310,

Hi Coral0310,

如果你是广告和你invoke theapp_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. 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()并就完成的操作它将转到适当的情况下,然后将适当的案例调用适当的回调,在广告取消的情况下,App_Ond_Adv_Undirect_Complete回调被称为映射到您的自定义回调。

谢谢mt_dialog.

CORAL0310
Offline
最后一次露面:5 years 2 weeks ago
加入:2016-03-10 06:12
Dear Dialog staff,

Dear Dialog staff,

感谢你的回复。

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

我明白“app_on_adv_undirect_complete回调”
如果fw不运行app_easy_gap_advertise_stop(),则不会调用。
(Please let me know if my thinking is wrong.)

Once again, I checked the operation of my projects.

一种。在正常的情况下,
"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,
This case does not have app_easy_gap_advertise_stop() is executed before the "app_on_adv_undirect_complete callback” is called.
我不明白这种情况发生的原因。

Please let me if you know something.
谢谢你。

CORAL0310
Offline
最后一次露面:5 years 2 weeks ago
加入:2016-03-10 06:12
Dear Dialog staff,

Dear Dialog staff,

Sorry, I was the wrong question.

>>我假设您在完全托管模式下运行。
请让我更多关于“完全托管模式”。

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.
(I have not made changes other than to issue a log on it.)

我的项目和“blue_app_barebone”示例是不同的,但停止方式非常相似。
I think that my project has not been to the “fully hosted mode”.

sorry to hear many times.
谢谢你。

mt_dialog.
Offline
最后一次露面:2个月2周前
职员
加入:2015-06-08 11:34
Hi Coral0310,

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.

谢谢mt_dialog.

CORAL0310
Offline
最后一次露面:5 years 2 weeks ago
加入:2016-03-10 06:12
感谢你的回复。

感谢你的回复。

1。
>>完全托管的模式意味着应用程序在580内部处理器中运行,在完全嵌入模式中,应用程序在外部处理上运行。

打扰一下。不太了解......
如何判断内部处理器或外部处理器是否?

Hope that helps.
我正在使用一个Typezy的开发套件(Murata Corporation)。
TypeZy从MDK-ARM下载FW到Via UART。

2。
>>The GAP_ERR_NO_ERROR that you see on the barebone example its no error state, you should get a GAP_ERR_NO_ERROR when the device has reseted successfully and another similar message when the device has completed the configuration succesfully.

谢谢你。

我能够了解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.

一种。在正常的情况下,
"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,
This case does not have app_easy_gap_advertise_stop() is executed before the "app_on_adv_undirect_complete callback” is called.
我不明白这种情况发生的原因。

Please let me if you know something.

谢谢你。

mt_dialog.
Offline
最后一次露面:2个月2周前
职员
加入:2015-06-08 11:34
Hi Coral0310,

Hi Coral0310,

1.如果您有外部PC代码并在接口上与580通信,例如(作为Proximity_reporter_ext)以便发送命令(通告,连接等),那么如果您的程序运行,则在完全嵌入的配置下运行专门在580上,然后您拥有完全托管的配置(大多数对话框项目都是这样)。

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.

谢谢mt_dialog.

CORAL0310
Offline
最后一次露面:5 years 2 weeks ago
加入:2016-03-10 06:12
Dear dialog staff,

Dear dialog staff,

感谢你的回复。

1.谢谢。
I was running in a fully embedded mode.

谢谢。
我将重新检查我的项目和App-Ble-Ble-Barebone。

I want to first resolve the GAP_ERR_NO_ERROR.

Even after the GAP_ERR_NO_ERROR has occurred,
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.
谢谢你。

mt_dialog.
Offline
最后一次露面:2个月2周前
职员
加入:2015-06-08 11:34
Hi Coral0310,

Hi Coral0310,

No problem, just follow the barebone example and check the procedure that is used in order start and set up the device and then to alter the advertising strings, make the appropriate compares with your program.

谢谢mt_dialog.

CORAL0310
Offline
最后一次露面:5 years 2 weeks ago
加入:2016-03-10 06:12
Dear Dialog staff,

Dear Dialog staff,

感谢你的回复。

我再次检查FW的操作。
GAP_ERR_NO_ERROR status is displayed after it has been referred to the “app_on_connection callback" is called.

I want to make “app_on_connection callback" does not occur,
因为我的fw不需要是一个连接。

有什么好事吗?
(我正在考虑将广告类型从“未确定”到“non_connection”。)

谢谢你。

mt_dialog.
Offline
最后一次露面:2个月2周前
职员
加入:2015-06-08 11:34
Hi Coral0310,

Hi Coral0310,

如果您不想在外设上连接连接,请将您的设备转换为不可连接的方式是一种方式,您可以看一下SDK3上的信标参考设计,在不可连接模式下广告。您可以在支持站点的参考设计部分中找到信标。

谢谢mt_dialog.

CORAL0310
Offline
最后一次露面:5 years 2 weeks ago
加入:2016-03-10 06:12
Dear Dialog staff,

Dear Dialog staff,

感谢你的回复。
我有两个问题。

1。Sorry, I’m using the 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".

2。I am selecting the SDK5.
However, I can’t decide which choice to SDK5 or SDK3.

目前,您认为哪个更好的选择?
If the support of SDK3 continues, I might consider the use of SDK3.

很抱歉听到很多次。
谢谢你。

mt_dialog.
Offline
最后一次露面:2个月2周前
职员
加入:2015-06-08 11:34
Hi Coral0310,

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) The SDK3 is still supported but dialog recommends for new designs to use the SDK5 since its more easy to use and most of the bugs are fixed.

谢谢mt_dialog.

CORAL0310
Offline
最后一次露面:5 years 2 weeks ago
加入:2016-03-10 06:12
感谢你的回复。

感谢你的回复。

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.

Please let me more about “user_config.h” file.
I want to know the value to be modified in the "user_config.h" file.

谢谢你。

mt_dialog.
Offline
最后一次露面:2个月2周前
职员
加入:2015-06-08 11:34
Hi Coral0310,

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.

谢谢mt_dialog.

CORAL0310
Offline
最后一次露面:5 years 2 weeks ago
加入:2016-03-10 06:12
感谢你的回复。

感谢你的回复。

I have been using the “ble_app_barebone” example.
我更改了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_undirected_advertise_start();
}

//后
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();
}

It could not be build, because app_easy_gap_non_connectable_advertise_get_active()
is not defined.

我已经定义了app_easy_gap_non_connectable_advertise_get_active()
to “app_easy_gap.h" file.
(我指的是app_easy_gap_undirected_advertise_get_active()。)

Build came to pass. However, FW is can’t advertise the update, advertise stops.
也许,我错了如何定义app_easy_gap_non_connectable_advertise_get_active()。

有什么好事吗?
(I would like some code, please.)

谢谢你。

mt_dialog.
Offline
最后一次露面:2个月2周前
职员
加入:2015-06-08 11:34
Hi Coral0310,

Hi Coral0310,

最可能您做广告,但您的广告停止,因为停止广告的定时器被触发,没有默认回调用于捕获非可连接的广告结束,但您可以使用CATT REST功能实现一个,请按照下面的链接进行操作应该实现的代码:

http://support.dialog-semiconductor.com/advertisement-complete-callback-...

谢谢mt_dialog.

CORAL0310
Offline
最后一次露面:5 years 2 weeks ago
加入:2016-03-10 06:12
嗨对话人员,

嗨对话人员,
感谢你的回复。

It was able to to continue to advertise for FW.
今天,我做了一个测试,但没有问题。

也许,我认为这件事已经解决了。
Thank you so much.

主题锁定