vshymanskyy / TinyGSM

A small Arduino library for GSM modules, that just works
GNU Lesser General Public License v3.0
1.95k stars 723 forks source link

Support for getting Band #198

Open xvinny-zz opened 6 years ago

xvinny-zz commented 6 years ago

Hi,

I developed a method to get the current mobile operating band when using SIM800. I'd like to share the code here. @vshymanskyy could you include it in the official version?

String getBand() {
    sendAT(GF("+CBAND?"));
    if (waitResponse(GF(GSM_NL "+CBAND:")) != 1) {
      return "";
    }
    //streamSkipUntil(':'); // Skip mode and format
    String res = stream.readStringUntil('\n');
    waitResponse();
    return res;
  }

Regards,

Vinicius

xvinny-zz commented 5 years ago

@vshymanskyy or @SRGDamia1, could you include this function in SIM800 client?