1. Trang chủ
  2. » Luận Văn - Báo Cáo

Luận văn thạc sĩ Kỹ thuật cơ điện tử: Thiết kế hệ thống khóa cửa điện tử

72 0 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Thiết kế hệ thống khóa cửa điện tử
Tác giả Trần Bảo An
Người hướng dẫn Dr. Trần Việt Hồng
Trường học Đại học Quốc gia Tp. HCM
Chuyên ngành Kỹ thuật cơ điện tử
Thể loại Luận văn thạc sĩ
Năm xuất bản 2017
Thành phố Tp. HCM
Định dạng
Số trang 72
Dung lượng 52,47 MB

Cấu trúc

  • CHAPTER 1: OVERVIEW (14)
  • CHAPTER 2: SELECTION OF DESIGN PLAN (24)
  • GHHSHOP (31)
    • CHAPTER 3: SYSTEM DESIGN (32)
  • HC05 ESP8266 (33)
    • CHAPTER 4: INNOVATION AND FINALIZATION (43)
  • HI THERE, (45)
    • CHAPTER 5: EXPERIMENTS (54)
    • CHAPTER 6: CONCLUSION AND FUTURE (62)
  • DIRECTION (62)
  • REFERENCE (72)

Nội dung

When technology and market are growing, here is what willhappen: e Its technology becomes cheapere People are getting more familiar with it, it takes less time to people to use this serv

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.

1.1 Reason to develop a Smart Lock There are several reasons to bring this product on air.

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.

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 Hafele

This 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

As it is unsure when these trend will explode Prepare and be a pioneer in this field will bring vast opportunity to enterprise.

1.2 Downside of having a Smart Lock Smart Lock product has six points which customer are not happy to have.

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.

Brand August Danalock Kwikset Kevo Atovi Country US.A Denmark US.A Vietnam Standard August Smart Danalock V3 Kwikset Kevo Khóa nha Glock package Lock Pro + (2nd Gen) price Connect

Table 1.1 Detail price of the popular smartlock on different market

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.

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.

Smartlock technology is vulnerable to hacking and cyber-attacks If Smartlock is hacked, there are 3 possible scenarios happen: e Service disrupts System will stop functioning, this is the least

“damaging” case. e 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. e Control overridden This is the worst scenario that can happen to your system in which hacker can open your lock anytime they want.

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.

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. e Smart lock technology does not have industry standards. e Some smart lock companies do not have extensive experience with information technology security [1].

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: e Its technology becomes cheaper e People are getting more familiar with it, it takes less time to people to use this service e Internet connection is getting faster and more stable e 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.

1.3 Cyber attack on Smart Lock

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].

Burglary Population group Forcible entry Unlawful entry | Attempted forcible entry Number of offenses known 893,999 540,614 99907

Table 1.2 Burglary statistical in United State 2014 https://ucr fbi go v/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!

1.4 Design ofa Doorlock system 1.4.1 Blackbox

According to European Union Agency For Network And Information Security, Smarthome service is recommend to have a concept as described in the figure 1.3.

It comprises of 3 main parts: e Devices included constrained devices and high capacity devices. e Phone with mobile application. e Remote services.

There are links between these parts to proceed control access and exchange data.

CONSTRAINED DEVICES lt HIGH CAPACITY DEVICES we Security alarm ll Audio / Visual systems

Smart (smart TV, TV set-top light bulbs 2 bows}

4 oO IP cameras a Smart smnoke

Broadband routers / home gateways / smart hubs

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 ofSmartphone which are Wifi, 3G and 4G.

Figure 1.4 Black box design of a Smartlock system 1.4.2 Interstice for cyber attack

There are 5 cracks for hackers to sneak in which will be investigated in the following chapters: e Crack in connection 1: Phone - Lock (fig.1.4) e Crack in connection 2: Lock - Internet (fig.1.4) e Crack in connection 3: Phone - Internet (fig.1.4) e Internet security itself e Guest key generation process 1.4.3 Function of existing product

After research on popular product such as August and Kwikset, the working model is built as Fig.1.5.

: ew pass ! i Ne W pass! es \ Grant Recess | Grant srrzSS , \

24/7/Log / ee Status ome ew ew we ww ow we ow ow ew we ow we ew www wo ww eo ow eed

Figure 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: e Closed range access via Bluetooth e Wide range access via Internet e Lock status notification / Tracking log e Password changing e One-time key access for Friend/Shipper/Neighbor

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 mtroduced in last study

By using auto-changing code method, Bluetooth communication is protected under common attach: replay attack and jam-and-relay attack.

1.6 Objective, purpose and scope 1.6.1 Objective e Have asystematic understanding about Smartlock design on market. e Propose aconnected way for this product. e Show risks where system is vulnerable to cyber attack and propose solution. e Implement the design.

1.6.2 Purpose Propose and design a connected and secured Smartlock: e Have all functions and features that other Smartlock has. e More secured: connection Phone - Lock is protected by rolling code. e Propose away to create secured guest key - via SMS.

1.6.3 ScopeThis thesis will not dig deep into Internet infrastructure and network.

SELECTION OF DESIGN PLAN

2.1 Smart lock design in the previous study

As this research inherits the past study, last design will be reminded It is included: e Control parts:

- Use Smartphone to open/close lock - Communicate Lock - Phone via Bluetooth - Cryptography uses RSA e Electrical parts:

- Servo is used - Direct power source will be used, battery is utilized for backup e Mechanical parts:

- Sin mechanism is used 2.2 Plan selection

To make offline version go online, there are 3 parts that need to be selected. a) Connection selection 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

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.

Bluetooth Bluetooth ghi ]g MKZOCHp shield

Figure 2.1 Option 1 for connection selection e Option 2:

Figure 2.2 Option 2 for connection selection

Option will be picked based on following criteria: range, maximum connected devices, components - cost, usage.

| Range 2 Range will be limited by 4 Range will be limited by

Bluetooth connection Bluetooth | Wi-Fi connection The Wi-Fi SIG suggests a distance of at Alliance is claiming that Wi- least 200 feet for a Bluetooth 4.0 | Fi Direct devices can reach device ~ 60m each other at a maximum distance of 656 feet ~ 200m.

2 Maximum 2 Number of connection will be | 4 Number of connection will connected limited by Bluetooth shield be limited by Modem. devices connected to Modem A Modem Viettel H640DW has

Bluetooth device can communicate with a maximum 7 devices in a piconet. maximum 20 connections.

3 Installation 3 Each lock has to establish 4 Each lock has to establish effort connection with Modem A connection with Modem. setup for Modem, microchip, Bluetooth shield and Wi-Fi shield is also needed.

4 Components | 4 Modem has to accompany 2 Each lock must have one

- cost with microchip, Bluetooth shield | Wi-Fi shield more. and Wi-Fi shield.

Table 2.1 Plan selection for Connection type According to table 2.1, option 2 will be chosen.

2.4 loT Platform - Cloud service selection

There are several Cloud services that could be used for educational and commercial purpose They are Thinger.io platform, ThingSpeak platform and Ibm platform.

Thinger.io is a platform from Spain in 2015 that provides hardware integration, cloud console, server a API, and server deployment.

This platform is compatible with various hardware Firstly, It supports Arduino compatible hardware, which is any board user can program with the Arduino IDE (Arduino + Ethernet, Arduino + Wifi, ESP8266, NodeMCU, TI CC3200, etc).

Secondly, It supports Linux powered devices like the Raspberry Pi, Intel Edison, or any other Linux computer running Ubuntu or MacOS Finally, ARM Mbed platform and compatible devices are also supported.

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 |

Figure 2.3 A real-time dashboards used to display weather condition by Thinger io

Source: http://docs thinger.io/console/

ThingSpeakTM 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.

ALGORITHM DEVELOPMENT SENSOR ANALYTICS i“ AND ANALYTICS _ C1 ThingSpeak oe MATLAB

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.|Š ]

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.

Authentication Token n6k1gh ESP8266 Test1 token _ZF5D(a3iw3A*oX1BU

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/

2.4.4 Comparison No | Criteria Thinger.io platform ThingSpeak platform | Ibm platform

| Usage 5 Interface and 4 It is not so hard to | 2 It is quite coding is quite start complicated for friendly to user beginner.

2 Trust in 3 Spain platform is | 5 Mathworks is a 5 IBM is a big platform not well-known big brand brand.

2 Limited, user cannot create more tool as they want.

4 As it works with App Invertor, widget is unlimited.

4 Developper 3 Projects are not 4 Many people use 2 It doesn’t have a community | much it, there are alotof | popular community. examples and projects.

Table 2.2 Comparison of different platform for IoT application

In conclusion, ThingSpeak platform by MathWorks will be used.

There are many options for Wi-Fi chip module on the market However, ESP8266 will be chosen because it is: e Compatible: It is compatible with Arduino which has been chosen in the previous design. e Cheap: It is cheap, price is lower than $5. e Popular: There are many local suppliers in Vietnam. e Encryption support: There are available libraries and function to improve security of the connection. e Strong community: There are many documentation as well as projects to reference.

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).

Kit RF Thu Phat Wifi ESP8266 Mạch Điều Khien Wifi Relay Mach Điều Khien Wifi Relay Mach Thu Phat Wifi ESP8266 V1

GHHSHOP

SYSTEM DESIGN

This chapter will be divided into 3 parts: e Black box revealing e Design for communication e Design for security which show a structured approach of design from conceptualization to final design which is protected by typical encryption.

3.1 Black box revealing In this chapter, black box will be unpacked.

The Lock box comprises of 4 main blocks: e Bluetooth module HC05 e Wi-Fi module ESP8266 e Microcontroller e Servo motor

Figure 3.2 Black box of Internet The Internet box comprises of 3 main blocks: e Wi-Fi modem e Cloud Platform - ThingSpeak e Webserver created by App Inventor Detailed component of system can be described as schematic in figure 3.3.

BLE —HC05 Wi-Fi — ESP8266

HC05 ESP8266

INNOVATION AND FINALIZATION

The infrastructure of system is given in Fig.3.14 Does system bring full functionality to customer? Study design will not only fulfill the function of existing system, but also do improvement.

4.1 Functionality of study product Full function of existing product will be guaranteed.

New pass | Granƒ access Notion Ũ | 24/7 Log J Ì Statús

‘ 1 h ic —_New pass \ Grant > cess | i Door lock 1 | Grant acres — \ = Ũ ett: SS | Ne 4

Shipper/Neighbor sag iad / ‘Ratification / Ni

Figure 4.1 Functionality of study product In additional, two features will be updated to the working model (Fig.4.1). e Closed range access via Bluetooth will be protected under auto- changing-code. e One-time key access provided by SMS.

As auto-changing-code is discussed in “A Novel Encryption Mechanism for Door Lock to Resist Jam—and—Relay Attack” and in the previous chapter of this document, it will not be discussed further again.

4.2 One-time key acess provided by SMS 4.2.1 One-time key access

This function appears in August smartlock and Atovi smartlock The purpose of this function is to provide temporary access for guest to enter the house one time only.

One-time key access has once become serious issue of August since their system has been hacked in 19 August, 2016 Here's a very basic overview of what they did: e Unboxed and configured a HomeKit-enabled August Smart Lock as usual e Granted Steve temporary guest access e While his guest access was active, Steve enrolled a new key (This was the tricky part) e Removed Steve's guest access e Steve used the newly enrolled key to control the August lock from his laptop

They managed to lock and unlock our lock a few times before August's fix In fact, they were testing out our newly enrolled key when August's patch went live the afternoon of August 19 one minute it was working, the next minute it wasn't [14].

As August fixed this issue, one-time key access still needs to be noticed.

4.2.2 One-time key access via SMS

This feature is an unique technique and is only created when working with auto- changing code.

The biggest advantage of request via SMS is ensure system working even when key user is not online or when the Internet is slow or cut down.

One-time key access is created through 4 steps (Fig.4.2).

Figure 4.2 Generating one-time key access procedureStep 1: Guests come to house, open an Application and choose Guest section on their phone (Fig.4.3).

HI THERE,

EXPERIMENTS

Design and implementation are completely different To make sure system can work on the field, experiments are necessary Therefore, a testing will be set up to validate design After getting the results from experiments, the design will be had confidence enough to release.

Design has five functions in total: closed range access via Bluetooth, wide range access via Internet, lock status notification / tracking log, password changing and one- time key access for Friend/Shipper/Neighbor

In which closed range access via Bluetooth has been tested in the previous work.

Due to lack of resources, only critical function is chosen to be implemented An old prototype will be used again to validate two functions: e Wide range access via Internet e One-time key access for Friend/Shipper/Neighbor 5.2 Set-up a model

Past model is used (Fig.5.2) Model consists of: e Microcontroller Arduino Mega 2560. e Smartphone already installed Application “Khóa cua thông minh ver 2.0”. e LCD module 1602 (Fig.5.1). eKEASTR SINGH

Figure 5.1 Blue LCD module 1602 Figure from buydisplay.com product 1602 Blue LCD Module HD44780 e Module Bluetooth HC05. e Servo motor. e Power backup circuit.

41 e Adapter 9V. e Resistor, wire and battery. e Wooden door 30cm x 30cm x 2cm. e Door latch from mica.

Figure 5.2 Some picture of used model for testing In this experiment, ESP8266 NodeMCU will be added to the prototype (Fig.5.3).

Figure 5.3 Module NodeMCU WIFI ESP8266 V1.0 Source 5.3 Wide range access via Internet

A setup is built up as Figure.5.4

A prototype has limit It is the capability of ThingSpeak platform Free version only allows send message update per 15 second (Fig.5.5)

Use For small non-commercial projects and for evaluation of the service

Scalable for larger No Annual usage is projects capped.

Number of messages 3 million/year

Message update interval Every 15 seconds limit

Number of simultaneous Limited to 3 MOTT subscriptions

Figure 5.5 Capability of ThmgSpeak's free user

Enter correct password (in this case is 9999) Click send (Fig.5.6 and Fig.5.7).

Field 1 Chart shows value of sent Password Red marked peaks are 9999 where door will open (Fig.5.8).

Figure 5.8 A graph of sent data to ThingSpeak The correct pass has been entered three times System time response can be found in the table 5.1

No | Password Response of ThingSpeak Response of Doorlock system

| 9999 4 seconds 7 seconds 2 9999 4 seconds 7 seconds 3 9999 4 seconds 7 seconds

Table 5.1 System response when using Wide range access function Table shows that the response time is stable and consistent - 7 seconds after clicking open button This response time is OK for Smart lock application.

5.4 One-time key access via SMS

A setup is built up as Fig.5.9 Phone in the left represent for guest’s phone, on the right is the home owner’s phone.

Figure 5.9 Test setup for one-time key access function Below is some figures of the test procedure.

Figure 5.11 Host successfully sent back SMS to Guest

Hi there, this is An Public key is Đã nhận

Use this code to access: 7474 P/s:

This code can only use once.

Figure 5.12 Text message the Guest received

The whole process takes 2 minute and 55 second The conditions of the test are: e Users are familiar with the process. e Host replies text message instantly.

It means this process can take about 5 minutes in reality.

The time response is OK with the current design.

Two functions “Wide range access via Internet” and “ One-time access via SMS” has been tested with the following response time 7 seconds and 5 minutes Prototype works properly as design.

When guest wants to grant access The faster way is get approve from Host via Internet SMS function is working better when Internet is unstable or broken down.

DIRECTION

A picture of a promising future for Home Rental Service as well as a challenge from cyber crime are shown.

Suitable hardware and software for Electronic Door Lock has been picked.

A procedure to connect Lock to Internet and to secure itself are written.

Study design has five basic function of an Electronic Door Lock.

Furthermore, design provide a better security for “closed range access” with auto-changing code Grant access via SMS is also designed to provide customer more choices to access their home.

Current Android application has bugs Sometime it crashes when connect/disconnect Wi-Fi when open the app.

Two functions: changing password and tracking log are not implemented by prototype.

6.3 Future direction Turn prototype into real product.

Implement changing password and tracking log function.

Fix bugs of Android application.

Design electrical circuit and Using Bluetooth 4.0 instead of Bluetooth 2.0 to have better power consumption.

Reasearch and use appropriate Cloud Platform to balance between quality and cost.

Add in Camera to provide option for high-class customer.

APPENDIX A: LOCK’S PROGRAM ON ARDUINO MEGA 2560

String readString; servo myservo; char str[4];

, O07}; int c,p,qg,e,phi,dP,dQ, ginv, pInv,m; unsigned long n; long int ciphertext;

BigNumber cBig,pBig, gB1ig, qinvBig, pInvBig,h;

BigNumber pass99; void setup() { // put your setup code here, to run once:

BigNumber::begin (); // initialize library randomSeed (analogRead (0)); lcd.begin(16, 2); myservo.attach(9); // attaches the servo on pin 9 to the servo object myservo.write (0); new key(); void new key () { int m; int 1=randem (m) ; int j=random(m) ; while (1==]) {

//phi=(p-1)*(q-1); n=p*q; int k=max(i,j); int x=random(k+1,38) ; e=A[xX];

//Tim khoa bi mat //Tim dP int sl=1; int al=1; while (s1>0){ int phil=al*(p-1)+1; sl=phil%e; alt++;

//Tim dQ int s2=1; int a2=1; while (s2>0) { int phi2*(q-1)+1; s2=phi2%e; a2++;

//Tim ginv int s3=1; int a3=1; while (s3>0) { int phi3*ptl;

//Tim bTnv int s4=1; int a4=1; while (s4>0) { int phi4*qtl1; s4=phi4%p; a4t++;

Serial.print (sending) ;//gui đi lced.setCursor(0, 1);lcd.print(sending) ; delay (800);

/⁄/1cd.setCursor (7,0); lcd.print(c); new key();//tao khoa moi myservo.write (65); delay (5000); myservo.write (0); void loop() { //Print LCD hang 1 lcd.setCursor (0, 0); lcd.print ("Auto"); lcd.setCursor(5, 0); Ilcd.print ("c="); lcd.setCursor(7, 0); lIcd.print(" "=

//Print LCD hang 2 lcd.setCursor(0, 1);lcd.print(" 1) gui(); readString=""; while (Serial.available()) { char ciphertext= Serial.read(); readStringt=ciphertext; c=readString.toTnt(); l1cd.setCursor(7, 0); lcd.print(c);

//Decrytion CBig=c;pBig=p; qB1g=g; qinvBig=qIinv; plInvBIg=plnv;

BigNumber mlg.pow(dP)%pBig;

BigNumber m2g.pow (dQ) sgB1g; if (ml>m2) { h=(qInvBig* (ml-m2)) SpBig; m=m2+h*qBig;

1f£(m==pass) { mocua(); l1cd.setCursor(9, 1); lcd.print(m) ;

//Recelver int 1=0; if (Serial2.available()) { delay(100); //allows all serial sent to be together while(Serial2.available() && 10) { if (String(str)== String(pass)) { myservo.write(65); delay(10000); myservo.write(0); } received

122 BLEW usum S|QELIEA jeqo¡Ð_ }Sl] Way! }SI| }222S 0} GSEs ies uaun

_+ ajqeuen [eqo|B BE ›) †SI }SI Jo uBual yp (a QUIENU2212S UdeIIs IaJoueuado op = 192 BESS) veym oF - aigeuen jeQO|D S6) SII)U30O3911|t f(s op Joun|: PEEESRÿ uouw x9

ISIJ Way JSI1222S ye — == BÀ = Jamod |EQO|D B= ait") + Jamod |eqo|B Đ= ử x SINS | et bad TT “

Ngày đăng: 09/09/2024, 03:48

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN