Professional Documents
Culture Documents
com>
Robert Faludi
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.
O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions
are also available for most titles (http://my.safaribooksonline.com). For more information, contact our
corporate/institutional sales department: 800-998-9938 or corporate@oreilly.com.
Printing History:
December 2010: First Edition.
Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of
O’Reilly Media, Inc. Building Wireless Sensor Networks, the image of dachshunds, and related trade dress
are trademarks of O’Reilly Media, Inc.
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as
trademarks. Where those designations appear in this book, and O’Reilly Media, Inc., was aware of a
trademark claim, the designations have been printed in caps or initial caps.
While every precaution has been taken in the preparation of this book, the publisher and author assume
no responsibility for errors or omissions, or for damages resulting from the use of the information con-
tained herein.
TM
ISBN: 978-0-596-80773-3
[M]
1292271061
Table of Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
1. Getting Ready . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Buying an XBee Radio 1
Hardware 1
Antennas 4
Vendors 6
Buying an Adapter 6
Digi Evaluation Board 7
USB Adapters 7
Breakout Boards 10
Arduino Board Adapter Hack 12
What Are All Those Pins? 15
Choosing a Terminal Program 15
Firmware Update Software 17
Terminal Software for Configuring Settings 17
Summary 20
2. Up and Running . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Radio Basics 23
Electromagnetic Spectrum 24
Inverse Square Law 24
Introduction to ZigBee 25
Network Topology 27
Addressing Basics 28
PAN Addresses 29
Channels 29
All Together Now 29
XBee Firmware Updates 32
Reading Current Firmware and Configuration 35
Configuring XBee 40
v
Settings 40
Connecting from Windows 41
Connecting from Macintosh 43
Command Mode and Transparent Mode 46
AT Commands (Are Your Friend) 47
Using AT Commands 49
Basic ZigBee Chat 50
Parts 50
Addresses 50
Coordinator 51
Router 53
Two Computers 53
One Computer 54
Chat 54
Download from Wow! eBook <www.wowebook.com>
Troubleshooting 55
Success! 56
vi | Table of Contents
XBee Direct Limitations 88
XBee I/O Features 89
AT Configuration I/O Commands 90
Advanced I/O Commands 93
Romantic Lighting Sensor 93
Basic Romantic Lighting Sensor 93
Prepare the Sensor Board 97
Prepare the Base Station 99
Romantic Lighting Sensor with Feedback 104
API Ahead 109
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
Table of Contents | ix