Merge pull request #7 from D-Modem/claude/project-thread-ai22rg

Mobile calls: send +MS=VCVM (V.cvm's new name)
This commit is contained in:
Neo authored and GitHub committed 2026-10-30 08:40:57 -07:00
commit 69e30fc1a9
5 files changed
+10 -9

No files matched your search

+1 -1
View File
@@ -27,7 +27,7 @@ speech through codecs that wreck modem signals; native-test's
| AMR-NB 4.75 kbit/s, GSM full rate (2G) | nothing reliable |
Between two D-Modems, V.cvm (D-Modem-RE's modem for speech codecs,
`+MS=V_CVM`) does better: after V.8 it spends 15 to 20 s probing the
`+MS=VCVM`) does better: after V.8 it spends 15 to 20 s probing the
codec, then loads a mode for it, with LAPM over it. Through AMR-NB 12.2
the app's engines connect at about 1200 bit/s coded (750 to 1200 each
way, `CONNECT 1200/CVM/LAPM/V44`; D-Modem-RE measured 175 to 350 through
@@ -56,7 +56,7 @@ data class ModemSettings(
*/
val adaptiveAnswer: Boolean = true,
/**
* the modulation on mobile calls (+MS): V_CVM (V.cvm, made for speech codecs: about 1200 bit/s
* the modulation on mobile calls (+MS): VCVM (V.cvm, made for speech codecs: about 1200 bit/s
* through AMR 12.2, to another D-Modem; V.22 or V.21 to other modems), V21 (300 bit/s), V22, V22B
*/
val cellSpeed: String = CELL_VCVM,
@@ -118,8 +118,8 @@ data class ModemSettings(
const val LINE_NONE = "none"
const val LINE_USB = "usb"
const val LINE_BT_MODEM = "bt_modem"
/** the mobile-call line's V.cvm (D-Modem-RE's +MS=V_CVM) */
const val CELL_VCVM = "V_CVM"
/** the mobile-call line's V.cvm (D-Modem-RE's +MS=VCVM) */
const val CELL_VCVM = "VCVM"
/**
* An account as `user:password@host[:port]` (dmodemd's SIP_LOGIN): null if it isn't one.
@@ -192,7 +192,8 @@ class SettingsStore(private val context: Context) {
speaker = p[Keys.speaker] ?: d.speaker,
callTones = p[Keys.callTones] ?: d.callTones,
adaptiveAnswer = p[Keys.adaptiveAnswer] ?: d.adaptiveAnswer,
cellSpeed = p[Keys.cellSpeed] ?: d.cellSpeed,
// V_CVM: the name before VCVM, kept by older versions
cellSpeed = (p[Keys.cellSpeed] ?: d.cellSpeed).let { if (it == "V_CVM") ModemSettings.CELL_VCVM else it },
btModemAddress = p[Keys.btModemAddress] ?: d.btModemAddress,
btModemName = p[Keys.btModemName] ?: d.btModemName,
recordLine = p[Keys.recordLine] ?: d.recordLine,
@@ -95,8 +95,8 @@ class CellLineTest {
val b = CellModem("cvmB", net.phone("5550002"), listen = true)
// V.cvm (D-Modem-RE's, for speech codecs): V.8, then 15 to 21 s probing the codec and
// loading a mode for it; S7 long enough for that
a.command("ATE0\\V1+MS=V_CVM;S7=90")
b.command("ATE0\\V1S0=1+MS=V_CVM;S7=90")
a.command("ATE0\\V1+MS=VCVM;S7=90")
b.command("ATE0\\V1S0=1+MS=VCVM;S7=90")
a.send("ATD5550002\r")
val ca = a.connectLine()
val cb = b.connectLine()
@@ -13,7 +13,7 @@ class CellSettingsTest {
fun startCommands() {
val cell = ModemSettings(line = ModemSettings.LINE_CELL)
// (V.cvm by default, S7 long enough for its start-up)
assertEquals("AT+MS=V_CVM;S7=90;X3", cell.startCommands())
assertEquals("AT+MS=VCVM;S7=90;X3", cell.startCommands())
assertEquals("AT+MS=V21;X3", cell.copy(cellSpeed = "V21").startCommands())
assertEquals("AT+MS=V22B;X3M2", cell.copy(cellSpeed = "V22B", initCommands = "atX3M2").startCommands())
assertEquals("AT+MS=V21", cell.copy(cellSpeed = "V21", initCommands = " ").startCommands())