Skip to content

ESP32 crash if enableDebugging() not enabled #49

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

Closed
PhilC66 opened this issue Jul 3, 2024 · 2 comments
Closed

ESP32 crash if enableDebugging() not enabled #49

PhilC66 opened this issue Jul 3, 2024 · 2 comments

Comments

@PhilC66
Copy link

PhilC66 commented Jul 3, 2024

Subject of the issue

Describe your issue here.
if enableDebugging() not enabled, ESP32 crash when Initialize the SARA mySARA.begin(saraSerial, Sara_Baud)

in SARA_R5_error_t SARA_R5::init(unsigned long baud,
SARA_R5::SARA_R5_init_type_t initType)
beginSerial(baud);
_debugPort->print("initype:");
_debugPort->println(initType);

_debugPort is null if enableDebugging() not enabled

needs to add
if (_printDebug == true) befor

Thanks

Your workbench

  • What platform are you using?
  • What version of the device are you using? Is there a firmware version?
  • How is the device wired to your platform?
  • How is everything being powered?
  • Are there any additional details that may help us help you?

Steps to reproduce

Tell us how to reproduce this issue. Please post stripped down example code demonstrating your issue to a gist.

Expected behaviour

Tell us what should happen

Actual behaviour

Tell us what happens instead

@PaulZC
Copy link
Collaborator

PaulZC commented Jul 3, 2024

Hi Philippe (@PhilC66 ),

Which version of the library do you have installed? Or maybe you modified the library source code? The latest code looks OK to me:

SARA_R5_error_t SARA_R5::init(unsigned long baud,
SARA_R5::SARA_R5_init_type_t initType)
{
int retries = _maxInitTries;
SARA_R5_error_t err = SARA_R5_ERROR_SUCCESS;
beginSerial(baud);
do
{
if (_printDebug == true)
_debugPort->println(F("init: Begin module init."));
if (initType == SARA_R5_INIT_AUTOBAUD)
{
if (_printDebug == true)
_debugPort->println(F("init: Attempting autobaud connection to module."));

Closing... Please reopen if you need more help with this.

Best wishes,
Paul

@PaulZC PaulZC closed this as completed Jul 3, 2024
@PhilC66
Copy link
Author

PhilC66 commented Jul 3, 2024

High Paul,
Same version, I modified this version a few days ago, and I forgot
Sorry for the inconvenience
Thanks
Philippe

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

No branches or pull requests

2 participants