Avatar for user151021

user151021

Member since Nov 2022 • Last active Nov 2022
  • 0 conversations
  • 2 comments

Most recent activity

  • Avatar for user151021

    With the sim900 module the result is OK!

    Serial2.setup(9600, { tx: 16, rx: 17 });
    
    var gprs = require('SIM900').connect(Serial2, undefined, function (err) {
      if (err) throw err;
      gprs.connect('APN', 'USER', 'PASSWORD', function (err) {
        if (err) throw err;
        gprs.getIP(function (err, ip) {
          if (err) throw err;
          console.log(ip);
        });
      });
    });
    

    After sending the above code I use RELP and get the result below:

    >gprs.at.cmd("AT\r\n")
    ["AT\r\n"
    =undefined
    ] "\r\nOK\r\n"
    >
    

    I would like to know using the sim900 module how do I check if the connection is ok with the APN network and how do I reconnect after disconnection.

    Ex:

    while(!gprs.networkConnect){
    gprs.reconnect()
    }
    

    How do I do this with the sim900 module? Sorry if the question is stupid!

  • in Puck.js, Pixl.js and MDBT42
    Avatar for user151021
    Serial2.setup(9600, { tx: 16, rx: 17 });
    var at = require('AT').connect(Serial2);
    setInterval(() => {
      at.debug();
      at.write('AT/r/n');
    }, 3000);
    

    How do I get the response in string format.
    I'm getting debug output like this: "\u00C1\u00DD?\u00F2?\u00FF"

Actions