InfiniTimeOrg / InfiniTimeOrg/InfiniTime

Increase the transmit power on watch so that the range is more than 150 feet

Open
#1,016 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
Dominant language
C
Stars
3.4k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

Verification
  • I searched for similar feature request and found none was relevant.
Pitch us your idea!

use ble_phy_txpwr_set(tx_pwr_lvl)

Description

Hi all,
I try to connect the Watch to the Nrf Tools App more than 150 feet (currently only about 15 feet in a house). I read some document and thread about Nimble, I add this code:
/* Set tx power level. */
rc = ble_phy_txpwr_set(tx_pwr_lvl); // tx_pwr_lvl == 4
memset(&fields, 0, sizeof(fields));
fields.tx_pwr_lvl = (uint8_t) tx_pwr_lvl;
in function StartAdvertising() of NimbleController.cpp.
The above doesn't seem to have an effect on the contents of the advertising packet; it still advertises around 15 feet.
The comment in https://github.com/apache/mynewt-nimble/blob/089f0d849a49a2a6c69f1e1f9103174b81af8b1a/nimble/drivers/native/src/ble_phy.c implies that this should be handled automatically, and the provided value is ignored. Is this implemented as described, or am I doing something wrong?
The actual tx power does change, I see the expected difference in received signal between +4, 0, -12, -20.
Thanks all

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in NimbleController.cpp at StartAdvertising and inspect how ble_phy_txpwr_set(tx_pwr_lvl) and the advertising fields are used. Compare that behavior with the referenced NimBLE ble_phy.c comment and determine whether the requested setting is expected to affect advertising range. Done means a confirmed explanation or a focused change that makes the intended transmit-power behavior work.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, cpp
Domain
embedded-iot, networking
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.