我建议实现一个自定义服务sensor data. Your sensor data is, as far as I understand, discreet data sets that gets transmitted periodically. The app notehttp://support.dialog-semicondiondiondum/download/file/fid/885.涵盖如何在一步一步的教程中构建自己的自定义服务。该应用笔记还介绍了如何在数据更改时设置允许设备将数据发送到SMRartphone的通知。DSP使用相同的基本方法(GATT上通知),并且是在非常高的数据速率下需要流数据的系统的伟大候选者,但是它不是Disceret数据包的周期传输的最佳候选者。使用自定义服务还使实现应用程序的智能手机侧更容易。
亲爱的JBaczuk, newbie's question. Do you know where can find the data input from keyboard in SPS project? I notice that uart_rx_callback() can realize the function and its definition showed below
I did not find any input from keyboard.. Since I want to revise this project,using very small, periodic data sets that generate by MCU to replace the data input from keyboard.. (Just generate a signal to simulate the real data), I need to know where the data read by UART..
你在谈论吗?keyboard data before it is sent over BLE or after? This might be a better question for Dialog as I haven't spent much time with the SPS, I created a custom profile instead for my application.
嗨,
我建议实现一个自定义服务sensor data. Your sensor data is, as far as I understand, discreet data sets that gets transmitted periodically. The app notehttp://support.dialog-semicondiondiondum/download/file/fid/885.涵盖如何在一步一步的教程中构建自己的自定义服务。该应用笔记还介绍了如何在数据更改时设置允许设备将数据发送到SMRartphone的通知。DSP使用相同的基本方法(GATT上通知),并且是在非常高的数据速率下需要流数据的系统的伟大候选者,但是它不是Disceret数据包的周期传输的最佳候选者。使用自定义服务还使实现应用程序的智能手机侧更容易。
好的,我会看看。是的,您是正确的,它们将非常小,定期数据集,因此不需要高数据流。
亲爱的JBaczuk,
newbie's question. Do you know where can find the data input from keyboard in SPS project? I notice that uart_rx_callback() can realize the function and its definition showed below
****************************************************************************************
* @brief接收回调函数将处理传入的UART数据
*
* @param [in] res(状态:uart_status_ok,uart_status_error,uart_status_timeout)
*
* @return none
****************************************************************************************
* /
static void uart_rx_callback(uint8_t res, uint32_t read_size)
{
//从UART调用的函数接收ISR
if(res == UART_STATUS_OK)
{
app_uart_push(rx_read_pointer,rx_callback_size,rx_state_ptr);
}
//从UART Timeout ISR调用的函数
否则if(res == uart_status_timeout)
{
app_uart_push(rx_read_pointer, read_size, rx_state_ptr);
}
其他
{
while(1); //error: callback called from unknown source
}
//重新回调
UART_SPS_READ(rx_read_pointer,rx_callback_size,&rx_state_ptr,&uart_rx_callback);
我跟踪了UART_RX_CALLBALL()中的UART_SPS_READ(),其定义是:
void UART_SPS_READ(UINT8_T * BUFPTR,UINT32_T大小,UINT8_T *状态,VOID(*回调)(UINT8_T,UINT32_T))
{
// Sanity check
assert_err(bufptr!= null);
assert_err(size!= 0);
assert_err(uart_sps_env.rx.bufptr == null);
// Prepare RX parameters
uart_sps_env.rx.size = size;
uart_sps_env.rx.bufptr = bufptr;
uart_sps_env.rx.state = state;
UART_SPS_ENV.RX.CALLBACK =回调;
//开始数据事务
UART_REC_DATA_AVAIL_SETF(1);// = setBits16(UART_IER_DLH_REG,ETBEI_DLH0,1);
}
I did not find any input from keyboard..
Since I want to revise this project,using very small, periodic data sets that generate by MCU to replace the data input from keyboard.. (Just generate a signal to simulate the real data), I need to know where the data read by UART..
你能给我一些提示吗?非常感谢!
如果可以回答这个问题,那么我现在正在努力的项目会有所帮助。
你在谈论吗?keyboard data before it is sent over BLE or after? This might be a better question for Dialog as I haven't spent much time with the SPS, I created a custom profile instead for my application.
抱歉的男人意味着要将此额头指向对话。我已经开始了自己的话题,考虑对他们有很多问题!
是的,我只是想知道在代码中收到键盘数据,因为我在他们的榜样中找不到它,而不是我们在项目中直接需要的东西,但我很好奇的东西。
嗨Nrenney,
如果我理解这个问题,因为显然有一点混合。您希望存储从DSP中的UART接收的数据的位置?从UART接收的数据被放置在PERIPH_TO_BLE_BUFFER环形缓冲区(在指向DATA_PTR成员的地址处)。
谢谢mt_dialog.
嗨jbaczuk,
The resource link for the application note cannot be found!
您知道相关申请笔记的名称吗?
这会帮助我很多!
提前致谢。
Bluesdk18
嗨Bluesdk18,
我想你有兴趣拥有一个演示,它将使用通知向中央发送数据,在这种情况下,BLE_APP_PERITELAL已全部演示,只需将0x01写入控制点特性,并按顺序向ADC 1的通知。开始获取数据。此外,还有一个关于“教程”部分构建自定义配置文件的教程,这些配置文件将帮助您自定义已全部现有自定义配置文件。您将引用其相当旧的链接以及链接到最多可能的文档可能是已过时并从支持站点中删除。
谢谢mt_dialog.
Hi MT_Dialog,
Thanks for your reply on my question!
The answer is what I need to know.
Bluesdk18