 Guillaume DOTT
		
	
	
		77105b180a
		
	
	
	
	Ignore PDU message lines in response when sending SMS
			Guillaume DOTT
		
	
	
		77105b180a
		
	
	
	
	Ignore PDU message lines in response when sending SMS
		
			
			Tested with TP-LINK MA180. It returns the PDU message when sending a message with a length greater than 56 (i don't really know why for now). These lines are ignored and only the last one with the status is parsed.
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
- Write missing test for modem module.
- Write a documentation.
- Test with different kinds of modem and OS.
Contributing
- Fork it
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Added some feature')
- Push to the branch (git push origin my-new-feature)
- Create new Pull Request
Description
				An easiest way to mount a GSM modem to send and to receive sms message
(forked from https://github.com/rodrigopinto/biju )
						
						
						
					Languages
				
				
								
								
									Ruby
								
								100%