An easiest way to mount a GSM modem to send and to receive sms message (forked from https://github.com/rodrigopinto/biju )
Go to file
Guillaume DOTT c842211e75 Add SMS ID to MalformedSms error 2014-02-10 11:15:13 +01:00
lib Add SMS ID to MalformedSms error 2014-02-10 11:15:13 +01:00
spec Add compatibility with ruby 1.9.3 2013-11-06 17:26:26 +01:00
.gitignore Add swap files to gitignore 2013-09-12 10:37:11 +02:00
.rspec Add tests using Rspec 2013-09-12 10:37:11 +02:00
Gemfile Initial commit. 2012-05-16 18:33:34 -03:00
LICENSE Initial commit. 2012-05-16 18:33:34 -03:00
README.md Add TODO note for UDH and SMS longer than 140 octets 2013-10-08 15:02:46 +02:00
Rakefile Add tests using Rspec 2013-09-12 10:37:11 +02:00
biju.gemspec Move AT commands in Hayes class and use Modem to send to SerialPort 2013-09-12 10:37:11 +02:00

README.md

Biju

Biju is an easy way to mount a GSM modem to send, to receive and to delete messages through a ruby interface. This is project is based on this code snippet.

Installation

Add this line to your application's Gemfile:

gem 'biju'

And then execute:

$ bundle

Or install it yourself as:

$ gem install biju

Usage

modem = Biju::Hayes.new('/dev/tty.HUAWEIMobile-Modem', pin: '0000')

# method to list all messages
# it can take the status in argument
# :unread, :read, :unsent, :sent, :all
modem.messages.each do |sms|
  puts sms
end

# method to send sms
sms = Biju::Sms.new(phone_number: '+3312345678', message: 'hello world')
modem.send(sms)

modem.close

TODO

  1. Write missing test for modem module.
  2. Write a documentation.
  3. Test with different kinds of modem and OS.
  4. Handle UDH (User Data Header) and SMS longer than 140 octets

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request