Multi-part SMS PDU generator in C (with multi-lingual support)

October 2, 2016


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. ***


This project depends on CMake. If CMake isn’t already installed on your system, you can do so by building it from source (which is the preferred method) or using a package manager.

Then run the following from the project’s root directory:

mkdir -p build
cd build
cmake ..

This should have built smstools3 as a static library (and sample1.c as well) in the build directory. To rebuild, delete the build directory and run above commands again.


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.


This project essentially provides a linkable API to an earlier modified version of SMS Server Tools 3 code. So all credit to Stefan Frings (original author of SMS Server Tools), Keijo “Keke” Kasvi (current maintainer) and other contributors.


comments powered by Disqus