Commit 063b2ec2fa1b965442f614c5dc114196c3bc9fea

Authored by Adhidarma Hadiwinoto
1 parent 16210aa33e
Exists in master

Split write sm

Showing 1 changed file with 3 additions and 1 deletions Side-by-side Diff

... ... @@ -295,7 +295,9 @@ async function sendSMS(destination, msg) {
295 295 logger.verbose('Waiting for lock before writing message');
296 296 await mutex.setLockWaitForSubCommand();
297 297 port.pipe(parser);
298   - await writeToPort(`AT+CMGS="${correctedDestination}"\r${msg}${Buffer.from([0x1A])}`);
  298 + await writeToPort(`AT+CMGS="${correctedDestination}"\r`);
  299 + await writeToPort(msg);
  300 + await writeToPort(Buffer.from([0x1A]));
299 301  
300 302 await mutex.setLockWaitForSubCommand();
301 303 mutex.releaseLockWaitForSubCommand();