Modem Question 
Author Message
 Modem Question

I have a problem with the following bit of code.  
The modem hangs up at
PRINT #a, "abcdefghijklmnopqrstuvwxyz0123456789"
Why is this?  I want this code to be able to call up a dedicated modem
and transmit info without handshaking.  Why is it{*filter*} up?

a = FREEFILE
OPEN "COM2: 1200,E,7,1,ASC,,RS32767" FOR OUTPUT AS #a
PN# = 8972771#
PRINT #a, "ATH1"
timera# = TIMER
timera# = timera# + 1
DO
        LOOP UNTIL TIMER >= timera#
PRINT #a, "ATDP" + ""; PN#; ""
timera# = TIMER
timera# = timera# + 22
DO
        LOOP UNTIL TIMER >= timera#
FOR l = 1 TO 100
        PRINT #a, "abcdefghijklmnopqrstuvwxyz0123456789"
        NEXT l
timera# = timera# + 2
DO
        LOOP UNTIL TIMER >= timera#
PRINT #a, "+++"
PRINT #a, "AT Z H0"
PRINT #a, "ATH"
CLOSE #a
END

|_|_|_|/|
|_|_|_|/|
|_|_|_|/



Sat, 10 Mar 2001 03:00:00 GMT  
 Modem Question
Thats kind of too complex. Most modems will do that hand shaking for you
depending on what kind of service you are trying to connect to.  I'm not
sure about all of your info, including opening the com port for OUTPUT,
when you need random instead.  Here is a simple Terminal App:

'Start of QB Code

OPEN "COM2:9600,N,8,1,BIN" FOR RANDOM AS #1
DO WHILE A$ <> CHR$(27)             ' To quit you press the escape key
IF LOC(1) > 0 THEN                  ' Checks for incomming data
        A$ = INPUT$(1, 1)           ' If there is some then accept 1 byte.
PRINT A$;                           ' Displays the new data
END IF
A$ = INKEY$
IF A$ <> "" THEN PRINT #1, A$;      ' Print what (if anything) the user
typed
LOOP
CLOSE 1

'END OF QB CODE



Quote:
> I have a problem with the following bit of code.  
> The modem hangs up at
> PRINT #a, "abcdefghijklmnopqrstuvwxyz0123456789"
> Why is this?  I want this code to be able to call up a dedicated modem
> and transmit info without handshaking.  Why is it{*filter*} up?

> a = FREEFILE
> OPEN "COM2: 1200,E,7,1,ASC,,RS32767" FOR OUTPUT AS #a
> PN# = 8972771#
> PRINT #a, "ATH1"
> timera# = TIMER
> timera# = timera# + 1
> DO
>         LOOP UNTIL TIMER >= timera#
> PRINT #a, "ATDP" + ""; PN#; ""
> timera# = TIMER
> timera# = timera# + 22
> DO
>         LOOP UNTIL TIMER >= timera#
> FOR l = 1 TO 100
>         PRINT #a, "abcdefghijklmnopqrstuvwxyz0123456789"
>         NEXT l
> timera# = timera# + 2
> DO
>         LOOP UNTIL TIMER >= timera#
> PRINT #a, "+++"
> PRINT #a, "AT Z H0"
> PRINT #a, "ATH"
> CLOSE #a
> END

> |_|_|_|/|
> |_|_|_|/|
> |_|_|_|/



Sun, 11 Mar 2001 03:00:00 GMT  
 Modem Question

Quote:

>I have a problem with the following bit of code.  
>The modem hangs up at
>PRINT #a, "abcdefghijklmnopqrstuvwxyz0123456789"
>Why is this?  I want this code to be able to call up a dedicated modem
>and transmit info without handshaking.  Why is it{*filter*} up?

>a = FREEFILE
>OPEN "COM2: 1200,E,7,1,ASC,,RS32767" FOR OUTPUT AS #a
>PN# = 8972771#
>PRINT #a, "ATH1"
>timera# = TIMER
>timera# = timera# + 1
>DO
>        LOOP UNTIL TIMER >= timera#
>PRINT #a, "ATDP" + ""; PN#; ""
>timera# = TIMER
>timera# = timera# + 22
>DO
>        LOOP UNTIL TIMER >= timera#
>FOR l = 1 TO 100
>        PRINT #a, "abcdefghijklmnopqrstuvwxyz0123456789"
>        NEXT l
>timera# = timera# + 2
>DO
>        LOOP UNTIL TIMER >= timera#
>PRINT #a, "+++"
>PRINT #a, "AT Z H0"
>PRINT #a, "ATH"
>CLOSE #a
>END

>|_|_|_|/|
>|_|_|_|/|
>|_|_|_|/

Just a few thoughts....

1) In my help file, the RS option on the open statement does not take a
numerical value.  The RS option supresses the detection of the REQUEST TO SEND
signal.  Is it possible that you want the RB or TB option? (receive buffer
size and transmit buffer size?) And do you need the empty space between ASC
and RS?

2) You are looping 100 times to send the long string of the alphabet.  This
comes out to 36 x 100 = 3600 characters and your computer is probably faster
than the comm port (set at 1200 baud, I would hope so!).  The default transmit
buffer is probably set for 512 characters.  This could cause a slowdown or
even a freeze up.

3) If your modem is set for ECHO (or the remote device that you are
contacting), then you are getting these characters sent back to you and your
default receive buffer is probably set for 512 characters. And since you are
opened in OUTPUT mode, you may never get to clear the buffer.  (Possibly use
RANDOM?)

4) The ASC option sends a CR after each print command.  What effect does this
have at the far end?  Do you want the BIN option or possibly just to supress
the CR by putting a semi-colon after the print command?

Just some things to check out...

Barry
eggers1 AT tsil DOT net



Sun, 11 Mar 2001 03:00:00 GMT  
 Modem Question


   >I have a problem with the following bit of code.
   >The modem hangs up at
   >PRINT #a, "abcdefghijklmnopqrstuvwxyz0123456789"
   >Why is this?  I want this code to be able to call up a dedicated
   >modem and transmit info without handshaking.  Why is it{*filter*} up?
After you dial the number, wait for the modem to say "CONNECT".

   >a = FREEFILE
   >OPEN "COM2: 1200,E,7,1,ASC,,RS32767" FOR OUTPUT AS #a
   >PN# = 8972771#
   >PRINT #a, "ATH1"
   >timera# = TIMER
   >timera# = timera# + 1
   >DO
   >LOOP UNTIL TIMER >= timera#
   >PRINT #a, "ATDP" + ""; PN#; ""
   >timera# = TIMER
   >timera# = timera# + 22
   >DO
   >LOOP UNTIL TIMER >= timera#
   >FOR l = 1 TO 100
   >PRINT #a, "abcdefghijklmnopqrstuvwxyz0123456789"
   >NEXT l
   >timera# = timera# + 2
   >DO
   >LOOP UNTIL TIMER >= timera#
   >PRINT #a, "+++"
   >PRINT #a, "AT Z H0"
   >PRINT #a, "ATH"
   >CLOSE #a
   >END

   >|_|_|_|/|
   >|_|_|_|/|
   >|_|_|_|/

Net-Tamer V 1.08X - Test Drive



Sun, 11 Mar 2001 03:00:00 GMT  
 Modem Question

Quote:

> I have a problem with the following bit of code. The modem
> hangs up at PRINT #a, "abcdefghijklmnopqrstuvwxyz0123456789"
> Why is this?  I want this code to be able to call up a
> dedicated modem and transmit info without handshaking.  Why is
> it{*filter*} up?

    [  Code Deleted  ]

-----------------------------------------------------------------
The way I read it, you dial the number and allow 22 seconds for a
connection to be established;  Has a connection been made before
you send the string?  Shouldn't you be looking for the return of
the "CONNECT" message?
-----------------------------------------------------------------
Derek Asari



Sun, 11 Mar 2001 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Modem question

2. Modem question

3. Modem question-PLEASE HELP!!!!

4. Multi-Modem question

5. Modem question???

6. modem question

7. VB6 Modem Questions

8. Modem Question - Is This Possible?

9. Modem question.

10. Modem question

11. Yet another modem question...

12. Modem Question

 

 
Powered by phpBB® Forum Software