你好,
I am using SDK 5.0.3 software on DA14583DEVKT-B board.
我拍摄了“BLE_APP_PERITELAL”(给出了BLE示例项目)。我修改了两个特征(我是一个单独的UUID)。
我的要求是每5毫秒发送专用数据。
I wish to know the following details.
1.我可以传输BLE数据包的最大速率。
2.可以在每个BLE数据包中传输最大应付负载。
3. How many maximum characteristics I enable at a time.
4.其他因素有什么影响传输。
5.数据是数据是可靠的。
Please share the information and guide me which documents I need to refer to understand the above mentioned factors.
Regards,
Mahesh Chandana。
Device:
Hi Mahesh,
1.您可以使用BLE定时器触发通知,但内核定时器只有10ms的分辨率,除了我认为可以使用580的定时器来触发所需的频率的通知。自动速率依赖于连接间隔和每个设备可以发送的数据包(每个设备的能力而不同,例如580能够每个连接间隔发送和最多10个数据包,但这并不意味着连接的中心将允许该)。
2. The maximum payload of each packet over the air is about 20 bytes, by increasing the MTU size and only if the data concern the same characteristcic this can be increased to 27 on the next packet on the same connection interval.
3. The maximum characteristics depends on the size of the database Heap, by increasing that you will get more space to create more characteristics.
4.快速传输的因素是系统可以支持的每个连接间隔中的连接间隔和数据包数。
5. Your last question is very generic.
为了了解影响BLE传输的因素以及数据包如何转发,您必须了解BLE协议的工作原理,我建议读取BLE规范,以了解两个BLE协议如何交换数据的更详细信息。
谢谢mt_dialog.
你好,
谢谢你的快速反应。
我拍摄了“BLE_APP_PERITELAL”(给出了BLE示例项目)。我已经修改为在一个服务下处理两个特性(用于发送传感器1数据和传感器2数据)。
That means, My application has to send (i.e. DA14583) 2 packets (i.e. one is for sensor 1 data and another is for sensor 2 data) for every 10 millli seconds. Mobile side I am logging the data by using android application.
对于每个数据包,我有数据包计数以识别任何数据包丢失。有时候,DA14583(即BLE外围设备)发送重复的数据包(即两次发送数据包)并缺少实际数据包。示例:我需要发送编号0,1,2,3,4,5,6,7,8,9,10的数据包,但它是发送0,1,2,2,4,4,6,6,(分组丢失也发生)9,10。
上述问题,我面临着10毫秒的采样率。如果采样率增加到20毫秒,则没有数据包丢失,没有重复。它正常工作20毫秒。
请指导我解决这个问题。
Regards,
Mahesh Chandana。
Hi Mahesh,
您如何从项目中触发通知?当你有时说出来的时候,这会多久发生一次?此外,建立两个设备的实际连接间隔(连接参数由主站设置而不是从站设置,因此只能指示他所希望的连接间隔,但这不是遵循的义务)。您发送的数据有多大?我在外设项目中提出了下面的片段(在ADC2的表征中添加通知并粘贴在计时器处理程序上的下面的片段),似乎与虚拟值正常工作,只要我可以通过嗅探器日志检查。
// *************************************定制价值1 ********************************* //
struct musts1_val_ntf_req * req = ke_msg_alloc_dyn(custs1_val_ntf_req,
task_custs1,
task_app,
custs1_val_ntf_req,
DEF_CUST1_ADC_VAL_1_CHAR_LEN);
// ADC value to be sampled
静态UINT16_T样本;
Sample =(Sample <= 0xFFFF)?(样品+ 1):0;
req-> conhdl = app_env-> conhdl;
req-> handle = cust1_idx_adc_val_1_val;
req->length = DEF_CUST1_ADC_VAL_1_CHAR_LEN;
memcpy(req->值,和样本,def_cust1_adc_val_1_char_len);
ke_msg_send(req);
struct susts1_val_ntf_req * req_2 = ke_msg_alloc_dyn(custs1_val_ntf_req,
task_custs1,
task_app,
custs1_val_ntf_req,
def_cust1_adc_val_2_char_len);
// *************************************定制价值2 ********************************* //
静态UINT16_T Sample_2 = 100;
sample_2 =(Sample_2 <= 0xFFFF)?(Sample_2 + 1):0;
req_2-> conhdl = app_env-> conhdl;
req_2->handle = CUST1_IDX_ADC_VAL_2_VAL;
req_2-> length = def_cust1_adc_val_2_char_len;
memcpy(req_2->value, &sample_2, DEF_CUST1_ADC_VAL_2_CHAR_LEN);
ke_msg_send(req_2);
谢谢mt_dialog.
你好,
我正在触发手机上的Android应用程序的通知。
Duplication occurrence is not consistent. Mostly it is between 1.5 seconds to 2 seconds (my BLE sample time is 10 msecs). This duplication occurring for period of 70 to 300 millisecond. From slave I am indicating the connection interval, the same was configured at the master side. My packet size is 20 bytes of data. I have used separate notification for Value 1 and Value 2. Whether you are giving separate notification for ADC1 and ADC2?
Regards,
Mahesh Chandana。
你好,
是否有提供在BLE中传输批量数据传输。
Regards,
Mahesh Chandana。
Hi Mahesh,
我不能复制你所经历的10 ms timer and via a 10 ms connection interval even if setting two different timers triggering, the notifications are send correctly, checked with a sniffer. What i can assume is that perhaps the connection intervals of the link between the two devices aren't set to the optimal (the connection intervals is up to the central to decide the peripheral can only indicate what it would like). I cant see any other reason on the 580 side to cause this data loss and have that behaviour, perhaps this is an issue of the application on the phone.
谢谢mt_dialog.
你好,
Thank you for your information. I need some more information regarding "Is there is provision to transfer the bulk data transfer in BLE?"
Regards,
Mahesh Chandana。
Hi Mahesh,
我没有得到这个问题,可以给出一些澄清吗?
谢谢mt_dialog.
你好,
我想知道BLE堆栈是否会支持“蓝牙规范4.2”。
As of now, we are able to send 20bytes on each characteristics. Is it possible to transfer bulk transfer like 256 bytes (on each transfer) on each characteristics.
Regards,
Mahesh Chandana。
Hi Mahesh,
580堆栈为4.2合格,并支持4.2蓝牙规范的强制性要求,但不是可选的要求。
Regarding your second question you can increase that size of your characteristics and your MTU, but how many characteristics you will succesfully update and how many data packets you will be able to successfully sent is limited by the factors i mentioned in post #2.
谢谢mt_dialog.