Groups > Superbase > Superbase 2 programming > Re: Comms




Comms

Comms
Thu, 26 Apr 2007 00:13:11 -040
Hello,

Two parter:

1. Using U.S. Robotics external modems for autodialing (followed by touchtone
commands for accessing voicemail, etc.). After a few times working well, it
stops. LED on the modem flash quickly, but no dial tone or anything.

If I turn the modem off then on again, it's fine. 

Is there something I'm not doing to clear or reset? Simple code like:
   OPEN COMMS USING Port%,2400,0,1,8,1,0,1,1,0,0,"",""
   
   COMMS ? "atdt" + NumPrefix$ + TelSelected$ + CHR$ (13)

   REQUEST "Select phone line when ringing.",NumPrefix$ +
TelSelected$,100

   COMMS ? "ath0" + CHR$ (13)

    CLOSE COMMS 

I've tried adding things like ATZ , but can't find anything that helps.

2. I seem to remember a limit on number of characters in a string that you can
send to a modem. Anybody know if that's true and what that limit is?

Is there a way to build the program in stages or something so that it can
continue with many commands/instructions?

Thank you for any guidance.

Best regards,
John
Post Reply
Re: Comms
Wed, 16 May 2007 15:53:43 +100
This is a very simple comms routine and i presume you are just sending lines of
ascii code from one modem to another.

1) Try COMMS ? "+++"  followed by COMMS ? "ATH0" to force
the line to hang up eg:.

 OPEN COMMS USING Port%,2400,0,1,8,1,0,1,1,0,0,"",""
 
 COMMS ? "atdt" + NumPrefix$ + TelSelected$ + CHR$ (13)

 REQUEST "Select phone line when ringing.",NumPrefix$ +
TelSelected$,100

 COMMS ? "+++" 
 COMMS ? "ath0"

 CLOSE COMMS 

2) There is no limit that i know off but information is sent in packets.  Make
sure you collect each packet of text sent and add it together eg:

WHILE com$ <> terminate$
 COMMS GET com$
  allcom$ =  allcom$ + com$
WEND

This is the simplest way of receiving unlimited data from one modem to another. 
It waits for a specific character to terminate the send.

WHILE LEN (com$) > 0
 COMMS INPUT com$
 allcom$ = allcom$ + com$
WEND

This will read up to 4000 characters at a time in the comms buffer and add them
to allcom$ on the fly.

If you need to send more than 4000 characters, you should probably be sending
files instead of characters.

-- 
Kind Regards
Axel H 


  "John Ciccone" <johnrc@NOSPAMsympatico.ca> wrote in message
news:f0p8su$am9$1@ipx22096.ipxserver.de...
  Hello,

  Two parter:

  1. Using U.S. Robotics external modems for autodialing (followed by touchtone
commands for accessing voicemail, etc.). After a few times working well, it
stops. LED on the modem flash quickly, but no dial tone or anything.

  If I turn the modem off then on again, it's fine. 

  Is there something I'm not doing to clear or reset? Simple code like:
     OPEN COMMS USING Port%,2400,0,1,8,1,0,1,1,0,0,"",""
     
     COMMS ? "atdt" + NumPrefix$ + TelSelected$ + CHR$ (13)

     REQUEST "Select phone line when ringing.",NumPrefix$ +
TelSelected$,100

     COMMS ? "ath0" + CHR$ (13)

      CLOSE COMMS 

  I've tried adding things like ATZ , but can't find anything that helps.

  2. I seem to remember a limit on number of characters in a string that you can
send to a modem. Anybody know if that's true and what that limit is?

  Is there a way to build the program in stages or something so that it can
continue with many commands/instructions?

  Thank you for any guidance.

  Best regards,
  John
Post Reply
Re: Comms
Thu, 17 May 2007 08:48:36 -040
Thank you Axel.


"Axel H" <hahnheuser@optusnet.com.au> wrote in message
news:f2e692$b1k$1@ipx22096.ipxserver.de...
This is a very simple comms routine and i presume you are just sending lines
of ascii code from one modem to another.

1) Try COMMS ? "+++"  followed by COMMS ? "ATH0" to force
the line to hang
up eg:.

 OPEN COMMS USING Port%,2400,0,1,8,1,0,1,1,0,0,"",""

 COMMS ? "atdt" + NumPrefix$ + TelSelected$ + CHR$ (13)

 REQUEST "Select phone line when ringing.",NumPrefix$ +
TelSelected$,100

 COMMS ? "+++"
 COMMS ? "ath0"

 CLOSE COMMS

2) There is no limit that i know off but information is sent in packets.
Make sure you collect each packet of text sent and add it together eg:

WHILE com$ <> terminate$
 COMMS GET com$
  allcom$ =  allcom$ + com$
WEND

This is the simplest way of receiving unlimited data from one modem to
another.  It waits for a specific character to terminate the send.

WHILE LEN (com$) > 0
 COMMS INPUT com$
 allcom$ = allcom$ + com$
WEND

This will read up to 4000 characters at a time in the comms buffer and add
them to allcom$ on the fly.

If you need to send more than 4000 characters, you should probably be
sending files instead of characters.

-- 
Kind Regards
Axel H


  "John Ciccone" <johnrc@NOSPAMsympatico.ca> wrote in message
news:f0p8su$am9$1@ipx22096.ipxserver.de...
  Hello,

  Two parter:

  1. Using U.S. Robotics external modems for autodialing (followed by
touchtone commands for accessing voicemail, etc.). After a few times working
well, it stops. LED on the modem flash quickly, but no dial tone or
anything.

  If I turn the modem off then on again, it's fine.

  Is there something I'm not doing to clear or reset? Simple code like:
     OPEN COMMS USING Port%,2400,0,1,8,1,0,1,1,0,0,"",""

     COMMS ? "atdt" + NumPrefix$ + TelSelected$ + CHR$ (13)

     REQUEST "Select phone line when ringing.",NumPrefix$ +
TelSelected$,100

     COMMS ? "ath0" + CHR$ (13)

      CLOSE COMMS

  I've tried adding things like ATZ , but can't find anything that helps.

  2. I seem to remember a limit on number of characters in a string that you
can send to a modem. Anybody know if that's true and what that limit is?

  Is there a way to build the program in stages or something so that it can
continue with many commands/instructions?

  Thank you for any guidance.

  Best regards,
  John



Post Reply
Re: Comms
Thu, 24 May 2007 12:43:38 -040
Thanks again, Axel! That "+++" seems to have cleared it up.

The only time I have to reset (power down/up) the modem is if I abort the
dialing process before it's complete... probably before it gets to
"+++". Do
you happen to know how I can catch the incomplete process and send
"+++"?


"Axel H" <hahnheuser@optusnet.com.au> wrote in message
news:f2e692$b1k$1@ipx22096.ipxserver.de...
This is a very simple comms routine and i presume you are just sending lines
of ascii code from one modem to another.

1) Try COMMS ? "+++"  followed by COMMS ? "ATH0" to force
the line to hang
up eg:.

 OPEN COMMS USING Port%,2400,0,1,8,1,0,1,1,0,0,"",""

 COMMS ? "atdt" + NumPrefix$ + TelSelected$ + CHR$ (13)

 REQUEST "Select phone line when ringing.",NumPrefix$ +
TelSelected$,100

 COMMS ? "+++"
 COMMS ? "ath0"

 CLOSE COMMS

2) There is no limit that i know off but information is sent in packets.
Make sure you collect each packet of text sent and add it together eg:

WHILE com$ <> terminate$
 COMMS GET com$
  allcom$ =  allcom$ + com$
WEND

This is the simplest way of receiving unlimited data from one modem to
another.  It waits for a specific character to terminate the send.

WHILE LEN (com$) > 0
 COMMS INPUT com$
 allcom$ = allcom$ + com$
WEND

This will read up to 4000 characters at a time in the comms buffer and add
them to allcom$ on the fly.

If you need to send more than 4000 characters, you should probably be
sending files instead of characters.

-- 
Kind Regards
Axel H


  "John Ciccone" <johnrc@NOSPAMsympatico.ca> wrote in message
news:f0p8su$am9$1@ipx22096.ipxserver.de...
  Hello,

  Two parter:

  1. Using U.S. Robotics external modems for autodialing (followed by
touchtone commands for accessing voicemail, etc.). After a few times working
well, it stops. LED on the modem flash quickly, but no dial tone or
anything.

  If I turn the modem off then on again, it's fine.

  Is there something I'm not doing to clear or reset? Simple code like:
     OPEN COMMS USING Port%,2400,0,1,8,1,0,1,1,0,0,"",""

     COMMS ? "atdt" + NumPrefix$ + TelSelected$ + CHR$ (13)

     REQUEST "Select phone line when ringing.",NumPrefix$ +
TelSelected$,100

     COMMS ? "ath0" + CHR$ (13)

      CLOSE COMMS

  I've tried adding things like ATZ , but can't find anything that helps.

  2. I seem to remember a limit on number of characters in a string that you
can send to a modem. Anybody know if that's true and what that limit is?

  Is there a way to build the program in stages or something so that it can
continue with many commands/instructions?

  Thank you for any guidance.

  Best regards,
  John


Post Reply
about | contact