Upload
cau-be-hu
View
224
Download
0
Embed Size (px)
Citation preview
7/28/2019 Capstone Document Final
1/125
MINISTRY OF EDUCATION AND TRAINING
FPT UNIVERSITY
Capstone Project Document
Wireless Module and Applications
DIGISKY GROUP
Group Members
Thi Thanh Tng 00668 TungTT00668
Trn Xun t 00607 DatTX00607
Bi Vn Thi 00714 ThaiBV00714
Nguyn B Thun 00701 ThuanNB00701
Trn Hi Linh 00312 LinhTH00312
Nguyn Anh Qun 00663 QuanNA00663
Supervisor Dr. Phan Duy Hng
Project code WMA
Hanoi, August/2011
7/28/2019 Capstone Document Final
2/125
2Table of Contents
Contents
INTRODUCTION...................................................................................................................................... 4
1.1. The Group ................................................................................................................................................. 5
1.2. The Idea .................................................................................................................................................... 5
1.3. Business Aspects ....................................................................................................................................... 6
1.3.1. Business Outline ...................................................................................................................................... 6
1.3.2. Limitations of existing system .................................................................................................................. 6
1.3.3. Improvement objectives .......................................................................................................................... 6
1.3.4. Benefits of expected system .................................................................................................................... 6
PROJECT MANAGEMENT ..................................................................................................................... 8
2.1 Problem Definition .................................................................................................................................... 9
2.1.1 Name of this Capstone Project..................................................................................................................... 9
2.1.2 Problem Abstraction .................................................................................................................................... 9
2.1.3 Project Review ............................................................................................................................................. 9
2.2. Project Organization ............................................................................................................................... 10
2.2.1. Development Process ............................................................................................................................ 10
2.2.2. Roles and Responsibilities ...................................................................................................................... 11
2.2.3. Tools and Technique .............................................................................................................................. 11
2.3. Project Management Plan ....................................................................................................................... 12
2.3.1. Tasks ...................................................................................................................................................... 12
2.3.2. Task Sheet: Assignments and Timetable ............................................................................................... 14
REQUIREMENTS ................................................................................................................................... 18
3.1 User Requirement Specification .............................................................................................................. 19
3.1.1 User Requirement ...................................................................................................................................... 19
3.1.2 Content editor requirement....................................................................................................................... 19
3.1.3 Led Board Controller requirement ............................................................................................................. 19
3.2 System Requirement Specification .......................................................................................................... 20
3.2.1 External Interface Requirements ............................................................................................................... 20
3.2.2 System Features ......................................................................................................................................... 23
IMPLEMENTATION .............................................................................................................................. 66
4.1 System Architecture ................................................................................................................................ 67
7/28/2019 Capstone Document Final
3/125
3 Wireless Module and Applications
4.1.1 Proposed System Architecture ................................................................................................................... 67
4.1.2 System Interfaces ....................................................................................................................................... 68
4.1.3 Component Diagram .................................................................................................................................. 69
4.2 Detailed Description of Components ....................................................................................................... 70
4.2.1 System Class & Block Diagram ................................................................................................................... 70
4.2.2 System Sequence Diagram ......................................................................................................................... 74
4.3 Analysis and selection of tools, devices ................................................................................................... 95
4.3.1 Devices ....................................................................................................................................................... 95
4.3.2 Tools ........................................................................................................................................................... 96
4.4 Circuit Design .......................................................................................................................................... 97
4.4.1 Wireless Module Evolution Board .............................................................................................................. 97
4.4.2 Controller Board ....................................................................................................................................... 100
4.5 Interface Design .................................................................................................................................... 101
4.5.1 PC Commander ........................................................................................................................................ 101
4.5.2 Mobile Commander ................................................................................................................................. 103
4.5.3 GPRS Server .............................................................................................................................................. 108
4.5.4 GPS Client ................................................................................................................................................. 109
4.6 Database Design .................................................................................................................................... 110
4.6.1 Mobile Commander DB Design ................................................................................................................ 110
4.7 Protocol Design ..................................................................................................................................... 111
4.7.1 Wireless Module Message Format (WMMF) ........................................................................................... 111
4.7.2 Wireless Module Communication Protocol (WMMC) ............................................................................. 114
RESULTS .............................................................................................................................................. 120
5.1 Achievements ....................................................................................................................................... 121
5.2 Risk/limitations of the system ............................................................................................................... 121
5.3 Strategies or solution for reducing limitations ...................................................................................... 121
5.4 Perspectives ...................................................................................................Error! Bookmark not defined.
CONCLUSIONS .................................................................................................................................... 122
APPENDIX............................................................................................................................................ 124
7/28/2019 Capstone Document Final
4/125
4
Introduction
7/28/2019 Capstone Document Final
5/125
5 Wireless Module and Applications
1.1. The GroupWe chose the name Digisky for our group, which came from an idea of digitalizingthe life
with the help of technologies. Digisky group has 6 members. Roles and responsibilities of
each are in the following table:
No Full Name Roll Number Role Responsibilitiy
1 Thi Thanh Tng 00668 Leader Manage Project, Develop, Test
2 Trn Xun t 00607 Member PTL, Develop, Test
3 Bi Vn Thi 00714 Member Develop, Test
4 Nguyn B Thun 00701 Member Develop, Test
5 Nguyn Anh Qun 00663 Member Develop, Test
6 Trn Hi Linh 00312 Member Develop, Test
1.2. The IdeaNowadays, wireless has become one of the most important factors in almost every field of
technologies. It exists in everything that we can think of. Wireless encompasses various types of
fixed, mobile, cellular telephones, laptop, and wireless networking, so its applications are
extremely huge, especially in the areas of communicating and transmitting. The idea came when
we questioned ourselves about the capabilities of wireless, how it improves things. We decided
to make a device that includes some wireless components such as WIFI/GPS/GSM and develop
applications based on that device. Those applications are:
Led message board controlling over WIFI/GSMTraditional led message board requires operator to change board message
manually and it takes a lot of time when the board is hang on wall or bound to
the wall. So we are going to make it easier by using a laptop or a mobile phone
to control, manipulate its content over WIFI or SMS.
GPS locatorWe will develop a GPS locating software on pc/mobile for tracking purpose. Thisapplication is actually very useful. It can be used for tracking stolen things or
simply used by parents who want to monitor their children.
http://en.wikipedia.org/wiki/Mobile_phonehttp://en.wikipedia.org/wiki/Wireless_networkhttp://en.wikipedia.org/wiki/Wireless_networkhttp://en.wikipedia.org/wiki/Mobile_phone7/28/2019 Capstone Document Final
6/125
6Table of Contents
1.3. Business Aspects1.3.1.Business Outline
Our main business is to create a device that is capable of communicating with other
devices such as PC, Laptop, mobile phones over wireless signals. The device is built based on
wireless components (WIFI module, GPS/GPRS/GSM module), microcontroller and some
other miscellaneous parts. The applications of this device can be extremely huge and we are
going to make applications that can best express the devices functions.
1.3.2.Limitations of existing system Have limited or only one function/module. Inflexible LED changing solution.
1.3.3.Improvement objectives Well-developed software interface. Well-developed hardware package. Optimization in size, quality, durability.
1.3.4.Benefits of expected system Provide a multi-purpose device that can be used or integrated with other devices such
as computer, mobile phone
Be able to be mass produced and to sell the products/solution to customers.
7/28/2019 Capstone Document Final
7/125
7 Wireless Module and Applications
7/28/2019 Capstone Document Final
8/125
8
Project Management
7/28/2019 Capstone Document Final
9/125
9 Wireless Module and Applications
2.1 Problem Definition2.1.1Name of this Capstone Project
The name of this project is Wireless Module and Applications (or WMA in
abbreviation). The main purpose of this project is all in its name: to develop an electronic board
that includes wireless components and to make applications base of that board.
2.1.2Problem AbstractionWe, as a group of students, realized that in the future, everything will be wireless. It is
the essence of the evolution of technologies. We all want the technologies powerful,
comfortable, and portable and even more. The Wireless has them all, and many other great
properties. In Vietnam, wireless has been applied in many fields such as telecommunications,
wireless networking, wireless controlling But the potentiality of wireless is still enormous. The
applications of it can be used in communicating, controlling and many other things that we can
think of. A lot of works that we have to do manually can be done extremely quickly and
automatically with the help of wireless controlling. On the other hand, wireless makes wired
device less interesting: Who wants to use cord-and-string devices compare to a delicate and
portable wireless device? So we decided to do this project in order to create a general solution
for those kinds of applications. The project has two main parts: the hardware is a electronic
board that includes a microcontroller, wireless components and is made for general purpose,
the software is the applications we make for the board: controlling led message board over GSM
and GPS locator.
The project has no customer, but we expect once the project is finished, we can sell its
applications as solutions or completed products.
When finished, the product must have following properties:
Be able to compatible with other devices. Can be manipulated for any purposes. Have a good quality, durability. Can be mass produced (Optional).
2.1.3Project Review2.1.3.1The Current SystemWe make the circuit board independently, so there is no current system. But there are several
solutions provided in the market for controlling led message board using WIFI.
2.1.3.2The Proposed SystemThe proposed system involves two main components:
Hardware includes microcontroller, GSM/GPS module and Led message board.
7/28/2019 Capstone Document Final
10/125
10Project Management
Software includes PC and mobile applications.The hardware interface can be compatible with any GSM or WIFI (Optional) device. Users can
use the device for any purpose. The software part is actually applications that are built upon the
hardware to demonstrate its function. The application is controlling LED message board over
SMS. Any user can modify the LED board content from distance using the application. Anotherapplication of the device is GPS locator: the mobile phone software will show the position of the
LED board on map. An option that we consider is controlling the LED board over WIFI, but this
option will depends on the project status.
2.1.3.3Boundaries of the systemThe boundaries of the system under-developed include:
A complete circuit board Completed LED board controlling solution. GPS locating solution.
2.2. Project Organization2.2.1.Development Process
Since the system involves both software and hardware components, we decided to use the
incremental model of software development process to apply to our development process.
The model is modified so that it can meet the needs that both software and hardware are
being designed in parallel.
Figure 2-1: Incremental development process
7/28/2019 Capstone Document Final
11/125
11 Wireless Module and Applications
2.2.2.Roles and ResponsibilitiesNo Full name Role Responsibilities
1 Thi Thanh Tng Project Manager,
Developer
Managing
Creating documents
Coding
Testing
2 Trn Xun t Project Technical
Leader, Developer
Managing documents.
Coding
Testing
3 Bi Vn Thi Developer,Business Analyst
Coding
Requirement Elicitation, Clarifying.
Testing
4 Nguyn B
Thun
Developer, Quality
Assurance
Coding
Creating Test Plan, Test Case
Testing
5 Nguyn AnhQun
Developer,
designer
Designing
Coding
Testing
6 Trn Hi Linh Developer,
Designer
Designing
Coding
Testing
2.2.3.Tools and Technique Microcontroller programming tool: MPLAB IDE, CCS Emulation tool: Proteus Printed circuit design tool: Altium Mobile Phone Application development tool: Eclipse IDE/ Android 2.2 PC Software development tool: Microsoft Visual C#
7/28/2019 Capstone Document Final
12/125
12Project Management
2.3. Project Management Plan2.3.1.Tasks2.3.1.1. Project Kick-offDescription
Officially start the project. Forming the team and appoint members to the team.
Deliverables
Project Charter
Resources Needed
All team members and Supervisor / 1 day
Dependencies and Constraints
N/A
Risks
N/A
2.3.1.2. Create System Requirements SpecificationDescription
Create System requirements specification (Hardware/Software)
Deliverables
System Requirement Specification (SRS) document
Resources Needed
All team members/ 1 week
Dependencies and Constraints
N/A
Risks
Conflicted requirements from all team members
2.3.1.3. Circuit Designing and MakingDescription
Design the circuit and hire a company for making it
Deliverables
Printed circuit design & the electronic board
Resources Needed
All team member for 1 week
7/28/2019 Capstone Document Final
13/125
13 Wireless Module and Applications
Dependencies and Constraints
SRS document
Risks
The welded circuit may not operate well as the intended design
2.3.1.4. Create Software Design DescriptionDescription
Design the software system
Deliverables
Software Design Description
Resources Needed
6 people/1 week
Dependencies and ConstraintsSRS document
Risks
Designing the software relies so much in the hardware design, so the designed software system
may not be able to adapt to the hardware system.
2.3.1.5. CodingDescription
Implement the software system based on the design document
Deliverables
PC/Mobile/embedded applications & source codes
Resources Needed
6 people/6 weeks
Dependencies and Constraints
SRS, SDD document, Circuit board
Risks
Lacking of requirements. Testing applications of embedded system may cause many problems. Hardware does not operate well as intended design.
2.3.1.6. System TestDescription
Perform system test for the system
7/28/2019 Capstone Document Final
14/125
14Project Management
Deliverables
System Test Document
Resources Needed
6 people/ 1 week
Dependencies and Constraints
Task 2.3.1.5 is finished.
Risks
- Lack of experience in testing embedded system.- Developers are also testers so it could cause lacking of test cases.
2.3.1.7. Closing ProjectDescription
Officially close the project.
Deliverables
Lesson learned document
Resources Needed
All team member/ 1 day
Dependencies and Constraints
Task 2.3.1.6 is finished
Risks
None
2.3.2.Task Sheet: Assignments and TimetableNo Task Name Duration Start Finish Predecessors Resource Names
1WIA Project 60 days
Mon
5/9/11Fri 8/5/11
2Initiating 1 day
Mon
5/9/11
Mon
5/9/11
3 Register Capstone Project 0 days Mon5/9/11
Mon5/9/11
TungTT
4Kick-off Meeting 1 day
Mon
5/9/11
Mon
5/9/11DIGISKY TEAM
5Planning 2 days
Tue
5/10/11
Wed
5/11/11
6 Develop Project Plan 2 days Tue Wed 4 TungTT
7/28/2019 Capstone Document Final
15/125
15 Wireless Module and Applications
5/10/11 5/11/11
7Plan Approved 0 days
Wed
5/11/11
Wed
5/11/116 DIGISKY TEAM
8Executing 55 days
Thu
5/12/11
Wed
8/3/11
9Definition Stage 8 days
Thu
5/12/11
Mon
5/23/11
10Brainstorming Requirements 6 days
Thu
5/12/11
Thu
5/19/117 DIGISKY TEAM
11 Writing System Requirement
Specification (SRS)2 days
Fri
5/20/11
Mon
5/23/1110 TungTT,DATTX
12SRS Completed 0 days
Mon
5/23/11
Mon
5/23/1111
13
Solution Stage 11 days
Tue
5/24/11
Tue
6/7/11
14Circuit Design 3 days
Tue
5/24/11
Thu
5/26/1111 DIGISKY TEAM
15 Create Software Design
Description8 days
Fri
5/27/11
Tue
6/7/1114 DIGISKY TEAM
16Design completed 0 days
Tue
6/7/11
Tue
6/7/1114,15
17Implementation 28 days
Wed
6/8/11
Fri
7/22/11
18 Order circuit board 7 days Wed6/8/11
Thu6/16/11
16 ThaiBV
19Coding 28 days
Wed
6/8/11
Fri
7/22/1116 DIGISKY TEAM
20Implementation Completed 0 days
Fri
7/22/11
Fri
7/22/1118,19
21Testing 8 days
Mon
7/25/11
Wed
8/3/11
22Writnig System Test Case 2 days
Mon
7/25/11
Tue
7/26/11
20 ThUANNB
23Executing Test 5 days
Wed
7/27/11
Tue
8/2/1122 DIGISKY TEAM
24 Create System Test
Document1 day
Wed
8/3/11
Wed
8/3/1123 ThUANNB,LinhTH
25System Test Completed 0 days
Wed
8/3/11
Wed
8/3/1124
7/28/2019 Capstone Document Final
16/125
16Project Management
26Closing 2 days
Thu
8/4/11Fri 8/5/11
27 Conducting Project
Postmortem1 day
Thu
8/4/11
Thu
8/4/1125 DIGISKY TEAM
28 Closing Project 1 day Fri 8/5/11 Fri 8/5/11 27
7/28/2019 Capstone Document Final
17/125
17 Wireless Module and Applications
7/28/2019 Capstone Document Final
18/125
18
Requirements
7/28/2019 Capstone Document Final
19/125
19 Wireless Module and Applications
3.1 User Requirement Specification3.1.1User Requirement
User can use PC to control the central controller via RS232. User can use PC to control the central controller via GSM/GPS module. User can use Mobile Phone to control the central controller via GSM network. User can use PC software to input text for manipulating led board content. User can use PC software to input image for manipulating led board content. User can use Mobile software to input text for manipulating led board content. Users can use pc software to add/remove/apply effects to the led board content. Users can use mobile software to add/remove/apply effects to the led board content. User can save/load led board configuration on pc software. User can save/load led board configuration on mobile software. User can see the GPS module position using a map on pc software. User can see the GPS module position using a map on mobile software. User can manage device list using pc software. User can manage device list using mobile software. User can choose whether the device will response to the commander or not. User can change the physical connection from RS232 to GSM/GPS or vice versa.
3.1.2Content editor requirement Allows change led board size/colors. Allows changing message font/size/position. Be able to convert image (color, grayscale) to binary image. Be able to apply effects to the content. Be able to convert led board content to corresponding hex code.
3.1.3Led Board Controller requirement Well designed to be minimized in size/cost and maximized in quality. Compatible with other GSM/GPS module interface. Has long durability in a constant period of time.
7/28/2019 Capstone Document Final
20/125
20Requirements
3.2 System Requirement Specification3.2.1External Interface Requirements3.2.1.1User Interfaces3.2.1.1.1 PC Commander
Main Screen of PC Commander Program
Figure 3-1: Draft main screen of PC Commander
7/28/2019 Capstone Document Final
21/125
21 Wireless Module and Applications
The Locating tool
User can use this tool to keep track of LED boards positions.
Figure 3-2: Draft screen of locating tool
3.2.1.1.2 Mobile CommanderThe Mobile Commander helps users locating the led board devices and inputting text message, as
well as adding effects to the text.
Figure 3-3: Draft screen of Mobile commander
7/28/2019 Capstone Document Final
22/125
22Requirements
3.2.1.2Hardware Interfaces The PC Commander communicates with the central controller via RS232 or using a GSM/GPS
Module.
The Central Controller communicates with the GSM/GPS Module and the led message board viaRS232.
The Mobile Phone Commander and GSM/GPS modules communicate with the central controllervia GSM/GPS network.
Figure 3-4: Hardware Interface
3.2.1.3Software Interface WMA consists of three components: The PC Commander software will be built using C# on Microsoft Visual Studio .NET framework. The Mobile Commander software will be built using Android framework with Eclipse IDE tool. The Embedded software lies on the microcontroller inside the central controller will be built
using c/c++ on MPLab IDE of Microchip.
3.2.1.4Communications Protocol PC commander and Central Controller control the GSM/GPS Module via AT Command Set. GSM/GPS Module and Mobile Phone communicates via GSM/GPS communication Protocols. PC Commander, mobile commander and GPRS Server communicates via TCP/IP over the
Internet.
7/28/2019 Capstone Document Final
23/125
23 Wireless Module and Applications
3.2.2System Features3.2.2.1PC Commander3.2.2.1.1 Overall Diagram
Users
PC commader
Manage LED's list
Manage a specific
LED
Prepare display
content to send
uses
uses
uses
Use GPS
communication
uses
Load/Save
configurations
uses
Connect
uses
USE CASE-1 SPECIFICATION
Use-case No. UC0001 Use-case Version
Use-case Name Connect PC commander to board
Author ThuanNB
Date 27/05/2011 Priority Normal
Actor:
User
Summary:
7/28/2019 Capstone Document Final
24/125
24Requirements
- Connect PC commander to board.Goal:
- Connect PC commander to boardTriggers
- User starts PC Commander and chooses a communication optionPreconditions:
- PC Commander is started successfully
Post Conditions:
N/A
Main Success Scenario:
- A successful message box appearsAlternative Scenario:
- An error message box appears to remind user to try againExceptions:
-
Connection is successful but is interrupted while user is using PC commander
Relationships:
Business Rules:
N/A
7/28/2019 Capstone Document Final
25/125
25 Wireless Module and Applications
3.2.2.1.2 Manage LED list Diagram
Users
Manage LED list
PC commader
View All LED list
Add new
Delete
uses
uses
uses
uses
USE CASE-2 SPECIFICATION
Use-case No. UC0002 Use-case Version
Use-case Name View LED
Author ThuanNB
Date 27/05/2011 Priority Normal
Actor:
User
Summary:
- View a selected Leds display contentGoal:
7/28/2019 Capstone Document Final
26/125
26Requirements
- Check a selected Leds display content before updating itTriggers
- User starts PC Commander-
User selects a communication option- User selects a specific LED from LED list
Preconditions:
- PC Commander is started successfully- Connection is OK- LED list is not empty
Post Conditions:
N/A
Main Success Scenario:
- Display LEDs contentAlternative Scenario:
- An error message box appears due to network problemExceptions:
- No LED is selectedRelationships:
US1
Business Rules:
N/A
USE CASE-3 SPECIFICATION
Use-case No. UC003 Use-case Version
Use-case Name Add new device to device list
7/28/2019 Capstone Document Final
27/125
27 Wireless Module and Applications
Author DatTX
Date 27/05/2011 Priority Normal
Actor:
User
Summary:
After showing all the device list to the user, PC commander allows user to add new device to the
device list
Goal:
Allow user to add new device, extends out system.
Triggers
- The user start PC Commander- User chose manage devices option in menu- User chose add new device in option menu
Preconditions:
N/A
Post Conditions:
- A new input form is show to the user- Add the new device to the database
Main Success Scenario:
- PC commander show the input form to user- User must put the mobile number for new device, position can be null- When user finish the input process, new device data will be add to the database- New update request can be send if user want to update the position of the device immediately
Alternative Scenario:
None
Exceptions:
- Adding new data to database error
7/28/2019 Capstone Document Final
28/125
28Requirements
Relationships:
UC004
Business Rules:
N/A
USE CASE-4 SPECIFICATION
Use-case No. UC004 Use-case Version
Use-case Name Remove a device from device list
Author DatTX
Date 27/05/2011 Priority Normal
Actor:
User
Summary:
After showing all the device list to the user, PC commander allow user to remove specific
devices from the device list
Goal:
Allow user to remove devices, reduce out system.
Triggers
- The user start PC Commander- User chose manage devices option in menu- User chose remove device in option menu
Preconditions:
N/A
Post Conditions:
- A new input form is show to the user
7/28/2019 Capstone Document Final
29/125
29 Wireless Module and Applications
- Remove selected devices from the databaseMain Success Scenario:
- User can chose multiple devices to remove-
When user finish the process, all selected devices will be remove from database
Alternative Scenario:
None
Exceptions:
- Remove data from database errorRelationships:
UC004
Business Rules:
N/A
7/28/2019 Capstone Document Final
30/125
30Requirements
3.2.2.1.3 Manage a selected LED
Users
Manage a specific
LED
PC commader
View a selected
LED's display content
Clear the selectedLED's display content
Update the selected
LEd's display content
uses
uses
uses
uses
USE CASE-05 SPECIFICATION
Use-case No. UC0005 Use-case Version
Use-case Name View the device list
Author DatTX
Date 27/05/2011 Priority Normal
Actor:
7/28/2019 Capstone Document Final
31/125
31 Wireless Module and Applications
User
Summary:
After user start PC Commander, user want to show the device list and manage it
Goal:
Show user where all of the devices are in a list view with some control.
Triggers
- The user start PC Commander- User choose manage device in main menu
Preconditions:
-
The device list is loaded before
Post Conditions:
- All device with its attribute contains: position(longitude, latitude), mobile number will be showin a list view
Main Success Scenario:
- PC commander load the device list from database- PC commander show also controls for user to manage the device like update position, update
mobile number, add/remove device from the list.
Alternative Scenario:
- If there is no device is loaded before, a message dialog will be showExceptions:
Loading database error
Relationships:
UC005,UC006,UC007,UC008
Business Rules:
N/A
7/28/2019 Capstone Document Final
32/125
32Requirements
USE CASE-6 SPECIFICATION
Use-case No. UC0006 Use-case Version
Use-case Name Clear LED content
Author ThuanNB
Date 27/05/2011 Priority Normal
Actor:
User
Summary:
- Clear Leds contentGoal:
- Clear LEDs content to update new one ifneededTriggers
- User starts PC Commander- User selects a communication option- User selects a specific LED- User choose to delete its display content
Preconditions:
- PC Commander is started successfully- Connection is OK- LED list is not empty
Post Conditions:
N/A
Main Success Scenario:
- A warning message appears to warn user if he really wants to clear the LEDs display contentIf the user agrees, the LEDs content no longer exists
7/28/2019 Capstone Document Final
33/125
33 Wireless Module and Applications
Alternative Scenario:
- An error message appears due to network problemsExceptions:
- NoRelationships:
UC1, UC05
Business Rules:
N/A
USE CASE-7 SPECIFICATION
Use-case No. UC07 Use-case Version
Use-case Name Update content of current LED
Author LinhTH
Date 27/05/2011 Priority Normal
Actor:
User
Summary:
This caseallows the user to update content of current LED, when they finish to input Text, Image
and choose effect.
Goal:
Update content of current LED.
Triggers
- Click on Update buttonPreconditions:
7/28/2019 Capstone Document Final
34/125
34Requirements
- Choose Led in the list Led- Input text and choose effect- Input image and choose effect
Post Conditions:
- Text and image will display in simulation Led.Main Success Scenario:
- When User click Update button, Text which is in text editor and image will load in simulationLed
Alternative Scenario:
- Everything doesnt change.Exceptions:
- Text is empty and Image is not chosenRelationships:
- U1- U6Business Rules:
N/A
7/28/2019 Capstone Document Final
35/125
35 Wireless Module and Applications
3.2.2.1.4 Prepare display content to send
Users
Prepare display
content to send
PC commader
Input customized
text
Input an
customized image
Text alignment on
LEDs
uses
uses
uses
uses
Image alignment on
LEDs
uses
Set LED size
uses
Preview
uses
Send
uses
USE CASE-8 SPECIFICATION
Use-case No. UC0008 Use-case Version
Use-case Name Input text
7/28/2019 Capstone Document Final
36/125
36Requirements
Author ThuanNB
Date 27/05/2011 Priority Normal
Actor:
User
Summary:
- Input text to send to LEDsGoal:
- Allow user to customize text inputTriggers
- User starts PC Commander- User selects a communication option- User selects text input option- User enters text content and customize it
Preconditions:
- PC Commander is started successfully- Connection is OK- Text is not empty
Post Conditions:
N/A
Main Success Scenario:
- Customized text is createdAlternative Scenario:
- N/AExceptions:
- NoRelationships:
7/28/2019 Capstone Document Final
37/125
37 Wireless Module and Applications
UC1
Business Rules:
N/A
USE CASE-9 SPECIFICATION
Use-case No. UC0009 Use-case Version
Use-case Name Input Image
Author ThuanNB
Date 27/05/2011 Priority Normal
Actor:
User
Summary:
- Input image to send to LEDsGoal:
- Allow user to customize Image inputTriggers
- User starts PC Commander- User selects a communication option- User selects image input option- User loads an image and customize it
Preconditions:
- PC Commander is started successfully- Connection is OK- Image is not empty
Post Conditions:
7/28/2019 Capstone Document Final
38/125
38Requirements
N/A
Main Success Scenario:
- Customized Image is createdAlternative Scenario:
- User loads an unsupported Image type. A warning message appearsExceptions:
- NoRelationships:
UC1
Business Rules:
N/A
USE CASE-10 SPECIFICATION
Use-case No. UC0010 Use-case Version
Use-case Name Text alignment
Author ThuanNB
Date 27/05/2011 Priority Normal
Actor:
User
Summary:
- Choose texts position to display on LEDsGoal:
- Allow user to select a suitable position
7/28/2019 Capstone Document Final
39/125
39 Wireless Module and Applications
Triggers
- User starts PC Commander- User selects a communication option- User selects text input option- User enters text and customize it- User uses arrow buttons to change texts position
Preconditions:
- PC Commander is started successfully- Connection is OK- Text is not empty
Post Conditions:
N/A
Main Success Scenario:
- Texts position changed as expectedAlternative Scenario:
- NoExceptions:
- Text s position is outside Leds boardersRelationships:
UC1, UC8
Business Rules:
N/A
USE CASE-11 SPECIFICATION
Use-case No. UC0011 Use-case Version
7/28/2019 Capstone Document Final
40/125
40Requirements
Use-case Name Image alignment
Author ThuanNB
Date 27/05/2011 Priority Normal
Actor:
User
Summary:
- Choose images position to display on LEDsGoal:
- Allow user to select a suitable positionTriggers
- User starts PC Commander- User selects a communication option- User selects image input option- User enters an image and customize it- User uses arrow buttons to change the images position
Preconditions:
- PC Commander is started successfully- Connection is OK- Image is not empty
Post Conditions:
N/A
Main Success Scenario:
- Images position changed as expectedAlternative Scenario:
- NoExceptions:
7/28/2019 Capstone Document Final
41/125
41 Wireless Module and Applications
- Image size is too large- image s position is outside Leds boarders
Relationships:
UC1, UC9
Business Rules:
N/A
USE CASE-12 SPECIFICATION
Use-case No. UC012 Use-case Version
Use-case Name Run to preview in simulation Led table
Author LinhTH
Date 27/05/2011 Priority Normal
Actor:
User
Summary:
This caseallows the user to know how current Led works in simulation Led table.
Goal:
Showcurrent LED works in simulation Led table.
Triggers
- Click on Preview buttonPreconditions:
- Choose Led in the list Led- Input text and choose effect- Input image and choose effect- Update content of Current Led
7/28/2019 Capstone Document Final
42/125
42Requirements
Post Conditions:
Simulation Led work with text and images effect.
Main Success Scenario:
- When User click Preview button, text and image with its effect will be repented in simulationLed table.
Alternative Scenario:
- Simulation Led table doesnt change.Exceptions:
- Cant convert image and text s effect to hex codeRelationships:
- U1-U10Business Rules:
N/A
USE CASE-13 SPECIFICATION
Use-case No. UC013 Use-case Version
Use-case Name Set size for Led table
Author LinhTH
Date 27/05/2011 Priority Normal
Actor:
User
Summary:
7/28/2019 Capstone Document Final
43/125
43 Wireless Module and Applications
This caseallows the user to set size for Led table.
Goal:
ShowSet size for Led table
Triggers
- Click on View SizePreconditions:
- Connect to device successfullyPost Conditions:
- Size of Simulation Led will change.Main Success Scenario:
- When User click Size, and input height and weight, the simulation led table will change followthis size
Alternative Scenario:
- Exceptions:
-
The input height and weight is too small or big
Relationships:
- U1Business Rules:
+ N/A
7/28/2019 Capstone Document Final
44/125
44Requirements
3.2.2.1.5 Use GPS communication
Users
Use GPS
communication
PC commader
Update LEDs'
postions
Display LEDs'
positions on Google map
Zoom in/out Google
Map
uses
uses
uses
uses
USE CASE-0014 SPECIFICATION
Use-case No. Use-case Version
Use-case Name Send request update device position
Author DatTX
Date 27/05/2011 Priority Normal
Actor:
User
7/28/2019 Capstone Document Final
45/125
45 Wireless Module and Applications
Summary:
When user want to update all device position, PC commander will sent update request to all
specific device to get information via connected board.
Goal:
Keep the device position up-to-date
Triggers
- User connect PC commander to device- User view the Google map- User choose update command from menu option
Preconditions:
- PC commander is connected to the mobile network- PC commander is connected to device- The device is connected to mobile network
Post Conditions:
N/A
Main Success Scenario:
- PC commander send tracking request to the specific LED board-
LED board send request the position information to the satellite via GPS and send it to thedevice that connected with PC commander.
- The device send data to PC commander to resolve.- PC commander receive the information from the device and update it on the Google map
Alternative Scenario:
- If device cannot connect to the Mobile network to send tracking request, a dialog will bedisplayed to notice user
- When request is send successful, an dialog will be display to tell user complete the taskExceptions:
- Device cannot send message to LED board to request update- PC Commander is not connected to control device
7/28/2019 Capstone Document Final
46/125
46Requirements
Relationships:
Business Rules:
N/A
USE CASE-15 SPECIFICATION
Use-case No. Use-case Version
Use-case Name View Google map on PC Commander
Author DatTX
Date 27/05/2011 Priority Normal
Actor:
User
Summary:
After user start PC Commander, it load all the device positions in the last update to display on
the Google map.
Goal:
Show user where all of the devices are in Google Map.
Triggers
- The user start PC CommanderPreconditions:
- PC is connected to the Internet- Device is sent position data to the server before.
Post Conditions:
N/A
Main Success Scenario:
7/28/2019 Capstone Document Final
47/125
47 Wireless Module and Applications
- PC Commander load the Map from the internet- PC commander load the data from database to display to the Google map
Alternative Scenario:
-
If PC commander cannot connect to the internet to load the Map, a error dialog will bedisplayed
- If there is no device data, an notification dialog will be displayedExceptions:
Loading Google map has interrupted by the network problem
Relationships:
Business Rules:
N/A
USE CASE 0016 SPECIFICATION
Use-case No. UC0016 Use-case Version
Use-case Name Zoom the Google map
Author DatTX
Date 27/05/2011 Priority Normal
Actor:
User
Summary:
Zoom in or zoom out when user tap or zoom in the Map.
Goal:
To help user to view the device position in details place
Triggers
- User view the Google map
7/28/2019 Capstone Document Final
48/125
48Requirements
- Zoom in or Zoom out the map in touch screenPreconditions:
- The Google map is loaded beforePost Conditions:
- The Google map is displayed in suitable size.Main Success Scenario:
- The map is loaded successful- The mobile is connected to the Internet
Alternative Scenario:
-
If the map is zoom in or zoom out in maximum or minimum, the map can not zoom in/ outanymore
- If the loading map is interrupted because of mobile network problem, the dialog message willbe showed
Exceptions:
The device position is different from before zoom-ing
Relationships:
Business Rules:
N/A
7/28/2019 Capstone Document Final
49/125
49 Wireless Module and Applications
3.2.2.1.6 Load/Save configuration
Users
Load/Save
configuration for next times
PC commader
Load text/Image
configuration
Save text/image
configuration
uses
uses
uses
USE CASE-17 SPECIFICATION
Use-case No. UC017 Use-case Version
Use-case Name Load configuration
Author LinhTH
Date 27/05/2011 Priority Normal
Actor:
7/28/2019 Capstone Document Final
50/125
50Requirements
User
Summary:
- This caseallows the user to load configuration of each Led on device.Goal:
- Load configuration of Led on deviceTriggers
- Choose Led and Click on Load configuration buttonPreconditions:
- Connect to device successfully-
Choose Led which need to load
Post Conditions:
- Content of current led will save and display in simulation.- Text will display in text editor
Main Success Scenario:
- When User click Load configuration ,content of match device will get to PC and savedAlternative Scenario:
- Exceptions:
- Connection error and cant get configuration of Led on deviceRelationships:
- U1,U2Business Rules:
N/A
7/28/2019 Capstone Document Final
51/125
51 Wireless Module and Applications
USE CASE-18 SPECIFICATION
Use-case No. UC018 Use-case Version
Use-case Name Save configuration for next time
Author LinhTH
Date 27/05/2011 Priority Normal
Actor:
User
Summary:
- This caseallows the user save configuration for current Led.Goal:
- Save configuration for next timeTriggers
- Click on Save configuration buttonPreconditions:
- Connect to device successfully- Choose Led which need to load- Update and preview successful
Post Conditions:
- Display dialog to report success or failMain Success Scenario:
- When User click save configuration ,content of match Led will be saved on PCAlternative Scenario:
- Exceptions:
7/28/2019 Capstone Document Final
52/125
52Requirements
- Cant save configuration of Led.Relationships:
- U1,U2Business Rules:
N/A
3.2.2.2Mobile Commander3.2.2.2.1 Use Case Using Google Map Diagram
USE CASE01 SPECIFICATION
7/28/2019 Capstone Document Final
53/125
53 Wireless Module and Applications
Use-case No. Use-case Version
Use-case Name View Google map on Mobile Commander
Author DatTX
Date 27/05/2011 Priority Normal
Actor:
User
Summary:
After user start Mobile Commander, it load all the device positions in the last update to display
on the Google map.
Goal:
Show user where all of the devices are in Google Map.
Triggers
The user start Mobile Commander
Preconditions:
-
Mobile is connected to the Internet- Device is sent position data to the server before.
Post Conditions:
N/A
Main Success Scenario:
- Mobile Commander load the Map from the internet- Mobile commander load the data from database to display to the Google map
Alternative Scenario:
- If Mobile commander cannot connect to the internet to load the Map, a error dialog will bedisplayed
- If there is no device data, an notification dialog will be displayedExceptions:
7/28/2019 Capstone Document Final
54/125
54Requirements
Loading Google map has interrupted by the network problem
Relationships:
UC002, UC003
Business Rules:
N/A
USE CASE002 SPECIFICATION
Use-case No. Use-case Version
Use-case Name Request update device position
Author DatTX
Date 27/05/2011 Priority Normal
Actor:
User
Summary:
When user want to update all device position, Mobile commander will sent update request to all
specific device to get information
Goal:
Keep the device position up-to-date
Triggers
- User view the Google map- User choose update command from menu option
Preconditions:
- Mobile commander is connected to the mobile network
7/28/2019 Capstone Document Final
55/125
55 Wireless Module and Applications
Post Conditions:
N/A
Main Success Scenario:
- Mobile commander send tracking request to the specific LED board- LED board send request the position information to the satellite via GPS and send it to the
Mobile commander.
- Mobile commander receive the information from the device and update it on the Google map
Alternative Scenario:
- If Mobile commander cannot connect to the Mobile network to send tracking request, a dialogwill be displayed to notice user
- When request is send successful, an dialog will be display to tell user complete the taskExceptions:
Mobile commander cannot send message to request update
Relationships:
UC001
Business Rules:
N/A
USE CASE 003 SPECIFICATION
Use-case No. UC003 Use-case Version
Use-case Name Zoom the Google map
Author DatTX
Date 27/05/2011 Priority Normal
7/28/2019 Capstone Document Final
56/125
56Requirements
Actor:
User
Summary:
Zoom in or zoom out when user tap or zoom in the Map.
Goal:
To help user to view the device position in details place
Triggers
- User view the Google map- Zoom in or Zoom out the map in touch screen
Preconditions:
- The Google map is loaded beforePost Conditions:
- The Google map is displayed in suitable size.Main Success Scenario:
- The map is loaded successful- The mobile is connected to the Internet
Alternative Scenario:
- If the map is zoom in or zoom out in maximum or minimum, the map cannot zoom in/ outanymore
- If the loading map is interrupted because of mobile network problem, the dialog message willbe showed
Exceptions:
The device position is different from before zooming
Relationships:
UC001
Business Rules:
N/A
7/28/2019 Capstone Document Final
57/125
57 Wireless Module and Applications
3.2.2.2.2 Use Case Manage Device List Diagram
USE CASE04 SPECIFICATION
Use-case No. UC004 Use-case Version
Use-case Name View the device list
Author DatTX
Date 27/05/2011 Priority Normal
Actor:
User
Summary:
7/28/2019 Capstone Document Final
58/125
58Requirements
After user start Mobile Commander, user want to show the device list and manage it
Goal:
Show user where all of the devices are in a list view with some control.
Triggers
- The user start Mobile Commander- User choose manage device in main menu
Preconditions:
- The device list is loaded beforePost Conditions:
-
All device with its attribute contains: position(longitude, latitude), mobile number will be showin a list view
Main Success Scenario:
- Mobile commander load the device list from database- Mobile commander show also controls for user to manage the device like update position,
update mobile number , add/remove device from the list.
Alternative Scenario:
- If there is no device is loaded before, a message dialog will be showExceptions:
Loading database error
Relationships:
UC005,UC006,UC007,UC008
Business Rules:
N/A
USE CASE05 SPECIFICATION
7/28/2019 Capstone Document Final
59/125
59 Wireless Module and Applications
Use-case No. UC005 Use-case Version
Use-case Name Add new device to device list
Author DatTX
Date 27/05/2011 Priority Normal
Actor:
User
Summary:
After showing all the device list to the user, Mobile commander allow user to add new device to
the device list
Goal:
Allow user to add new device, extends out system.
Triggers
- User started Mobile Commander- User chose manage devices option in menu- User chose add new device in option menu
Preconditions:
N/A
Post Conditions:
- A new input form is show to the user- Add the new device to the database
Main Success Scenario:
- Mobile commander show the input form to user- User must put the mobile number for new device, position can be null- When user finish the input process, new device data will be add to the database- New update request can be send if user want to update the position of the device immediately
7/28/2019 Capstone Document Final
60/125
60Requirements
Alternative Scenario:
None
Exceptions:
- Adding new data to database errorRelationships:
UC004
Business Rules:
N/A
USE CASE06 SPECIFICATION
Use-case No. UC006 Use-case Version
Use-case Name Remove a device from device list
Author DatTX
Date 27/05/2011 Priority Normal
Actor:
User
Summary:
After showing all the device list to the user, Mobile commander allow user to remove specific
devices from the device list
Goal:
Allow user to remove devices, reduce out system.
Triggers
7/28/2019 Capstone Document Final
61/125
61 Wireless Module and Applications
- The user start Mobile Commander- User chose manage devices option in menu- User chose remove device in option menu
Preconditions:
N/A
Post Conditions:
- A new input form is show to the user- Remove selected devices from the database
Main Success Scenario:
- User can chose multiple devices to remove- When user finish the process, all selected devices will be remove from database
Alternative Scenario:
None
Exceptions:
- Remove data from database errorRelationships:
UC004
Business Rules:
N/A
USE CASE07 SPECIFICATION
Use-case No. UC007 Use-case Version
Use-case Name Edit the message to send
7/28/2019 Capstone Document Final
62/125
62Requirements
Author DatTX
Date 27/05/2011 Priority Normal
Actor:
User
Summary:
This function is to prepare message when user want to send message to device. Its allow user to
add text include configure font, size and effect of the texture and also chose device to send.
Goal:
Show the editor to user for editing the message to send.
Triggers
- User start Mobile Commander- User choose send message from main menu or from option menu when viewing a device.- Message editor is show to user- Allow user to input text, font, size, effect of string to send- Allow user to input the device ID or device mobile number to send
Preconditions:
- Device list is listed before and has at least one devicePost Conditions:
N/A
Main Success Scenario:
- Mobile Commander load the device list from database and has at least one deviceAlternative Scenario:
N/A
Exceptions:
- If there is no device in device list, an warning message will be show to userRelationships:
7/28/2019 Capstone Document Final
63/125
63 Wireless Module and Applications
UC004,UC008
Business Rules:
Any message is not more than 1000 characters.
USE CASE08 SPECIFICATION
Use-case No. UC008 Use-case Version
Use-case Name Send message to device list
Author DatTX
Date 27/05/2011 Priority Normal
Actor:
User
Summary:
This function allow user to send message that edited in editor form to specific devices.
Goal:
Send message to device list. Show status of deliverable message when finish sending
Triggers
- User start Mobile Commander- User choose send message from main menu or from option menu when viewing a device.- Message editor is show to user- Allow user to input text, font, size, effect of string to send- Allow user to input the device ID or device mobile number to send- User chose send command to send message to devices
Preconditions:
- Mobile commander is connected to mobile network.
7/28/2019 Capstone Document Final
64/125
64Requirements
- Device list is not empty- Message is not empty
Post Conditions:
N/A
Main Success Scenario:
- Mobile Commander load the device list from database and has at least one device- User choose device to send message from device list- Message will be send to all of device in selected list- Delivery message is show after user send message to tell user about the status of the message)
delivered or not)
Alternative Scenario:
- If no device is selected before, an warning message is showedExceptions:
- If mobile commander is not connected to mobile network or cannot send message because ofany problem, an warning message is showed.
- If message is empty, an warning message is showed.Relationships:
UC004, UC007
Business Rules:
N/A
7/28/2019 Capstone Document Final
65/125
65 Wireless Module and Applications
3.2.2.3Central Controller3.2.2.3.1 Functions
Send SMS to the commander to provide informationInput - User send SMS to GSM/GPS Module to get informationProcessing involved - Extract SMS contents.
- Processing the content.- Wrap the processed content into SMS format
Expected output - Send SMS to the user successfully
Authenticate userInput - User sends SMS to GSM/GPS ModuleProcessing involved - Extract SMS contents.
- Processing the content.- Validate the mobile number and password provided in the SMS
Expected output - Reject if the mobile number is not authorized.
Modify LED message boardInput - User sends SMS to GSM/GPS ModuleProcessing involved - Extract SMS contents.
- Processing the content.- Send data to the led board
Expected output -
Content of the LED message board changed.
7/28/2019 Capstone Document Final
66/125
66
Implementation
7/28/2019 Capstone Document Final
67/125
67 Wireless Module and Applications
4.1 System Architecture4.1.1Proposed System Architecture
I/O Pins
RS232
GPS
TCP/IP
TCP/IP
GSMRS232
GSM
TCP/IP
Server
Mobile
Wireless ModulePC
Wireless Module Controller
Satellite
Figure 4-1: System Architecture
The architecture of WMA consists of two main components: The commander, which is
developed on PC and Mobile and the controller, which is developed on the microcontroller, wireless
module and Led module. These two components are almost separated except that they
communicated through GSM network and the Internet. The communication between them is as
follows. Both the commander and the Controller are joined to the GSM network. When the
commander sends an SMS to the controller, the microcontroller handles it and manipulates the LED
Module. The Controller also connects to the Internet via GPRS core network. There would be a GPRS
server which serves as a data collector (in this case, the data is GPS information) from
microcontrollers and provides them to the client the commanders. The proposed architecture
make the system easy to be implemented and also very convenient for debugging, maintaining the
system.
7/28/2019 Capstone Document Final
68/125
68Implementation
.NET Framework
UI
Android Framework
XML
C#
Microcontroller
Wireless Module
Base Classes SQLite Core Libraries
Java
AT COMMANDS SET UART I/O Pins
Led Module Controller
Comman
der
andGPRS
Serve
r
Figure 4-2: Components Architecture
4.1.2System Interfaces4.1.2.1Hardware Interface
The wireless module that consists of GSM module and GPS module provides two UARTports for external connection with the microcontroller.
The Microcontroller connects to the LED module via I/O pins.4.1.2.2Software Interface
The wireless module provides AT Commands set for external device for manipulatingpurpose.
The Commanders (both on PC and Mobile) and the microcontroller communicate basedon the WMMF protocol (See 4.7.1 for details).
The commanders (both on PC and Mobile), the GPRS Server and the microcontrollercommunicate based on WMCP protocol (See 4.7.2 for details).
7/28/2019 Capstone Document Final
69/125
69 Wireless Module and Applications
4.1.3Component Diagram
Figure 4-3: Component Diagram
7/28/2019 Capstone Document Final
70/125
Implementation
4.2 Detailed Description of Components4.2.1System Class & Block Diagram4.2.1.1PC Commander Class Diagram
+SetEnabled(in isTrue : bool, in isEdit : bool) : void
+GetDataFromXmlFile(in nodeName : string, in nodeID : string) : void
+GetDataFromForm() : void
+LoadTreeView() : void
+LoadDataToComboEffect() : void
+LoadFontToComboxFont() : void
+ResetForm() : void
-currentLedMatrix : LedMatrixTable
-XMLPath_ListLedTable : string
-XMLPath_ListEffectName : string
-XMLPath_Account : string
-isEdit : bool
-fixHeight : int
-fixWidth : int
-onOffMatrix : int[,]
-initialMatrix : int[,]
PCCommander+DataToString(in ledMatrix : LedMatrixTable)
+ConvertToStringData() : string
-ConvertBitmapToLastArray() : int[,]
-ConvertBitmapToArray() : int[,]
-CreateBitmapImage(in strConvert : string, in fName : string, in fSize : int, in fStyle :
FontStyle) : Bitmap
-MakeGrayscale(in original : Bitmap) : Bitmap
-imagePath : string
-scanDirection : int
-text : string
-height : int
-width : int
-horizontalOffSet : int
-verticalOffSet : int
-objBitmap : Bitmap-turnID : int
-isBorder : bool
-isReverse : bool
-isUpset : bool
DataToString
+StringToLEDMatrix(in ledMatrix) : void
+ConvertStringToArray() : int
-scanDirection : int
-stringBytes : string
-height : int
-width : int
-speed : int
-autoHeight : int
-autoWidth : int
StringToLEDMatrix
+GetEffect(in int[,] inputArray, int turnID, bool isBorder, bool isReverse, bool
isUpset) : int[,]
-ConvertArrayBorder(in objArray : int[,]) : int[,]
-ConvertArrayReverse(in objArray : int[,]) : int[,]
-ConvertArrayTurnLeft(in objArray : int[,]) : int[,]
-ConvertArrayTurnRight(in objArray : int[,]) : int[,]
-ConvertArrayUpset(in objArray : int[,]) : int[,]
AlignEffect
+ConvertBitsToBytes(in stringData01 : string) : byte
+ConvertByteToString(in byteArray : byte) : string
+ConvertStringToByte(in stringEnconding : string) :
byte
+ConvertByteToBits(in byteArray : byte) : string
ByteStringConverter
+FileReaderWriter(in path : string)
+GetDataFromXmlFile(in ledTableName : string, in ledTableCardID : string) : LedMatrixTable
+CreateNewLedTable(in ledMatrix : LedMatrixTable) : void
+SaveLedTableToXML(in ledMatrix : LedMatrixTable, in name : string, in cardID : string) : bool+SaveLedTableName(in newLedTableName : string, in ledTableCardID : string) : bool
+DeleteLedTableInXML(in ledTableName : string, in ledTableCardID : string) : bool
+CheckLedTableCardID(in ledTableCardID : bool) : bool
+ChangePassWord(in oldPass : string, in newPass : string) : bool
+SaveLedTableToXML(in ledMatrix : LedMatrixTable, in newName : string, in newID : string, in hight : string, in width :
string) : bool
-strFilePath : string
FileReaderWriter
+GetEffect(in int effectID, int[,] inputMatrix) : int
-GetDataEffect(in int effectID) : string
-Effect_None(in int[,] inputMatrix) : void
-Effect_RightToLeft(in int[,] inputMatrix) : void
-Effect_LeftToRight(in int[,] inputMatrix) : void
-Effect_UpToDown(in int[,] inputMatrix) : void
-Effect_DownToUp(in int[,] inputMatrix) : void
-rowsOfOnOffMatrix : int
-columnsOfOnOffMatrix : int
-onOffMatrix : int
MotionEffect
RS232
+LedMatrixTable()
-dataType : int
-textFormat : TextFormat
-text : string
-imagePath : string
-stringBytes : string
-height : int
-width : int
-speed : int
-effect : int
-scanDirection : int-name : string
-id : string
LedMatrixTable
+TextFormat()
+GetFormatString() : string
+AnalyserFormatString(in strFormat : string) : void
-fontName : string
-fontSize : int
-fontStyle : object
-horizontalOffSet : int
-verticalOffSet : int
-turnID : int
-isBorder : bool
-isReverse : bool
-isUpset : bool
TextFormat
+EffectItem(in name : string, in value : int)
-name : string
-value : int
EffectItem
About
-width : int
-height : int
-ledTableName : string
-ledTableCardID : string
-isOk : bool
AddNewLedTable
-typeConnection : string
-isOK : bool
Connection
-isOK : bool
ChangePassWord
-ledMatrix : LedMatrixTable
-strXMLpath : string
LedMatrixProperties
LedMatrixControl.
dll
7/28/2019 Capstone Document Final
71/125
71 Wireless Module and Applications
4.2.1.2Mobile Commander Class Diagram
7/28/2019 Capstone Document Final
72/125
72Implementation
4.2.1.3GPRS Server Class Diagram
4.2.1.4GPS Client
7/28/2019 Capstone Document Final
73/125
73 Wireless Module and Applications
4.2.1.5Controller Block Diagram4.2.1.5.1 Block diagram 1: Get GPS data
UART
UART
UART
UART
GPS Module
Microcontroller
GSM/GPRS Module
GPRS Server
TCP/IP
4.2.1.5.2 Block Diagram 2: Control LED board via SMS message
I/OPins
UART
UART
GSM
GSM
PC/Mobile
Commander
GPS/GPRS Module
Microcontroller
Led Board
7/28/2019 Capstone Document Final
74/125
74Implementation
4.2.2System Sequence Diagram4.2.2.1PC Commander Sequences4.2.2.1.1 Get and display Matrix from file
7/28/2019 Capstone Document Final
75/125
75 Wireless Module and Applications
4.2.2.1.2 Input Data
7/28/2019 Capstone Document Final
76/125
76Implementation
4.2.2.1.3 Clear Data
4.2.2.1.4 Save current LED matrix
7/28/2019 Capstone Document Final
77/125
77 Wireless Module and Applications
4.2.2.1.5 Add new LED matrix
7/28/2019 Capstone Document Final
78/125
78Implementation
4.2.2.1.6 Delete current LED matrix
7/28/2019 Capstone Document Final
79/125
79 Wireless Module and Applications
4.2.2.1.7 Preview LED Matrix
4.2.2.1.8 Pause animation
7/28/2019 Capstone Document Final
80/125
80Implementation
4.2.2.1.9 Reset LED matrix
4.2.2.2Mobile Commander Sequences4.2.2.2.1 Display map with the device position list on the mobile
7/28/2019 Capstone Document Final
81/125
81 Wireless Module and Applications
4.2.2.2.2 Set Led content for specified modules by sending SMS command
7/28/2019 Capstone Document Final
82/125
82Implementation
4.2.2.2.3 Send SMS command to get current content of the module
7/28/2019 Capstone Document Final
83/125
83 Wireless Module and Applications
4.2.2.2.4 Add new devices to device list
7/28/2019 Capstone Document Final
84/125
84Implementation
4.2.2.2.5 Send Data to Device in Mobile Soft
7/28/2019 Capstone Document Final
85/125
85 Wireless Module and Applications
4.2.2.2.6 Display all modules list with its name, phone number
4.2.2.2.7 Display the map with the device position list on the mobile
7/28/2019 Capstone Document Final
86/125
86Implementation
4.2.2.2.8 Send SMS command to change Module password
7/28/2019 Capstone Document Final
87/125
87 Wireless Module and Applications
4.2.2.2.9 Connect to GPS Server and get devices position
7/28/2019 Capstone Document Final
88/125
88Implementation
4.2.2.3Microcontroller Sequences4.2.2.3.1 Get GPS data and send to GPRS server by Micro controller
7/28/2019 Capstone Document Final
89/125
89 Wireless Module and Applications
4.2.2.3.2 Control LED board via SMS message by Micro controller
7/28/2019 Capstone Document Final
90/125
90Implementation
4.2.2.4GPRS Server4.2.2.4.1 Accept a version sent from a client
7/28/2019 Capstone Document Final
91/125
91 Wireless Module and Applications
4.2.2.4.2 Accept Phone Number sent from GSM module
7/28/2019 Capstone Document Final
92/125
92Implementation
4.2.2.4.3 Accept and convert GPS data sent from a GSM module
7/28/2019 Capstone Document Final
93/125
93 Wireless Module and Applications
4.2.2.4.4 Accept a password sent from a mobile
7/28/2019 Capstone Document Final
94/125
94Implementation
4.2.2.4.5 Accept a phone No list request sent from a mobile
7/28/2019 Capstone Document Final
95/125
95 Wireless Module and Applications
4.2.2.4.6 Accept GPS data requests and send GPS data to mobiles
4.3 Analysis and selection of tools, devices4.3.1Devices4.3.1.1SIMCOM SIM548C module
The SIM548 module suits all the requirement of WMA. The module integrates both GSM/GPRS
module and GPS module, so the two main functions of the system could be implemented using onlythe SIM548 module instead of using two separated GSM and GPS modules. Besides, we chose the
SIM548 module for following advantages:
The GSM module operates at 4 bands: 850/900/18001900MHz. So it would be easier for thesystem to be compatible with any telecommunication network infrastructure.
7/28/2019 Capstone Document Final
96/125
96Implementation
The GSM module is controlled using AT commands set which is very well-documented and easyto understand.
The module operates at a supply voltage range from 3.4 to 4.5 V and it is also very low powerconsumption.
The normal operation temperature is from -30 C to +80C, so it would be able to work at almostevery condition.
The GSM module supports both Text and PDU mode, which is suitable for send binary data overGSM network. Regular SMS is limited to 160 septets (7bits) or 140 octets (8 bits). The LED data
required 8-bit-data-type so the PDU mode would be perfect for such purposes.
The transfer speed of the module is up to 85.6 kbps (downlink) and 42.8 kbps (uplink). The GSM module integrates TCP/IP stack. Two separated antenna connectors. The GPS module has high accuracy and quick acquisition rate. The GPS module Has 4Mb flash memory and 1Mb SRAM.4.3.1.2MICROCHIP dsPIC30F4013
The dsPIC30F4013 has two separated UART ports, which are suitable for controlling the SIM548 module.
Those two ports could be used at the same time for listening on the GPS port and send appropriate data
through GSM port.
4.3.1.3MICROCHIP PIC18F46K20The PIC18F46k20 is appropriate for manipulating LED Matrix and it also has UART ports which are used
for controlling GSM/GPRS module.
4.3.1.4LED Module (P10 outdoor 16x32x2) The Led module is single-color and could be use for displaying text, image, simple logo and even
animations.
Pixel size: 10 mm. Module size: 16 x 32. Expectation of life: 100,000 hours. High stability and luminosity. Could be put outdoor and is waterproof.4.3.2Tools4.3.2.1Microsoft Visual Studio 2008 SP1
Visual Studio is one of the most powerful IDE for developing software, both on software system
and embedded system. There is no doubt that VS is the best choice for those who want to develop
software application.
4.3.2.2Eclipse 3.6 (Helios)Eclipse was chose because of its huge community. For the past three years. Eclipse has been
used as a replacement for Development Tool of many hardware and software manufacture all over
7/28/2019 Capstone Document Final
97/125
97 Wireless Module and Applications
the world. Besides, The Mobile commander is developed on Android 2.2 (Froyo), which is fully
compatible with Eclipse.
4.3.2.3MPLAB IDE 8.43MPLAB IDE is a graphical, integrated debugging, programming tool for all kinds of Microchip
Microcontroller. The IDE also supports many third-party tools and it is also compatible with otherIDE. Besides, the programming guide for MPLAB is very well-documented and is very popular.
4.3.2.4Microsoft Visio 2010Visio was used to visualize system diagram, components diagram and class diagram of WMA
project.
4.3.2.5Astah UML ProAstah was used to draw sequence diagram of system components. The tool makes the drawing
easier because It provides source code importing, which is very useful for auto generating class
diagram.
4.3.2.6Tortoise SVN ClientTortoise SVN client is an open project which is used as a project file-server. This tool is free and
team members can easily add/update all project files/documents to the server. It helps us to
synchronize all project file/documents. It also help us manage the version of the documents and
users are able to show log and revert to any version if current version contains error. The server
address is place at URL:
https://cpro-wia.googlecode.com/svn/trunk
4.4 Circuit Design4.4.1Wireless Module Evolution Board
7/28/2019 Capstone Document Final
98/125
Implementation
7/28/2019 Capstone Document Final
99/125
99 Wireless Module and Applications
4.4.1.1Evolution Board Top LayerTop layer design of Evolution Board:
4.4.1.2Evolution Board Bottom LayerBottom layer design of Evolution Board:
7/28/2019 Capstone Document Final
100/125
100Implementationtation
4.4.2Controller Board
4.4.2.1Controller Board Layer
7/28/2019 Capstone Document Final
101/125
101 Wireless Module and Applications
4.5 Interface Design4.5.1PC Commander
Main Screen
PC Commander main screen is divided into 6 regions: toolbar, preview screen, setting & zooming panel,
editing panel, input panel, managing panel.
Toolbar
The strip menu contains following buttons (from left to right respectively):
Add button: Add new LED matrix. Save button: Save current configuration to XML file. Play button: Run the animation if the effect of LED matrix was enabled. Stop button: Stop the animation. Refresh button: Refresh the LED matrix content to default Clear button: Clear LED matrix content. Delete button: Delete selected LED matrix on Treeview. Send button: Send current LED matrix content to selected LED matrices on Treeview.
Managing panel
7/28/2019 Capstone Document Final
102/125
102Implementationtation
Managing panel display LED matrices that were saved in the XML file. Those LEDs are displayed in a tree
structure.
Preview Screen
The preview screen displays visually the LED contents and all settings that were applied to it.
Input Panel
User can input text or image in this panel. The commander also allows user to choose size, font, and
style.
Setting & zooming panel
The panel contains two text boxes for width and height settings, a checkbox for auto setting the LED
size, and a zooming slide for zooming in/out the LED matrix.
7/28/2019 Capstone Document Final
103/125
103 Wireless Module and Applications
Editing Panel
The panel contains a dropdown list box that contains available effects, a text box for inputting the LED
moving speed, for buttons that moves the LED matrix in for directions, and a sub panel. The sub panel
consists of 5 buttons with 5 editing effect for LED static content.
4.5.2Mobile Commander4.5.2.1Screen flow
PC commander contains 8 screens as following:
7/28/2019 Capstone Document Final
104/125
104Implementationtation
4.5.2.2Detailed screensMain screen
Main screen of mobile commander contains three buttons:
View Map Button: Go to [View map screen]. Manage Devices: Go to [All devices screen]. About us Button: Go to [About us screen].
View map screen
View map screen displays a Google Map and all devices position in the database
7/28/2019 Capstone Document Final
105/125
105 Wireless Module and Applications
All devices screen
The All devices screen show all devices in the database as a list. There is a checkbox on the right side of
each device. When user hits the menu button on themobile, the popup menus shows with 3 buttons:
Add button: Go to [Add device screen]. Update Button: Showing popup menu that contains update operations. Delete Button: Delete selected devices.
When pushing updat button, a popup menu shows with 4 options:
Set content: Go to [Set content Screen]. Get content screen: Get content of LED board. Get position: Get current position of devices. Change password: Go to [Change password screen].
Add device screen
7/28/2019 Capstone Document Final
106/125
106Implementationtation
The add device screen contains following controls:
Device name text box: Input device name. PhoneNum text box: Input device phone number. Longitude text box: Input device longitude. Latitude text box: Input device latitude. Password text box: Input device password. Add button: Create new device, add it to the database and go back to [All devices
screen]
Back button: Go back to [All devices screen] without applying any changes.Edit device screen
Edit device screen contains following controls:
Device name text box: Input device name Phone number text box: Input phone number Latitude textbox: Input latitude. Longitude textbox: Input longitude. Led board View: Displaying LED content. Save button: Save changes to database, go back to [All devices screen]. Back button: Go back to [All devices screen] without applying any changes.
7/28/2019 Capstone Document Final
107/125
107 Wireless Module and Applications
Change password screen
The screen contains following controls:
Old password text box: Input old password. New password text box: Input new password. Retype password text box: Input new password. Send Command button: Send set password command and go back to [All devices screen] Back button: Go back to [All devices screen] without applying any changes.
Set content screen
7/28/2019 Capstone Document Final
108/125
108Implementationtation
The screen contains following controls:
Device list text box: disabled text box that displays devices list. Content text box: Input LED content. Size text box: Input LED size. Effect list box: List of effects. Speed text box Input LED effect speed. Preview button Show LED content on the Led board View. Key arrows button: Move LED content in four directions. Led board View: Display LED content.
About Screen
4.5.3GPRS Server
7/28/2019 Capstone Document Final
109/125
109 Wireless Module and Applications
The GPRS Server contains following controls:
Port Number Text box: Input port number Connected Clients List box: Displaying connected clients. Start button: Start server. Stop button: Stop server. Log text box: Display logging information.4.5.4GPS Client
Login Screen
Screen controls:
Server address textbox: Input GPRS Server address. Port text box: Input GPRS Server port. Password textbox: Input GPRS Server login password. Connect button: Start connecting to GPRS Server. Exit button: Exit the application.
Main Screen
7/28/2019 Capstone Document Final
110/125
110Implementationtation
4.6 Database Design4.6.1Mobile Commander DB DesignThe WMA application used DB to stored icon information about devices.
There in formations are kept while power OFF terminal
DB storage place (each DB commonness)
/data/data/ digisky.cpro.wma/database/...
The list of database for home application:
DB file name Table name Description for table
device.db devices Contains information about
device such as device name,
phone number, longitude,
latitude
Devices table
Column name Type Primary key Description
_id INTEGER yes Id of the device
device_name TEXT Name of the module device
phone_number TEXT Phone number of the module
Latitude NUMERIC Latitude value of the module
Longitude NUMERIC Longitude value of the module
Password TEXT Password of the module
Led_content BLOB Contains LED board data
7/28/2019 Capstone Document Final
111/125
111 Wireless Module and Applications
4.7 Protocol Design4.7.1Wireless Module Message Format (WMMF)4.7.1.1Overview
This Format is defined for the communication between the commander (PC/Mobile) and theGSM Module via SMS.
4.7.1.2SMS Format4.7.1.2.1 SMS from commander to GSM Module4.7.1.2.1.1 Set content format
1 2 3 4 5 6 7 8 9 10 11 12
RT PWD DT EF SPD LEN
RT (1 byte): A 8 bits integer that represents the request type. This field must be 0x00. PWD (6 bytes): A 6 bytes string in ASCII format that represents password. DT (1 byte): A 8 bits integer that represents data type. This field can be 0x00 for text and 0x01
for image.
EF (1 byte): A 8 bits integer that represents effect ID. SPD (1 byte): A 8 bits integer that represents effect speed. LEN (1 byte): A 8 bits integer that represents length of LED data. Following are number of bytes whose size is defined in LEN field.4.7.1.2.1.2 Get Content format
1 2 3 4 5 6 7 8
RT PWD CS
RT (1 byte): A 8 bits integer that represents the request type. This field must be 0x01. PWD (6 bytes): A 6 bytes string in ASCII format that represents password.
7/28/2019 Capstone Document Final
112/125
112Implementationtation
CS (1 byte): A 8 bits integer that checksum data. This field is optional.4.7.1.2.1.3 Set password format
1 2 3 4 5 6 7 8 9 10 11 12 13
RT OLDPWD NEWPWD
RT (1 byte): A 8 bits integer that represents the request type. This field must be 0x02. OLDPWD (6 bytes): A 6 bytes string in ASCII format that represents old password. NEWPWD (6 bytes): A 6 bytes string in ASCII format that represents new password.4.7.1.2.2 SMS from GSM module to Commander4.7.1.2.2.1 Get Content Format
1 2 3 4
RT DT LEN
RT (1 byte): A 8 bits integer that represents the request type. This field must be 0x00. LEN (1 byte): A 8 bits integer that represents length of LED data. Following are number of bytes whose size is defined in LEN field.4.7.1.2.2.2 Set Content response
1 2
RT RC
RT (1 byte): A 8 bits integer that represents the request type. This field must be 0x01. RC (1 byte): A 8 bits integer that represents the request type. This field could be 0x00 for
successfully or 0x01for failed.
7/28/2019 Capstone Document Final
113/125
113 Wireless Module and Applications
4.7.1.2.2.3 Change password response
1 2
RT RC
RT (1 byte): A 8 bits integer that represents the request type. This field must be 0x02. RC (1 byte): A 8 bits integer that represents the request type. This field could be 0x00 for
successfully or 0x01for wrong password or 0x02 for unauthorized phone number.
7/28/2019 Capstone Document Final
114/125
114Implementationtation
4.7.2Wireless Module Communication Protocol (WMMC)4.7.2.1Overview
This protocol is designed for the communication between GPRS Server, GPSa Client (on PC/
Mobile) and the GSM/GPRS Module. The protocol is lightweight in order to make the
communication faster and also provides necessary security.
4.7.2.2Packet FormatThe format of packets that come between server and client consists two parts: The header and
The Data. The header is in 4-bytes fixed size and the data length is defined in the header.
Client Data Block 1
Client Data header
Client Data Block 2
Client Data Block n
Server Data Block 1
Server Data header
Server Data Block 2
Server Data Block n
Figure 4-4: Client & Server Packet Format
Pseudo-code ofWMADATAHEADER
Struct WMADATAHEADER
{
byte stx; (1 byte)
byte command; (1 byte)
short dataLength; (2 bytes)
}
STX is the source o