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

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


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)

… The reserved parameter is now used for cellular_signal_t
- 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
@m-mcgowan
Copy link
Contributor

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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

break;
}
}
return res;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

#endif
system_tick_t ts_ = 0;
};

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
@avtolstoy avtolstoy mentioned this pull request Nov 9, 2017
6 tasks
@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 March 9, 2019 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants