• Post Reply Bookmark Topic Watch Topic
  • New Topic

Dial a modem from Java?

 
A Harry
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm fairly new to Java programming & hope I can explain this properly
I've been set a task - from a Windows NT 4 server box, periodically dial a modem in to another PC - this will eventually lead to making a webcam take a picture & downloading the picture over the modem & storing the file on a hard disk.
But anyway for now I just want to write a Java program that runs on the NT box & at set intervals (probably use the timer classes but not important for now) dials a number using an installed modem.
I've downloaded the JavaComm API & tried one of the examples that supposed to list the state of a ports on my PC - it just says "No serial ports found!" even though I have a modem installed that works fine.
Can someone point in the direction as to how I would acheive this - do I have to learn a whole load of new stuff about com port programming or is there a simple way to do it i.e select a modem & pass a tel no to it?
I really have no idea where to start!
Thanks in advance
harry
 
Raghav Mathur
Ranch Hand
Posts: 641
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you searching for serial ports or parallel ports? The comport identifier class searches for parallel as well for serial ports.

regards
raghav mathur
[ August 04, 2002: Message edited by: raghav mathur ]
 
A Harry
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A serial port
I installed it EXACTLY as described in sun's installation guide & suprise surprise it doesn't work - I suppose if it did it just wouldn't be Java!
Is there any such thing as a simple guide to dialing modems from Java? - something that doesn't require the almost mandatory 2 weeks of downtime messing about that seems to acompany anything related to Java?
I have a modem installed & working & I can't get to it!
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"harryajh",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp.
We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please edit your profile and select a new name which meets the requirements.
Thanks.
Dave
 
Raghav Mathur
Ranch Hand
Posts: 641
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Look at the code . Now if your Modem is installed on COM2 which i,am sure it would be then it would raise an exception " port is being used by another application" Since windows(or any other OS) is also using that same port.
Originally posted by harryajh:

I have a modem installed & working & I can't get to it!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!