Надежда этот код помогает:
package logic;
import com.harshadura.gsm.smsdura.GsmModem;
public class TestSMS {
private static String port = "COM3"; //Modem Port.
private static int bitRate = 115200; //this is also optional. leave as it is.
private static String modemName = "ZTE"; //this is optional.
private static String modemPin = "0000"; //Pin code if any have assigned to the modem.
private static String SMSC = "+9477000003"; //Message Center Number ex. Mobitel
public static void main(String[] args) throws Exception {
GsmModem gsmModem = new GsmModem();
GsmModem.configModem(port, bitRate, modemName, modemPin, SMSC);
gsmModem.Sender("+94712244555", "Test Message"); // (tp, msg)
}
}
полный ответ и детали at this article
насчет [SMSLib] (http://smslib.org/)? – vojta
Вот пример: [link] (https://github.com/tdelenikas/smslib-v3/blob/master/src/java/examples/modem/SendMessage.java), но я не знаю, что здесь вводит «SerialModemGateway gateway» = новый SerialModemGateway («modem.com1», «COM4», 115200, «Huawei», «»); – user1967089