请问大虾:我正在做两个猫之间的通讯,主要是传输一些字符串但是我串过去以后接收到只收到NO两个字符,无论传输什么请问这是为什么?如何解决?我用的是串口命令加上AT指令

解决方案 »

  1.   

    当串口都初始化成功后!
    CString str;
    str="ATS0=1";
    str.Format("%s",str);
    m_hScom.SetOutput((COleVariant(str));
    捕获串口接收到字符串的事件
    当连接成功后发送数据
    CString str1;
    str1="LOGIN 01";
    m_hScom.SetOutoput((ColeVariant(str1));
    此时在接受端就收到了一个NO字符串
      

  2.   

    See the sample below, maybe useful: http://www.codeguru.com/network/RasClient.shtml
      

  3.   

    See the links below, useful: http://www.codeproject.com/useritems/tserial_event.asp
    http://www.codeproject.com/useritems/CheckRASandModem.asp
    http://www.codeproject.com/useritems/rras.asp
      

  4.   

    //其中S0=n(n>=1)自动应答.n为响铃次数;E0/E1关闭/打开命令字符回应;
    //Q0/Q1modem返回/不返回结果码;M0/M1关闭/打开MODEM扬声器,
     注意回车府的添加即可。