IOT (Server) to DSPS (Host)data transmission

18 posts / 0 new
最后一篇
prasanth.velliy...
离线
最后一次露面:1年8个月前
加入:2016-02-18 12:18
IOT (Server) to DSPS (Host)data transmission

Q1 : I want to send data from IOT sensor device to the DSPS host running on DA14580 , how to do it ? what are the changes that i have to do ?
Q2:同样,我想从自定义配置文件中发送数据 - Sample128_After第7.3.6节项目到DA14580上运行的DSPS主机,如何进行?
谢谢..dialog.

Device:
mt_dialog.
离线
最后一次露面:1 week 5 days ago
职员
加入:2015-06-08 11:34
嗨prasanth.velliyangiri,

嗨prasanth.velliyangiri,

1.这些是不同的项目和变化quired are far from small modifications, the DSPS host checks for a specific profile (the DSPS profile), so you should change the service discovery operation of the host and adapt it to the IoT available services and characteristics. After discovering the services enable the notifications on the available characteristics and you can push the data that you are notified over the UART.

2.同样适用于自定义项目,必须更改主机的发现过程,以查找自定义配置文件的特征。

谢谢mt_dialog.

prasanth.velliy...
离线
最后一次露面:1年8个月前
加入:2016-02-18 12:18
Q : How to create a custom

Q : How to create a custom profile for Client role , that searches service(sample128_After section 7.3.6.zip project (@server role)), connects to service , finds characteristics and read/write to the characteristics ?
I have gone through RW-BLE-GATT-IS.doc . this doc just gives the protocols only.so, it would be great, if you provide step by step tutorial like custom profile creation..thank you..!!!

mt_dialog.
离线
最后一次露面:1 week 5 days ago
职员
加入:2015-06-08 11:34
嗨prasanth.velliyangiri,

嗨prasanth.velliyangiri,

不幸的是,没有有关服务和特征的发现过程的可用教程,但您可以作为示例,DSP(这是自定义128位服务)主机侧,以便实现您自己的Central连接,搜索。并在客户端设备中发现特定服务。

谢谢mt_dialog.

prasanth.velliy...
离线
最后一次露面:1年8个月前
加入:2016-02-18 12:18
亲爱的对话框

亲爱的对话框
这些是我在DSPS主机中完成的更改 - Sample128_Awter第7.3.6节项目-@server角色
step 1: chaged the UUID in sps_client.h as per my Custom profile service and characteristics
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
step 2: Next chage in
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 }
};

第3步:在sps_client_enable_req_handler&gattc_cmp_evt_handler中分配uuid ...

uint8_t sps_data_service_uuid[]=sample128_svc ;

but code stops at GLOBAL_INT_START(); // arch_main
what am i missing ...??what else i have to change ?

mt_dialog.
离线
最后一次露面:1 week 5 days ago
职员
加入:2015-06-08 11:34
嗨prasanth,

嗨prasanth,

首先,您需要提到您的代码停止在global_int_start();我不认为你的代码在那里停下来,它只是通过主要功能循环,自设备刚刚扫描并且不做任何其他事情,这是您的代码更常见的点,所以您正在运行循环时正确地运行应该和所有例子都在做。

通过改变需求方UUID的项目的UUIDs is proper, but the discovery functions are populating the dsps enviroment structure which holds the information regarding the service that is discovered on the other side of the link, so you will have to modify that accoring to your needs as well. In order to check if the discovery is working properly you will have to check if the the infomation in the application enviroment are proper and correspond to the actual handles of your peripheral's database.

谢谢mt_dialog.

prasanth.velliy...
离线
最后一次露面:1年8个月前
加入:2016-02-18 12:18
你能告诉我,

你能告诉我,when the Client profile Tutorial will be available ??
Thank you Dialog

mt_dialog.
离线
最后一次露面:1 week 5 days ago
职员
加入:2015-06-08 11:34
嗨prasanth,

嗨prasanth,

据我所知,任何关于一个关于教程的计划,它将一步一步地指导您关于创建主机和发现过程。

谢谢mt_dialog.

prasanth.velliy...
离线
最后一次露面:1年8个月前
加入:2016-02-18 12:18
亲爱的对话框

亲爱的对话框
在DSPS_HOST项目中
Q1:您能否指定与读取DSPS_DEVICE(服务器项目)的特征相关的函数

mt_dialog.
离线
最后一次露面:1 week 5 days ago
职员
加入:2015-06-08 11:34
嗨prasanth,

嗨prasanth,

在580中,没有指示中央读取的特征的应用程序,这是由堆栈处理的,没有配置文件应用程序功能,如果这是你的意思。有关DSP的应用程序配置文件函数的更多信息,您可以在6.7部分应用程序任务界面上查看用户手册(UM-B-038)到串行端口服务。

谢谢mt_dialog.

prasanth.velliy...
离线
最后一次露面:1年8个月前
加入:2016-02-18 12:18
int sample128_timer_handler

int sample128_timer_handler(ke_msg_id_t const msgid,
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);
}
我想在DSP设备项目中实现TIMER处理程序以获取我们正在发送的数据,因此DSP设备项目定期传输......我在-USER_SPS_SERVER_DATA_TX_CFM_HANDLLER中尝试过......但似乎不起作用

mt_dialog.
离线
最后一次露面:1 week 5 days ago
职员
加入:2015-06-08 11:34
嗨prasanth,

嗨prasanth,

The sample128 uses different messages in order to trigger notifications than the DSPS project. The function that you mention sends a SAMPLE128_UPD_CHAR2_REQ message, there is no handler in the DSPS that handles this kind of message, since the DSPS doesn't support this message. The handler that you mention handles the SPS_SERVER_DATA_TX_CFM that confirms that the data are placed in the TX buffer. If you want the device to send data periodically you can follow the post belowhttp://support.dialog-semicondiondiondiondum/dsps-panasonic-evalpan1740

谢谢mt_dialog.

prasanth.velliy...
离线
最后一次露面:1年8个月前
加入: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成功)
{
if (init)
{
periodical_data_timer_handler();
}
别的
{
periodical_data_timer_handler();
}
}

/ ******************************************************************** /
void句号_data_timer_handler(void)
{
static uint16_t length;
uint8_t * p_data = null;
user_send_ble_data(p_data, length);
wrbl_env.sensor_read_time = app_easy_timer( 100, periodical_data_timer_handler );

}

/ ********************************************************************** /
void user_on_disconnect(struct gapc_disconnect_ind const * param)
{
default_app_on_disconnect(param);
ARCH_PRINTF(“设备已断开\ r \ n”);
if(wrbl_env.sensor_read_time == 1)
{
app_easy_timer_cancel(wrbl_env.sensor_read_time);
}

}

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

Q1 : i have made above changes in DSPS device project -code is stopping here -> if ((GetWord16(SYS_STAT_REG) & DBG_IS_UP) == DBG_IS_UP)
__asm(“bkpt#0 \ n”);

什么可能是这个问题??我错过了什么?谢谢你..

mt_dialog.
离线
最后一次露面:1 week 5 days ago
职员
加入:2015-06-08 11:34
嗨prasanth,

嗨prasanth,

我猜你代码在NMI或HardFault处理程序中停止,您的代码粘在某个地方,大多数可能在读取SPI传感器时(如果启用了看门狗)或者您正在访问空指针和硬盘处理程序触发器。SDK提供该功能,以弄清楚发生错误的位置,请检查UM-B-051文档以获取更多信息,以便调试此操作。

谢谢mt_dialog.

prasanth.velliy...
离线
最后一次露面:1年8个月前
加入:2016-02-18 12:18
亲爱的对话框

亲爱的对话框
Q1 : Even after adding this function , i didn't find any delay in transmission . could you please help me to solve this issue ??
void句号_data_timer_handler(void)
{
//静态UINT16_T长度;
// uint8_t * p_data = null;
user_send_ble_data("FELLOW", 6);
wrbl_env.sensor_read_time = app_easy_timer(20000,句号_data_timer_handler);

/*if(wrbl_env.sensor_read_time != NULL)
{
app_easy_timer_cancel(wrbl_env.sensor_read_time);
}*/
}

Q2 : if i want to use ke_timer_set(); directly for periodic transmission , how to use this in DSPS device project ??

mt_dialog.
离线
最后一次露面:1 week 5 days ago
职员
加入:2015-06-08 11:34
嗨prasanth,

嗨prasanth,

I dont get the question, the kernel timer didn't triggered ? You can use the arch_set_pxact_gpio() and check if the timer elapses or not. I tested the above code in a new DSPS project and triggered the timer upon connection, it works just fine and i can receive data properly on the phone application.

Use the app_easy_timer() api, it uses the ke_timer_set() and when the handler executes you can execute your code and reset the timer. If you want to directly use the ke_timer_set check your other posthttp://support.dialog-semiconductor.com/apptimerset-0

谢谢mt_dialog.

prasanth.velliy...
离线
最后一次露面:1年8个月前
加入:2016-02-18 12:18
我没有得到 - 触发了

我没有得到 - 触发了timer upon connection?? actually i am calling - periodical_data_timer_handler(); - function inside - void user_ble_pull (bool init, bool success) ... could you please suggest me where i have to put the - periodical_data_timer_handler(); - call function in DSPS device project ?? it would be great if you give me working example code...

mt_dialog.
离线
最后一次露面:1 week 5 days ago
职员
加入:2015-06-08 11:34
嗨prasanth,

嗨prasanth,

You have to establish a connection in order to start sending notifications to a central, without a connection i dont see how this is possible. So connect to a central and start a timer, when the handler triggers you will send a notification via user_send_ble_data and you will reset the timer. The preriodical_data_timer_handler() is just a handler, when you start a timer with that callback, that callback will be executed when time elapses.

谢谢mt_dialog.