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,

I am creating a Farmware for the beacon in SDK5.0.3.
我设计了FW,每隔几秒钟改变广告数据的一部分。

FW will for a while operating, but FW will stop the advertising.
I dont want that advertised stops.

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.
(Normally, it has received a GAP_ERR_CANCELED.)

此外,当广告的传播stops, user_catch_rest_hndl() is handling.

1.你知道GAP_ERR_NO_ERROR和GAP_ERR_COMMAND_DISALLED发生的原因吗?

我没有看到除了GAP_ERR_NO_ERROR和GAP_ERR_COMMAND_DISALLED之外。
The two errors always has occurred at the same time.

2. I do not want to stop the advertise. Is there a better way?
I did the following measures to FW.

1.如果FW收到非GAP_ERR_CANCELED,FW将停止广告。
(FW will use the processing of adv_data_update_timer_cb ().)
2.然后,在user_app_adv_start()中恢复FW正在恢复。

I do this renovation in FW, it was allowed to operate 10 hours.
GAP_ERR_COMMAND_DISALLOWED发生,但advertisements are not stopped.

Best regards.

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.

I'll check the barebone example in the 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 have a question.

I want to know the conditions under which user_app_adv_undirect_complete() is called.
我认为在FW停止广告之后调用user_app_adv_undirect_complete()。
However, I do not have confidence in their own thinking.

请告诉我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 youinvoke theapp_easy_gap_advertise_stop() it issues a GAPM_CANCEL_CMD in order to cancel the on going air operation,这将取消广告程序。完成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的情况下,
This case does not have app_easy_gap_advertise_stop() is executed before the "app_on_adv_undirect_complete callback” is called.
I do not understand the reason why this happens.

Please let me if you know something.
Thank you.

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

亲爱的对话人员,

Sorry, I was the wrong question.

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

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

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的情况下,
This case does not have app_easy_gap_advertise_stop() is executed before the "app_on_adv_undirect_complete callback” is called.
I do not understand the reason why this happens.

Please let me if you know something.

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。

Even after the GAP_ERR_NO_ERROR has occurred,
我想继续广播广告。

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

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

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

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

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.
GAP_ERR_NO_ERROR status is displayed after it has been referred to the “app_on_connection callback" is called.

我想制作“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, I’m using the SDK5.0.3.
Is there a sample that would be helpful in SDK5?

我想我只是更改设置(例如user_config.h)或广告启动方法。

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

2. I am selecting the 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) 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.

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()函数以启动广告,使您的设备不可连接。

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

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.

I have been using the “ble_app_barebone” example.
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_undirected_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();
}

It could not be build, because app_easy_gap_non_connectable_advertise_get_active()
没有定义。

I have defined the app_easy_gap_non_connectable_advertise_get_active()
to “app_easy_gap.h" file.
(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.
Thank you so much.

Topic locked