⚠️
嗨,...感谢您来论坛。令人兴奋的消息!我们现在正在迁至我们的新论坛平台,将提供更好的功能,并包含在主对话框网站中。所有帖子和帐户都已迁移。我们现在只接受新论坛上的流量 - 请发布任何新线程https://www.dialog-seminile.com/support.。我们将在未来几天修复错误/优化搜索和标记。
6个帖子/ 0新
最后一篇
marios256
离线
最后一次露面:10个月前1年
加入:2017-10-30 09:36.
转移字节

你好,
我是新的数据传输。我试图通过阅读特征从我的DA14585发送数据到我的手机。当我在〜320字节上初始化我的CASS数组时,程序停止运行。在建造它时,我没有警告或错误。我想发送1-2千字节的数据。
先感谢您

设备:
mt_dialog.
离线
最后一次露面:3个月3天前
职员
加入:2015-06-08 11:34
嗨Marios256,

嗨Marios256,

您究竟究竟在究竟尝试这样做,当您提及320字节超过320字节的字符数组时,您如何确实如此。也许你的代码最终到了一个硬盘或在NMI处理程序中,如果您从KEIL运行设备并使用调试器,则应易于跟踪。如果您希望具有250个字节的大小的可读特性,那么您应该在user_custs1_def.h文件中声明,例如,您可以尝试使用ADC 2特征,然后如果您想将该特性设置为特定的特征值您必须在句柄和结构中的长度字段中使用适当的配置发送Custs1_val_set_req消息并发送它,以便自定义配置文件将值设置为自定义数据库。

谢谢mt_dialog.

marios256
离线
最后一次露面:10个月前1年
加入:2017-10-30 09:36.
你好,

你好,
在user_custs1_def.h文件中,我初始化:#define def_user_led_state_char_len 400作为示例。然后,在user_custs1_impl.c中我创建了这个处理程序:
void app_adcval1_timer_cb_handler()
{
struct susts1_val_ntf_ind_req * req = ke_msg_alloc_dyn(custs1_val_ntf_req,
prf_get_task_from_id(task_id_custs1),
task_app,
custs1_val_ntf_ind_req,
def_user_led_state_char_len);
静态Char样本[400] =“这幅画被认为是弗朗西斯科·德尔·戈科托的妻子丽莎·格拉达尼的肖像,并在一个白色的伦巴第杨树面板上用油。它被认为已经被涂在1503到1506之间;然而,Leonardo可能继续在1517年延迟工作。最近的学术工作表明它在1513年之前不会开始。它是由法兰西·弗朗西斯国王收购的“;
req-> handle = user_idx_led_state_val;
req-> length = def_user_led_state_char_len;

req-> notification = true;
memcpy(req->值,&sample,def_user_led_state_char_len);
KE_MSG_SEND(REQ);}

所以,当我输入调试会话时,我按下运行按钮,它突然停止了。我看不到警告或错误。
非常感谢!

mt_dialog.
离线
最后一次露面:3个月3天前
职员
加入:2015-06-08 11:34
嗨Marios256,

嗨Marios256,

您正在使用的信息是发送notification and not to just change the value in the database in order for the central to read it, when sending a notification only the first 20 bytes are going to be modified unless you change the MTU to the size that you would like to transfer. Replicated the code on that you pasted on my side on the ble_app_peripheral with the exact mods that you have done and i dont see any issue, as soon as i enable the notifications and issue a 0x01 to the control point i am able to get the first 20 bytes of the string that you have pasted and maintain the connection. If that sudden stop occurs without enabling the notifications or even connecting to the device, then the issue isn't the mod that you are doing but something else that you have in the SDK or the demo.

谢谢mt_dialog.

marios256
离线
最后一次露面:10个月前1年
加入:2017-10-30 09:36.
晚上好,

晚上好,
谢谢你们帮助我。所以,如果我想读取一个特征转移1000字节或者我该怎么办?
我写了这个结构,但它一直停止运行
struct custs1_val_set_req *req = KE_MSG_ALLOC(CUSTS1_VAL_SET_REQ, prf_get_task_from_id(TASK_ID_CUSTS1), TASK_APP, custs1_val_set_req);
req-> handle = user_idx_led_state_val;
req-> length = def_user_led_state_char_len;
静态Char样本[400] =“这幅画被认为是弗朗西斯科·德尔·戈科托的妻子丽莎·格拉达尼的肖像,并在一个白色的伦巴第杨树面板上用油。它被认为已经被涂在1503到1506之间;然而,Leonardo可能继续在1517年延迟工作。最近的学术工作表明它在1513年之前不会开始。它是由法兰西·弗朗西斯国王收购的“;
memcpy(req->值,&sample,def_user_led_state_char_len);
KE_MSG_SEND(REQ);
我注意到,当我在350-400左右初始化user_custs1_def.h #define def_user_led_state_char_len时,会出现问题。如果我在300初始化它,它可以正常工作。
提前致谢!

mt_dialog.
离线
最后一次露面:3个月3天前
职员
加入:2015-06-08 11:34
嗨Marios256。

嗨Marios256。

发送更多通知,只需发送第一个批量,然后在获取确认器后,通知已成功存储在发送缓冲区中,发送第二个通知。每当您发送通知时,您将获得CUSTS1_VAL_NTF_CFM(对于自定义配置文件),一旦您获得此操作,您就会知道只需发送通知即可将其传送到中央,因此您可以直接放置第二个通知。

关于停止运行,或许您在增加特性的大小时,您可以重置平台重置,尝试从DA1458x_config_advanced中定义和增加DB_Heap_sz,例如,您可以放置​​2048的值。

谢谢mt_dialog.