DLE activation in BT 4.2 and up

67 views
Skip to first unread message

M C

unread,
Jun 4, 2019, 8:06:49 AM6/4/19
to MIT App Inventor Forum
I need to transfer data from BLE device to Android at higher rate and need  packet length higher then default 27 bytes per packet. Suppose that phone is equipped with BT 4.2 or 5.0 and Android version 8 or higher.
Is there a way in App Inventor current BLE  extension to activate MTU negotiation to achieve higher packet length and more packets per transmission interval or any workaround?

Chris Ward

unread,
Jun 4, 2019, 9:41:18 AM6/4/19
to MIT App Inventor Forum
Hello M C

Do you want to tell us a bit more about your Project so that we can offer best advice? 

Concerning MTU resizing, MIT are in fact working on an update to the BLE extension now. I do not know when that will become available.


Chris Ward

unread,
Jun 4, 2019, 3:51:20 PM6/4/19
to MIT App Inventor Forum
Hello MC

Please do not send emails directly to the Power Users, we do not respond to direct communications.

This is because, by keeping the discussion on the forum, there are many people from all around the World (different time zones) who can potentially help you, not just the first responder, who may be unavailable. Plus, there is often something that many forum members can learn by reading the posts.

Be aware that the Power Users are here to help you to help yourself. We are volunteers and we want to see everybody do well and enjoy programming with AI. So, please post to your forum thread for further help.

Evan Patton

unread,
Jun 4, 2019, 4:34:33 PM6/4/19
to MIT App Inventor Forum
I have a test version of the BLE extension with a block to upgrade the MTU size if you want to try it. At the moment I don't have hardware I can test it with so it's very experimental.

Regards,
Evan

M C

unread,
Jun 5, 2019, 4:09:34 AM6/5/19
to MIT App Inventor Forum

I'm experimenting with EEG, EKG Holter type device by adding ble module based on Nordic bt 5.0 chip to present real time data on Android tablet. At the moment I can transfer data to ble usb dongle on pc using extended packet length.

 

I  made demo applikation in App  Inventor to demonstrate this option on Android. But, on a new Samsung tablet decleard to have bt 5.0 I do not receive request for MTU negotiation and couldn't find that option in ble extension. So, packet size is default and transfer rate is too low for my application. I expected that  negotiation should be performed without explicit user action. So, I'm looking how to solve it. The option to switch to Java is open but may not be optimal for me at this moment.


Thank you very much. I'd like to test experimental BLE extension. If you want me to perform any specific test, just tell me.

Regards,

Milenko


 

M C

unread,
Jun 7, 2019, 12:45:00 PM6/7/19
to MIT App Inventor Forum
Thank You Evan for updating BLE extension.
MTU negotiation initiation works with Samsung Tab a10 (2019, Android 9) and my device based on Nordic nRF52832. Strange behavior is if MTU value is specified far outside normal range (23 -247bytes). For values up to ~400 result is correct (247 in my case) but over connection is lost. I do not consider that as urgent to fix.
Milenko

Evan Patton

unread,
Jun 7, 2019, 4:38:07 PM6/7/19
to MIT App Inventor Forum
That does not surprise me. The BLE spec says that the max payload for 4.2 and 5.0 is 247 bytes. I can imagine that sending a value beyond the maximum named in the spec would result in undefined behavior, such as the connection disappearing.

Regards,
Evan
Reply all
Reply to author
Forward
0 new messages