From d856a2be8eee3de96b447a3a4118bf5449958f1b Mon Sep 17 00:00:00 2001 From: Kirill Zhumarin Date: Mon, 17 Jun 2024 10:31:31 +0000 Subject: [PATCH] fix --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 7267025..3f41dcb 100644 --- a/src/index.js +++ b/src/index.js @@ -223,7 +223,7 @@ async function getPhoneInfo(cgsn) { response = await atc.sendCommand("AT+CGMR"); if (!response.success) return null; - phoneSwVersion = response.lines[0]; + phoneSwVersion = response.lines[0].match(/^\s*(\d+)/)[0]; console.log(`Detected phone ${phoneVendor} ${phoneModel}v${phoneSwVersion}`);