USING LINUX WITH H5 DEVICES
else
printf ( "%s\n", "succeed" );
}
return (fd);
}
int main()
{
int serialFD = open_port(USB);
char buf[BUFSIZE];
memset(buf,0,BUFSIZE);
write(serialFD, "AT\r" , strlen("AT\r"));
sleep(1);
read( serialFD, buf, BUFSIZE );
printf("The string is: %s\n", buf);
close(serialFD);
return 0;
}
The sleep instruction is required because the modem response after issuing the AT command is not immediate, so
you need to wait a bit before reading. There are more efficient ways to do this, for example, you can put the read
call in a while loop and exit when the read buffer contains a certain string.
74
TM
MultiConnect
PCIe MTPCIE-H5/MTPCIE-BW Developer Guide
Need help?
Do you have a question about the MultiConnect MTPCIE-H5 and is the answer not in the manual?
Questions and answers