- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've found CyBle_SetTxPowerLevel(0) in a program called Proximity Bonding, peripheral. It's purpose is to reduce the advertising transmitter power to such a low level that in order to bond a central device must be placed within a cm or two of it. This seems to work sometimes and not so much at other times.
I've been unable to find any documentation that talks about the parameter "0". All I've found are indications (enum) that the value can be from 0x01 through 0x07.
Is the use of "0" legit and, if so, what does it really mean?
Thanks for your help,
Dennis
Solved! Go to Solution.
- Labels:
-
BLE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Dennis,
You need to pass a valid value for Power Level. '0' is not a valid value. Enum CYBLE_BLESS_PWR_LVL_T does not have a valid '0' value. This is a bug in this example. Thanks for pointing this out.
-Gyan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Dennis,
You need to pass the struct of type CYBLE_BLESS_PWR_IN_DB_T as a parameter to this API which has two elements 1) Power Level and 2) Channel type for which you want to update the power.
Could you please point out the project from where did you get this implementation?
-Gyan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Gyan,
The project is BLE Proximity Bonding (peripheral) (it also contains a central project).
I found it from a PSoC4 BLE forum post by grsr dated 30 Jun 2016 which contains the link "Attachment Download BLEProximityBonding.zip.
Line 127 of BLEAppication.c is SetTxPowerLevel(0); which calls:
void setTxPowerLevel(CYBLE_BLESS_PWR_LVL_T powerlevel)
{
pwrlvl.blePwrLevelInDbm=powerlevel;
pwrlvl.bleSsChId=CYBLE_LL_ADV_CH_TYPE;
CyBle_SetTxPowerLevel(&pwrlvl);
pwrlvl.bleSsChId=CYBLE_LL_CONN_CH_TYPE;
CyBle_SetTxPowerLevel(&pwrlvl);
}
Will this work? Maybe I just don't understand.
Thanks,
Dennis
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Dennis,
You need to pass a valid value for Power Level. '0' is not a valid value. Enum CYBLE_BLESS_PWR_LVL_T does not have a valid '0' value. This is a bug in this example. Thanks for pointing this out.
-Gyan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Gyan, I'll stop beating my head against THAT wall and try another approach.
Dennis