Skip to content
/ pdu Public
forked from emilsedgh/pdu

PDU parser and generator written in javascript

License

Notifications You must be signed in to change notification settings

hieucdtspk/pdu

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.' }

About

PDU parser and generator written in javascript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%