关于使用SDK5.0的广告作为灯泡

18个帖子/ 0新
最后一篇
Liuluan002.
离线
最后一次露面:3 months 3 weeks ago
加入:2015-11-27 14:24
关于使用SDK5.0的广告作为灯泡

嗨对话框,

我正在尝试使Beacon应用程序的忠告权如其他蓝牙设备可以倾听空中,这是我遵循您网站链接的那个人的问题,但仍然无法捕捉到其他蓝牙设备的广播数据包扫描广播包。能否请你帮忙?

引用我所做的与以下内容相同:
http://support.dialog-semicondiondiondum/aadvertisement-complete-callback -...

2-option (the proper one) is to catch the ending of a non connectable advertisement through the catch rest function (user_catch_rest_hndl). You can just place the below code in the user_peripheral.c function:

案例GAPM_CMP_EVT:
{
struct gapm_cmp_evt const *msg_param = (struct gapm_cmp_evt const *)(param);
开关(MSG_PARAM->操作)
{
case GAPM_ADV_NON_CONN:
user_app_adv_start();//完成后或任何您想要的内容
break;

默认:
break;
} 休息;
}

Device:
mt_dialog.
离线
最后一次露面:1周21小时前
职员
加入:2015-06-08 11:34
Hi liuluan002,

Hi liuluan002,

您可以转到GapM_CMP_EVT_HANDLER()并在接收捕获REST功能的回调函数时检查断点。如果执行正确的案例,则在切换语句中调用它。您可以始终使用第一个选项,以便调试目的,以检查GAPM_ADV_NON_CONN是否被触发。

谢谢mt_dialog.

Liuluan002.
离线
最后一次露面:3 months 3 weeks ago
加入:2015-11-27 14:24
感谢你的回复。

感谢你的回复。但是我正在调试代码,但它在global_int_stop()中停止;在arch_main.cn时,我运行f10步骤

Liuluan002.
离线
最后一次露面:3 months 3 weeks ago
加入:2015-11-27 14:24
亲爱的mt_dialog,

亲爱的mt_dialog,

I am trying to run your code from the DA1458x_SDK\5.0.3\projects\target_apps\ble_examples\ble_app_peripheral, but I can not catch the broadcasting package from other bluetooth device. This device can got the package from other bluetooth beacon package. could you please help me to run it to get some beacon broadcasting package running based on the ble_app_peripheral ?

mt_dialog.
离线
最后一次露面:1周21小时前
职员
加入:2015-06-08 11:34
Hi liuluan002,

Hi liuluan002,

The code that is indicated in the post you ve mentioned is just to catch the ending of an non-connectable advertising (the device is advertising and you issue a stop causing the advertising to stop and you get the indication to your application that your device stopped advertising). What do you mean you can not catch the advertising package from another device ? In order to get ble packages from other devices you have to be a scanner in order to snif advertising packages from other peripherals.

谢谢mt_dialog.

Liuluan002.
离线
最后一次露面:3 months 3 weeks ago
加入:2015-11-27 14:24
I am using bluetooth scanner

I am using bluetooth scanner I made based on microchip RN4020 to catch up the all the advertisement package from all the broadcast package. I can see the other beacon package from other devises with the microchip RN4020 scanning, but I can not seen the package coming from the DA14580.

从我的代码中,我刚刚添加了Da1458x_sdk \ 5.0.3 \ projects \ target_apps \ ble_examples \ ble_app_periasieral的项目的以下更改

2-option (the proper one) is to catch the ending of a non connectable advertisement through the catch rest function (user_catch_rest_hndl). You can just place the below code in the user_peripheral.c function:

案例GAPM_CMP_EVT:
{
struct gapm_cmp_evt const *msg_param = (struct gapm_cmp_evt const *)(param);
开关(MSG_PARAM->操作)
{
case GAPM_ADV_NON_CONN:
user_app_adv_start();//完成后或任何您想要的内容
break;

默认:
break;
} 休息;
}

mt_dialog.
离线
最后一次露面:1周21小时前
职员
加入:2015-06-08 11:34
Hi liuluan002,

Hi liuluan002,

由于您没有看到任何广告,而且您没有得到您的广告已停止的指示,可以确保您的设备通过使用Smart Spetpets工具或只是为了确保尝试Android BLE应用程序进行广告?

谢谢mt_dialog.

Liuluan002.
离线
最后一次露面:3 months 3 weeks ago
加入:2015-11-27 14:24
嗨,我可以看到

嗨,我可以从手机看到广告包,但我不能使用mircochip的扫描仪来扫描它。但是使用相同的工具,它可以从同一设备中运行的IBeAcon示例扫描包。你能帮忙吗?是否需要将代码从无连接的广播更改为非连接的广播?我怎么能做到?

mt_dialog.
离线
最后一次露面:1周21小时前
职员
加入:2015-06-08 11:34
Hi liuluan002,

Hi liuluan002,

I am not aware what kind of data packets your scanner detects. If you want to advertise in non-connectable mode you can do this by using the app_easy_gap_non_connectable_advertise_start() function in the template project of the SDK.

谢谢mt_dialog.

Liuluan002.
离线
最后一次露面:3 months 3 weeks ago
加入:2015-11-27 14:24
我试过,但仍然没有

我试过,但仍然没有那么差异。来自信标的广播方法和行为是否有很多来自信标示例和da1458x_sdk \ 5.0.3 \ projects \ target_apps \ ble_examples \ ble_app_perifal的示例?

mt_dialog.
离线
最后一次露面:1周21小时前
职员
加入:2015-06-08 11:34
Hi liuluan002,

Hi liuluan002,

信标示例使用两种不同的广告模式(取决于软件配置 - Gapm_adv_non_conn和GapM_Adv_undirect),并且设备的角色在Gap_peripheral_slv中设置pdu类型是adv_nonconn_ind。也是Beacon广告没有扫描响应数据。App_Peripheral AS在Gap_Peripheral_SLV中使用GAPM_ADV_UNDICHICED,具有扫描响应数据,PDU类型使用是ADV_IND。

谢谢mt_dialog.

Liuluan002.
离线
最后一次露面:3 months 3 weeks ago
加入:2015-11-27 14:24
谢谢你的回复,我

谢谢你的回复,我现在试着检查一下。
对于扫描,我们是否有可能只收听一个频道,例如我们只扫描通道37?

mt_dialog.
离线
最后一次露面:1周21小时前
职员
加入:2015-06-08 11:34
Hi liuluan002,

Hi liuluan002,

Its not possible to only check individual advertising channels or retrieve the specific advertising channel number..

谢谢mt_dialog.

Liuluan002.
离线
最后一次露面:3 months 3 weeks ago
加入:2015-11-27 14:24
谢谢你现在工作。

谢谢你现在工作。

Anther question is about the watchdog
对于项目“BLE_APP_BAREBONE”,我已将WatchDog从“#undef cfg_wdog”更改为“da1458x_config_basic.h”中的“#define cfg_wdog”。然后我将以下代码写入“app_task.c”,然后我发现它在运行后一段时间后,程序停止,如何解决这个问题?看起来看门狗没有运行。能否请你帮忙?再一次非常感谢你。

// device configuration updated
case GAPM_SET_DEV_CONFIG:
{
if(param-> status!= gap_err_no_error)
{
assert_err(0);// 意外的错误
}
别的
{
if( 7 == current_role)
{
#if debug_log.
printf_string(“\ r \ n adv1 \ r \ n”);
UART2_INIT(UART_BAUDRATE_115K2,3);
#万一
while(1)
{
#if debug_log.
printf_string("\r\n WD T");
如果(USE_WDOG)
{
printf_string(" 1");
wdg_reload(WATCHDOG_DEFAULT_PERIOD);
wdg_resume();
}
if(development_debug)
{
printf_string(“2”);
}
printf_string(“\ r \ n”);
UART2_INIT(UART_BAUDRATE_115K2,3);
#万一
}
Record2(Current_role);
Execute_callback_void(app_on_set_dev_config_complete);
}
别的
{
#if debug_log.
printf_string(“\ r \ n adv2 \ r \ n”);
UART2_INIT(UART_BAUDRATE_115K2,3);

#万一
Record2(Current_role);
}
ke_timer_set(app_switch_role_timer,task_app,10);// 10 * 10ms
}
}
break;

mt_dialog.
离线
最后一次露面:1周21小时前
职员
加入:2015-06-08 11:34
Hi liuluan002,

Hi liuluan002,

I dont really understand what you are trying to do. As far as i can tell the program isn't going to advertise but it will stuck in that while(1) and will always reload the watchdog and print some stuff. If the program stops due to NMI_Handler() (meaning watchdog interrupt) then you can find where the NMI interrupt is issued by opening the memory tab and checking at address 0x81850, the seventh unsigned long integer number in your memory window is your program counter. You can check this in order to see where the program stopped.

谢谢mt_dialog.

Liuluan002.
离线
最后一次露面:3 months 3 weeks ago
加入:2015-11-27 14:24
谢谢你。我让它成功

谢谢你。我让它成功now

Liuluan002.
离线
最后一次露面:3 months 3 weeks ago
加入:2015-11-27 14:24
有没有办法做

是否有任何方法可以通过UART端口进行软件更新?怎么做?
有没有办法做OTA between the two dialog BTLE by programming it?
是否有任何方式我们仍然使用对话框14583的内部闪存的一部分作为传感器数据记录?

mt_dialog.
离线
最后一次露面:1周21小时前
职员
加入:2015-06-08 11:34
Hi liuluan002,

Hi liuluan002,

The current SUOTA implementation uses either an SPI Flash or an I2C eeprom there is no other implementation for another use case.

你的意思是一个哒the suota receiver and the other da operate as central and update the image of the first da ? There is no implementation of the SUOTA profile as a central since most of the spota central are usually phones or other devices that allow the upload of an image.

您可以使用DA的Flash来存储数据除了将上传到DA的图像。信标示例使用SPI内存的空间来存储一些配置数据,我不会看到任何原因为什么不能够用14583执行此操作。

谢谢mt_dialog.