-
Notifications
You must be signed in to change notification settings - Fork 3k
Cellular : add modem version in mbed trace #12339
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
Conversation
@jeromecoutant, thank you for your changes. |
@@ -373,6 +374,22 @@ void CellularStateMachine::state_device_ready() | |||
} | |||
} | |||
} | |||
|
|||
#if MBED_CONF_MBED_TRACE_ENABLE | |||
CellularInformation *info = _cellularDevice.open_information(); |
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.
Should this be done only when moving to next state (STATE_SIM_PIN)? We might be restarting/powering or failing to communicate with the modem.
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 should probably be just before if (device_ready())
at line 364.
|
||
#if MBED_CONF_MBED_TRACE_ENABLE | ||
CellularInformation *info = _cellularDevice.open_information(); | ||
char buf[80]; // this should actually be 2048, but then you should use heap memory or likely run out of the stack |
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 could be something like:
char *buf = new (std::nothrow) char[2048]; // size from 3GPP TS 27.007
if (buf) {
if (info->get_manufacturer..
...
delete[] buf;
}
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.
done
ab28c93
to
d4dccca
Compare
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.
@jeromecoutant Can you change this to use heap memory with new/delete?
APN and registration prints seems to duplicate what you see with the current traces and AT-debug enabled so they are probably not needed here?
d4dccca
to
5f1ea7d
Compare
CI started |
Test run: FAILEDSummary: 3 of 4 test jobs failed Failed test jobs:
|
Internal CI error, restarted |
Test run: FAILEDSummary: 1 of 11 test jobs failed Failed test jobs:
|
Test restarted |
@AnttiKauppila @AriParkkila Doesn't this require updates to the documentation to detail the changes to displayed information ? |
Summary of changes
It could be useful to get in logs modem module version.
@LMESTM
@AriParkkila
Impact of changes
No impact with default compilation
Example with STMOD_CELLULAR when mbed-trace is enabled:
[INFO][CELL]: Modem manufacturer: Quectel
[INFO][CELL]: Modem model: BG96
[INFO][CELL]: Modem revision: BG96MAR02A07M1G
Migration actions required
Documentation
Pull request type
Test results
Reviewers