Skip to content

Modem PDU Converter: A Python class for converting GSM 7-bit packed format to a human-readable string, specifically tailored for compatibility with older Huawei modems like E160. Inspired by http://smstools3.kekekasvi.com/topic.php?id=288

Notifications You must be signed in to change notification settings

PinchPitar/pdu_to_string_converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

PDUDecoder - A Python Class for GSM 7-bit PDU Decoding

Overview

The PDUDecoder class provides a simple yet effective way to decode GSM 7-bit PDU (Protocol Data Unit) encoded text in Python. It supports both the standard GSM character set and the extended character set.

Features

  • Decoding of GSM 7-bit PDU: Converts PDU encoded text into a human-readable string.
  • GSM and Extended Character Sets: Includes a comprehensive list of characters supported in the GSM and extended GSM character sets.

Installation

This class does not require any external dependencies. You can simply copy the PDUDecoder class into your Python project.

Usage

Example

Here's a basic example of how to use the PDUDecoder class:

# Import the class
from pdu_decoder import PDUDecoder

# Example PDU encoded text (as a string of hex characters)
encoded_text = "E8329BFD4697D9EC37"

# Decode the PDU encoded text
decoded_text = PDUDecoder.pdu_to_string(encoded_text)

# Print the decoded text
print("Decoded text:", decoded_text)

Decoding Functionality

To decode a string of PDU encoded text, use the pdu_to_string static method. This method takes a string of hex characters representing the PDU encoded text and returns the decoded string.

Contributions

Contributions to this project are welcome. Please ensure that any pull requests are well-documented and include unit tests where applicable.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Modem PDU Converter: A Python class for converting GSM 7-bit packed format to a human-readable string, specifically tailored for compatibility with older Huawei modems like E160. Inspired by http://smstools3.kekekasvi.com/topic.php?id=288

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages