IOT(服务器)到DSP(主机)数据传输

18个帖子/ 0新
Last post
prasanth.velliy ...
Offline
Last seen:1 year 10 months ago
Joined:2016-02-18 12:18
IOT(服务器)到DSP(主机)数据传输

Q1:我想将数据从IoT传感器设备发送到DA14580上的DSPS主机,如何进行?我要做的更改是什么?
Q2 : similarly, I want to send the data from custom profile - sample128_After section 7.3.6 project to DSPS host running on DA14580 , how to do it ?
Thank you ..Dialog

设备:
MT_dialog
Offline
Last seen:1 month 4 weeks ago
Staff
Joined:2015-06-08 11:34
Hi prasanth.velliyangiri,

Hi prasanth.velliyangiri,

1.这些是不同的项目,所需的更改远非微小的修改,DSPS主机检查特定配置文件(DSP配置文件),因此您应该更改主机的服务发现操作并将其调整为IOT可用服务特征。发现服务后,可以在可用特征上启用通知,并且您可以按UART上通知您的数据。

2. The same applies for the custom project, you must change the discovery procedure of the host in order to find the characteristics of the custom profile.

Thanks MT_dialog

prasanth.velliy ...
Offline
Last seen:1 year 10 months ago
Joined:2016-02-18 12:18
问:如何创建自定义

问:如何为客户端角色创建自定义配置文件,搜索服务(Sample128_After第7.3.6.zip项目(@Server角色))连接到服务,查找特征并读取/写入特征?
我经历了rw-ble-gatt-is.doc。这个Doc只给出协议。所以,如果您提供的步骤教程,如自定义档案创作,那将是很棒的..谢谢你..!

MT_dialog
Offline
Last seen:1 month 4 weeks ago
Staff
Joined:2015-06-08 11:34
Hi prasanth.velliyangiri,

Hi prasanth.velliyangiri,

Unfortunatelly there is no available tutorial regarding the implementation of the discovery procedure of services and characteristics, but you can take as an example the DSPS (which is a custom 128-bit service) host side in order to implement your own central that connects, searches and discovers for a specific service in a client device.

Thanks MT_dialog

prasanth.velliy ...
Offline
Last seen:1 year 10 months ago
Joined:2016-02-18 12:18
Dear Dialog

Dear Dialog
these are the changes that i hav done in DSPS HOST - sample128_After section 7.3.6 project-@服务器role
第1步:按照我的自定义配置文件服务和特征,在SPS_CLIER.H中介入UUID
sps_service_uuid = sample128_svc.
SPS_SERVER_TX_UUID = sample128_1_val
sps_server_rx_uuid = sample128_2_val.
sps_flow_ctrl_uuid = sample128_3_val.
第2步:下一个凹陷
const struct prf_char_def_128 spsc_sps_char[SPSC_CHAR_MAX] ={
[spsc_srv_tx_data_char] = {sample128_1_val,att_mandatory,att_char_prop_rd |ATT_CHAR_PROP_WR},
[SPSC_SRV_RX_DATA_CHAR] = {sample128_2_val, ATT_MANDATORY, ATT_CHAR_PROP_RD | ATT_CHAR_PROP_NTF },
[spsc_flow_ctrl_char] = {sample128_3_val,att_mandatory,att_char_prop_rd |ATT_CHAR_PROP_NTF}
};

Step 3: Assigning the UUID in sps_client_enable_req_handler & gattc_cmp_evt_handler...

UINT8_T SPS_DATA_SERVICE_UUID [] = SAMPLE128_SVC;

但代码停止在global_int_start();// Arch_Main.
我错过了什么......?我还有什么要改变的?

MT_dialog
Offline
Last seen:1 month 4 weeks ago
Staff
Joined:2015-06-08 11:34
Hi prasanth,

Hi prasanth,

To start with, you are mentioning that your code stops at the GLOBAL_INT_START(); i dont think that your code stops there, it just loops through the main function and since the device just scans and doesn't do anything else this is the point that your code pass more often, so you are running the while loop properly as you should and as all the examples are doing.

通过将DSP UUID更改为项目的UUID,但发现函数填充DSP环境结构,该结构占据了链接另一侧发现的服务的信息,因此您必须修改它的可供选择也需要。为了检查发现是否正常工作,您必须检查应用程序环境中的信息是否适当,对应于外围数据库的实际处理。

Thanks MT_dialog

prasanth.velliy ...
Offline
Last seen:1 year 10 months ago
Joined:2016-02-18 12:18
Could you please tell me,

你能告诉我,当客户个人资料教程将可用时请告诉我?
谢谢对话框

MT_dialog
Offline
Last seen:1 month 4 weeks ago
Staff
Joined:2015-06-08 11:34
Hi prasanth,

Hi prasanth,

As far as i know there arent any on going plans for a tutorial that will guide you step by step regarding the creation of a host and the discovery procedure.

Thanks MT_dialog

prasanth.velliy ...
Offline
Last seen:1 year 10 months ago
Joined:2016-02-18 12:18
Dear Dialog

Dear Dialog
In DSPS_HOST project
Q1 : could you please specify the functions related to reading the characteristics from DSPS_DEVICE(server project)

MT_dialog
Offline
Last seen:1 month 4 weeks ago
Staff
Joined:2015-06-08 11:34
Hi prasanth,

Hi prasanth,

In the 580 there is no indication to the application that a central has read your characteristic, this is handled by the stack, there is no profile application function that does this, if that is what you mean. For more information regarding the application profile functions for the DSPS you can have a look at the User Manual (UM-B-038) at the 6.7 section Application task interface to Serial Port Service.

Thanks MT_dialog

prasanth.velliy ...
Offline
Last seen:1 year 10 months ago
Joined:2016-02-18 12:18
int sample128_timer_handler.

msgstmm msgid,limemer
struct gapm_cmp_evt const * param,
ke_task_id_t const dest_id,
ke_task_id_t const src_id)
{

ke_timer_set(APP_SAMPLE128_TIMER,TASK_APP,50);
Sample128_PlaceHolder ++;

struct sample128_upd_char2_req *req = KE_MSG_ALLOC(
SAMPLE128_UPD_CHAR2_REQ,
TASK_SAMPLE128,
TASK_APP,
sample128_upd_char2_req
);
req-> val = sample128_PlaceHolder;
req->conhdl = app_env.conhdl;
KE_MSG_SEND(REQ);
}
i want to implement above timer handler in dsps device project for data that we are transmitting , so dsps device project transmit periodically..how to do this...i hav tried within -user_sps_server_data_tx_cfm_handler - but seems not working

MT_dialog
Offline
Last seen:1 month 4 weeks ago
Staff
Joined:2015-06-08 11:34
Hi prasanth,

Hi prasanth,

示例128使用不同的消息来触发比DSP项目的通知。您提到的函数发送示例128_upd_char2_req消息,DSP中没有处理此类消息的DSP中没有处理程序,因为DSP不支持此消息。您提到的处理程序处理SPS_SERVER_DATA_TX_CFM,该命令确认数据已放在TX缓冲区中。如果您希望设备定期发送数据,您可以在下面的帖子遵循http://support.dialog-semiconductor.com/dsps-panasonic-evalpan1740.

Thanks MT_dialog

prasanth.velliy ...
Offline
Last seen:1 year 10 months ago
Joined:2016-02-18 12:18
亲爱的对话框,

亲爱的对话框,

/ *************************************************************** /
typedef struct wrbl_env_T
{

void(* wrbl_timer_cb)();

uint16_t sensor_read_time;// vp.
uint16_t sensor_read_time_1; // VP
uint16_t sensor_read_time_2; // VP

wrbl_env_struct;

/ ****************************************************************/

void user_ble_pull (bool init, bool success)
{
如果(init)
{
句号_data_timer_handler();
}
else
{
句号_data_timer_handler();
}
}

/ ******************************************************************** /
空白periodical_data_timer_handler(void)
{
静态uint16_t长度;
uint8_t *p_data = NULL;
user_send_ble_data(p_data,长度);
wrbl_env.sensor_read_time = app_easy_timer(100,句号_data_timer_handler);

}

/ ********************************************************************** /
void user_on_disconnect( struct gapc_disconnect_ind const *param )
{
default_app_on_disconnect(param);
arch_printf("Device disconnected\r\n");
if(wrbl_env.sensor_read_time == 1)
{
app_easy_timer_cancel( wrbl_env.sensor_read_time);
}

}

/ *********************************************************************/

Q1:我在DSP设备项目的上面更改 - 代码在这里停止 - > if((getword16(sys_stat_reg)&dbg_is_up)== dbg_is_up)
__asm("BKPT #0\n");

what could be the issue ??what am i missing ?? thank you..

MT_dialog
Offline
Last seen:1 month 4 weeks ago
Staff
Joined:2015-06-08 11:34
Hi prasanth,

Hi prasanth,

I guess that you code stops either on NMI or in Hardfault Handler, your code either stucks somewhere, most probably when reading the SPI sensor (NMI handler if the watchdog is enabled) or you are accessing a NULL pointer and the Hardfault handler triggers. The SDK provides that feature in order to figure out where the error occured, please check the UM-B-051 document for more information in order to debug this.

Thanks MT_dialog

prasanth.velliy ...
Offline
Last seen:1 year 10 months ago
Joined:2016-02-18 12:18
Dear Dialog

Dear Dialog
Q1:即使添加此功能后,我也没有在传输中找到任何延迟。你能帮我解决这个问题吗?
空白periodical_data_timer_handler(void)
{
//static uint16_t length;
//uint8_t *p_data = NULL;
user_send_ble_data(“别人”,6);
wrbl_env.sensor_read_time = app_easy_timer( 20000, periodical_data_timer_handler );

/*如果(wrbl_env.sensor_read_time!= null)
{
app_easy_timer_cancel( wrbl_env.sensor_read_time);
* /
}

Q2:如果我想使用ke_timer_set();直接用于定期传输,如何在DSP设备项目中使用它?

MT_dialog
Offline
Last seen:1 month 4 weeks ago
Staff
Joined:2015-06-08 11:34
Hi prasanth,

Hi prasanth,

我没有得到这个问题,内核计时器没有触发?您可以使用ARCH_SET_PXACT_GPIO()并检查计时器是否已过度。我在新的DSP项目中测试了上面的代码,并在连接时触发定时器,它工作正常,我可以在手机应用程序上正确接收数据。

使用app_easy_timer()API,它使用KE_TIMER_SET(),并且当处理程序执行时,您可以执行代码并重置计时器。如果要直接使用ke_timer_set检查您的其他帖子http://support.dialog-semicondiondiondiondum/apptimerset-0..

Thanks MT_dialog

prasanth.velliy ...
Offline
Last seen:1 year 10 months ago
Joined:2016-02-18 12:18
i didn't get - triggered the

我没有得到 - 连接时触发计时器?实际上我正在打电话 - 句号 - _data_timer_handler();- 内部函数 - void user_ble_pull(bool init,bool成功)......你能否建议我在哪里放置 - 句号_data_timer_handler();- DSP设备项目中的呼叫功能?如果你给我工作的例子代码,那就太好了......

MT_dialog
Offline
Last seen:1 month 4 weeks ago
Staff
Joined:2015-06-08 11:34
Hi prasanth,

Hi prasanth,

您必须建立一个连接,以便开始向中央发送通知,而无需连接,我不会看到这是可能的。因此,连接到一个中央并启动计时器,当处理程序触发时,您将通过user_send_ble_data发送通知,并且您将重置计时器。preriodical_data_timer_handler()只是一个处理程序,当您使用该回调的计时器启动时,将在时间过去时执行回调。

Thanks MT_dialog