smslib

SMSLib example for interactive USSD session

对着背影说爱祢 提交于 2019-12-03 21:17:16
I have a USSD application that provides an interactive session for users, for example: User> Dial USSD Shortcode Serv> Return Main Menu User> Select Option 1, e.g. "View Movie Times" Serv> Return List of Cities User> Select Option 3, e.g. Mumbai Serv> Return List of Cinemas User> etc ... I would like to test the USSD Server by using SMSLib to simulate the user. Are there any example SMSLib code snippets that show how to perform an interactive USSD session with a USSD server? Chris Snow The code at this link gives an example of sending and receiving USSD data using smslib: // SendUSSD.java -

SMSLib doesn't send SMS with E226 3G modem

匿名 (未验证) 提交于 2019-12-03 09:13:36
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I would like to know if someone knows why I can't send sms with my E226 3g modem. I have configured the example class, I setted modem model, PIN and Smsc number. public class SendMessage { public void doIt() throws Exception { OutboundNotification outboundNotification = new OutboundNotification(); System.out.println("Example: Send message from a serial gsm modem."); System.out.println(Library.getLibraryDescription()); System.out.println("Version: " + Library.getLibraryVersion()); SerialModemGateway gateway = new SerialModemGateway("modem

Automatically detect which Com Port is connected to a USB GSM Modem using Java

二次信任 提交于 2019-11-30 21:50:40
I wrote a Java application that reads and sends SMS messages from a USB GSM modem. I'm using SMSLib (which uses JavaCommAPI), and it runs on Windows. I need to pass in the COM PORT, that the modem appears to be connected to. So far, I've been looking up the COM PORT manually using the Windows Device Manager, and write it into a properties file. I'm wondering if there's a way to detect which COM PORT, the modem is connected to programmatically? It'll save the trouble of looking it up every time The port number changes if I unplug/replug it sometimes Thanks!! Satish package com.cubepro.util;

Automatically detect which Com Port is connected to a USB GSM Modem using Java

微笑、不失礼 提交于 2019-11-30 17:45:43
问题 I wrote a Java application that reads and sends SMS messages from a USB GSM modem. I'm using SMSLib (which uses JavaCommAPI), and it runs on Windows. I need to pass in the COM PORT, that the modem appears to be connected to. So far, I've been looking up the COM PORT manually using the Windows Device Manager, and write it into a properties file. I'm wondering if there's a way to detect which COM PORT, the modem is connected to programmatically? It'll save the trouble of looking it up every

How to get the output of AT command into a string in java?

为君一笑 提交于 2019-11-28 11:45:06
I am trying to read the result of an AT command (command executed to do various operation to a GSM modem from console). I have seen and successfully tested using the Java OuputStream class to get the result of an AT command as output stream but what I need to do is to get the result not as outputstream but into a variable (String for now) in my class. If it is possible to do like outStream.write(("Some At command").getBytes()); which works fine, how can it be possibe to do something like this Strign resultOfCommmand=.....result of some AT command; I am trying it in this way InputStream is =

How to get the output of AT command into a string in java?

青春壹個敷衍的年華 提交于 2019-11-27 03:41:46
问题 I am trying to read the result of an AT command (command executed to do various operation to a GSM modem from console). I have seen and successfully tested using the Java OuputStream class to get the result of an AT command as output stream but what I need to do is to get the result not as outputstream but into a variable (String for now) in my class. If it is possible to do like outStream.write(("Some At command").getBytes()); which works fine, how can it be possibe to do something like this