Error when using AT command module

Posted on
  • Hi all,

    I'm using the AT module to send messages for interfacing to my GSM.

    I've noticed I'm seeing a few errors pop out every so often when viewing the console:

    Shutting down GSM Module
    ] "undefined1\r\n\r\nOK" <--- "1\r\n\r\nOK"
    ] "OK\r\n" <--- "\r\n"
    Uncaught Error: Field or method "0" does not already exist, and can't create it on undefined
     at line 1 col 139
    ...)==f&&(b=c[f](b));"\n"==b[0]&&(b=b.su­bstr(1));for(a=b.indexO...
                                   ^
    in function called from system
    ] "\r" <--- "\r"
    ] "\nNO" <--- "\nNO"
    ] "NORMA" <--- "RMA"
    ] "NORMAL P" <--- "L P"
    ] "NORMAL POWE" <--- "OWE"
    ] "NORMAL POWER D" <--- "R D"
    ] "NORMAL POWER DOWN" <--- "OWN"
    ] "NORMAL POWER DOWN \r\n" <--- " \r\n"
    ] "\r\n" <--- "\r\n"
    Module Off
    
    

    Obviously without viewing all of my code this is hard to track down but if someone could point my to where the AT command library is hitting this error I dont mind looking through my own code to pinpoint the issue. I'm assuming its something to do with registering listeners?

  • You could try loading the unminified module instead? It would probably give you more of an idea where the problem was.

    To do that you can just go into settings, and change the extensions from .min.js|.js to .js...

  • Actually, try returning "" from any handlers that you register with register. They should return any bit of the string they were passed that they're not using.

    It might actually be that you wanted to register a line handler instead?

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

Error when using AT command module

Posted by Avatar for Hardware_Hacks @Hardware_Hacks

Actions