All i can do for you is that i can provide you the way to clear and set DTR. Here it is....
You have to #include<sys/ioctl.h>
m_hCom is the handle to the Port or ttyS0
Code:
//________________________Set_DTR__________________bool Set_DTR(void)
{
int nRet;
int status;
status = 0;
nRet = ioctl(m_hCom, TIOCMGET,&status);
if(nRet < 0) return FALSE;
status |= TIOCM_DTR;
nRet = ioctl(m_hCom, TIOCMSET, &status);
if(nRet < 0) return FALSE;
return TRUE;
}
//________________________Clr_DTR__________________bool Clr_DTR(void)
{
int nRet;
int status;
status = 0;
nRet = ioctl(m_hCom, TIOCMGET,&status);
if(nRet < 0) return FALSE;
status &= ~TIOCM_DTR;
nRet = ioctl(m_hCom, TIOCMSET, &status);
if(nRet < 0) return FALSE;
return TRUE;
}