puck and AT commands

Posted on
  • Hi, I am using puck as central controller and I need to send AT serial commands to a 3G modem. Is this possible ?

  • Yes, it should be fine. There's an AT command library to make it a little easier: espruino.com/AT

    Something like this should do it:

    Serial1.setup(9600, { rx:..., tx:... });
    var at = require("AT").connect(Serial1);  
    // at.debug();
    // Send command that returns multiple items
    at.cmd("AT+FOO\r\n", 1000, function cb(d) {
      if (d===undefined) ; // we timed out!
      console.log(d);
      if (still_waiting_for_more_info) return cb;
    });
    

    Do you want to use the internet connection from the 3G modem, or just the ability to send text messages?

    There's a module for SIM800/900 that'll do full internet connectivity, and that could probably be modified pretty easily for your particular 3G modem as well: espruino.com/SIM900

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

puck and AT commands

Posted by Avatar for zarconi @zarconi

Actions