Multitech MultiConnect MTPCIE-H5 Developer's Manual page 74

Hide thumbs Also See for MultiConnect MTPCIE-H5:
Table of Contents

Advertisement

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

Advertisement

Table of Contents
loading

This manual is also suitable for:

Multiconnect mtpcie-bw

Table of Contents