USING LINUX WITH EV3 DEVICES
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.
®
MultiConnect
PCIe MTPCIE-EV3 Developer Guide
61
Need help?
Do you have a question about the MultiConnect MTPCIE-EV3 and is the answer not in the manual?
Questions and answers