• My proposal for selecting between CREG or CEREG is pass a key named 'lte' in options{}. If this is true, use CEREG, else CREG

    Hopefully I've used the correct javascript idiom for testing to see the key exists or default to false. If not, please correct me after you've stopped laughing.

    In the connect function:

    atcmd("ATE0").then(function() { // echo off
            if (options.lte || false)
            return atcmd("AT+CEREG?"); // Check LTE registered
                return atcmd("AT+CREG?"); // Check GSM registered

Avatar for Kartman @Kartman started