The Hidden Code Behind Every SMS
How Data Coding Schemes Shape Telecom Testing (DCS on SMS)
By Kusal Fernando
Image: XG-V2.0 hardware
As the development team of XGP, we spend our days solving complex network testing challenges. Today, I want to share something that might surprise you, every SMS you send carries a hidden code that determines not just how it's displayed, but how it lives on your device.
What Your Phone Knows That You Don't
When you fire off a quick "Running late!" text, you see plain text. But your phone sees something much more sophisticated, a Data Coding Scheme (DCS) embedded within the SMS Protocol Data Unit (PDU) that acts like a set of instructions telling the receiving device exactly how to handle your message.
Think of DCS as the SMS equivalent of a shipping label. It doesn't just contain the destination; it specifies how the package should be handled, where it should be stored, and how it should be presented to the recipient.
After years of working with telecom operators struggling with SMS testing complexities, I've learned that understanding DCS isn't just academic—it's critical for anyone responsible for messaging service quality, or Telco network improvements.
The Engineering Reality: Three Encoding Worlds
From an engineering perspective, SMS supports three distinct encoding schemes, each optimized for different use cases:
GSM 7-bit: The Efficiency Champion
• 60 characters per message
• Perfect for English and standard Latin characters
• 7-bit packing maximizes message density
• Default choice for most Western markets
UCS2: Breaking Language Barriers
• 70 characters per message (2 bytes per character)
• Essential for Chinese, Arabic, Hindi, Sinhala and other non-Latin scripts
• Critical for global operators serving diverse markets
• Often overlooked in testing scenarios—at significant cost
8-bit Binary: Beyond Text
• 140 bytes of raw data
• Handles ringtones, operator logos, OTA configurations
• Enables rich messaging features
• Payload treated as binary data, not text
The catch?
Most testing teams focus exclusively on GSM 7-bit, leaving massive gaps in their validation coverage.
Message Classes: The Forgotten Hierarchy
Here's where it gets interesting from a technical standpoint. Every SMS doesn't just carry content; it carries instructions about where it should live on the device:
• Class 0 (Flash): Immediate display, no storage—think emergency alerts
• Class 1 (Mobile Equipment): Stored in phone memory
• Class 2 (SIM/USIM): Lives on the SIM card—survives device changes
• Class 3 (Terminal Equipment): Device-specific handling
The Technical Deep Dive: DCS Bit Structure
For the engineers reading this, here's the bit-level breakdown that determines message behavior:
DCS Octet Structure:
Bit 7-6: Coding Group (00 = General Data Coding)
Bit 5: Compression (0 = Uncompressed, 1 = Compressed)
Bit 4: Message Class Indicator (1 = Class defined in bits 1-0)
Bit 3-2: Character Set:
00 = GSM 7-bit
01 = 8-bit 10 = UCS2
11 = Reserved
Bit 1-0: Message Class (when bit 4 = 1)
• A typical PDU might look like:
07911356046907411100099118000000F4000400115...
The problem?
Manually crafting PDUs with specific DCS values is not just complex—it's error-prone and doesn't scale.
Real-World Testing Nightmares
Scenario 1: The International Launch Disaster
A major operator expanding into Asian markets tested only GSM 7-bit encoding. Result? Customer complaints about "broken" messages when local languages are displayed as question marks.
Scenario 2: The IoT Integration Failure
An enterprise client's binary OTA configurations failed silently because their testing framework couldn't handle 8-bit DCS properly, causing thousands of devices to remain unconfigured.
Scenario 3: The Emergency Alert Crisis
Flash messages (Class 0) weren't properly tested across device types, leading to critical alerts being stored instead of displayed immediately during a network emergency.
How XGP Transforms DCS Testing
This is exactly why we built sophisticated SMS testing capabilities into XGP. Instead of wrestling with hex editors and manual PDU construction, our platform provides:
Intuitive Configuration – Power of Execution Variables
Simple text boxes for SMSC, recipient, and message content
Dropdown selections for encoding schemes. (Simply input the required DCS value)
Image: Execution Variables
Automated PDU Generation – Test-Driver makes your life easier.
Automatically constructs proper PDUs based on your parameters
Handles complex encoding scenarios without manual intervention
Validates DCS combinations before transmission
Image: Test Steps with Responses
Real-Time Analysis
Built-in RF radios send actual SMS messages over cellular networks
Detailed debug traces show how exact PDU structure and DCS values
End-to-end validation from generation to delivery
Image: Debug Traces (.pcap) - Verification of DCS 04
The Business Impact
From a business perspective, proper DCS testing isn't just about technical correctness—it's about:
• Revenue Protection: Preventing message delivery failures that impact billing
• Customer Experience: Ensuring messages display correctly across all markets
• Regulatory Compliance: Meeting emergency alert and accessibility requirements
• Operational Efficiency: Reducing support tickets from encoding-related issues
Looking Forward: The Evolution of Messaging
As we move toward RCS, 5G messaging, and IoT-scale communications, DCS complexity will only increase. New encoding schemes, richer media types, and diverse device capabilities mean testing frameworks must evolve.
XGP's approach is abstracting complexity while maintaining full control over the underlying technical details—positions teams to handle both current SMS requirements and future messaging evolution.
The Engineering Challenge
For my fellow engineers: How are you currently handling DCS testing in your organization? Are you:
• Manually creating PDUs for different encoding scenarios?
• Testing only GSM 7-bit and hoping for the best?
• Struggling with international character set validation?
• Facing issues with binary message delivery?
The telecom industry is moving too fast for manual approaches to SMS testing. The question isn't whether to automate DCS testing—it's how quickly you can implement a solution that scales with your needs.
What's your experience with SMS DCS challenges? Have you encountered encoding issues in production that could have been caught with better testing?
I'd love to hear about the SMS testing challenges you're facing and discuss how modern automation approaches can help.
Want to see XGP's SMS testing capabilities in action? Visit xgp.au or message me directly for a technical demonstration.
Want to see XGP's SMS testing capabilities in action?
Visit www.xgp.au or contact us directly for a technical demonstration.