Serial Communication in Java with Example Program. This article discusses how to use the serial port communication with Java and Arduino, which is exactly what I am after. But what I was looking for here was how to use the write method to send serial data from Java. Share this: Click to share on Twitter (Opens in new window).
I think you've been asked to do something that isn't possible. I don't think any of those platforms support this.
On older feature phones (NOT smart phones) they had a physical serial port. You could hook-up the serial port to a PC (or other serial device) and use it as a data modem. They extended the AT-command set to be able to send SMS messges over the serial interface. The code you found is for working with the physical serial ports on these old phones, modems, and modules. There are also GSM modules and modems that implement a similar physical serial port.
Maybe some VERY old phones actually used GSM modules internally, but that's been eliminated years ago to reduce construction cost. I doubt there is a physical serial interface internally.
Maybe somebody still supports some internal emulation of this, but certainly not on smart phones like iPhone, Android, etc. Jon Tara 18/5/2012, 18:07 น. Rhodes supports sending SMS: However, some platforms - for example, iOS - do not allow you to send 'silent' SMS. On iOS, when you use an SMS URL, it opens the Messages app, and the user will have to hit a button to complete the send. There is no way around this.
Apple does not want apps sending SMS without the user's knowledge. Android, on the other hand, has a fine-grain permission system. So, apps can send SMS messages silently, but the user first has to grant the app permission to do so. Mohit Tyagi 22/5/2012, 7:44 น.
SerialComm (SMS library for the Java platform SNAPSHOT API) Class NEXT CLASS SUMMARY: NESTED FIELD DETAIL: FIELD org.marre.sms.transport.gsm Class SerialComm java.lang.Object org.marre.sms.transport.gsm.SerialComm All Implemented Interfaces: public class SerialComm extends java.lang.Object implements Simple Serial port comm. Version: $Id: SerialComm.java,v 1.7 2005/11/26 16:39:33 c95men Exp $ Author: Markus Eriksson Constructor Summary (java.lang.String appName, java.lang.String portName) Constructor. Method Summary void Closes the connection to the device. Void Opens a connection to the device. Java.lang.String Reads one row of data from the device.
![Java Send Sms Serial Port Java Send Sms Serial Port](/uploads/1/2/5/4/125492925/804648633.png)
Java.lang.String (java.lang.String find) Reads one row of data from the device or until we have read the find string. Void (java.lang.String row) Send data to the device. Void (java.lang.String theBitRate) void (java.lang.String theDataBits) void (boolean echo) void (java.lang.String theFlowControl) void (java.lang.String theParity) void (java.lang.String theStopBits) Methods inherited from class java.lang.Object clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait Constructor Detail SerialComm public SerialComm(java.lang.String appName, java.lang.String portName) Constructor. Parameters: portName - Method Detail open public void open throws java.io.IOException Description copied from interface: Opens a connection to the device. Specified by: in interface Throws: java.io.IOException close public void close Description copied from interface: Closes the connection to the device. Specified by: in interface send public void send(java.lang.String row) throws java.io.IOException Description copied from interface: Send data to the device. Specified by: in interface Parameters: row - Throws: java.io.IOException readLine public java.lang.String readLine throws java.io.IOException Description copied from interface: Reads one row of data from the device.
Specified by: in interface Returns: Throws: java.io.IOException readLine public java.lang.String readLine(java.lang.String find) throws java.io.IOException Description copied from interface: Reads one row of data from the device or until we have read the find string. Specified by: in interface Parameters: find - Returns: Throws: java.io.IOException setBitRate public void setBitRate(java.lang.String theBitRate) setDataBits public void setDataBits(java.lang.String theDataBits) setFlowControl public void setFlowControl(java.lang.String theFlowControl) setParity public void setParity(java.lang.String theParity) setStopBits public void setStopBits(java.lang.String theStopBits) setEcho public void setEcho(boolean echo) Class NEXT CLASS SUMMARY: NESTED FIELD DETAIL: FIELD Copyright © 2002-2005 Markus Eriksson. All Rights Reserved.