PyBeacon icon indicating copy to clipboard operation
PyBeacon copied to clipboard

Set tx power level via commandline param

Open chriso0710 opened this issue 9 years ago • 5 comments

Hi all,

I am looking for a way to set the transmit power level for url advertising.

I can see in https://github.com/nirmankarta/PyBeacon/blob/master/PyBeacon/PyBeacon.py#L131 that the signal strength/tx power is set to 0xed, which should be -19dbm according to the eddystone url specification at https://github.com/google/eddystone/tree/master/eddystone-url

Would it make sense to make that value configurable via a commandline parameter? Maybe something like

pybeacon -u <url> -p <powerlevel>

powerlevel could be a string like "weak, normal, strong" or a number. What do you think? Did anyone already test other power values, would that actually work on a Pi 3?

Christian

chriso0710 avatar Jan 10 '17 17:01 chriso0710

Hi @chriso0710 that's a great idea. When I started this project, I thought about it but never got the time to do it. It would be great if you play around and do it. We will get it merged in eddystone repo.

PrabhanshuAttri avatar Jan 15 '17 11:01 PrabhanshuAttri

Thanks for the feedback @PrabhanshuAttri . I am going to do some tests and send a PR.

chriso0710 avatar Jan 16 '17 08:01 chriso0710

Cool. PS don't forget to take pull before you start working.

Cheers

PrabhanshuAttri avatar Jan 16 '17 09:01 PrabhanshuAttri

@chriso0710 any updates?

PrabhanshuAttri avatar Mar 12 '17 23:03 PrabhanshuAttri

Sorry, did not have time to work on this. Too much stuff going on ATM. But hoping to tackle this soon...

chriso0710 avatar Mar 13 '17 07:03 chriso0710