aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes RXTX: getting the port identifier associated with the modem and using AT commands Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "RXTX: getting the port identifier associated with the modem and using AT commands" Watch "RXTX: getting the port identifier associated with the modem and using AT commands" New topic
Author

RXTX: getting the port identifier associated with the modem and using AT commands

Mahmoud Hadad
Ranch Hand

Joined: Jan 09, 2006
Posts: 67
hi all,
i have established a connection with my internal modem using the RXTX API and have two questions about the RXTX API.to make a phone call from my computer through my internal modem i should be using AT commands so i must get an InputStream from a CommPort object and send the AT calling command through that InputStream and the modem should make the call?
this is the first question ,as for the second question how can my application determine on what port is the internal modem installed?i mean COM1,COM2...etc???i could not find a method for obtaining a port identifier associated with the hardware installed or the port my internal modem is attached to?
if anyone knows plzz advice as i'm totally new into this kind of programming.
VReddy Parvathapu
Greenhorn

Joined: May 29, 2006
Posts: 1
hi,
the CommPortIdentifier.getPortIdentifiers() method will return an enumeration of the ports available both serial and parallel . From this enumeration you need to cast each element to PortIdentifier(portId) and then call the method PortIdentifier.getName() this will return string of the name like in "COM1", "LPT1" etc. the COMx series is for serial ports and the LPTx series is for parallel ports. From then u could use the PortIdentifier to refer to your COM port, by creating a SerialPort object using open method ..like
eg: SerialPort comSerialPort = portId.open("someName",timeoutValue);

i hope this helps you.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: RXTX: getting the port identifier associated with the modem and using AT commands