Figure 1.1 An advertisement to promote product from Häfele ...1Figure 1.2 Available service at Airbnb...2 Figure 1.3 Design concept of Smarthome services ...6 Figure 1.4 Black box design
Trang 1ĐẠI HỌC QUỐC GIA TP HCM
TRƯỜNG ĐẠI HỌC BÁCH KHOA
Trang 2TRƯỜNG ĐẠI HỌC BÁCH KHOA –ĐHQG -HCM
Cán bộ hướng dẫn khoa học :
(Ghi rõ họ, tên, học hàm, học vị và chữ ký) Cán bộ chấm nhận xét 1 :
(Ghi rõ họ, tên, học hàm, học vị và chữ ký) Cán bộ chấm nhận xét 2 :
(Ghi rõ họ, tên, học hàm, học vị và chữ ký) Luận văn thạc sĩ được bảo vệ tại Trường Đại học Bách Khoa, ĐHQG Tp HCM ngày tháng năm
Thành phần Hội đồng đánh giá luận văn thạc sĩ gồm: (Ghi rõ họ, tên, học hàm, học vị của Hội đồng chấm bảo vệ luận văn thạc sĩ) 1
2
3
4
5
Xác nhận của Chủ tịch Hội đồng đánh giá LV và Trưởng Khoa quản lý chuyên ngành sau khi luận văn đã được sửa chữa (nếu có) CHỦ TỊCH HỘI ĐỒNG TRƯỞNG KHOA…………
Trang 3
NHIỆM VỤ LUẬN VĂN THẠC SĨ Họ tên học viên: Trần Bảo Ân MSHV: 1670543
Ngày, tháng, năm sinh: 22/10/1993 Nơi sinh: Tp HCM
Chuyên ngành: Kỹ thuật cơ điện tử Mã số : 60520114
I TÊN ĐỀ TÀI: THIẾT KẾ HỆ THỐNG KHÓA CỬA ĐIỆN TỬ
DESIGN AN ELECTRONIC DOOR LOCK SYSTEM
II NHIỆM VỤ VÀ NỘI DUNG: - Tìm hiểu tổng quan về sản phẩm khóa cửa điện tử
- Tìm hiểu và thiết kế giải thuật kết nối mạng và bảo mật cho khóa cửa điện tử
- Thiết kế các lược đồ hoạt động của hệ thống và thực nghiệm
III NGÀY GIAO NHIỆM VỤ : (Ghi theo trong QĐ giao đề tài)
IV NGÀY HOÀN THÀNH NHIỆM VỤ: (Ghi theo trong QĐ giao đề tài)
V CÁN BỘ HƯỚNG DẪN (Ghi rõ học hàm, học vị, họ, tên): Tiến sĩ Trần Việt Hồng
Tp HCM, ngày tháng năm 20
CÁN BỘ HƯỚNG DẪN (Họ tên và chữ ký) CHỦ NHIỆM BỘ MÔN ĐÀO TẠO (Họ tên và chữ ký) TRƯỞNG KHOA….………
(Họ tên và chữ ký)
Trang 4Ho Chi Minh city, 4th Dec, 2017
Trần Bảo Ân
Trang 5Trong quá trình nghiên cứu và báo cáo khoa học, tôi luôn nghe được lời khuyên:
“Nghiên cứu khoa học không phải là một báo cáo đơn thuần, mà phải là một câu chuyện sống động”
Tôi đã viết chương đầu tiên của câu chuyện này vào năm 2016 Câu chuyện này chưa kết thúc vào năm ấy, vì bây giờ câu chuyện sẽ được tiếp nối Một chương mới đầy hấp dẫn sẽ được kể trong phần tiếp theo của báo cáo
Phần tổng quan sẽ cung cấp thông tin về tương lai của sản phẩm Smart lock Nó có tiềm năng cũng như có rủi ro khi phát triển Và rủi ro lớn nhất là An ninh mạng Thiết kế sẽ bắt đầu
từ hộp đen đến thiết kế chi tiết, từ kết nối đơn thuần đến bảo mật cấp cao Mô hình dòng chảy
dữ liệu cũng được thiết kế và sẽ được kiểm chứng bằng thực nghiệm
Charlie Munger đã nói: “Lấy một ý tưởng đơn giản và giải quyết nó nghiêm túc” Đó cũng là ý tưởng mà câu chuyện mà tôi mang đến, không chỉ đưa ra cách thiết kế Smart lock
mà còn là những sản phẩm IoT sau này nữa
- During research and technical presentation, I always heard that:“A Scientific Research should be a story, instead of a mere report”
I have written its first season during my thesis in 2016 - Design a electronic Door Lock Stories doesn’t end up like that Now, I continue to write the following season A very sexy one that bring you a panoramic and structured view of the whole Door Lock system
An overview section will bring information about future of Smart lock product It has potential as well as risk when developing The most critical issue is cyber attack on Smart lock A design will go from Black box to detail design, from connectivity to security A model
of data stream will also given A prototype is built up to validate designed function
“Take a simple idea and take it seriously” - Charlie Munger That is the idea of this document which not only shows the way to design Smart lock but also to design IoT devices
in the future
Trang 6GUARANTEE
I will guarantee this research is my independent study All data and figure have reference and publish correctly All results has been written myself and they have never been published in other technical research
Trần Bảo Ân
Trang 7CHAPTER 1: OVERVIEW 1
Reason to develop a Smart Lock 11.1
Customer need 11.1.1
Market trend 11.1.2
Downside of having a Smart Lock 21.2
Its technology is expensive .21.2.1
Steep learning curve 31.2.2
Internet reliability 31.2.3
Cyber attack 31.2.4
Invasion of Privacy 31.2.5
Security Flaws 41.2.6
Summary 41.2.7
Cyber attack on Smart Lock 41.3
Design of a Doorlock system 51.4
Blackbox 51.4.1
Interstice for cyber attack 71.4.2
Function of existing product 71.4.3
Research of previous study 91.5
Objective, purpose and scope 91.6
Objective 91.6.1
Trang 8Smart lock design in the previous study 112.1.
Plan selection 112.2
Connection selection 112.3
IoT Platform - Cloud service selection 132.4
Thinger.io platform 142.4.1
ThingSpeak platform 152.4.2
Ibm platform 162.4.3
Comparison 162.4.4
Wireless module selection 172.5
Schematic 182.6
CHAPTER 3: SYSTEM DESIGN 19
Black box revealing 193.1
Design for communication 213.2
Bluetooth communication 213.2.1
WiFi communication 1 - Microcontroller, ESP8266 and ThingSpeak 213.2.2
WiFi communication - ThingSpeak and App 223.2.3
Design for security 233.3
Connection 1 - Bluetooth connection with advance protection 233.3.1
Connection 2 - WiFi connection between ESP8266 and Modem 263.3.2
Connection 3 - Security of Cloud Platform 273.3.3
Connection 4 - WiFi connection between Phone and Cloud Platform 283.3.4
Conclusion 283.4
CHAPTER 4: INNOVATION AND FINALIZATION 30
Functionality of study product 304.1
Trang 9One-time key access 314.2.1.
One-time key access via SMS 314.2.2
Changing password process 344.3
Data stream 354.4
System under harsh conditions 384.5
Phone lost 384.5.1
Electricity and Internet lost 394.5.2
Conclusion 394.6
CHAPTER 5: EXPERIMENTS 41
Purpose of experiments 415.1
Set-up a model 415.2
Wide range access via Internet 425.3
One-time key access via SMS 455.4
Conclusion 485.5
CHAPTER 6: CONCLUSION AND FUTURE DIRECTION 49
Achievement 496.1
Weakness 496.2
Future direction 496.3
Trang 10Figure 1.1 An advertisement to promote product from Häfele 1
Figure 1.2 Available service at Airbnb 2
Figure 1.3 Design concept of Smarthome services 6
Figure 1.4 Black box design of a Smartlock system 7
Figure 1.5 Functionality of existing product 8
Figure 1.6 Secure function introduced in last study 9
Figure 2.1 Option 1 for connection selection 12
Figure 2.2 Option 2 for connection selection 12
Figure 2.3 A real-time dashboards used to display weather condition by Thinger.io 14 Figure 2.4 Diagram of IoT system providing by ThingSpeak 15
Figure 2.5 A screenshot of Ibm Watson platform 16
Figure 2.6 An online catalogue sold ESP8266 in Vietnam 18
Figure 2.7 Schematic design 18
Figure 3.1 Black box of Lock 19
Figure 3.2 Black box of Internet 20
Figure 3.3 Schematic of system 20
Figure 3.4 Some key features in ThingSpeak 22
Figure 3.5 Schematic of system and its protection 23
Figure 3.6 Auto-changing code mechanism 23
Figure 3.7 Process on Smartphone 24
Figure 3.8 Process on Microcontroller 24
Figure 3.9 System is safe under replay-atack 25
Figure 3.10 System is safe under two phases of jam-and-relay-attack 25
Trang 11Figure 3.12 Thumbprint of api.thingspeak.com 27
Figure 3.13 Write and Read API Keys function in ThingSpeak 28
Figure 3.14 Design of system in term of connectivity and security 29
Figure 4.1 Functionality of study product 30
Figure 4.2 Generating one-time key access procedure 32
Figure 4.3 User Interface for selecting role: Guest or Host 32
Figure 4.4 Interface for Guest 33
Figure 4.5 Interface for Host 33
Figure 4.6 Interface of creating one-time key access for Host 34
Figure 4.7 A model of data streaming in Door Lock 35
Figure 4.8 Data streaming in closed range access via Bluetooth 36
Figure 4.9 Data streaming in wide range access via Internet 36
Figure 4.10 Data streaming in getting Lock notification and Tracking Log 37
Figure 4.11 Data streaming in Password changing 37
Figure 4.12 Data streaming in processing of one-time key access via SMS 38
Figure 5.1 Blue LCD module 1602 41
Figure 5.2 Some picture of used model for testing 42
Figure 5.3 Module NodeMCU WIFI ESP8266 V1.0 Source 42
Figure 5.4 Test setup for wide range access via Internet 43
Figure 5.5 Capability of ThingSpeak’s free user 43
Figure 5.6 Test procedure for Internet access: door closed 44
Trang 12Figure 5.11 Host successfully sent back SMS to Guest 47 Figure 5.12 Text message the Guest received 47 Figure 5.13 Guest successfully used One-time access key 48
Trang 13Table 1.1 Detail price of the popular smartlock on different market 2
Table 1.2 Burglary statistical in United State 2014 5
Table 2.1 Plan selection for Connection type 13
Table 2.2 Comparison of different platform for IoT application 16
Table 5.1 System response when using Wide range access function 45
Trang 14CHAPTER 1: OVERVIEW
Living in a home with smart home technology provides you with convenient
features Be a part of Smart Home, it is true that there are several advantages of having
a Smart Lock, but there are a few disadvantages of having it, too
Reason to develop a Smart Lock
1.1.
There are several reasons to bring this product on air
Customer need
1.1.1.
Convenience is what this product bring to life Home owner can provide access,
tracking status of his door remotely Also, mechanical key is unnecessary, it is
integrated into customer daily accessory - his smartphone
Market trend
1.1.2.
People notice that Internet of Thing is a coming event but people don’t realize
that how fast this trend is In Viet Nam, beside many Startup companies such as
Atovi Smart Lock, Häfele- a German company- has invested in Smart Lock section in
Viet Nam They promote a lot of program to advertise this product (Fig 1.1) Why an
international furniture company have interest in this field and invest that much to Viet
Nam?
Figure 1.1 An advertisement to promote product from Häfele
Source: keyless.vn
Trang 15This trend will not stop, back in 2015, no one in Viet Nam could imagine they
would use GrabBike rather than traditional taxi motorbike In fact it is
There is a rising service called Airbnb, AirBed and Breakfast, which allows user
to book homes and vacation rentals through an App Accompanied with Smartphone,
Smart Lock is a key feature to make this service alive (Fig 1.2)
Figure 1.2 Available service at Airbnb
Source: Airbnb.com
As it is unsure when these trend will explode Prepare and be a pioneer in this
field will bring vast opportunity to enterprise
Downside of having a Smart Lock
1.2.
Smart Lock product has six points which customer are not happy to have
Its technology is expensive
1.2.1.
Would customer pay more for more convenience door opening? How much will
they eager to pay? With the price $300 that state in the table 1.1, it’s hard to convince
customer
Standard
package
price
August Smart Lock Pro + Connect
$279
Danalock V3
249,00 €
Kwikset Kevo (2nd Gen)
$229.99
Khóa nhà Glock
5.990.000 dong
Trang 16Steep learning curve
1.2.2.
Learning how to operate smart lock is not difficult if you are a tech-savvy individual If your technology skills are not advanced, you will have to take time to learn how to use it This may require spending a significant amount of time consulting instruction manuals that teach you how to properly use the device Especially for developing country like Vietnam, even smartphone is not a new concept, there are many middle-aged people don’t get used to it
Internet reliability
1.2.3.
Since smart locks rely heavily on the strength of Internet connectivity, the system could experience problems on days when your internet signals are weak Poor internet strength could cause system fail or stall
Information stealing Hackers can get access to your personal files in
the event of a cyber-attack Not only is this dangerous for the residents
of your home, but it can leave you vulnerable to identity theft
Control overridden This is the worst scenario that can happen to your
system in which hacker can open your lock anytime they want
Invasion of Privacy
1.2.5.
Customer privacy from name, date of birth, address to phone number could bring customer to the case being spammed or even financial corruption These things are what happens with accounts that has been invaded by Meitu - a Chinese photo application at the beginning of 2017
Trang 17Security Flaws
1.2.6.
Smart lock technology is a new rising technology As a result, its technology can
be flawed
There are two primary reasons that this technology has flaws
Smart lock technology does not have industry standards
Some smart lock companies do not have extensive experience with information technology security [1]
Summary
1.2.7.
In 2017, it is true that these downside are existing But, in the near future, those points will be improved When technology and market are growing, here is what will happen:
Its technology becomes cheaper
People are getting more familiar with it, it takes less time to people to use this service
Internet connection is getting faster and more stable
There will be industry standards for smartlock
Till then, only two cons remaining: cyber attack and privacy invasion
In this report, “Cyber attack on Smart Lock” will be considered
Cyber attack on Smart Lock
1.3.
Before everyone freaks out about hacked locks, let's get real about the potential security risks around software-based locks A 2014 FBI report states that 57 percent of burglaries involve forcible entry (breaking a window, kicking down a door), 36 percent involve unlawful entry (entering through an unlocked window or an open garage door), and 7 percent involve attempted forcible entry [2]
Trang 18Burglary
Population group Forcible entry Unlawful entry Attempted forcible entry
Number of offenses known 893,999 540,614 99,907
Percentage
Table 1.2 Burglary statistical in United State 2014
https://ucr.fbi.gov/crime-in-the-u.s/2014/crime-in-the-u.s.-2014/offenses-known-to-law-enforcement/burglary That means home invasions related to hacking a smart device are rare enough that the FBI doesn't provide statistics on them That also means hacking a Smart lock was an unlikely route to take to access someone's home
From 2014 data, it seems that cyber attack is not a big concern However, in the circumstance that IoT and Industrial 4.0 are exploding, technology is growing Preparing for the future is not a bad idea at all!
Design of a Doorlock system
It comprises of 3 main parts:
Devices included constrained devices and high capacity devices
Phone with mobile application
Trang 19There are links between these parts to proceed control access and exchange data
Figure 1.3 Design concept of Smarthome services
Source: Security and Resilience of Smart Home Environments Good practices and
recommendations Study by European Union Agency For Network And Information Security
Base on design concept above, system will be modeled into 3 boxes: Phone,
Lock and Internet which connects to each other (fig.1.3)
Connection 1 - between Phone and Lock, often uses short ranged technology
BLE and NFC are preferable
Connection 2 - between Lock and Internet, to get system online, often used
Ethernet and Wifi
Connection 3 - between Phone and Internet uses common connect function of
Smartphone which are Wifi, 3G and 4G
Trang 20Figure 1.4 Black box design of a Smartlock system
Interstice for cyber attack
1.4.2.
There are 5 cracks for hackers to sneak in which will be investigated in the following chapters:
Crack in connection 1: Phone - Lock (fig.1.4)
Crack in connection 2: Lock - Internet (fig.1.4)
Crack in connection 3: Phone - Internet (fig.1.4)
Internet security itself
Guest key generation process
Function of existing product
1.4.3.
After research on popular product such as August and Kwikset, the working model is built as Fig.1.5
Trang 21Figure 1.5 Functionality of existing product
The working model describe a big picture include many Door Locks and many users Each Door Lock will have its closed-range-access via Bluetooth and wide-range-access via Internet All Locks are connected to the Internet User can use Internet to manipulate system remotely
Basic functionality consists of:
Closed range access via Bluetooth
Wide range access via Internet
Lock status notification / Tracking log
Password changing
One-time key access for Friend/Shipper/Neighbor
Trang 22Research of previous study
1.5.
Last study researchs on strengthen security of Smartphone and Door lock communication (Fig.1.6) The method called “auto-changing code” which combines RSA and rolling code mechanism
Figure 1.6 Secure function introduced in last study
By using auto-changing code method, Bluetooth communication is protected under common attach: replay attack and jam-and-relay attack
Objective, purpose and scope
1.6.
Objective
1.6.1.
Have a systematic understanding about Smartlock design on market
Propose a connected way for this product
Show risks where system is vulnerable to cyber attack and propose solution
Implement the design
Purpose
1.6.2.
Propose and design a connected and secured Smartlock:
Have all functions and features that other Smartlock has
More secured: connection Phone - Lock is protected by rolling code
Propose a way to create secured guest key - via SMS
Scope
1.6.3.
This thesis will not dig deep into Internet infrastructure and network
Trang 23Thesis structure
1.7.
Chapter 1: Overview Show the reasons why Smartlock needs to be developed Show
the downside of its and cyber attack will be the main focus Model Smartlock under black box, show the risks and direction of this study
Chapter 2: Selection of design plan Choose way of connection of system List out
and pick appropriate IoT Platform - Cloud service Select the Wireless Module
Chapter 3: System design Propose a process and components to make system online
Summary with schematics Find risks in which system are vulnerable and propose solution
Chapter 4: Innovation and finalization Compare existing product on market and
give innovation solution In this case, access request can be proceed in 2 ways: via Internet and SMS In the final part of the chapter, system will be fully made
Chapter 5: Experiment Some functions will be implemented and see how it works Chapter 6: Conclusion and future direction Make a conclusion and direction of
further development
Trang 24CHAPTER 2: SELECTION OF DESIGN PLAN
Smart lock design in the previous study
2.1.
As this research inherits the past study, last design will be reminded It is included:
Control parts:
- Use Smartphone to open/close lock
- Communicate Lock - Phone via Bluetooth
- Cryptography uses RSA
b) IoT Platform - Cloud service selection
c) Wireless module selection
Criterion to pick an option
All options are compared base on experience, observation of the author as there
is no official comparison of Smartlock solution
Point are marked by scale of 5: 5-very good, 4-good, 3-OK, 2-not good, 1-bad
Connection selection
2.3.
There are 4 types of wireless connection which are widely used in Smarthome application: Bluetooth, Wi-Fi, Zigbee and Z-wave
In this research, Bluetooth and Wi-Fi will be picked and focused
There will be two options to make system go online
Trang 25 Option 1:
Figure 2.1 Option 1 for connection selection
Option 2:
Trang 26No Criteria Option 1 Option 2
1 Range 2 Range will be limited by
Bluetooth connection Bluetooth SIG suggests a distance of at least 200 feet for a Bluetooth 4.0 device ~ 60m
4 Range will be limited by
Wi-Fi connection The Wi-Fi Alliance is claiming that Wi-
Fi Direct devices can reach each other at a maximum distance of 656 feet ~ 200m [3]
connected
devices
2 Number of connection will be
limited by Bluetooth shield connected to Modem A Bluetooth device can communicate with a maximum 7 devices in a piconet
4 Number of connection will
3 Each lock has to establish
connection with Modem A setup for Modem, microchip, Bluetooth shield and Wi-Fi shield is also needed
4 Each lock has to establish
connection with Modem
4 Components
- cost
4 Modem has to accompany
with microchip, Bluetooth shield and Wi-Fi shield
2 Each lock must have one
Wi-Fi shield more
Table 2.1 Plan selection for Connection type
According to table 2.1, option 2 will be chosen
IoT Platform - Cloud service selection
2.4.
There are several Cloud services that could be used for educational and commercial purpose They are Thinger.io platform, ThingSpeak platform and Ibm platform
Trang 272.4.1.2 Cloud Console
The Cloud Console is related with the management front-end designed for user to easily manage his devices and visualize its information in the cloud User can register devices, create real-time dashboards, access the devices API, and other management operations.[4]
Trang 28ThingSpeak platform
2.4.2.
ThingSpeak™ is an IoT analytics platform service that allows user to aggregate,
visualize and analyze live data streams in the cloud ThingSpeak provides instant
visualizations of data posted by user devices to ThingSpeak With the ability to
execute MATLAB® code in ThingSpeak user can perform online analysis and
processing of the data as it comes in ThingSpeak is often used for prototyping and
proof of concept IoT systems that require analytics
Figure 2.4 Diagram of IoT system providing by ThingSpeak
Source: https://thingspeak.com/pages/learn_more
On the left, they are the smart devices (the “things” in IoT) that live at the edge
of the network These devices collect data and include things like wearable devices,
wireless temperatures sensors, heart rate monitors, and hydraulic pressure sensors, and
machines on the factory floor
In the middle, it is the cloud where data from many sources is aggregated and
analyzed in real time, often by an IoT analytics platform designed for this purpose
The right side of the diagram depicts the algorithm development associated with
the IoT application Here an engineer or data scientist tries to gain insight into the
collected data by performing historical analysis on the data In this case, the data is
pulled from the IoT platform into a desktop software environment to enable the
engineer or scientist to prototype algorithms that may eventually execute in the cloud
or on the smart device itself
An IoT system includes all these elements ThingSpeak fits in the cloud part of
the diagram and provides a platform to quickly collect and analyze data from internet
connected sensors.[5]
Trang 29Ibm platform
2.4.3.
It is a platform builded by Ibm Watson Like Thinger.io platform and
ThingSpeak platform, It provide a place to store data and analyze it
Figure 2.5 A screenshot of Ibm Watson platform
Source:
https://developer.ibm.com/recipes/tutorials/connect-an-esp8266-with-the-arduino-sdk-to-the-ibm-iot-foundation/
Comparison
2.4.4.
No Criteria Thinger.io platform ThingSpeak platform Ibm platform
1 Usage 5 Interface and
coding is quite friendly to user
4 It is not so hard to
start
2 It is quite
complicated for beginner
4 Many people use
it, there are a lot of
2 It doesn’t have a
popular community
Trang 30In conclusion, ThingSpeak platform by MathWorks will be used
Wireless module selection
Cheap: It is cheap, price is lower than $5
Popular: There are many local suppliers in Vietnam
Encryption support: There are available libraries and function to
improve security of the connection
Strong community: There are many documentation as well as projects
to reference
Brief information about ESP8266
The ESP8266 is a low-cost Wi-Fi chip with full TCP/IP stack and MCU (microcontroller unit) capability produced by Shanghai-based Chinese manufacturer, Espressif Systems [6]
The chip first came to the attention of western makers in August 2014 with the ESP-01 module, made by a third-party manufacturer, Ai-Thinker This small module allows microcontrollers to connect to a Wi-Fi network and make simple TCP/IP connections However, at the time there was almost no English-language documentation on the chip and the commands it accepted [7] The very low price and the fact that there were very few external components on the module which suggested that it could eventually be very inexpensive in volume, attracted many hackers to explore the module, chip, and the software on it, as well as to translate the Chinese documentation.[8]
In Vietnam, many versions of ESP8266 are easily found and bought (Fig 2.6)
Trang 32CHAPTER 3: SYSTEM DESIGN
This chapter will be divided into 3 parts:
Black box revealing
Design for communication
Design for security
which show a structured approach of design from conceptualization to final design which is protected by typical encryption
Black box revealing
3.1.
In this chapter, black box will be unpacked
Figure 3.1 Black box of Lock
The Lock box comprises of 4 main blocks:
Trang 33
Figure 3.2 Black box of Internet
The Internet box comprises of 3 main blocks:
Wi-Fi modem
Cloud Platform - ThingSpeak
Webserver created by App Inventor
Detailed component of system can be described as schematic in figure 3.3
Internet
Trang 34Design for communication
Bluetooth module and Smartphone through version 2.0 or 4.0
WiFi communication 1 - Microcontroller, ESP8266 and ThingSpeak
3.2.2.
3.2.2.1 Microcontroller and ESP8266
Just like Bluetooth module, ESP8266 will be connected with Arduino through Serial Communication via TX and RX pin
3.2.2.2 ESP8266 and ThingSpeak
Connect ESP8266 to Modem: Store user ID and password in ESP8266 module and put them into the sketch ESP8266 is online now!
Example code:
Some key feature to be noticed of ThingSpeak platform can be found in Fig 3.4 include Channel ID, Field, Write API Key and Read API Key
Data in ThingSpeak can be written or read through 4 key feature above
For example: Get data from ThingSpeak by using function
i = (ThingSpeak.readIntField(328779,1,"WZ9X1EXYP2B7JIP3"));
Trang 35Figure 3.4 Some key features in ThingSpeak
WiFi communication - ThingSpeak and App
3.2.3.
App can read or write to ThingSpeak by using key feature of it
For example: Write data to ThingSpeak by issuing HTTP request
Trang 36Design for security
3.3.
There are 4 connections which are vulnerable under cyber attack (Fig 3.5)
Figure 3.5 Schematic of system and its protection
Connection 1 - Bluetooth connection with advance protection
3.3.1.
As presented in “A Novel Encryption Mechanism for Door Lock to Resist
Jam–and–Relay Attack”, connection 1 is using auto-changing code mechanism (Fig.3.6)
Figure 3.6 Auto-changing code mechanism