How to configure BLE Advertisement Behaviour eg rate & TX_PWR?
-
Hi,
How would I set the TX power and advertisement rate?
Also, what are the current defaults for the WiPy?
Lourens
-
That's a good question, I don't see any way to set the BLE TX Power.
The ESP32 datasheet lists +10dBm max output power in BLE mode, but looking at the BLE FCC test report for the WiPy 2.0 the peak power was only 2.87 dBm, even considering the antenna attenuation that's low. I guess the BLE TX Power is not currently set at the maximum.
As for advertising interval there are two parameters that set it:
Minimum advertising interval (adv_int_min) = 20 milliseconds
Maximum advertising interval (adv_int_max) = 40 millisecondsThese aren't visible on the Python side and baked in modbt.c
-
@jmarcelino
will be good to see your findings raported as issues on github :) -
@livius
I prefer to do pull requests ;-)But sure let me dig how power settings work on the ESP32 forum first and I'll then suggest changes through the "proper" channels.
-
@jmarcelino said in How to configure BLE Advertisement Behaviour eg rate & TX_PWR?:
settings
yes, pull requests are much much better :)
-
So with adv_int_max at 40 milliseconds, it looks like I would have to do bluetooth.advertise() with enable / disable on a timer if I want a 500 millisecond interval?
What I'm really after is a single advertisement at a configurable rate of say 1 to 4 per second. Would be nice if a future bluetooth.set_advertisement() could take a rate parameter.
-
@lcgeldenhuys said in How to configure BLE Advertisement Behaviour eg rate & TX_PWR?:
So with adv_int_max at 40 milliseconds, it looks like I would have to do bluetooth.advertise() with enable / disable on a timer if I want a 500 millisecond interval?
What I'm really after is a single advertisement at a configurable rate of say 1 to 4 per second. Would be nice if a future bluetooth.set_advertisement() could take a rate parameter.
Same here, I look to do a beacon that could last 5-10 years with a single battery. Until we get the deep sleep, it is just a mere dream for now.
Benoit Despatis, P.Eng.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login