dcsimg
Results 1 to 2 of 2

Thread: Checking if modem line busy

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2007
    Posts
    1

    Checking if modem line busy

    Noobie here, so this may be a really dumb and simple question, but I can't seem to resolve it so far.

    I want to simply test if the phone line is in use before I have my program dial the modem (VB6). I'm trying using MSComm but even the .portopen command returns an error. Shouldn't I be able to set portopen = true then output AT commands to test for use? Is there an easier way to silently be sure no one is talking on the phone line before the modem dials?

    I'm probably missing the obvious, please go easy on me .

    Thanks

  2. #2
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,692

    Re: Checking if modem line busy

    You can't open a port that doesn't exist - that's how you test for existing ports, by opening them and trapping the error. It sounds as if the port you think you have isn't really the port you have. Run through ports 1 to 30, trying to open them and having the program tell you which ones opened. (I assume that the computer has either at least one real RS232 port, or you have at least one USB->serial adapter plugged in and working properly.)
    The most difficult part of developing a program is understanding the problem.
    The second most difficult part is deciding how you're going to solve the problem.
    Actually writing the program (translating your solution into some computer language) is the easiest part.

    Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.

    Please Help Us To Save Ana

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width