Skip to content

Learn how to build Java Dekstop App for SMS gateway using GSM modem

Notifications You must be signed in to change notification settings

MarchellinAntonia/SMSGateway

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SMSGateway

Building Java Dekstop App for SMS gateway using GSM modem

Getting Started

These app send bulk SMS using GSM Modem (tested using Wavecom and Syscom MP8P) in this project there is 3 main class:

  • SMSPanel (the Main Interface)
  • SMSSender (class that contain methods for send SMS)
  • SMSCommand (class that contain AT-COMMANDs for send command to modem)

Code

this app built using RXTXcomm lib to connect java app with GSM Modem (lib included in project). first, it will identified all communication port, then open selected port the serial port will receive command (AT COMMAND) via OutputStream and InputStream

get all communication port using this code

portList = CommPortIdentifier.getPortIdentifiers();

set modem baud rate, databits, stopbits, and parity using this code

serialPort.setSerialPortParams(115200,
    SerialPort.DATABITS_8,
    SerialPort.STOPBITS_1,
    SerialPort.PARITY_NONE);

to send single SMS, use this simple raw AT COMMAND

AT
AT+CMGF=1
AT+CMGS="+31638740161" //replace with recipient number

if you using netbeans, chang run setting by right click on project -> properties -> Run. in VM Options add this -Djava.library.path=/usr/lib/jni then click OK

if you can't detect port then the port might be not granted permission, use this command in terminal

sudo chmod 666 /dev/ttyUSB0

or change /dev/ttyUSB0 with your connected port

Useful Tutorial

Built With

  • IDE - Netbeans 8.2
  • Operating System - Ubuntu

Authors

  • Marchellin Antonia

Screenshot

  • panel to send sms


* panel to check inbox


* panel to check outbox


About

Learn how to build Java Dekstop App for SMS gateway using GSM modem

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages