Coder Social home page Coder Social logo

dmsherazi / multi-part-sms-pdu-generator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hu55a1n1/multi-part-sms-pdu-generator

1.0 1.0 0.0 2.04 MB

A simplified C library for generating PDU encoded multi-part multilingual SMS. This library uses the versatile SMS Server Tools for encoding/decoding.

Home Page: http:\\shoaib-ahmed.com

License: GNU General Public License v2.0

C 96.16% Makefile 0.23% C++ 3.61%

multi-part-sms-pdu-generator's Introduction

Multi-part-SMS-PDU-generator

A simplified C library for generating PDU encoded multi-part multilingual SMS. This library uses the versatile SMS Server Tools for encoding/decoding.

User provided string is split into 140 char chunks and then encoded into pdu format.

This library can be used to encode multilingual messages (including arabic and persian) to PDU and decode a PDU into its component data. To know more about PDU encoding, you may find the material in the 'docs' directory useful. The SMS-PDU converter here may also come in handy.

Compilation:

I apologize for the rather intricate compilation process. I will soon add a Makefile. For now, follow the steps below:

In the 'smstools3' directory:

gcc -c pdu.c charset.c logging.c extras.c locking.c stats.c cfgfile.c alarm.c modeminit.c whitelist.c blacklist.c smsd_cfg.c smsd.c -D NUMBER_OF_MODEMS=1 -D NOSTATS -g
ld -r pdu.o charset.o logging.o extras.o locking.o stats.o cfgfile.o alarm.o modeminit.o whitelist.o blacklist.o smsd_cfg.o smsd.o -o codec.o

In the 'pdu_codec' directory:

gcc -c pdu_codec.c
ld -r pdu_codec.o smstools3/codec.o -o pdu.o

To compile the sample:

gcc sample.c pdu.o -o sample -lrt

Usage:

The API is pretty straight forward. Check the sample provided.

And, don't forget to call free_pdu() after you're done with the pdu.

For sending arabic (or other languages), use alphabet=2 and unicode characters for every two bytes as \x06\x33\x06\x44\x06\x4a\x06\x45 for سليم.

Here's a good online converter.

multi-part-sms-pdu-generator's People

Stargazers

 avatar

Watchers

 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.