
78 MAKING THINGS TALK
Second, remember that serial data can be sent either
as ASCII or as raw binary values, and which you choose
to use depends both on the capabilities and limitations
of the devices you’re connecting, and on all the devices
in the middle that connect them. It might not be wise to
send raw binary data, for example, if the modems or the
software environments you program in are optimized for
ASCII data transfer.
Third, when you think about your project, think about the
messages that need to be exchanged, and come up with
a data protocol that adequately describes all the informa-
tion you need to send. This is your data packet. You might
want to add header bytes, separators, or tail bytes to make
reading the sequence easier.
Conclusion
The projects in this chapter have covered a number of ideas that are central to all
networked data communication. First, keep in mind that data communication is based
on a layered series of agreements, starting with the physical layer, then the electrical,
the logical, the data, and finally the application layer. Keep these layers in mind as you
design and troubleshoot your projects and you’ll find it easier to isolate problems
mode with ATUCL\r and following the same steps as
previously.
Because the AT commands are just text strings, you can
easily use them in microcontroller programs to control the
module, make and break connections, ...