Hi everyone,
I don't have a lot of experience in BLE protocol.
I always lost data when I transport data by BLE protocol. I can predict data lost in intervals, can you share your experience in handling data when transmitting over BLE?
Thank a lot.
Hi everyone,
I don't have a lot of experience in BLE protocol.
I always lost data when I transport data by BLE protocol. I can predict data lost in intervals, can you share your experience in handling data when transmitting over BLE?
Thank a lot.
Hi,
How do you transfer the data over BLE? If it is over a connection, BLE guarantees data integrity, and there are retransmissions if packets are lost. However, there are other methods of transfering data (both advertising and more modern aproeches like isochroneous channels), where data integrity is not guaranteed. Which method to you use? Also, it is very much possible to loose datea at the application layer, perhaps you call some Bluetooth APIs without checking the return values, and assume it was OK?
Hi,
I use NUS for transfer the data over BLE and I use bt_nus_send() function to transfer.
Hi,
Nguyen Kha Duong said:I use NUS for transfer the data over BLE and I use bt_nus_send() function to transfer.
I see. Do you check the return value? It will return 0 on success, or a negative value on failure. If so, you need to try to send the data again later if you do not want to loose it.
Nguyen Kha Duong said:I am planning to consider Max Connection Packet Event BLE to send
I am not sure what you are referring to here? The packet length? If so, the sample doe snot support data length extension by default, but you can adjust that by adjusting a few parameters, mainly these.
Nguyen Kha Duong said:This interval falls into any random range right? If that is true then how can I control it?
The connection interval is decided by the central, but a peripheral can request a connection parameter update with specific parameters using bt_conn_le_param_update(). See this post. This is also demonstrated in lesson 3 exercies 2 of the Bluetooth Low Energy Fundamentals course, which is higly recommended.
Hi,
I collect data by uart protocol and use put 15 packet in buffer.
1 packet = 15 data length.
=> 15 x 15 = 225
but I use FIFO so I choose buffer size is 240.
After that, I get 1 element in FIFO (15 packet) to sent data by bt_nus_send() and it return 0.
Beside that, I configure connecting interval :100ms
so, my question is:
How can I determine data packet transmit to moblie app?
I need to know it because I want to calculate time interval?
Hi,
Nguyen Kha Duong said:How can I determine data packet transmit to moblie app?
What exactly do you mean by this? But in any case, you may not get neither the connection interval, packet length or event length you want when connected to a mobile, so you should design the system robust so that it can work with other parameters than what you would like to choose.