如何通过Quectel EC21 GSM/LTE模块发送跨运营商短信?
I’ve run into similar cross-carrier SMS issues with Quectel modules before, so let’s break down actionable steps to get this sorted for your EC21:
Verify the phone number format
Inter-operator messaging almost always requires the number to use the international E.164 format (with country code prefix) instead of a local short number. For example, domestic Chinese numbers should be written as+8613xxxxxxxxxinstead of just13xxxxxxxxx. Test with this command sequence:AT+CMGF=1 // Switch to TEXT mode first AT+CMGS="+8613xxxxxxxxx" > Test cross-carrier SMS // Type your message, then press Ctrl+Z to sendCheck and correct the SMS Center (SMSC) number
Your SIM card’s SMSC must be set to your carrier’s official, unrestricted number—using an SMSC limited to intra-operator traffic will block cross-network sends.- Check current SMSC configuration:
AT+CSCA? - If incorrect, set the official SMSC for your carrier. Examples for Chinese carriers:
- China Mobile:
AT+CSCA="+8613800[your-area-code]500" - China Unicom:
AT+CSCA="+8613010[your-area-code]500" - China Telecom:
AT+CSCA="+8613300[your-area-code]500"
- China Mobile:
- Confirm the change with
AT+CSCA?again.
- Check current SMSC configuration:
Switch to PDU mode (if TEXT mode fails)
Some carriers have better compatibility with PDU mode for inter-operator SMS. Try switching and testing with a simple message:AT+CMGF=0 // Switch to PDU mode // Example PDU for sending "Test" to +8613xxxxxxxxx (generate your own via online PDU calculators) AT+CMGS=17 > 0011000D916831xxxxxxxxF00008045465374 // Enter the PDU string, then press Ctrl+ZAdjust SMS encoding settings
Mismatched encoding can cause silent failures across carriers. For TEXT mode, use the universal UCS2 encoding to support all character types:AT+CSMP=17,167,0,8 // Set UCS2 encoding for TEXT modeTest with a plain English message first—if that works, try Chinese characters next.
Confirm network registration and signal strength
Weak signal or incorrect network registration can block cross-carrier sends:- Check registration status:
AT+CREG?(look for+CREG: 0,1or+CREG: 0,5, which mean successful registration) - Check signal strength:
AT+CSQ(a value between 10-31 is good; values below 10 indicate weak signal)
If signal is poor, move to a better location or adjust your module’s antenna.
- Check registration status:
Rule out carrier-side restrictions
It’s possible your SIM card has restricted inter-operator SMS access. Reach out to your carrier’s support to confirm:- Does your plan allow cross-carrier SMS sending?
- Are there any service blocks or limitations on your SIM card?
Share the specific error code
When sending fails, the module returns a+CMS ERROR: [code]—this is critical for pinpointing the exact issue. For example:+CMS ERROR: 310= Invalid SMSC number+CMS ERROR: 21= Network rejected the request+CMS ERROR: 500= Unknown error
Posting this code will help narrow down the problem much faster.
内容的提问来源于stack exchange,提问作者Ali Sam

