I'm thinking your code expects an "OK" from the AT+QISEND. This doesn't happen. The sequence should be:
AT+QISEND 0,365\r\n
response is \r\n>[space]
send data
response is \r\n SEND OK\r\n
Thus the current send function in QuectelBG96.js is borken. My current thought is there was a timing issue with the way the original code handled send but it worked most of the time. Adding extra time probably 'fixed' this. On top of this, sometimes there seems to be a discrepancy between the length of data we think we send and what the BG96 thinks it got - I've yet to narrow down on this. Setting flow control seems to help.
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.
I'm thinking your code expects an "OK" from the AT+QISEND. This doesn't happen. The sequence should be:
AT+QISEND 0,365\r\n
response is \r\n>[space]
send data
response is \r\n SEND OK\r\n
Thus the current send function in QuectelBG96.js is borken. My current thought is there was a timing issue with the way the original code handled send but it worked most of the time. Adding extra time probably 'fixed' this. On top of this, sometimes there seems to be a discrepancy between the length of data we think we send and what the BG96 thinks it got - I've yet to narrow down on this. Setting flow control seems to help.