Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
PDU parser and generator written in javascript
JavaScript
branch: master

Merge pull request #2 from alexislg2/CSMS

use a random 8-bit number for CSMS reference
latest commit ab9f6eaef2
@emilsedgh authored
Failed to load latest commit information.
LICENSE Initial commit
README.md Fixing syntax issues on readme examples
example.js Adding example file
index.js Initial commit
package.json proper version
pdu.js use a random 8-bit number for CSMS reference

README.md

pdu.js

PDU parser and generator for node or your browser.

How to install

npm install pdu.js

How to use

First require it:

var pdu = require('pdu');

pdu.generate()

    pdu.generate({
      text:'Some text',
      receiver:999999999999, //MSISDN
      encoding:'16bit' //Or 7bit if you're sending an ascii message.
    });

returns an array of generated pdu's.

pdu.parse()

pdu.parse('06918919015000240C9189194238148900003110211052254117CAB03D3C1FCBD3703AA81D5E97E7A079D93D2FBB00');

Returns an object, containing parsed information:

{ smsc: '9891100500',
smsc_type: '91',
sender: '989124834198',
sender_type: '91',
encoding: '7bit',
time: 1357953952000,
text: 'Javascript makes sense.' }
Something went wrong with that request. Please try again.