Performed by: Yair Sommer Rea Yeheskel Instructor: Idan Katz Cooperated with:Motorola הטכניון...

Preview:

Citation preview

Performed by: Yair Sommer Rea Yeheskel

Instructor: Idan KatzCooperated with: Motorola

הטכניון - מכון טכנולוגי לישראל

הפקולטה להנדסת חשמל

Technion - Israel institute of technologydepartment of Electrical Engineering

Mid semester presentation

SW application for Motorola g20 cellular engine - Design

24 May 2004

1 High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

Background:

AbstractHigh speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

2

- Each operation requires an Input using AT commands.

- During the integration process, customers need to spend time for accessing and using the cellular engine interfaces.

- g20 cellular engine supports various operations. (sms, data transmission, voice, stk, etc.)

- There is a need to reduce the “Time to market”.

AbstractHigh speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

2

Project Goal:

Writing a SW API Layer, with a GUI application for the g20 cellular engine.

(The SW API will be a customer reference for the way code should be written during the development of their applications.)

Design GuidelinesHigh speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

- Parallelism – Allow several functionalities at once(example: execute AT commands while waiting for input on the GUI).

- Minimal number of threads - to optimize memory use.

- Respond/alert user in case of unsolicited events

- Customer Reference – Code must be very clear, short and simple.

- Simple Structure of program – a few layers, each layer has a unique role.

General DesignHigh speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

2

The Software will be implemented in The Software will be implemented in layers:layers:- Driver Layer – Handling the Serial Port I/O.

- AT Commands interpreter Layer – Executes commands using the Wrapper layer.- API Modules layer – Each module (SMS, voice, etc.) will include all functionalities required.

- GUI application layer.

- Wrapper Layer for the Serial I/O – interface from the Driver Layer To C language.

Driver Layer

Wrapper Layer

AT Command interpreter/listener Layer

General DesignHigh speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

2

SM

SA

PI

Phone

AP

I

GPR

SA

PI

TC

P/U

DP

AP

I

STK

AP

I

More

g20

AP

I

Tes

tsM

odu

le

GUI Application

Layer Diagram:

Will be used as customer

reference

General DesignHigh speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

2

Driver Layer

Wrapper Layer

AT Command interpreter /Listener

GUI Application

API Modules Layer

Driver Layer

- Handling the Serial Port I/O.

- An existing reliable layer which include all needed serial I/O operations.- Main Operations – Open/Close, Read/Write – From/To serial port.

General DesignHigh speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

2

Driver Layer

Wrapper Layer

AT Command interpreter /Listener

GUI Application

API Modules Layer

Wrapper Layer

- Interface from the Driver Layer functions to C language.- Gives a C format to all serial I/O operations, using the driver Layer.- Will be used by the AT command interpreter layer.

General DesignHigh speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

2

Driver Layer

Wrapper Layer

AT Command interpreter /Listener

GUI Application

API Modules Layer

AT Command interpreter/listener Layer

- Each API Module, calls various AT commands.

- Each AT command must be checked before being sent to the g20 (Valid input and parameters).

Problem:

- The situation in which each module is responsible for checking its own input is unwanted.

General DesignHigh speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

2

Driver Layer

Wrapper Layer

AT Command interpreter /Listener

GUI Application

API Modules Layer

AT Command interpreter/listener Layer

- Gets an AT command and it’s parameters.

- Checks validity of the command and parameters.

- Creates the AT command String, sends it to the g20, and receives the result.- Returns the result to the calling environment.

- For each incoming result, checks if it’s unsolicited event, and notify the calling environment (additional return value).

General DesignHigh speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

2

Driver Layer

Wrapper Layer

AT Command interpreter /Listener

GUI Application

API Modules Layer

AT Command interpreter/listener Layer

- While no AT command is executed, checks for unsolicited events. In case of such event notify the calling environment.

General DesignHigh speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

2

Driver Layer

Wrapper Layer

AT Command interpreter /Listener

GUI Application

API Modules Layer

AT Command interpreter/listener Layer

Check parameters validity

Creates the AT command stringParameters

Sends the AT command and receive result code

Return unsolicited event flag , and event type

Return Result to calling environment

General DesignHigh speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

2

Driver Layer

Wrapper Layer

AT Command interpreter /Listener

GUI Application

API Modules Layer

API Modules Layer

- Each type of operations (SMS, voice, stk etc.) will be

implemented as a separate module.

- Each module will have functions of its operations.

- The functions will create the sequences of AT commands and parameters, and will send each command to the AT command interpreter layer.

General DesignHigh speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

2

Driver Layer

Wrapper Layer

AT Command interpreter /Listener

GUI Application

API Modules Layer

API Modules Layer

- This Layer will be used as customer reference for the way code should be written.

- A special tests module, will get a variant number of AT commands, execute them, and return relevant results to the calling environment.

General DesignHigh speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

Driver Layer

Wrapper Layer

AT Command interpreter /Listener

GUI Application

API Modules Layer

API Modules Layer

2

Create sequences ofAT commands based

on parameters.

Operation types +

parameters

Sends the commands, Get Results, and returns them to

the calling environment

General DesignHigh speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

2

Driver Layer

Wrapper Layer

AT Command interpreter /Listener

GUI Application

API Modules Layer

GUI Application

An easy to use GUI, which allow the user to initiate all supported operations.

System descriptionHigh speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

Multi Threading in the g20 Application SW:Multi Threading in the g20 Application SW:

The SW will include 3 Threads:

- GUI thread – Takes care of relevant screens in the GUI.

- Main thread – Service all GUI requests, Holds Current system info., Handle unsolicited events.

- I/O thread – Interacting with the g20, alerts the main thread about unsolicited events.

System descriptionHigh speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

3

GUI ThreadGUI Thread

- Takes Care of the relevant

screens in the GUI.- Gets input/data from the user and pass it to the main thread.

- Present relevant information (reception, status of memory, network settings, etc.)

GUI Thread

GUI Thread

System descriptionHigh speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

3

Main ThreadMain Thread

- Holds and reflects the current status of the system.

- Gets request for operation from the GUI process.

- Sends relevant operations to I/O thread and gets final results (Success,

Failure, relevant return values). - Gets information about unsolicited events, and handles them.

Main Thread

GUI Thread

System descriptionHigh speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

3

I/O ThreadI/O Thread

- Gets operations request and insert them to the operations queue (FIFO).

- Each operation in the queue, consists of

an AT commands sequence.

- In case of unsolicited events, notifies the main thread.

Main Thread

Operationqueue

I/O Thread - The sequence of commands is sent to the g20 through the interpreter layer.

High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

4

Driver Layer

Wrapper Layer

AT Command interpreter/listener Layer

SM

SA

PI

Phone

AP

I

GPR

SA

PI

TC

P/U

DP

AP

I

STK

AP

I

More

g20

AP

I

Tes

tsM

odu

le

GUI ApplicationGUI Thread

Main Thread

Operationqueue

I/O Thread

ProgressionHigh speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

5

In progress – Define final API modules to implement.

Done - Acquire knowledge for operating AT commands and getting signals through SW.

Done – Define final implementation and algorithms.

Done – Status Report

Time TableHigh speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

5

1 Week - Find a reliable driver layer for RS232.

- Final Definition of each API module.

2 Weeks - Learn Regular Expression for use in AT interpreter Layer, and additional required

material.

3 Weeks - Code AT interpreter Layer.

2 Weeks - Code API Module.

Recommended