Hoffnung dieser Code hilft:
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)
}
}
Die vollständige Antwort und Details sind at this article
Was [SMSLib] (http://smslib.org/)? – vojta
Hier ist ein Beispiel: [link] (https://github.com/tdelenikas/smslib-v3/blob/master/src/java/examples/modem/SendMessage.java) aber ich weiß nicht, was hier 'SerialModemGateway Gateway' eingetragen hat = neuer SerialModemGateway ("modem.com1", "COM4", 115200, "Huawei", ""); ' – user1967089