-
Notifications
You must be signed in to change notification settings - Fork 518
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
[msom] Add GNSS test FQC command #2721
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, also verified on M524(EG91-EX) and M404(BG95-M5)
$ npm run-script mfg-cli:start tinker:gnss-test start
> cli-monorepo@1.0.0 mfg-cli:start /Users/yuting/projects/js_prj/particle-cli
> ./packages/mfg-cli/bin/run "tinker:gnss-test" "start"
{
"pass": true
}
$ ./packages/mfg-cli/bin/run tinker:gnss-test status
{
"pass": true,
"message": "Found 1 satellites"
}
r = Cellular.command("AT+QGPS=1\r\n"); | ||
|
||
bool success = false; | ||
for (int i = 0; i < RETRIES && !success; i++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This loop is used elsewhere as well. It would be handy to have a macro/template that wraps retry loops with delay. Don't worry about it today.
int r = 0; | ||
// Configure antenna for GNSS priority | ||
for (int i = 0; i < RETRIES && r != RESP_OK; i++) { | ||
r = Cellular.command("AT+QGPSCFG=\"priority\",0"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The AT+QGPSCFG="priority"
command should take a maximum of 300ms to execute. I see you don't have a timeout on the command call.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, I just use the default 10 second timeout. I dont care about timing just that it succeeded.
switch (i) { | ||
case 5: // TotalNumSat | ||
{ | ||
int numberSattelites = atoi(token); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spelling
i++; | ||
|
||
switch (i) { | ||
case 5: // TotalNumSat |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are two constellations reported in the GSV sentences. This method may take the last set only, which is GLONASS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this just lazily finds the last GSV sentence satellite count. I didnt do any more parsing since its not clear what data (if any) we care about returning to the host.
If we can see any number of satellites, then I consider gnss working and return success.
If we want this test to do more, then we need to specify that and I can improve it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may want to target the constellation that would be provided by the GNSS simulator during manufacturing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eugene posted an example simulator that reported GPS, but we dont know for sure what the factory will end up using. This will work with any constellation.
If we care about detecting/parsing each individual constellation I can do that, but we should make sure this will be used somewhere.
5093446
to
76e9ca2
Compare
Problem
Msom hardware supports a built in GNSS engine along with the cellular modem. The mfg-cli needs to be updated to test this GNSS functionality as part of FQC testing at the factory. A new tinker:gnss-test command has been added to enable testing of both M404 (Quectel BG95-M5 modem/GNSS) and M524(Quectel EG91 modem/GNSS) hardware.
Solution
Add support for the new
particlemfg tinker:gnss-test
commandSteps to Test
Use
mfg-cli
to test per instructions hereExample App
Use tinker
References
See CLI PR here
See slack here