Announcement

Collapse
No announcement yet.

Auto dialling

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #21
    Thanks Stuart

    I tried commas and printed 'timer' before and after the dialling. The commas made absolutely no difference to the overall time of dialling. I did wonder if the modem I use did not recognise commas - is that possible?

    How do you set S8? (I tried to work this out but failed!)

    Kerry
    [I]I made a coding error once - but fortunately I fixed it before anyone noticed[/I]
    Kerry Farmer

    Comment


    • #22
      You won't see it in time for PC to send string to MODEM. At 9600 bpS one character is about 1mS. The PC is not doing the dialing, the MODEM is. A commas in the string causes the MODEM to pause dialing for 2 seconds (default).
      Dale

      Comment


      • #23
        Originally posted by Kerry Farmer View Post
        Thanks Stuart

        I tried commas and printed 'timer' before and after the dialling. The commas made absolutely no difference to the overall time of dialling. I did wonder if the modem I use did not recognise commas - is that possible?

        How do you set S8? (I tried to work this out but failed!)

        Kerry
        I'd be surprised if a modems ATD didn't recognise commas.
        To set the pause time, iust give it ATS8=2 instead of ATD.......

        See here for on command reference:.
        https://www.computerhope.com/atcom.htm
        You only neeed to look at the block under General at commands"
        If you look carefully at the D command, you will see ", - pause for 2 seconds"

        There's also a fuller description at: http://woop.ca/xfree/connect/modemset1.shtml

        "
        , -- Pause While Dialing. The comma (,) dial modifier causes the modem to pause while dialing. The modem will pause the number of seconds specified in S-Register S8 and then continue dialing. If a pause time longer than the value in S-Register S8, it can be increased by either inserting more than one (,) in the dial command line or changing the value of S-Register S8. In the following example, the command accesses the outside (public) telephone line with the 9 dial modifier. Because the comma (,) dial modifier is present, the modem delays before dialing the telephone number 5551212. Ex: ATD 9, 5551212 [Enter]

        Comment


        • #24
          Originally posted by Dale Yarker View Post
          You won't see it in time for PC to send string to MODEM. At 9600 bpS one character is about 1mS. The PC is not doing the dialing, the MODEM is. A commas in the string causes the MODEM to pause dialing for 2 seconds (default).
          ^^^^^^^^^^^^
          This!

          If you can hear the modem, you will hear the pause between the second and thrid tone.

          If you can't hear the modem, you may be able to do so with ATL3 (Ln Sets the internal speaker volume 0,1=lowest, 2=medium, 3=highest)

          Comment


          • #25
            Thanks guys

            Still learning
            [I]I made a coding error once - but fortunately I fixed it before anyone noticed[/I]
            Kerry Farmer

            Comment


            • #26
              Originally posted by Kerry Farmer View Post

              I am calling Australia from New Zealand
              There is a prefix of '00' to get an international call and then you dial '61' for Australia and then the Australian number without the leading zero
              I can call NZ numbers with no extra code
              My suspicion is that the numbers are sent too fast.
              But calling Australia I am having some success with

              COMM OPEN "COM3" AS #hComm
              DIM call_count AS LONG
              call_count = 1
              DIM call_wait AS LONG
              call_wait = 1
              DO UNTIL call_count > LEN(current_telephone_number)
              COMM SEND #hComm, "ATDT" + MID$(current_telephone_number,call_count,1)
              INCR call_count
              SLEEP call_wait
              LOOP

              COMM SEND #hComm, "ATDT" +$CRLF
              modem_input_data_length=0
              DO UNTIL modem_input_data_length>0
              modem_input_data_length = COMM(#hComm, RXQUE)
              COMM RECV #3, modem_input_data_length, modem_input_data
              LOOP
              You really don't need to loop every number to dial with the modem, the modem wont dial until it gets the $CRLF so in your case not until this line COMM SEND #hComm, "ATDT" +$CRLF
              So your SLEEP call_wait
              is only delaying your program sending the command to the modem, not the actual dialing. (carriage return sent to complete the command)

              Try just sending the complete command at once with the 2 sec wait ie:
              I have no clue how long an Australian phone number is, lets assume its 8 digits

              COMM OPEN "COM3" AS #hComm
              COMM SEND #hComm, "ATDT" + "00,61,12345678" +$CRLF 'AT attention / D dial T touch tone / your numbers / COMMA 2sec delay / your numbers etc / enter

              Do what ever you do to wait for ring......


              if you want to change the pause duration
              COMM OPEN "COM3" AS #hComm
              COMM SEND #hComm, "ATS8=1" + $CRLF 'Set pause for comma to 1 sec
              COMM SEND #hComm, "ATS11=190" + $CRLF 'double Dial duration usually 95 (try this if pause does not work)
              COMM SEND #hComm, "ATDT" + "00,61,12345678" +$CRLF 'Dial your number

              Do what ever you do to wait for ring......

              Comment


              • #27
                Originally posted by Rod Macia View Post
                You really don't need to loop every number to dial with the modem,
                Wow! I didn't read Kerry's code thoroughly and didn't realise he was doing that.

                Yes, just a simple COMM SEND #hComm, "ATDT" + "00,61,12345678" +$CRLF is all that is needed. ( as in my 20+ year old code in Post 4

                Comment


                • #28
                  Good Rod.
                  You're not alone Stuart I missed also.

                  It might better explain something else too! What would a MODEM do with a comma and no digits? With no digits in current "ATDT" string there is nothing to pause.
                  Dale

                  Comment


                  • #29
                    Kerry,
                    Semicolon - Return to Command State after Dialing
                    The semicolon ( ; ) dial modifier, used only at the end of a command line (just before the <CR», instructs the modem to return to the command state immediately after dialing, without breaking the connection.

                    So COMM SEND #hComm, "ATDT" + "00,61,12345678;" +$CR

                    should dial and it will go back to command while it rings, which should solve your initial problem "But sometimes the people at the other end cannot hear me very well - and it suddenly comes better after about a minute"

                    After you pick up the telephone handset, you then issue a COMM SEND #hComm,"ATH0" it will hang up the modem.

                    One more note the modem commands require $CR not $CRLF although the $LF is probably ignored.

                    PS: Stuart I know you mentioned it on Post#8
                    Last edited by Rod Macia; 23 Jul 2022, 01:26 AM. Reason: Typo

                    Comment

                    Working...
                    X