GAP_ERR_COMMAND_DISALLED发生,FW将停止广告。

21 posts / 0 new
Last post
Coral0310
离线
Last seen:5年2周前
Joined:2016-03-10 06:12
GAP_ERR_COMMAND_DISALLED发生,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_ERR_NO_ERROR和GAP_ERR_COMMAND_DISALLED发生的原因吗?

我没有看到除了GAP_ERR_NO_ERROR和GAP_ERR_COMMAND_DISALLED之外。
这两个错误总是发生在同一时间。

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

1.如果FW收到非GAP_ERR_CANCELED,FW将停止广告。
(FW将使用ADV_DATA_UPDATE_TIMER_CB()的处理。)
2.然后,在user_app_adv_start()中恢复FW正在恢复。

我在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
嗨Coral0310,

嗨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

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_app_adv_undirect_complete()。
但是,我对自己的思想没有信心。

请告诉我user_app_adv_undirect_complete()调用的条件。
Thank you.

MT_dialog
离线
Last seen:2 months 2 weeks ago
Staff
Joined:2015-06-08 11:34
嗨Coral0310,

嗨Coral0310,

If you are advertising and you援引app_easy_gap_advertise_stop()它发出gapm_cancel_cmd,以取消播出的空气运行,这将取消广告程序。完成GAPM_CANCEL_CMD(意味着您不再广告)GAPM_CANCEL_CMD将提供GAPM_CMP_EVT(完整事件),以指示对执行操作的取消已完成。GAPM_CMP_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
亲爱的对话人员,

亲爱的对话人员,

Thank you for your reply.

>>如果您是广告和调用app_easy_gap_advertise_stop()它会发出gapm_cancel_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_EASY_GAP_ADVERTES_STOP()之后,已调用“app_on_adv_undirect_complete回调”。

湾在GAP_ERR_COMMAND_DISALLED的情况下,
在调用“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
亲爱的对话人员,

亲爱的对话人员,

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

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

今天,我被允许在SDK5中运行“Blue_App_BareBone”示例,然后发生了Gap_Err_No_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
嗨Coral0310,

嗨Coral0310,

完全托管的模式意味着应用程序在580内部处理器中运行,在完全嵌入模式中,应用程序在外部处理上运行。你在鞍骨的eAcke上看到的gap_err_no_error没有错误状态,你应该得到一个GAP_ERR_NO_ERROR当设备已成功重置并且当设备已成功完成配置时,设备已成功重置和其他类似的消息。

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_ERR_COMMAND_DISALDED。

我了解“app_od_adv_undirect_complete回调”如果fw不运行app_easy_gap_advertise_stop(),则不会调用。
(如果我的思想是错的,请告诉我。)

再一次,我检查了我的项目的操作。

a. In the case of normal,
在执行APP_EASY_GAP_ADVERTES_STOP()之后,已调用“app_on_adv_undirect_complete回调”。

湾在GAP_ERR_COMMAND_DISALLED的情况下,
在调用“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
嗨Coral0310,

嗨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.是的,如果您不调用app_easy_gap_advertise_stop()则不应调用app_on_add_undirect_complete()回调。关于在正常操作中不应调用我已提到的命令,在正常操作中不应调用,并且在停止正在进行的广告过程之前发出启动时返回。在app_ble_barebone中我没有看到此消息发生。请检查该示例。

Thanks MT_dialog

Coral0310
离线
Last seen:5年2周前
Joined:2016-03-10 06:12
亲爱的对话人员,

亲爱的对话人员,

Thank you for your reply.

1. Thank you.
我以完全嵌入的模式运行。

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

我想先解析Gap_err_no_error。

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

请给我一个好方法。
当有一个有助于的示例项目时,我很高兴。

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

MT_dialog
离线
Last seen:2 months 2 weeks ago
Staff
Joined:2015-06-08 11:34
嗨Coral0310,

嗨Coral0310,

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

Thanks MT_dialog

Coral0310
离线
Last seen:5年2周前
Joined:2016-03-10 06:12
亲爱的对话人员,

亲爱的对话人员,

Thank you for your reply.

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

我想制作“app_on_connection回调”,没有发生,
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
嗨Coral0310,

嗨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

Coral0310
离线
Last seen:5年2周前
Joined:2016-03-10 06:12
亲爱的对话人员,

亲爱的对话人员,

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)或广告启动方法。

例如,请让我如何将“BLE_APP_BAREBONE样本”的广告模式更改为“不可连接模式”。

我选择了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
嗨Coral0310,

嗨Coral0310,

1)在门户网站上没有任何官方信标示例,您可以在不可连接的部分中更改user_config.h文件,并使用app_easy_gap_non_connectable_advertise_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.
>您可以在非可连接部分中更改user_config.h文件,并通过使用app_easy_gap_non_connectable_advertise_start()函数以启动广告,使您的设备不可连接。

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

Thank you.

MT_dialog
离线
Last seen:2 months 2 weeks ago
Staff
Joined:2015-06-08 11:34
嗨Coral0310,

嗨Coral0310,

没有值您应该在user_config.h文件中更改,处理不可连接的广告的结构是user_non_connectable_advertise_conf,您可以配置间隔等,然后在您需要调用app_easy_gap_non_connectable_advertise_get_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)
{

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()
没有定义。

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
嗨Coral0310,

嗨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-semicondiondiondum/aadvertisement-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