locked
How to achieve Serial(COM/USB) port communication? RRS feed

  • Question

  • Hello All,

    I am using MotoQ9H handset for windows mobile developement.

    In my project I need to turn on one of the pin of MotoQ9H. So need to do serial port communication.

    Code written is:

                lLastError = serial.Open(_T("COM1:"),0,0,false);
                if (lLastError != ERROR_SUCCESS)
                {
                    bErrFlag = true;
                    return true;
                }

               
                lLastError = serial.Setup(CSerial::EBaud4800,CSerial::EData8,CSerial::EParNone,CSerial::EStop1);
                if (lLastError != ERROR_SUCCESS)
                {
                    bErrFlag = true;
                    return true;
                }

     

    But its not working i.e its not opening the serial port.

    If I try to to COM4 instead of COM1 in serial.open then its turn on the Bluetooth i.e code working for COM4.

     

    Can u pls help me out and tell me How we can turn on the pin of handset using Serial port communication.

    Wednesday, April 14, 2010 4:40 AM