Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Diagnostics] Signal strength/quality #1423

Merged

Conversation

@avtolstoy
Copy link
Member

commented Nov 2, 2017

submission notes
**Important:** Please sanitize/remove any confidential info like usernames, passwords, org names, product names/ids, access tokens, client ids/secrets, or anything else you don't wish to share.

Please Read and Sign the Contributor License Agreement ([Info here](https://github.com/spark/firmware/blob/develop/CONTRIBUTING.md)).

You may also delete this submission notes header if you'd like. Thank you for contributing!

Solution

Supersedes `net.rssi` diagnostic data source:

- Adds `net.sigstr`: signal strength Q8.8 0-100 (%)
- Adds `net.sigstrv`: signal strength value, signed Q16.16, access technology dependent
- Adds `net.sigqual`: signal quality Q8.8 0-100 (%)
- Adds `net.sigqualv`: signal quality value, signed Q16.16, access technology dependent
- Adds `net.at`: access technology. Enum:
        - 0: UNKNOWN
        - 1: WIFI
        - 2: GSM
        - 3: EDGE
        - 4: UMTS/UTRAN/WCDMA/3G
        - 5: CDMA
        - 6: LTE

Steps to Test

N/A

Example App

N/A

References

  • Supersedes #1397
  • [CH9012]

Completeness

  • User is totes amazing for contributing!
  • Contributor has signed CLA (Info here)
  • Problem and Solution clearly stated
  • Run unit/integration/application tests on device
  • Added documentation
  • Added to CHANGELOG.md after merging (add links to docs and issues)
avtolstoy added 18 commits Nov 2, 2017
cellular_signal() should not take a reference, as it is a C function.…
… The reserved parameter is now used for cellular_signal_t
Superseding net.rssi diagnostic data source:
- Adding net.sigstr: signal strength Q8.8 0-100 (%)
- Adding net.sigstrv: signal strength value, signed Q16.16 access
  technology dependent
- Adding net.sigqual: signal quality Q8.8 0-100 (%)
- Adding net.sigqualv: signal quality value, signed Q16.16, access
  technology dependent
- Adding net.at: access technology. Enum:
        - 0: UNKNOWN
        - 1: WIFI
        - 2: GSM
        - 3: EDGE
        - 4: UMTS/UTRAN/WCDMA/3G
        - 5: CDMA
        - 6: LTE

@avtolstoy avtolstoy requested a review from m-mcgowan Nov 2, 2017

@m-mcgowan

This comment has been minimized.

Copy link
Contributor

commented Nov 3, 2017

Since this changes WiFI.RSSI() for the Core, I wonder if you could also check #985 and #921 please!

}

inf->rssi = rssi * 100;
inf->snr = INT_MIN;

This comment has been minimized.

Copy link
@m-mcgowan

m-mcgowan Nov 3, 2017

Contributor

I wonder if we should have flags to indicate which fields are supported.

break;
}
}
return res;

This comment has been minimized.

Copy link
@m-mcgowan

m-mcgowan Nov 3, 2017

Contributor

Perhaps factor out fetching the data from the modem from computing the percentages so that the computation can be more easily tested.

}

inf->rssi = rssi * 100;
inf->snr = INT_MIN;

This comment has been minimized.

Copy link
@m-mcgowan

m-mcgowan Nov 3, 2017

Contributor

Perhaps add flags to explicitly indicate which fields are supported?

inf->snr = (rssi - noise) * 100;
inf->noise = noise * 100;

inf->strength = std::min(std::max(2 * (rssi + 100), 0L), 100L) * 65535 / 100;

This comment has been minimized.

Copy link
@m-mcgowan

m-mcgowan Nov 3, 2017

Contributor

similarly here, please consider factoring out fetching the signal values from the normalization code.

#endif
system_tick_t ts_ = 0;
};

This comment has been minimized.

Copy link
@m-mcgowan

m-mcgowan Nov 3, 2017

Contributor

This is a good idea, since the higher level wiring APIs access the signal data field by field.

@m-mcgowan m-mcgowan merged commit d9831de into feature/diagnostics-merge Nov 6, 2017

0 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
continuous-integration/travis-ci/push The Travis CI build failed
Details
@avtolstoy avtolstoy referenced this pull request Nov 9, 2017
4 of 6 tasks complete

@m-mcgowan m-mcgowan added this to the 0.8.0 milestone Dec 13, 2017

avtolstoy added a commit to particle-iot/docs that referenced this pull request Feb 23, 2018

@technobly technobly deleted the feature/diagnostics-signal-quality branch Mar 9, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.