Giter VIP home page Giter VIP logo

sms-decoder's Introduction

SMS-Decoder

A .NET / .NET Core library for parsing PDU-Mode SMS and decoding 7-bit, 8-bit, USC2 data.

Getting Started

Firstly, clone or download full source.

Then run:

cd sms-decoder
./test.sh

If you have a GPRS device (for example: SIM900A), you may connect it via serial, and modify ser.py:

ser = serial.Serial("<YOUR_DEVICE_SERIAL>")

Make sure your divice is in PDU-mode, then run:

./test-at.sh

And send a sms from another divice or even cellphone.

You'll see the decoded sms.

Usage

An easy way to use it in .NET (Core) is like:

SmsDecoder.Helper.Decode (hexStrOrBytes);

But it's not support long sms which is split into many parts.

So, in production environments, you should use MessagePool �just like:

public static void onCompleteMsg (SmsDecoder.Message msg) {}
var pool = new SmsDecoder.MessagePool (onCompleteMsg);
pool.Add (SmsDecoder.Helper.Decode (...));

For full source, please reference to test/Program.cs.

File Description

  • sms-decoder.sln: .NET Core 2.0 solution file.
  • doc: some useful document about pdu format.
  • lib: library source code.
  • test: a demo for this library.
  • test.sh: includes some captcha sms sample to test decoding.
  • ser.py: python script to connect GPRS device via serial.
  • test-at.sh: build solution, simply parse AT commands from ser.py, and real-time decode sms'.

License

MIT

Thanks

Thanks for using, please star if helps. And do not hesitate to report any issue.

Hope you enjoy it.

-- Wi1dcard

sms-decoder's People

Contributors

wi1dcard avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.