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

TinyGSM library changed #116

Closed
capedra opened this issue May 22, 2021 · 3 comments
Closed

TinyGSM library changed #116

capedra opened this issue May 22, 2021 · 3 comments

Comments

@capedra
Copy link

capedra commented May 22, 2021

Suddenly my code stopped working and I found out some changes on TinyGSM library which works different now.

This part does NOT work anymore:

  /*
    2 Automatic
    13 GSM only
    38 LTE only
    51 GSM and LTE only
  * * * */
  String res;
  do {
    res = modem.setNetworkMode(38);
    delay(500);
  } while (res != "OK");

  /*
    1 CAT-M
    2 NB-Iot
    3 CAT-M and NB-IoT
  * * */
  do {
    res = modem.setPreferredMode(1);
    delay(500);
  } while (res != "OK");

Now you have to do:

  /*
    2 Automatic
    13 GSM only
    38 LTE only
    51 GSM and LTE only
  * * * */
  bool res;

  do {
    res = modem.setNetworkMode(2);
    delay(500);
  } while (!res);

  /*
    1 CAT-M
    2 NB-Iot
    3 CAT-M and NB-IoT
  * * */
  do {
    res = modem.setPreferredMode(3);
    delay(500);
  } while (!res);

@capedra
Copy link
Author

capedra commented May 23, 2021

/*
  2 Automatic
  13 GSM only
  38 LTE only
  51 GSM and LTE only
* * * */
modem.setNetworkMode(2);
modem.waitResponse(GSM_OK);

/*
  1 CAT-M
  2 NB-Iot
  3 CAT-M and NB-IoT
* * */
modem.setPreferredMode(3);
modem.waitResponse(GSM_OK);

@Mr-HaleYa
Copy link
Contributor

congrats, a PR has been made already #119 so this can be closed
they changed setNetworkMode from String to Bool

@capedra
Copy link
Author

capedra commented Jul 21, 2021

@Mr-HaleYa Great! I'm closing this issue.

@capedra capedra closed this as completed Jul 21, 2021
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