How can i control my Pan Tilt Pod 5 metres along from my PC

PaulS:

Could you tell me what is my problem here ?

Must be the blue shirt you are wearing. Try a green one.

See, that answer makes as little sense as your question. Not that there is a problem with the question, but there is absolutely no context for it, and it is completely unrelated to how to use a 5 meter cable to stretch 10 meters.

What operating system are you using? Clearly, it isn't windows.
What application are you trying to use to talk to the serial port?

Thanks Pauls, sorry for my missing,
i'm using CentOS 6 and using qextserialport class in Qt to talk to the serial port.

Here is a part of my code in Qt (just do as some guide on the internet)
void ControlWidget::initPanTilt()
{

  • port = new QextSerialPort("/dev/ttyACM0");*
  • port->setBaudRate(BAUD9600);*
  • port->setFlowControl(FLOW_OFF);*
  • port->setParity(PAR_NONE);*
  • port->setDataBits(DATA_8);*
  • port->setStopBits(STOP_2);*
  • if (port->open(QIODevice::ReadWrite))*
  • {*
  • cerr << "Opened ttyACM0" << endl;*
  • }*
    }
    void ControlWidget::PanLeft()
    {
    _ if (*panPos >= 0x05)_
  • {*
    _ *panPos = *panPos - 0x05;_
  • }*
  • else*
  • {*
    _ *panPos = 0x00;_
  • }*
  • writePanTilt();*
    }
    void ControlWidget::PanRight()
    {
    _ if (*panPos <= 0xaf)_
  • {*
    _ *panPos = *panPos + 0x05;_
  • }*
  • else*
  • {*
    _ *panPos = 0xb4;_
  • }*
  • writePanTilt();*
    }
    void ControlWidget::TiltDown()
    {
    _ if (*tiltPos >= 0xba)_
  • {*
    _ *tiltPos = *tiltPos - 0x05;_
  • }*
  • else*
  • {*
    _ *tiltPos = 0xb5;_
  • }*
  • writePanTilt();*
    }
    void ControlWidget::TiltUp()
    {
    _ if (*tiltPos <= 0xf5)_
  • {*
    _ *tiltPos = *tiltPos + 0x05;_
  • }*
  • else*
  • {*
    _ *tiltPos = 0xfa;_
  • }*
  • writePanTilt();*
    }
    void ControlWidget::writePanTilt()
    {
  • if (port->isOpen())*
  • {*
    port->write(reinterpret_cast < const char* >(panPos), 1);
    port->write(reinterpret_cast < const char* >(tiltPos), 1);
  • port->flush();*
  • }*
    }

everything work fines with the 1m usb cable but when i try to use 5m usb cable, the problem is same as i've describe before.
Is it the problem with length of the cable ?