Skip to Content

CXSMW Command — SMS White List

Enables or disables incoming SMS filtering through a whitelist of authorized phone numbers.


What is it for?

🔐 Main use cases:

  • 🛡️ Protect device against unauthorized SMS commands
  • 📱 Restrict control to specific numbers
  • 🏢 Centralized fleet control
  • 🔒 Security in production environments

When the White List is enabled, only SMS from numbers registered in destinations SM0-SM4 will be processed.


Features

FeatureValue
States0 = Disabled, 1 = Enabled
Number listSM0 - SM4 (5 numbers maximum)
PersistenceNVS (survives reboots)
Available sinceFirmware v1.9.08

Commands

OperationSyntaxDescription
ConfigureSCXSMWEEnables/disables White List
QuerySCXSMWReads current state
ResponseRCXSMWEConfirmation with state

Parameters

ParameterDescriptionValues
EWhite List state0 = Disabled, 1 = Enabled

Examples

Enable White List

>SCXSMW1< // Response: RCXSMW1 // Device will only accept SMS from numbers in SM0-SM4

Disable White List

>SCXSMW0< // Response: RCXSMW0 // Device will accept SMS from any number

Query state

>SCXSMW< // Response: RCXSMW1 (enabled) or RCXSMW0 (disabled)

Authorized Numbers Configuration

The White List uses numbers configured in SMS destinations (SM0-SM4):

// Configure authorized numbers >SSM0+5491112345678< // Number 1: Monitoring center >SSM1+5491187654321< // Number 2: Supervisor // Verify configuration >QSM0< // Response: RSM0+5491112345678 // Clear number (send empty) >SSM2< // Response: RSM2

Available indexes

IndexNVS KeyRecommended use
SM0SMS0Monitoring center
SM1SMS1Main supervisor
SM2SMS2Secondary supervisor
SM3SMS3Emergency
SM4SMS4Backup

Internal Operation

When an SMS arrives and the White List is enabled:

QPW Exception: If the SMS doesn’t come from an authorized number but the first command is >QPW... (password), the SMS will still be processed. This allows access recovery in case of losing authorized numbers.

Partial matching

Validation uses substring search (strstr), allowing partial matches:

Number in SM0SMS fromResult
12345678+5491112345678MATCH
12345678+5491198765432❌ NO MATCH

It’s recommended to use complete international format with country code for better precision and avoid false positives.


Use Cases

Fleet with centralized control

// 1. Configure monitoring center number >SSM0+5491140001234< // 2. Configure supervisor number >SSM1+5491140005678< // 3. Enable White List >SCXSMW1< // Result: Only the center and supervisor can send SMS commands

Temporarily disable for diagnostics

// Disable for testing >SCXSMW0< // Perform tests from any number... // Re-enable >SCXSMW1<

Verify complete configuration

// Verify White List state >SCXSMW< // Response: RCXSMW1 // Verify authorized numbers >QSM0< // Response: RSM0+5491140001234 >QSM1< // Response: RSM1+5491140005678 >QSM2< // Response: RSM2 (empty)

Security Considerations

Recommendations

RecommendationDescription
✅ Enable in productionProtects against unauthorized SMS commands
✅ Use international formatInclude country code to avoid false positives
✅ Verify numbersBefore enabling, confirm SM0-SM4
✅ Configuration backupNumbers are stored in NVS

Potential risks

RiskMitigation
Empty White ListNo SMS will be processed if enabled without numbers
Incorrect numbersVerify with QSM before enabling
False partial matchUse complete numbers with country code

Important! If you enable the White List without configured numbers, no SMS will be processed.


Troubleshooting

ProblemProbable causeSolution
SMS not processedWhite List enabled without numbersAdd numbers to SM0-SM4 or disable with >SCXSMW0<
SMS ignored from known numberDifferent number formatVerify exact format with >QSMx<
Responses don’t arriveIncorrect SMS destinationConfigure SM0-SM4 correctly

Compatibility

💾Firmware:v1.9.08
SP-IOT
SM-IOT
ZE-IOT

See Also

Last updated