Hi,
I'm working on a DA14580, I'm transmitting data (between 16 and 20 bytes long for each packet) to a smartphone app. The problem is when I send more than 8 bytes, for example 16, I receive two packets of 8 bytes instead of one of 16 bytes. Do you know if there is an option in the keil project which could limit the size of the sent packet?
Thanks in advance
Device:
Hi Avouali,
Keil has nothing to do with that, i suppose that you are using notifications in order to send the data, notifications have a maximum data transfer the length of MTU data, but the default MTU size is about 20bytes, can you please elaborate your question a bit, because i am not sure i follow. What example are you using and what modifications have you applied. For example if you use the ble_app_peripheral example and modify the ADC1 value characteristic to 16 bytes and you populate a 16 byte value from the app_adcval1_timer_cb_handler() function you should get all 16 bytes in one notification packet.
Thanks MT_dialog
hi,
i have to admit that i'm not even sure to use notifications to send data.
I use the SDK v_5.150.2. On this project i added an external interrupt to wake up and turn into low power mode the BLE module.
I did'nt touch anything linked to the transmission and all features related.
I send data to be sent via UART (57k6 bauds).
My project looks to be functional since i can communicate with the DSPS app properly, i receive exactly what i expect. The problem is when i try to communicate with my own app, the length of the packet is 8 bytes long. And i get the rest of the information in the following packet. So to get 16 bytes, i need to decode 2 packets instead of one.
Hope i made it clearer
Hi Avouaill,
I am sorry, still not able to understand the setup, i get that you are using DSPS and that you are sending data to a custom application, the DSPS uses the MTU exchange feature so it is able to notify more than 20 bytes of data in one L2CAP packet, so the notifications that you get on the central side should be quite large, even more than 20 bytes which is the default. Perhaps you should try something simpler than the DSPS application in order to get familiar with the BLE protocol itself like the app_ble_peripheral, check the app_adcval1_timer_cb_handler() the default length of the notification characteristic is 2 bytes but you can easily extend it to 16 bytes by changing the value in the DEF_CUST1_ADC_VAL_1_CHAR_LEN to 16 instead of 2. Also since you are using a custom application in order to communicate with the DSPS application have in mind that you will have to enable to notifications at the flow control characteristic in order for the system to work properly, perhaps this has something to do with it, also the fact that you see on your application interface that the data are comming in an 8byte packet perhaps has something to do with your application and not how the data are send over the air.
Thanks MT_dialog
Hi,
thanks for your answer.
I will try that and let you know if i have something new.
问候