Preface |
|
vii | |
Acknowledgements |
|
xi | |
|
|
xxv | |
|
|
1 | (6) |
|
1.1 Organization of the Book |
|
|
1 | (6) |
|
1.1.1 How to Read This Book |
|
|
2 | (1) |
|
1.1.2 Software and Hardware Tools Used in This Book |
|
|
3 | (1) |
|
1.1.3 Conventions Used in the Book |
|
|
4 | (1) |
|
1.1.4 Security Keys and Certificates |
|
|
4 | (1) |
|
|
5 | (1) |
|
1.1.6 Feedback of the Book |
|
|
5 | (2) |
|
2 LTE Cellular Narrowband Internet of Things (NB-IoT) |
|
|
7 | (16) |
|
|
7 | (1) |
|
2.2 LTE Cellular Narrowband Internet of Things (NB-IoT) |
|
|
8 | (1) |
|
2.3 NB-IoT Applications and Scenarios |
|
|
9 | (1) |
|
|
9 | (1) |
|
|
10 | (1) |
|
|
10 | (1) |
|
2.5 Message Queue Telemetry Transport (MQTT) |
|
|
10 | (3) |
|
2.5.1 Publish/Subscribe Model 11 |
|
|
1 | (11) |
|
2.5.2 Topic and Subscription |
|
|
12 | (1) |
|
|
12 | (1) |
|
|
12 | (1) |
|
2.5.5 Quality of Service Levels |
|
|
13 | (1) |
|
|
13 | (2) |
|
2.7 Case Study for Smart City: City of Coral Gables, Florida |
|
|
15 | (5) |
|
2.7.1 IoT Use Cases in the Smart City Hub |
|
|
18 | (1) |
|
2.7.2 Smart City Hub IoT Dashboard |
|
|
19 | (1) |
|
2.8 Commercial NB-IoT Modems |
|
|
20 | (3) |
|
3 Installing and Setting up Hardware and Software |
|
|
23 | (8) |
|
3.1 NB-IoT Hardware Board and Software |
|
|
23 | (1) |
|
3.2 Installing Arduino IDE and NB-IoT Hardware Board Package |
|
|
24 | (1) |
|
|
25 | (1) |
|
3.4 Setting up the NB-IoT Hardware Board |
|
|
26 | (1) |
|
3.5 Arduino Serial Monitor |
|
|
27 | (4) |
|
4 Microcontroller and NB-IoT Modem Units |
|
|
31 | (12) |
|
4.1 Microcontroller Unit (MCU) |
|
|
31 | (1) |
|
4.2 Quectel BG96 LTE Cellular NB-IoT Modem |
|
|
32 | (1) |
|
4.3 Key Features of the NB-IoT Hardware Board for Arduino |
|
|
32 | (5) |
|
4.4 Inside NB-IoT Hardware Board for Arduino |
|
|
37 | (5) |
|
4.5 Connecting the NB-IoT Hardware Board to the Computer |
|
|
42 | (1) |
|
|
43 | (26) |
|
|
44 | (1) |
|
|
45 | (1) |
|
5.3 Status Control Commands |
|
|
46 | (2) |
|
|
48 | (2) |
|
5.5 Packet Domain Commands |
|
|
50 | (1) |
|
|
50 | (2) |
|
|
52 | (4) |
|
|
56 | (3) |
|
|
59 | (2) |
|
|
61 | (2) |
|
|
63 | (1) |
|
5.12 Firmware Update Commands |
|
|
64 | (1) |
|
5.13 Mobile Operator Configuration |
|
|
65 | (1) |
|
|
66 | (3) |
|
6 Data Serialization and Deserialization |
|
|
69 | (18) |
|
6.1 JavaScript Object Notation (JSON) Format |
|
|
69 | (1) |
|
|
70 | (1) |
|
6.3 JSON Library for Arduino |
|
|
70 | (1) |
|
6.4 Arduino Sketch with JSON |
|
|
71 | (2) |
|
6.5 Concise Binary Object Representation (CBOR) Format |
|
|
73 | (1) |
|
|
74 | (3) |
|
6.7 Major Type 0 (Unsigned Integer) |
|
|
77 | (1) |
|
6.8 Major Type 1 (Signed Integer) |
|
|
77 | (1) |
|
6.9 Major Type 2 (Byte Strings) |
|
|
78 | (1) |
|
6.10 Major Type 3 (Text Strings) |
|
|
78 | (1) |
|
6.11 Major Type 4 (Arrays) |
|
|
78 | (1) |
|
|
79 | (1) |
|
6.13 Major Type 7 (Floating-Point Number) |
|
|
79 | (1) |
|
6.14 CBOR Compact Data Size |
|
|
80 | (1) |
|
6.15 Arduino Sketch with CBOR |
|
|
81 | (3) |
|
|
84 | (3) |
|
7 Amazon Web Services for IoT Devices (AWS IoT) |
|
|
87 | (32) |
|
7.1 AWS IoT Device Management and Configuration |
|
|
88 | (1) |
|
7.2 Registering the Thing |
|
|
89 | (1) |
|
7.3 Creating Security Certificates |
|
|
89 | (6) |
|
|
95 | (4) |
|
|
99 | (4) |
|
|
103 | (4) |
|
7.7 Arduino Client Sketch with AWS IoT |
|
|
107 | (8) |
|
7.8 AWS IoT Device Communication and Testing |
|
|
115 | (4) |
|
|
119 | (20) |
|
8.1 Accessing AWS DynamoDB Data |
|
|
119 | (1) |
|
8.2 Setting AWS Credentials and Region |
|
|
119 | (1) |
|
8.3 Using Node.js and JavaScript APIs for AWS SDK |
|
|
120 | (1) |
|
8.4 Read Single Records in DynamoDB |
|
|
121 | (1) |
|
8.5 JavaScript for Reading the DynamoDB |
|
|
121 | (1) |
|
8.6 Read All Records in DynamoDB |
|
|
122 | (3) |
|
8.7 Visualizing GPS Geo-Location Using Google Maps |
|
|
125 | (6) |
|
8.7.1 Get the Google Maps API |
|
|
125 | (1) |
|
8.7.2 Initializing Google Maps Using JavaScript API |
|
|
126 | (1) |
|
8.7.3 Retrieving the GPS location from the DynamoDB |
|
|
127 | (2) |
|
8.7.4 Displaying the GPS Geo-Location in a Web Browser |
|
|
129 | (2) |
|
8.8 Data Visualization Using Charts |
|
|
131 | (8) |
|
8.8.1 Installing Chart.js Library |
|
|
131 | (1) |
|
8.8.2 Prepare an Area in Web Page to Render Chart |
|
|
131 | (1) |
|
8.8.3 Reading and Preparing the Data from DynamoDB |
|
|
132 | (1) |
|
|
133 | (1) |
|
8.8.5 Create Complete Web Page |
|
|
133 | (3) |
|
8.8.6 Rendering the Chart |
|
|
136 | (3) |
|
|
139 | (48) |
|
|
141 | (8) |
|
9.1 Hardware and Software Component Required |
|
|
141 | (1) |
|
9.2 Setup Steps and Diagram |
|
|
141 | (1) |
|
|
142 | (7) |
|
10 Transmission Control Protocol (TCP) |
|
|
149 | (6) |
|
10.1 Hardware Setup, Steps, and Diagram |
|
|
149 | (1) |
|
|
149 | (6) |
|
11 Secure Socket Layer (SSL) Connection |
|
|
155 | (6) |
|
11.1 Hardware Setup, Steps, and Diagram |
|
|
155 | (1) |
|
|
155 | (6) |
|
12 Message Queue Telemetry Transport (MQTT) |
|
|
161 | (6) |
|
12.1 Hardware Setup, Steps, and Diagram |
|
|
161 | (1) |
|
|
161 | (6) |
|
13 Location and GPS Tracking |
|
|
167 | (8) |
|
13.1 Hardware Setup, Steps, and Diagram |
|
|
167 | (1) |
|
|
167 | (1) |
|
|
168 | (3) |
|
13.4 Interface with the Cloud |
|
|
171 | (4) |
|
14 Hypertext Transfer Protocol (HTTP) |
|
|
175 | (6) |
|
14.1 Hardware Setup, Steps, and Diagram |
|
|
175 | (1) |
|
|
175 | (6) |
|
15 NB-IoT Modem Firmware Update |
|
|
181 | (6) |
|
15.1 Hardware Setup, Steps, and Diagram |
|
|
181 | (1) |
|
|
181 | (6) |
|
|
187 | (72) |
|
|
189 | (8) |
|
16.1 Hardware Component Required |
|
|
189 | (1) |
|
|
189 | (3) |
|
|
192 | (1) |
|
|
193 | (1) |
|
|
194 | (3) |
|
17 Making Sound Using Active Buzzer |
|
|
197 | (4) |
|
17.1 Hardware Component Required |
|
|
197 | (1) |
|
|
197 | (1) |
|
|
198 | (1) |
|
|
199 | (1) |
|
|
199 | (2) |
|
18 Making Sound Using Passive Buzzer |
|
|
201 | (4) |
|
18.1 Hardware Component Required |
|
|
201 | (1) |
|
|
201 | (1) |
|
|
202 | (1) |
|
|
203 | (1) |
|
|
204 | (1) |
|
|
205 | (6) |
|
19.1 Hardware Component Required |
|
|
205 | (1) |
|
|
205 | (2) |
|
|
207 | (1) |
|
|
207 | (1) |
|
|
208 | (3) |
|
|
211 | (6) |
|
20.1 Hardware Component Required |
|
|
211 | (1) |
|
|
211 | (2) |
|
|
213 | (1) |
|
|
214 | (1) |
|
|
215 | (2) |
|
|
217 | (6) |
|
21.1 Hardware Component Required |
|
|
217 | (1) |
|
|
217 | (2) |
|
|
219 | (1) |
|
|
220 | (1) |
|
|
221 | (2) |
|
22 Infra-Red (IR) Receiver |
|
|
223 | (6) |
|
22.1 Hardware Component Required |
|
|
223 | (1) |
|
|
223 | (2) |
|
|
225 | (1) |
|
|
226 | (1) |
|
|
226 | (3) |
|
23 Radio Frequency Identification |
|
|
229 | (8) |
|
23.1 Hardware Component Required |
|
|
229 | (1) |
|
|
229 | (3) |
|
|
232 | (1) |
|
|
232 | (2) |
|
|
234 | (3) |
|
24 Eight LED and Shift Register |
|
|
237 | (10) |
|
24.1 Hardware Component Required |
|
|
237 | (1) |
|
|
237 | (2) |
|
|
239 | (1) |
|
|
240 | (1) |
|
|
241 | (1) |
|
24.6 Arduino Sketch Using the Serial Monitor |
|
|
242 | (5) |
|
|
247 | (6) |
|
25.1 Hardware Component Required |
|
|
247 | (1) |
|
|
247 | (2) |
|
|
249 | (1) |
|
|
249 | (1) |
|
|
250 | (3) |
|
|
253 | (6) |
|
26.1 Hardware Component Required |
|
|
253 | (1) |
|
|
254 | (1) |
|
|
255 | (1) |
|
|
256 | (1) |
|
|
256 | (3) |
|
|
259 | (58) |
|
|
261 | (6) |
|
27.1 Hardware Component Required |
|
|
261 | (1) |
|
|
261 | (1) |
|
|
262 | (1) |
|
|
263 | (1) |
|
|
263 | (1) |
|
27.6 Interface with the Cloud |
|
|
264 | (3) |
|
|
267 | (6) |
|
28.1 Hardware Component Required |
|
|
267 | (1) |
|
|
267 | (1) |
|
|
268 | (1) |
|
|
269 | (1) |
|
|
270 | (1) |
|
28.6 Interface with the cloud |
|
|
271 | (2) |
|
|
273 | (8) |
|
29.1 Hardware Component Required |
|
|
273 | (1) |
|
|
273 | (2) |
|
|
275 | (1) |
|
|
276 | (1) |
|
|
276 | (2) |
|
29.6 Interface with the Cloud |
|
|
278 | (3) |
|
30 Temperature and Humidity Sensor |
|
|
281 | (8) |
|
30.1 Hardware Component Required |
|
|
281 | (1) |
|
|
281 | (1) |
|
|
282 | (1) |
|
|
283 | (1) |
|
|
283 | (3) |
|
30.6 Interface with the Cloud |
|
|
286 | (3) |
|
31 Water Level Detection Sensor |
|
|
289 | (6) |
|
31.1 Hardware Component Required |
|
|
289 | (1) |
|
|
289 | (1) |
|
|
290 | (1) |
|
|
291 | (1) |
|
|
291 | (2) |
|
31.6 Interface with the Cloud |
|
|
293 | (2) |
|
32 Microphone Sound Sensor |
|
|
295 | (6) |
|
32.1 Hardware Component Required |
|
|
295 | (1) |
|
|
296 | (1) |
|
|
296 | (1) |
|
|
297 | (1) |
|
|
297 | (2) |
|
32.6 Interface with the Cloud |
|
|
299 | (2) |
|
|
301 | (8) |
|
33.1 Hardware Component Required |
|
|
301 | (1) |
|
|
301 | (2) |
|
|
303 | (1) |
|
|
304 | (1) |
|
|
304 | (1) |
|
33.6 Interface with the Cloud |
|
|
305 | (4) |
|
|
309 | (8) |
|
34.1 Hardware Component Required |
|
|
309 | (1) |
|
|
309 | (2) |
|
|
311 | (1) |
|
|
312 | (1) |
|
|
312 | (2) |
|
34.6 Interface with the Cloud |
|
|
314 | (3) |
|
|
317 | (31) |
|
|
319 | (6) |
|
35.1 Hardware Component Required |
|
|
319 | (1) |
|
|
319 | (2) |
|
|
321 | (1) |
|
|
321 | (1) |
|
35.5 Interface with the Cloud |
|
|
322 | (3) |
|
|
325 | (12) |
|
36.1 Hardware Component Required |
|
|
325 | (1) |
|
|
326 | (3) |
|
|
329 | (1) |
|
|
329 | (1) |
|
|
330 | (1) |
|
36.6 Interface with the Cloud |
|
|
331 | (3) |
|
36.7 Controlling Stepper Motor with Remote |
|
|
334 | (1) |
|
|
334 | (1) |
|
|
334 | (1) |
|
|
335 | (2) |
|
|
337 | (6) |
|
37.1 Hardware Component Required |
|
|
337 | (1) |
|
|
337 | (1) |
|
|
338 | (1) |
|
|
339 | (1) |
|
|
339 | (1) |
|
37.6 Interface with the Cloud |
|
|
340 | (3) |
|
|
343 | (5) |
References |
|
348 | (1) |
Index |
|
349 | |