Quectel LTE BG96 Cat.M1/NB1 & EGPRS Module
The Quectel BG96 is a LTE/Cat.M1/NB1/EGPRS module that can provide internet access via an AT command set.
Support is provided in Espruino by the QuectelBG96 (About Modules) module.
Software
Serial1.setup(115200, { rx: .., tx : ... });
function connectionReady() {
var http = require("http");
http.get("http://www.pur3.co.uk/hello.txt", function(res) {
res.on('data', function(data) {
console.log(data);
});
});
}
gprs = require('QuectelBG96').connect(Serial1, {
apn : "",
username : "",
password : ""
}, function(err) {
if (err) throw err;
connectionReady();
});
// gprs.debug(); // show just debug info from BG96 module
The second argument to connect
is an object that can contain:
{
lte : bool, // Are we using LTE? This changes how we check if we're registered
apn : "", // optional access point name.
username : "", // optional username
password : "", // optional password
// debug : true // to show raw AT command info
}
Reference
gprs.at
The AT command handler - use this to send your own AT commands to the M35.
gprs.debug(isDebugging)
Return debugging information and to turn on/off debug messages.
gprs.getVersion(function(err, version) { ... });
Call the callback with the version number reported back from the AT+GMR
command. The callback is called with err==null
on success.
gprs.getIP(function(err, ip) { ... });
Call the callback with the current IP address, as a String. The callback is called with err==null on success.
Using
This page is auto-generated from GitHub. If you see any mistakes or have suggestions, please let us know.