CONTROL

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Juanjo

    #1

    CONTROL

    Hi, I need to know how can I send the CTRL + Z character
    to a modem
  • Dmitriy Lapshin [C# / .NET MVP]

    #2
    Re: CONTROL

    Hi,

    As far as I remember, the code of this character is 26. So you could send a
    byte with value 26 to the modem stream.

    Hope this answers your question.

    --
    Dmitriy Lapshin [C# / .NET MVP]
    X-Unity Test Studio

    Bring the power of unit testing to VS .NET IDE

    "Juanjo" <jjcarreno@inst asoft.es> wrote in message
    news:04e301c3c2 fe$66ab4d10$a50 1280a@phx.gbl.. .[color=blue]
    > Hi, I need to know how can I send the CTRL + Z character
    > to a modem[/color]

    Comment

    • Morten Wennevik

      #3
      Re: CONTROL



      --
      Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

      Comment

      • Juanjo

        #4
        Re: CONTROL

        [color=blue]
        >-----Original Message-----
        >Hi,
        >
        >As far as I remember, the code of this character is 26.[/color]
        So you could send a[color=blue]
        >byte with value 26 to the modem stream.
        >
        >Hope this answers your question.
        >
        >--
        >Dmitriy Lapshin [C# / .NET MVP]
        >X-Unity Test Studio
        >http://x-unity.miik.com.ua/teststudio.aspx
        >Bring the power of unit testing to VS .NET IDE
        >
        >"Juanjo" <jjcarreno@inst asoft.es> wrote in message
        >news:04e301c3c 2fe$66ab4d10$a5 01280a@phx.gbl. ..[color=green]
        >> Hi, I need to know how can I send the CTRL + Z character
        >> to a modem[/color]
        >
        >.
        >thank you very much, I think I do it before, but I will[/color]
        try to do it again. bye

        Comment

        • Juanjo

          #5
          Re: CONTROL

          I don´t know what is the problem but my gsm modem doesn´t
          work with this lines of code

          Buffer = "AT+CMGF = 1" + (char) 13;
          oBuffer = (object)Buffer;
          axNETComm1.set_ Output(ref oBuffer);


          Buffer = "AT+CSDH = 1" + (char) 13;
          oBuffer = (object)Buffer;
          axNETComm1.set_ Output(ref oBuffer);

          Buffer = "AT+CSMP = 17,167,0,0" +
          (char) 13;
          oBuffer = (object)Buffer;
          axNETComm1.set_ Output(ref oBuffer);

          Buffer = "AT+CSCA
          = '+34607003115'" + (char) 13;
          oBuffer = (object)Buffer;
          axNETComm1.set_ Output(ref oBuffer);


          Buffer = "AT+CMGS
          = '+34624713696'" + (char) 13;
          oBuffer = (object)Buffer;
          axNETComm1.set_ Output(ref oBuffer);

          Buffer = "this is a SMS from my
          computer" + (char) 26;
          oBuffer = (object)Buffer;
          axNETComm1.set_ Output(ref oBuffer);



          this is a part of the code of one example that I obtain
          from AxNETCommOCX, any suggestion??

          Comment

          • Juanjo

            #6
            Re: CONTROL

            thank you for your suggestions.


            Comment

            • Dmitriy Lapshin [C# / .NET MVP]

              #7
              Re: CONTROL

              >oBuffer = (object)Buffer;

              I suppose the problem is with this (and similar) lines. You can try passing
              the Buffer variable itself as an argument. Unfortunately, I have never
              worked with the ActiveX you use so I probably cannot be more helpful.

              Then, this type cast:

              (char) 13

              looks suspicious to me. You can try specifying special characters like this:

              Buffer = "AT+CMGF = 1\x0d";

              --
              Dmitriy Lapshin [C# / .NET MVP]
              X-Unity Test Studio

              Bring the power of unit testing to VS .NET IDE

              "Juanjo" <jjcarreno@inst asoft.es> wrote in message
              news:046901c3c3 1b$e064edb0$a00 1280a@phx.gbl.. .
              I don´t know what is the problem but my gsm modem doesn´t
              work with this lines of code

              Buffer = "AT+CMGF = 1" + (char) 13;
              oBuffer = (object)Buffer;
              axNETComm1.set_ Output(ref oBuffer);


              Buffer = "AT+CSDH = 1" + (char) 13;
              oBuffer = (object)Buffer;
              axNETComm1.set_ Output(ref oBuffer);

              Buffer = "AT+CSMP = 17,167,0,0" +
              (char) 13;
              oBuffer = (object)Buffer;
              axNETComm1.set_ Output(ref oBuffer);

              Buffer = "AT+CSCA
              = '+34607003115'" + (char) 13;
              oBuffer = (object)Buffer;
              axNETComm1.set_ Output(ref oBuffer);


              Buffer = "AT+CMGS
              = '+34624713696'" + (char) 13;
              oBuffer = (object)Buffer;
              axNETComm1.set_ Output(ref oBuffer);

              Buffer = "this is a SMS from my
              computer" + (char) 26;
              oBuffer = (object)Buffer;
              axNETComm1.set_ Output(ref oBuffer);



              this is a part of the code of one example that I obtain
              from AxNETCommOCX, any suggestion??

              Comment

              Working...