BLE questions

awaisahmed
Posts: 20
Joined: Sat May 12, 2018 5:02 pm

BLE questions

Postby awaisahmed » Sat Aug 25, 2018 10:59 am

Hi
i have following questions
device: sparkfun thing ESP32
Eclipse oxygen
windows
1. i have tested the device by setting the adv interval from 0x06 till 0x19 but the device was not listed on my andriod phone (7.0 Nougat running) application used for BLE named as nRFConnect. what i have configured minimum adv interval is 0x20 which means 20x1.25ms =25ms. is this the min adv interval supported by esp32 ?

2. in BLE mode how many packets ESP32 can receive and transmit ? supported ?
3. I am calculating throughput of the device. from following formula
n * 20 B * 1/T
-operation type,
-connection interval, and
-number of packets transmitted per connection event.

is this the correct formula ?

chegewara
Posts: 2376
Joined: Wed Jun 14, 2017 9:00 pm

Re: BLE questions

Postby chegewara » Sat Aug 25, 2018 3:48 pm

Hi,
1. https://devzone.nordicsemi.com/f/nordic ... nimum-size
0x20 is not the same as 20×1.25, advertising is count as follow: 0x20 × 0.625 = 32 × 0.625 = 20 ms (1.25ms is count for connection interval)
3. if peer device supports higher mtu value (up to 517 bytes), you can send up to 514 bytes in notification/indication in message;

JoaoLopesF
Posts: 59
Joined: Thu Aug 17, 2017 5:40 pm

Re: BLE questions

Postby JoaoLopesF » Sun Aug 26, 2018 12:47 pm

Hi, I agree with you, @chegewara.

Complementing:

- ESP32 generally acts as a BLE server and the Mobile App as client.
- MTU is always commanded by the client, in this case Android phone
- The MTU default of ESP-IDF is about 20 bytes, so your server code can treat this requests of MTU
- On Android the MTU default is also about 20 bytes.
- You can only change the MTU for Android >= 5.0,
if your app wants to be compatible with 4.3 too, this needs to be checked.

I recently I do a set of app examples for anyone who wants to make BLE connected ESP32 devices,
with mobiles app (Android and iOS)

Everything I said, I have implanted in these projects
The MTU default is about 185, same as iOS default, but this can be changed

See it in: viewtopic.php?f=18&t=6806
Just download and find for MTU

Hope this helps

Who is online

Users browsing this forum: No registered users and 97 guests