Hi,Thanks for your help
Yes,the reset pin is not controlled by the MCU ,is tied to high(Vcc)and the baud rate is set to 19200.
The message is below:
BOOL ANT_ResetSystem()
{
Uint8 antBuf[5];
int ret;
antBuf[0] = MESG_TX_SYNC;
antBuf[1] = MESG_OPEN_CHANNEL_SIZE;//0x01;
antBuf[2] = MESG_SYSTEM_RESET_ID;//0x4A;
antBuf[3] = 0;
antBuf[4] = CheckSum_Calc8(antBuf, 4);
ret=write(uart_fd, antBuf,5);
}
BOOL ANT_OpenChannel(Uint8 ucChannel)
{
Uint8 aucTxFifo[TX_FIFO_SIZE];
Uint8 ucTotalSize;
int ret=0;
aucTxFifo[0] =MESG_TX_SYNC;
aucTxFifo[1] = MESG_OPEN_CHANNEL_SIZE;
aucTxFifo[2] = MESG_OPEN_CHANNEL_ID;
aucTxFifo[3] = ANT_NETWORK_NUM;//0;
aucTxFifo[4] = CheckSum_Calc8(aucTxFifo, 4);
ret=write(uart_fd, &aucTxFifo;[0],5);
if(!ANT_GetResponse(rspBuf,5,ANT_WAIT_TIME))
return FALSE;
if(rspBuf[1]==MESG_RESPONSE_EVENT_ID &&
rspBuf[2]==ucChannel &&
rspBuf[3]==MESG_OPEN_CHANNEL_ID &&
rspBuf[4]==RESPONSE_NO_ERROR)
return TRUE;
return FALSE;
}