This is the output when I run it as it is where the step 1 AT command has a 100ms timeout. Notice how we get the 'undefined' in that step now.
Connecting to SIM900 module ] "ÿ" <--- "ÿ" DEBUG: Starting ["ATE0\r\n" ] "ÿA" <--- "A" ] "ÿATE0" <--- "TE0" ] "ÿATE0\r\n\r\n" <--- "\r\n\r\n" DEBUG:ÿATE0 ] "OK\r\n" <--- "OK\r\n" DEBUG:OK ["AT+CPIN?\r\n" DEBUG:undefined ] "\r" <--- "\r" ] "\n+CP" <--- "\n+CP" ] "+CPIN: " <--- "IN: " ] "+CPIN: READ" <--- "READ" ] "+CPIN: READY\r\n\r" <--- "Y\r\n\r" ] "\nOK\r\n" <--- "\nOK\r\n"
@jakedempsey started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
This is the output when I run it as it is where the step 1 AT command has a 100ms timeout. Notice how we get the 'undefined' in that step now.
Connecting to SIM900 module
] "ÿ" <--- "ÿ"
DEBUG: Starting
["ATE0\r\n"
] "ÿA" <--- "A"
] "ÿATE0" <--- "TE0"
] "ÿATE0\r\n\r\n" <--- "\r\n\r\n"
DEBUG:ÿATE0
] "OK\r\n" <--- "OK\r\n"
DEBUG:OK
["AT+CPIN?\r\n"
DEBUG:undefined
] "\r" <--- "\r"
] "\n+CP" <--- "\n+CP"
] "+CPIN: " <--- "IN: "
] "+CPIN: READ" <--- "READ"
] "+CPIN: READY\r\n\r" <--- "Y\r\n\r"
] "\nOK\r\n" <--- "\nOK\r\n"