DSPS Host polls DSPS Device

13 posts / 0 new
最后一篇
prasanth.velliy...
离线
Last seen:1 year 9 months ago
加入:2016-02-18 12:18
DSPS Host polls DSPS Device

亲爱的对话框

我的问题是
1.多体DSP设备将处于睡眠模式(Appx 6 DSP设备)
2. DSPS Host polls one DSPS Device , so DSPS Device wake up and ready to send Data.
3. When Polling finished , Next, DSPS Host will polls next DSPS Device. How to do this ?? Please Guide me ...!

谢谢Dialog

Device:
MT_dialog
离线
Last seen:1 month 3 days ago
职员
加入:2015-06-08 11:34
嗨prasanth.velliyangiri,

嗨prasanth.velliyangiri,

我假设您unconnect意味着设备ed and you are not wish to implement multiple simultanieous connections but a connect, exchange data and disconnect scheme.

1. The peripheral devices have to wake up once and while to advertise, there is no way for a central to see a non-advertising device.

2. In order to send data, there has to be a connection, so once the scanner finds the advertisment from the peripheral you can either check an info in the advertising string or the bd address and issue a connection request from the central.

3. After the data has been exchanged, the host can issue a disconnection and continue scanning for the next peripheral to connect and exchange data.

Thanks MT_dialog

MSun
离线
Last seen:7 months 1 week ago
加入:2015-11-30 22:40
是的,你应该能够

是的,您应该能够采用具有客户端(中央/主机)和服务器(外设/设备)实现的最新DSP应用程序。

Presently the Client application simply scans for any DSPS Peripherals, and connects to the first one that it finds.
您需要修改应用程序的客户端,以执行您需要的操作。

Thanks, Martin

prasanth.velliy...
离线
Last seen:1 year 9 months ago
加入:2016-02-18 12:18
嗨对话框

嗨对话框
谢谢for your reply. i am using DSPS project , can i able to configure BLE device address
Q1:我看到不同的BLE地址,为什么??
1. #define BT_DEFAULT_BDADDR {{0x01, 0x23, 0x45, 0x67, 0x89, RIPPLE_ID}} (in => co_bt.h)
2. /// BD Address of device
。peer_addr_0 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, (in => user_config.h - line 340)
3.在DSPS Android应用程序中
device_address 90:b6:86:97:D2:A7(这个地址我无法找到DSPS_DEVICE项目中的)

4. #define CFG_NVDS_TAG_BD_ADDRESS {0x00, 0x00, 0x00, 0xCA, 0xEA, 0x80} (in nvds.c )

Q2: Based on what parametrs MASTER(DSPS_HOST) will decide which slave(DSPS_Device) it has to connect ?? (What are the parameters needed for central(DSPA_HOST) to make connection with Slave (DSPS_DEVICE).
谢谢Dialog...

MT_dialog
离线
Last seen:1 month 3 days ago
职员
加入:2015-06-08 11:34
嗨prasanth.velliyangiri,

嗨prasanth.velliyangiri,

Q1。您可以配置BD地址,引用设计从NVDS结构获取其BD地址,并且BD地址可以从CFG_NVDS_TAG_BD_ADDRESS的DA1458x_config_Advanced.h文件配置,如果您更改此,则该BD您的设备的地址应该改变。SDK虽然它首先检查OTP标头设备ID字段是否已刻录,包含与0不同的值。如果标题的值小于零,则这是设备将使用的地址。因此,如果在NVDS中定义BD地址,并且您的OTP标题具有刻录的设备ID字段,则将使用OTP的地址。在多个连接的情况下,您指示的结构构件涉及连接设备的BD地址。

Q2。当中央将在获得广告指示后立即发送连接参数,在user_on_add_report_ind中调用app_easy_gap_start_connection_to_set(),传递的参数是间隔12.5ms,并且从user_central_conf结构中拍摄REST参数。

Thanks MT_dialog

prasanth.velliy...
离线
Last seen:1 year 9 months ago
加入:2016-02-18 12:18
嗨对话框

嗨对话框
谢谢for your reply.
Q1. In DSPS_DEVICE project where advertising starting and stopping ?? i want to implement a logic that after connection happens with DSPS_HOST , DSPS_DEVICE will receive a test str from DSPS_HOST and do the comparison with pre defined data, if it matches then DSPS_DEVICE sends it data to DSPS_HOST.

Q2: It would be great if you could give the state diagram which tells DSPS_DEVICE advertising , receiving connection req , sending data and simlarly for DSPS_HOST functions.

谢谢Dialog

MT_dialog
离线
Last seen:1 month 3 days ago
职员
加入:2015-06-08 11:34
嗨prasanth.velliyangiri,

嗨prasanth.velliyangiri,

Q1. Upon booting the device starts advertising and keeps on advertising until a central connects on the device, as soon as the central disconnects from the device the peripheral starts advertising again. Regarding your question, you mean what functions are triggered to a peripheral when a connection and a disconnection occurs ? Those functions would be the user_on_connection() and the user_on_disconnect. Regarding the advertising to start advertise you invoke the default_advertise_operation, which is invoked in the default_app_on_db_init_complete (as soon as the database is created) and the advertising stop will occur as soon as your device is connected or as soon as you cancel it.

Q2。在图4和5中的DSP用户手册UM-B-038中,示出了外围和中心的应用FSM。

Thanks MT_dialog

prasanth.velliy...
离线
Last seen:1 year 9 months ago
加入:2016-02-18 12:18
嗨对话框

嗨对话框
谢谢for your reply..
在调试DSPS_DEVICE代码时(我从(app_task.c / line 383)=> execute_callback_void(app_on_db_init_complete),代码停止在下面的函数

int app_entry_point_handler(ke_msg_id_t const msgid,
void const * param,
ke_task_id_t const dest_id,
ke_task_id_t const src_id)
{
int i=0;
enum ke_msg_status_tag process_msg_handling_result;

当我

MT_dialog
离线
Last seen:1 month 3 days ago
职员
加入:2015-06-08 11:34
嗨prasanth.velliyangiri,

嗨prasanth.velliyangiri,

The function that you mention is the main handler that handles all the messages received from the BLE stack. Where the code stucks exactly? and have you made any changes to the SDK ?

Thanks MT_dialog

prasanth.velliy...
离线
Last seen:1 year 9 months ago
加入:2016-02-18 12:18
嗨对话框Regarding the DSPS

关于DSPS_HOST轮询DSPS_DEVIECE的对话

i am doing the following
dsps_host -
// ***在user_sps_scheduler.c
///用户轮询数据
#define user_poll_data“\ x1a \ x1b \ x1c \ x1d \ x1e \ x1f”

void user_ble_pull(bool init,bool成功)
{
如果{
user_send_ble_data(USER_POLL_DATA, 6);
}
else{
user_send_ble_data(USER_POLL_DATA, 6);
}
}
/ **************************************************************************************************************** /
// IN DSPS_DEVIECE
// ***在user_sps_scheduler.c
void user_ble_push(uint8_t* wrdata, uint16_t write_amount)
{
//将项目写入缓冲区;
user_buffer_write_items(&ble_to_periph_buffer,wrdata,write_amount);
periodic_timer_handler();
}
periodic_timer_handler()
{
user_send_ble_data("PRASANTH", 8); // will send data periodically
}

主发送轮询数据=>设备接收UART的任何数据,定期计时器称为,现在Deviec将发送自己的数据...
but i am not seeing any data on DSPS_HOST side ?? Any help
谢谢

MT_dialog
离线
Last seen:1 month 3 days ago
职员
加入:2015-06-08 11:34
嗨prasanth.velliyangiri,

嗨prasanth.velliyangiri,

您已从User_ble_Pull中删除了所有实现,删除了所有检查和初始化,并通过没有条件的简单If()替换此操作,并且您只需对圣务区执行写入。让我们假设您不想将数据更新或推送到缓冲区中,因此您不需要上述所有功能,您只想直接写入其他特征(只是通过执行上述方式清除,您正在绕过发送数据的缓冲区到另一侧,您将数据写入外围特性)。DSP应用程序中的许多函数在包括user_on_system_powered()中的许多函数调用了user_ble_pull,这意味着即使在未连接时也会向堆栈发送数据,我无法预测会发生什么。如果您只想直接写入从设备的特征,您只需在连接时从主机中设置计时器并开始将数据与user_send_ble_data()发送到另一侧(确保在UART上进行正确的连接)。在您这样做的情况下,您可以在另一侧获取数据,在设备中的数据接收时启动定期处理程序,您应该在主机上开始获取数据,如果没有检查主机上的接收处理程序是否触发。另请确保已正确连接流控制引脚,并且您的终端在定义的流量控制下运行。

Thanks MT_dialog

prasanth.velliy...
离线
Last seen:1 year 9 months ago
加入:2016-02-18 12:18
嗨对话小组

嗨对话小组

In DSPS_HOST code =>
/ ******************************************************************************************************/

void user_ble_pull(bool init,bool成功)
{
如果{
user_send_ble_data("USER_POLL_DATA", 14);
}
else{
user_send_ble_data("USER_POLL_DATA", 14);
}
}

/ **************************************************************************************************************** /
// IN DSPS_DEVIECE

# DSPS_POLLDATA "DSPS_POLLDATA"

// ***在user_sps_scheduler.c
void user_ble_push(uint8_t* wrdata, uint16_t write_amount)
{
//将项目写入缓冲区;
user_buffer_write_items(&ble_to_periph_buffer,wrdata,write_amount);
if(!memcmp(wrdata,dsps_polldata,sizeof(dsps_polldata))))
{
periodic_timer_handler();
}
}
/ **********************************************************************************/
periodic_timer_handler()
{
user_send_ble_data("PRASANTH", 8); // will send data periodically
}

above polling logic works fine with HOST<=> one DSPS_DEVICE , But with HOST <=> Multible DSPS_DEVICE i am not getting any data , with out this polling logic my HOST <=> Multible DSPS_DEVICE code working fine(i am able to connect to two devices at the same time and i am getting data from the DSPS_DEVICE to HOST side) , what could be the issue

谢谢

MT_dialog
离线
Last seen:1 month 3 days ago
职员
加入:2015-06-08 11:34
嗨prasanth.velliyangiri,

嗨prasanth.velliyangiri,

如许多帖子所述,DSP示例不支持在一个外设上连接的多个从站,您可以看一下这篇文章,其中客户达到该帖子,但对话框不支持这一点https://support.dialog-semiconductor.com/multiple-slaveda14580-connectio...。我想在尝试从中央发送数据时,首先要查看的是连接索引,请检查您尝试通过数据从设备1或从设备的两个连接的站点。

Thanks MT_dialog