10/22/10

Sale of Goods (Sale of Goods Act 1930)

Contract of Sale of Goods

Where Seller
Transfers
Agrees to Transfer
Contract may be
Absolute
Conditional

Difference between Sale and Agreement to Sell


Sale

Possession Passes
Executed
Buyer has absolute Rights against Public
Seller can sue for the Price
As Further sale, buyer can sue for damages from Seller and 2nd Buyer
On Destruction Loss falls on Buyer

Agreement to Sell
Possessions Resides
Executory
Buyer can sue for Price only to Seller
Seller can sue for Damages
As Further sale, buyer can sue for damages only from Seller
On Destruction Loss falls on Seller

Intellectual property

Intellectual Property

Intellectual property (IP) refers to creations of the mind: inventions, literary and artistic works, and symbols, names, images, and designs used in commerce.
IP is divided into two categories:  Industrial property, which includes inventions (patents), trademarks, industrial designs and Copyright, which includes literary and artistic works such as novels, poems and plays, films, musical works, artistic works

Patent

A patent is a grant from the Government, which confers on the grantee, for a limited term of 20 years, the following acts, namely
When patents has been granted in respect of a product.
When the patents has been granted in respect of a process.

Trademarks


A trademark is a sign that individualizes the goods of a given enterprise and distinguishes them from the goods of others. It can be in the form of words, designs, letters, numerals or packaging, slogans, devices, symbols, etc

Industrial Designs


An industrial design is the ornamental or aesthetic aspect of an article, in other words, that part which makes the article attractive & appealing. It may consist of three-dimensional features, such as the shape or surface of an article or two-dimensional features, such as patterns, lines or colours

Copyright Rights

Copyright deals with the protection of literary and artistic works. These include writings, music, and works of the fine arts, such as paintings and sculptures, and technology-based works such as computer programs and electronic databases.

IPO Pakistan


Vision
IPO-Pakistan has set for itself the following vision namely
“To put Pakistan on the IP map of the world as a compliant and responsible country by promoting and protecting intellectual property rights.”
Mission
The Mission Statement of IPO-Pakistan is as follows
“Integrating and upgrading IP infrastructure for improved service delivery; increased public awareness and enhanced enforcement coordination for achieving the goal of being an IP based nation.”

Principal and Agent

Creation of Agency

Express Agency
Implied Agency
Agency by Estoppel
Agency by Holding out
Agency by Necessity
Agency by Ratification
Agency by Statue

Classes of Agents ….. By Authority

Special Agent
General Agent
Universal Agent

Classes of Agents ….. By Performance

Mercantile or Commercial Agent
Factors
Brokers
Commission Agents
Del Credere Agents
Auctioneers
Bankers
Indentors

Personal Liability of Agent


When Contract Expressly Provides
When Agent Signs a Negotiable Instrument in his own Name
When Acting for a Concealed Principal
When Acting for a Principal who can not be Sued
For Breach of Contract
Where Payment made by Mistake or Fraud
Custom makes Agent Personally Liable

Termination of Agency

Performance of Contract
Agreement between Parties
Death of Either Party
Insanity of Either Party
Insolvency of Principal or sometimes Agent
On Dissolution if Either Party is Company
Destruction of Subject Matter
Renunciation by Agent
Revocation by Principal

Companies Law (Companies Ordinance 1984)

Characteristics

Legal Person
Distinct Personality from its Members
Entitled to hold Property
Perpetual Succession
Transferable Shares
Limited Liability
Punishable as Fines only
No Fundamental Rights as per Constitution

Classes

Chartered Companies
Statutory Companies
Government Companies
Registered Companies
Public Companies
Private Companies
Unlimited Companies
Guarantee Companies
Investment Companies
Foreign Companies

Distinction Between Private and Public
Companies


Private Company
Minimum Members – 2
Maximum Members – 50
Minimum Directors – 2
No Director’s Consent
No Issuance of Prospectus
Restrict Transferable Shares
No limit for Managerial Remuneration
Any Kind of Share
Disproportionate Voting Right

Public Company
Minimum Members – 7
Max. Members – No Limit
Minimum Directors – 3
Director's Consent Must
Prospectus Must
Free Transferable Shares
11 % as Managerial Remuneration
Preference or Equity Shares
Only one Share one Vote Rule

Privileges of Private Companies


Two Signatories for Memorandum
Commencement of Business before Subscription Paid
No need to offer existing Members for Further Sale of Shares
Commencement of Business just after Incorporation
Disproportionate voting Rights
Two Directors Only

Officer in Default


MD
Whole time Director
Manager
Secretary
Person In-Charge over BoD
Person Authorized by BoD
Specified Director or All Directors

Formation of Company

Memorandum of Association
Articles of Association
Statement of Nominal Capital
Statutory Declaration for the Completion of Formalities
List of Consented Directors
Written Consent of Directors
Undertaking to take and pay for Qualification Share by Directors

Commencement of Business

Minimum Subscription has been Allotted
Directors have paid for Qualification Shares
Statutory declaration have been Filed

Articles & Memorandum of Company

Memorandum
Charter of Information of Incorporation
Scope and Power of Company
WHO AND WHAT?

Articles

Duties & rights of Company
Mode and Form of Business
HOW?

Memorandum of Association

Name with Pvt. Ltd or Ltd
Registered Office
Weather Liability of Members limited
Proposed Amount of Capital & its Break-up in Shares
Declaration of Association
Objects
Main
Others if any

Alteration in Articles & Memorandum of Company

Resolution to Secretary by any Member
Agenda of Meeting
Voting
Role of Corporate Law Authority
Approved Resolution to CLA
Notification by CLA

Membership

Application and Allotment
Transfer of Shares
Transmission of Shares
Acquiescence of Estoppels

Termination of Membership

Transfer of Shares
Shares Fortified
Valid Surrender
Shares Sold by Co. to Enforce Lien
Person Dies
Redeemable Preference Shares Redeemed
Contract Rescinded
For Insolvent Official Assignee Disclaims
Share Warrants in exchange of Shares Issued
Liquidator Disclaims Shares

Types of Shares

Preference Shares
Equity Shares

Meetings

Statutory Meeting
Annual General Meeting
Extraordinary General Meeting

Procedure of Meeting

Notice of Meeting
Ordinary and Special meeting
Quorum
Chairman
Proxies
Voting and Pool
Meeting Called by CLA
Resolution
Ordinary Resolution
Special Resolution
Minutes of the Meeting

Winding Up


Winding up by Court
Company Petition
Default in delivering Statutory Report
Failure in Commencement of Business - 1 Year
Members Fall – 7
Unable to pay its Debts
Court Opinion

Liquidators


Powers
Duties
Voluntary Basis

Arbitration (Arbitration Act 1940)

Appointment
Power of Parties
Power of Court
Proceedings
Award
Judgment on Award
Supersede
Alter
Modify
Rectify
Nullify


Advantages of Arbitration

Less Costly
Less Irritating
Less Publicity
More Simple Regards Procedure
Usually final with no Appeal

Who may refer for Arbitration

Karta or Manager
Authorized Agent
Attorney or Counsel
Trustee
Official Assignee or Receiver
Certified Guardian

Who can not refer for Arbitration


Minor or Lunatic
Insolvent
Partner without special Authority
Executer or Administrator for the Genuineness of Will

What may be referred for Arbitration

Private Rights - Subject matter of Civil Suits
Personal Rights - Subject matter of Civil Suits
Terms of Separation can be referred
Disputes regarding Compliment & Dignity
Weather Judgment has been obtained properly
Time Barred Claim
Both Question of Law & Question of Fact
Disputes between Insolvent and Creditors other then Insolvency Proceedings

What can not be referred for Arbitration

Suit for Divorce or Conjugal Rights
Dispute arising from Illegal Transaction
Insolvency Proceedings
Public Charities & Trusts
Lunacy Proceedings
Appointment of Guardian to a Minor
Validity of Will
Execution Proceedings
Matters of Criminal Nature

Duties of Arbitrator

Act Judicially
Observe 1st Principle of Justice
Fair to both parties
Not to act as an Advocate or Agent of any Party
Decide all matters referred
Discharge Function Personally
Not Exceed his Authority

8/3/10

Basic networking components

Network interface cards

NETWORK Interfacing cards is also known as network adopter. the purpose of this card is to connect third party devices with computer system. it having own device driver
to install for working this card.

Repeaters
Repeaters or hubs work at the OSI physical layer to regenerate the network’s signal and resend them to other segments
Primitive hub can be viewed as a multi port repeater
It regenerates data and broadcasts them to all ports

Hubs

Intelligent hubs have console ports, to allow monitoring of the hubs status and port activity.
Passive hubs just repeat any incoming signals to every port available, therefore does not act as a line repeater.
Passive hubs just split signals to multiple ports but do not regenerate the signals, which means that they do not extend a cable’s length. They only allow two or more hosts to connect to the same cable segment.
Active hubs regenerate signals.
Hubs utilize star topology.



Bridges


Has one input and one output
Used to isolate network traffic and computers
Has the intelligent to examine incoming packet source and destination addresses

But cannot interpret higher-level information
Hence cannot filter packet according to its protocol


Routers

Routers are OSI network layer 3 devices
Using interface modules can connect different layer 2 technologies e.g. Ethernet, FDDI, token ring etc…
Routers have the capability to interconnect network segments or entire networks (WANS/MANS).
These devices examine incoming packets to determine the destination address of the data. It then examines its internal routing table to choose the best path for the packet through the network, and switches them to the proper outgoing port.

Switches


fayyaz

A switch is a mufti-port bridge.
It operates at OSI data link layer 2.
It stores MAC addresses in an internal lockup table.
Temporary switched paths are created between the frame’s source destination.
Some Switches have limited layer 3 IP routing capabilities.
Switches can be configured to use V LANS.
Switches support spanning tree protocol to create resilient networks.

8/2/10

LM317 (LM317)

3-Terminal Adjustable Regulator
GENERAL DESCRIPTION
The LM317 series of adjustable 3-terminal positive voltage regulators is capable of supplying in excess of 1.5A over a 1.2V to 37V output range. They are exceptionally easy to use and require only two external resistors to set the output voltage. Further, both line and load regulations are better than standard fixed regulators. Also, the LM317 is packaged in standard transistor packages which are easily mounted and handled.
In addition to higher performance than fixed regulators, the LM317 series offers full overload protection available only in IC’s. Included on the chip are current limit, thermal overload protection and safe area protection. All overload protection circuitry remains fully functional even if the adjustment terminal is disconnected.
Normally, no capacitors are needed unless the device is situated more than 6 inches from the input filter capacitors in which case an input bypass is needed. An optional output capacitor can be added to improve transient response. The adjustment terminal can be bypassed to achieve very high ripple rejection ratios which are difficult to achieve with standard 3-terminal regulators. Besides replacing fixed regulators, the LM317 is useful in a wide variety of other applications. Since the regulator is “floating” and sees only the input-to-output differential voltage, supplies of several hundred volts can be regulated as long as the maximum input to output differential is not exceeded, i.e. avoid short-circuiting the output.
Also, it makes an especially simple adjustable switching regulator, a programmable output regulator, or by connecting a fixed resistor between the adjustment pin and output, the LM317 can be used as a precision current regulator. Supplies with electronic shutdown can be achieved by clamping the adjustment terminal to ground which programs the output to 1.2V where most loads draw little current.

LM35DZ

Precision Centigrade Temperature Sensors
GENERAL DESCRIPTION

The LM35 series are precision integrated-circuit temperature sensors, whose output voltage is linearly proportional to the Celsius (Centigrade) temperature. The LM35 thus has an advantage over linear temperature sensors calibrated in Kelvin, as the user is not required to subtract a large constant voltage from its output to obtain convenient Centigrade scaling. The LM35 does not require any external calibration or trimming to provide typical accuracies of ±1⁄4°C at room temperature and ±3⁄4°C over a full −55 to +150°C temperature range. Low cost is assured by trimming and calibration at the wafer level. The LM35’s low output impedance, linear output, and precise inherent calibration make interfacing to readout or control circuitry especially easy. It can be used with single power supplies, or with plus and minus supplies. As it draws only 60 μA from its supply, it has very low self-heating, less than 0.1°C in still air. The LM35 is rated to operate over a −55° to +150°C temperature range, while the LM35C is rated for a −40° to +110°C range (−10° with improved accuracy). The LM35 series is available packaged in hermetic TO-46 transistor packages, while the LM35C, LM35CA, and LM35D are also available in the plastic TO-92 transistor package. The LM35D is also available in an 8-lead surface mount small outline package and a plastic TO-220 package.

LED’s

In our project we are using 4 LED’s Red, Blue, White, and Green. They all represent a particular stat of mobile initialization as given below
RED Indicates mobile failed to initialize
Green Indicate either SMS Tx board is on or off.
Blue indicate SMS sending failed
White Indicate task perform successfully
64

DB9 CONNECTOR

The DB-9 connector is used for sending and receiving all data from DKU-5 data cable. The connector DB-9 is connected to MAX232 as shown below. Pin5 of both connectors is grounded. Data transmitted from the DKU-5's transmit pin will come on the receive pin of DB-9 and vice versa.

MAX232

Since RS232 is not compatible with today’s microprocessor and controllers, we need a line driver (voltage converter) to convert the RS232’s signal to TTL voltage levels that will be acceptable to 8051 TxD and RxD pins. So MAX 232 converts from RS232 voltage levels to TTL voltage levels and vice versa.
The MAX232 has two sets of line drivers for transferring and receiving data. The line drivers used for TxD are called T1 and T2, while the line drivers Rxd are designated as R1 and R2. One of any set is used

MICRO CONTROLLER (AT89S52)

The AT89S52 is a low-power, high-performance CMOS 8-bit microcontroller with 8K bytes of in-system programmable Flash memory. The device is manufactured using Atmel’s high-density nonvolatile memory technology and is compatible with the industry standard 80C51 instruction set and pin out. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU with in-system programmable Flash on a monolithic chip, the Atmel AT89S52 is a powerful microcontroller which provides a highly-flexible and cost-effective solution to many embedded control applications. The AT89S52 provides the following standard features: 8K bytes of Flash, 256 bytes of RAM, 32 I/O lines, Watchdog timer, two data pointers, three 16-bit timer/counters, a six-vector two-level interrupt architecture, a full duplex serial port, on-chip oscillator, and clock circuitry. In addition, the AT89S52 is designed with static logic for operation down to zero frequency and supports two software selectable power saving modes.
62
The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port, and interrupt system to continue functioning. The Power-down mode saves the RAM contents but freezes the oscillator, disabling all other chip functions until the next interrupt or hardware reset.

TRANSMITTER

As we worked on GSM technology and our purpose is to send the ECG so we used the mobile phone to send SMS which transmits the SMS to the physicist's cell phone. The physicist's cell number is already saved in microcontroller. So when mobile gets the signal from microcontroller it sends the SMS to the required cell number automatically.

SETTING OR READING THE SERVICE CENTRE ADDRESS / SMSC ADDRESS (AT+CSCA)

To set the service centre address, perform a set operation with the +CSCA AT command using the following syntax: (Optional parameters are enclosed in square brackets.)
+CSCA=address[,address_type]
The address Parameter
The first parameter of the +CSCA AT command, address, specifies the SMSC address to be set. Usually it is a phone number formatted using the typical ISDN / telephony numbering plan (ITU E.164/E.163). For example "+85291234567" Note that the value assigned to the address parameter should be a string, which means you should use double quotes to enclose the phone number.
Reading the Service Centre Address
To read the service centre address, we can perform a read operation using the +CSCA read command "+CSCA?" The information response returned has the following format:
+CSCA: address,address_type
The definition of address and address_type is the same as above.
Example Demonstrating How to Use the +CSCA AT Command to Set and Read the Service Centre Address
As said earlier, sometimes a proper service centre address is in use by default and there is no need to make any changes. So first let's type the read command "+CSCA?" in a terminal program (for example, HyperTerminal in Microsoft Windows) to check if a proper service centre address is in use currently. The response returned from a GSM/GPRS modem or mobile phone should be something like this:
AT+CSCA? +CSCA: "+85291111111",145 OK
If you find that the service centre address is not correct, use the +CSCA AT command to change it, like this:
AT+CSCA="+85290000000",145 OK

The final result code OK indicates the service centre address was set successfully. If the execution of the command line fails, the final result code will be ERROR
SMS AND PDU FORMAT
Introduction

The SMS message, as specified by the ETSI organization (documents GSM 03.40 and GSM 03.38), can be up to 160 characters long, where each character is 7 bits according to the 7-bit default alphabet. Eight-bit messages (max 140 characters) are usually not viewable by the phones as text messages; instead they are used for data in e.g. smart messaging (images and ringing tones) and OTA provisioning of WAP settings. 16-bit messages (max 70 characters) are used for Unicode (UCS2) text messages, viewable by most phones.
The PDU format
The PDU string contains not only the message, but also a lot of meta-information about the sender, his SMS service centre, the time stamp etc. It is all in the form of hexa-decimal octets or decimal semi-octets. The following string is the example for understanding when sending the message containing "hellohello" from http://www.mtn.co.za/.
Table 3
07
917283010010F5
040BC87238880900F10000993092516195800AE8329BFD4697D9EC37
This octet sequence consists of three parts: An initial octet indicating the length of the SMSC information ("07"), the SMSC information itself ("917283010010F5"), and the SMS_DELIVER part (specified by ETSI in GSM03.40). Note: on some phones (e.g. Ericssson 888?) the first three (colored) parts are omitted when showing the message in PDU mode!
35
Table 4
Octet(s)
Description
07
Length of the SMSC information (in this case 7 octets)

Type-of-address of the SMSC. (91 means international format of the phone number)
72 83 01 00 10 F5
Service centre number(in decimal semi-octets). The length of the phone number is odd (11), so a trailing F has been added to form proper octets. The phone number of this service centre is "+27381000015". See below.
04
First octet of this SMS-DELIVER message.
0B
Address-Length. Length of the sender number (0B hex = 11 dec)
C8
Type-of-address of the sender number
72 38 88 09 00 F1
Sender number (decimal semi-octets), with a trailing F
00
TP-PID. Protocol identifier.
00
TP-DCS Data coding scheme
99 30 92 51 61 95 80
TP-SCTS. Time stamp (semi-octets)
0A
TP-UDL. User data length, length of message. The TP-DCS field indicated 7-bit data, so the length here is the number of septets (10). If the TP-DCS field were set to indicate 8-bit data or Unicode, the length would be the number of octets (9).
E8329BFD4697D9EC37
TP-UD. Message "hellohello" , 8-bit octets representing 7-bit data.
All the octets above are hexa-decimal 8-bit octets, except the Service centre number, the sender number and the timestamp; they are decimal semi-octets. The message part in the end of the PDU string consists of hexa-decimal 8-bit octets, but these octets represent 7-bit data. The semi-octets are decimal, and e.g. the sender number is obtained by performing internal swapping within the semi-octets from "72 38 88 09 00 F1" to "27 83 88 90 00 1F". The length of the phone number is odd, so a proper octet sequence cannot be formed by this
36
number. This is the reason why the trailing F has been added. The time stamp, when parsed, equals "99 03 29 15 16 59 08", where the 6 first characters represent date, the following 6 represents time, and the last two represents time-zone related to GMT.
3.6.3.1 PDU FORMAT EXPLANATION
The PDU mode can be understood by the following example. PDU string =
07911326040000F0040B911346610089F60000208062917314080CC8F71D14969741F9 77FD07 .The PDU string is been defined as per this table,
Figure 11
Explanation:
The first octet of the whole PDU data, tells the length of the SMSC (Short Message Service Center). Next octet tells that whether it’s been a local number or an international number. 91
37
is used for international number. Next 6 octets are telling the actual SMSC number. In this example its 13 26 04 00 00 FO (SMSC = 13 26 04 00 00 FO).
Figure 12
Interpreting 8-bit octets as 7-bit messages
This transformation is described in detail in GSM 03.38, and an example of the "hellohello" transformation is shown here. The transformation is based on the 7 bit default alphabet, but an application built on the PDU mode can use any character encoding.
EXAMPLE:
Sending a message in the PDU mode
The following example shows how to send the message "hellohello" in the PDU mode from a Nokia 6110.
AT+CMGF=0 //Set PDU mode
AT+CSMS=0 //Check if modem supports SMS commands
38
AT+CMGS=23 //Send message, 23 octets (excluding the two initial zeros)
>0011000B916407281553F80000AA0AE8329BFD4697D9EC37
There are 23 octets in this message (46 'characters'). The first octet ("00") doesn't count, it is only an indicator of the length of the SMSC information supplied (0). The PDU string consists of the following:
Table 5
Octet(s)
Description
00
Length of SMSC information. Here the length is 0, which means that the SMSC stored in the phone should be used. Note: This octet is optional. On some phones this octet should be omitted! (Using the SMSC stored in phone is thus implicit)
11
First octet of the SMS-SUBMIT message.
00
TP-Message-Reference. The "00" value here lets the phone set the message reference number itself.
TEXT MODE
The Short Message Service is a store and forward service, in other words, short messages are not sent directly from sender to recipient, but always via an SMS Center (SMSC) instead. Each mobile telephone network that supports SMS has one or more messaging centers to handle and manage the short messages. The Short Message Service SMS, as defined within the GSM 900 / 1800 / 1900 digital mobile phone standard has several unique features:
The SMS message, as specified by the ETS1 organization (documents GSM 03.40 and GSM 03.38), can be up to 160 characters long, where each character is 7 bits according to the 7-bit default alphabet. Or 140 characters (8 bit coded) of text in length. Those 140 / 160 characters can comprise of words or numbers or an alphanumeric combination.

SENDING SMS MESSAGES FROM A COMPUTER / PC USING AT COMMANDS (AT+CMGS, AT+CMSS)

Either of the AT commands +CMGS (command name in text: Send Message) and +CMSS (command name in text: Send Message from Storage) can be used to send SMS messages from a computer / PC. The key difference between them is that the +CMGS AT command takes the SMS message to be sent as a parameter, while the +CMSS AT command takes the index number that specifies the location of the SMS message in the message storage area as a parameter. Following is an example for illustrating the difference.
EXAMPLE
Suppose we want to send the text message "Sending text messages is easy." from a computer / PC to the mobile phone number 91234567 using the +CMGS AT command in SMS text mode. Here is the command line to be used:
AT+CMGS="91234567"Sending text messages is easy.
To send the same text message using the +CMSS AT command, first we have to use the AT command +CMGW (command name in text: Write Message to Memory) to write the text message to the message storage area. In SMS text mode, the command line should be:
AT+CMGW="91234567"Sending text messages is easy.
DELETING SMS MESSAGES FROM MESSAGE STORAGE (AT+CMGD)
The AT command +CMGD (command name in text: Delete Message) is used to delete SMS message(s) from message storage. The message storage area from which SMS messages are

deleted is specified by the +CPMS AT command (command name in text: Preferred Message Storage).
EXAMPLE
Demonstrating How to Use the +CMGD AT Command to Delete SMS Text Messages
Now let's see an example that demonstrates how to use the +CMGD AT command to delete an SMS text message from the message storage area. Suppose we have written an SMS text message to the message storage area by the +CMGW AT command like this:
AT+CMGW="+85291234567" > A simple demo of SMS text messaging. +CMGW: 1 OK
The information response of the +CMGW AT command tells us that the SMS text message is stored in the memory location at index 1. To delete the SMS text message, specify 1 to the index parameter of the +CMGD AT command, like this:
(Important note: Make sure you are writing text messages to and deleting text messages from the same message storage area. If not, we may delete the wrong text message.
AT+CMGD=1 OK
The final result code OK indicates the SMS text message "A simple demo of SMS text messaging." was deleted successfully. If the operation fails, the final result code returned will either be ERROR or +CMS ERROR.

SMS TEXT MODE & PDU MODE
OPERATING MODE: SMS TEXT MODE AND SMS PDU MODE

The SMS specification has defined two modes in which a GSM/GPRS modem or mobile phone can operate. They are called SMS text mode and SMS PDU mode. (PDU stands for Protocol Data Unit.) The mode that a GSM/GPRS modem or mobile phone is operating in determines the syntax of some SMS AT commands and the format of the responses returned after execution. These two AT commands are useful to you only if SMS text mode is used:
• +CSMP (Set Text Mode Parameters)
• +CSDH (Show Text Mode Parameters)
Comparison of SMS Text Mode and SMS PDU Mode
Below we compare SMS text mode and SMS PDU mode from various aspects. The comparison should help you to learn the differences between these two modes and decide which mode should be used by your SMS messaging application.
Syntax of SMS AT Commands and Responses
When the GSM/GPRS modem or mobile phone is operating in different modes, the syntax of certain SMS AT commands and the responses returned after command execution is different. Here's an example for illustration. Let's say we would like to send the SMS message "It is easy to send text messages." to the mobile phone number +85291234567. In SMS text mode, this is the command line that you should enter:
AT+CMGS="+85291234567"It is easy to send text messages.
However, if the GSM/GPRS modem or mobile phone is operating in SMS PDU mode, executing the above command line will cause an error to occur. This is because the syntax of the +CMGS AT command is different in SMS PDU mode. To do the same task, the following command line should be used instead:
AT+CMGS=4207915892000000F001000B915892214365F7000021493A283D0795C3F33C88FE06CDCB6E32885EC6D341EDF27C1E3E97E72E

TESTING THE COMMUNICATION BETWEEN THE PC AND GSM/GPRS MODEM OR MOBILE PHONE

Suppose you have connected your GSM/GPRS modem or mobile phone to your PC / computer and started a terminal program (such as HyperTerminal on Microsoft Windows). Now you are ready to enter your first command. The first thing that is usually done is to test the communication between the PC and GSM/GPRS modem/mobile phone to confirm that everything is working properly so far. Simply enter "AT" in the terminal program to perform the test. When the GSM/GPRS modem or mobile phone receives "AT", it will send back the final result code "OK" to indicate that it has received your command successfully, like this:
AT OK
WRITING SMS MESSAGES TO MEMORY / MESSAGE STORAGE (AT+CMGW)
The AT command +CMGW (command name in text: Write Message to Memory) is used to write an SMS message to memory (i.e. message storage). The memory/message storage area to which SMS messages are written is specified by the +CPMS AT command (command line in text: Preferred Message Storage).
Syntax of the +CMGW AT Command in SMS Text Mode
In SMS text mode, the syntax of the +CMGW AT command is: (Optional parameters are enclosed in square brackets.)
+CMGW[=address[,address_type[,message_status]]]sms_message_body

Before we discuss each of the parameters, let's see an example that gives you some idea of how an actual command line should look like:
AT+CMGW="+85291234567",145,"STO UNSENT"
This is an example for illustrating the syntax of the +CMGW AT command in SMS text mode.
The Character
, which represents the carriage return character, follows the message_status parameter. When the GSM/GPRS modem or mobile phone receives the carriage return character, it will send back a prompt formed by these four characters: the carriage return character, the linefeed character, the ">" character and the space character.
The Character
When you finish entering the SMS message body, you have to enter the character to mark the end of the SMS message body. The GSM/GPRS modem or mobile phone will then attempt to write the SMS message to the memory/message storage area.
READING SMS MESSAGES FROM A MESSAGE STORAGE AREA USING AT COMMANDS (AT+CMGR, AT+CMGL)
To enable a computer / PC to read SMS messages from a message storage area, the GSM/GPRS modem or mobile phone has to support either of the AT commands +CMGR (command name in text: Read Messages) and +CMGL (command name in text: List Messages). The +CMGR AT command is used to read an SMS message at a certain location of the message storage area, while the +CMGL AT command is used to read SMS messages that have a certain status from the message storage area. The status can be "received unread", "received read", "stored unsent", "stored sent", etc. The +CMGL AT command also allows you to retrieve all SMS messages stored in the message storage area.
EXAMPLE:
Following is an example for illustrating the difference between +CMGR and +CMGL. Suppose we want to use your computer / PC to read a text message from the message storage area and we know the index at which the SMS text message is located. In this case, we

should use the +CMGR AT command. Here is the command line to be typed (assume the SMS text message is stored at index 3):
AT+CMGR=3
The GSM/GPRS modem or mobile phone should return something like this:
+CMGR: "REC READ","+85291234567",,"07/02/18,00:12:05+32" Hello, welcome to our SMS tutorial. OK

INFORMATION RESPONSE AND FINAL RESULT CODE

AT+CGMI <-- Command line entered Nokia <-- Information response OK <-- Final result code
28
Case Sensitivity of AT Commands
In the SMS specification, all AT commands are in uppercase letters. However, many GSM/GPRS modems and mobile phones allow you to type AT commands in either uppercase or lowercase letters. For example, on Nokia 6021, AT commands are case-insensitive and the following two command lines are equivalent:
AT+CMGL
AT+cmgl

TYPES OF AT COMMANDS

Basic Commands and Extended Commands
There are two types of AT commands: basic commands and extended commands.
Basic commands are AT commands that do not start with "+". For example, D (Dial), A (Answer), H (Hook control) and O (Return to online data state) are basic commands.
Extended commands are AT commands that start with "+". All GSM AT commands are extended commands. For example, +CMGS (Send SMS message), +CMSS (Send SMS message from storage), +CMGL (List SMS messages) and +CMGR (Read SMS messages) are extended commands
GENERAL SYNTAX OF EXTENDED AT COMMANDS
The general syntax of extended AT commands is straightforward. The syntax rules are provided below. The syntax of basic AT commands is slightly different but will not cover the syntax of basic AT commands in this SMS chapter since all SMS messaging commands are extended AT commands.

Syntax rule 1. All command lines must start with "AT" and end with a carriage return character. (We will use to represent a carriage return character) In a terminal program like HyperTerminal of Microsoft Windows, we can press the Enter key on the keyboard to output a carriage return character.
Example: To list all unread inbound SMS messages stored in the message storage area, type "AT", then the extended AT command "+CMGL", and finally a carriage return character, like this:
AT+CMGL
Syntax rule 2. A command line can contain more than one AT command. Only the first AT command should be prefixed with "AT". AT commands in the same command-line string should be separated with semicolons.
Example: To list all unread inbound SMS messages stored in the message storage area and obtain the manufacturer name of the mobile device, type "AT", then the extended AT command "+CMGL", followed by a semicolon and the next extended AT command "+CGMI":
AT+CMGL;+CGMI //correct command
An error will occur if both AT commands are prefixed with "AT", like this:
AT+CMGL;AT+CGMI//incorrect command
Syntax rule 3. A string is enclosed between double quotes.
Example: To read all SMS messages from message storage in SMS text mode (at this time you do not need to know what SMS text mode is), you need to assign the string "ALL" to the extended AT command +CMGL, like this:
AT+CMGL="ALL"
27
Syntax rule 4. Information responses and result codes (including both final result codes and unsolicited (unwanted) result codes) always start and end with a carriage return character and a linefeed character.
Example: After sending the command line "AT+CGMI" to the mobile device, the mobile device should return a response similar to this:
Nokia OK
The first line is the information response of the AT command +CGMI and the second line is the final result code. and represents a carriage return character and a linefeed character respectively. The final result code "OK" marks the end of the response. It indicates no more data will be sent from the mobile device to the computer / PC.
When a terminal program such as HyperTerminal of Microsoft Windows sees a carriage return character, it moves the cursor to the beginning of the current line. When it sees a linefeed character, it moves the cursor to the same position on the next line. Hence, the command line "AT+CGMI" that you entered and the corresponding response will be displayed like this in a terminal program such as HyperTerminal of Microsoft Windows:
AT+CGMI Nokia OK

AT COMMANDS

INTRODUCTION TO AT COMMANDS
AT commands are instructions used to control a modem. AT is the abbreviation of ATtention. Every command line starts with "AT" or "at". That's why modem commands are called AT commands. Many of the commands that are used to control wired dial-up modems, such as ATD (Dial), ATA (Answer), ATH (Hook control) and ATO (Return to online data state), are also supported by GSM/GPRS modems and mobile phones. Besides this common AT command set, GSM/GPRS modems and mobile phones support an AT command set that is specific to the GSM technology, which includes SMS-related commands like AT+CMGS (Send SMS message), AT+CMSS (Send SMS message from storage), AT+CMGL (List SMS messages) and AT+CMGR (Read SMS messages). Note that the starting "AT" is the prefix that informs the modem about the start of a command line.
Here are some of the tasks that can be done using AT commands with a GSM/GPRS modem or mobile phone:
• Get basic information about the mobile phone or GSM/GPRS modem. For example, name of manufacturer (AT+CGMI), model number (AT+CGMM), IMEI number (International Mobile Equipment Identity) (AT+CGSN) and software version (AT+CGMR).
• Get basic information about the subscriber. For example, MSISDN (AT+CNUM) and IMSI number (International Mobile Subscriber Identity) (AT+CIMI).
• Get the current status of the mobile phone or GSM/GPRS modem. For example, mobile phone activity status (AT+CPAS), mobile network registration status (AT+CREG), radio signal strength (AT+CSQ), battery charge level and battery charging status (AT+CBC).
• Send (AT+CMGS, AT+CMSS), read (AT+CMGR, AT+CMGL), write (AT+CMGW) or delete (AT+CMGD) SMS messages and obtain notifications of newly received SMS messages (AT+CNMI).
• Read (AT+CPBR), write (AT+CPBW) or search (AT+CPBF) phonebook entries.
• Perform security-related tasks, such as opening or closing facility locks (AT+CLCK),
25
checking whether a facility is locked (AT+CLCK) and changing passwords (AT+CPWD). (Facility lock examples: SIM lock [a password must be given to the SIM card every time the mobile phone is switched on] and PH-SIM lock [a certain SIM card is associated with the mobile phone. To use other SIM cards with the mobile phone, a password must be entered.])
• Control the presentation of result codes / error messages of AT commands. For example, you can control whether to enable certain error messages (AT+CMEE) and whether error messages should be displayed in numeric format or verbose format (AT+CMEE=1 or AT+CMEE=2).
• Get or change the configurations of the mobile phone or GSM/GPRS modem. For example, change the GSM network (AT+COPS), bearer service type (AT+CBST), radio link protocol parameters (AT+CRLP), SMS centre address (AT+CSCA) and storage of SMS messages (AT+CPMS).
• Save and restore configurations of the mobile phone or GSM/GPRS modem. For example, save (AT+CSAS) and restore (AT+CRES) settings related to SMS messaging such as the SMS centre address.

HOW TO RECEIVE SMS MESSAGES USING A COMPUTER / PC?

EXAMPLE WITH DESCRIPTION:
Below shows a simple example that demonstrates how to use AT commands and the HyperTerminal program of Microsoft Windows to read SMS text messages received by a GSM / GPRS modem or mobile phone.
23
AT OK AT+CMGF=1 OK AT+CMGL="ALL" +CMGL: 1,"REC READ","+85291234567",,"06/11/11,00:30:29+32" Hello, welcome to our SMS tutorial. +CMGL: 2,"REC READ","+85291234567",,"06/11/11,00:32:20+32" A simple demo of SMS text messaging. OK
Here is a description of what is done in the above example:
• Line 1: "AT" is sent to the GSM / GPRS modem to test the connection. The GSM / GPRS modem sends back the result code "OK" (line 2), which means the connection between the HyperTerminal program and the GSM / GPRS modem works fine.
• Line 3: The AT command +CMGF is used to instruct the GSM / GPRS modem to operate in SMS text mode. The result code "OK" is returned (line 4), which indicates the command line "AT+CMGF=1" has been executed successfully. If the result code "ERROR" is returned, it is likely that the GSM / GPRS modem does not support the SMS text mode. To confirm, type "AT+CMGF=?" in the HyperTerminal program. If the response is "+CMGF: (0,1)" (0=PDU mode and 1=text mode), then SMS text mode is supported. If the response is "+CMGF: (0)", then SMS text mode is not supported.
• Line 5-9: The AT command +CMGL is used to list all SMS text messages in the message storage of the GSM / GPRS modem. There are two SMS text messages in the message storage: "Hello, welcome to our SMS tutorial." and "A simple demo of SMS text messaging.". "+85291234567" is the sender mobile phone number. "06/11/11,00:30:29+32" and "06/11/11,00:32:20+32" tell us when the SMS text messages were received by the SMSC. "+32" is the time zone. Note that the unit is a quarter of an hour. So, +32 means GMT+8 hours, since 32 quarters of an hour = 8 hours. "REC READ" indicates both of the SMS text messages have been read before.
24
• Line 11: The result code "OK" indicates the execution of the AT command +CMGL is successful.

HOW TO SEND SMS MESSAGES FROM A COMPUTER / PC?

EXAMPLE WITH DESCRIPTION:
Below shows a simple example that demonstrates how to use AT commands and the HyperTerminal program of Microsoft Windows to send an SMS text message
AT OK AT+CMGF=1 OK AT+CMGW="+85291234567" > A simple demo of SMS text messaging. +CMGW: 1 OK AT+CMSS=1 +CMSS: 20 OK
Here is a description of what is done in the above example:
• Line 1: "AT" is sent to the GSM / GPRS modem to test the connection. The GSM / GPRS modem sends back the result code "OK" (line 2), which means the connection between the HyperTerminal program and the GSM / GPRS modem works fine.
• Line 3: The AT command +CMGF is used to instruct the GSM / GPRS modem to operate in SMS text mode. The result code "OK" is returned (line 4), which indicates the command line "AT+CMGF=1" has been executed successfully. If the result code "ERROR" is returned, it is likely that the GSM / GPRS modem does not support the SMS text mode. To confirm, type "AT+CMGF=?" in the HyperTerminal program. If the response is "+CMGF: (0,1)" (0=PDU mode and 1=text mode), then SMS text mode is supported. If the response is "+CMGF: (0)", then SMS text mode is not supported.
• Line 5 and 6: The AT command +CMGW is used to write an SMS text message to the message storage of the GSM / GPRS modem. "+85291234567" is the recipient mobile phone number. After typing the recipient mobile phone number, you should press the Enter button of the keyboard. The GSM / GPRS modem will then return a 22
prompt "> " and you can start typing the SMS text message "A simple demo of SMS text messaging.". When finished, press Ctrl+z of the keyboard.
• Line 7: "+CMGW: 1" tells us that the index assigned to the SMS text message is 1. It indicates the location of the SMS text message in the message storage.
• Line 9: The result code "OK" indicates the execution of the AT command +CMGW is successful.
• Line 10: The AT command +CMSS is used to send the SMS text message from the message storage of the GSM / GPRS modem. "1" is the index of the SMS text message obtained from line 7.
• Line 11: "+CMSS: 20" tells us that the reference number assigned to the SMS text message is 20.
• Line 13: The result code "OK" indicates the execution of the AT command +CMSS is successful.

Procedure for Sending AT Commands to a Mobile Phone or GSM/GPRS Modem Using MS HyperTerminal

To use MS HyperTerminal to send AT commands to your mobile phone or GSM/GPRS modem, you can follow the procedure below:
1. Put a valid SIM card into the mobile phone or GSM/GPRS modem.
2. Connect mobile phone or GSM/GPRS modem to a computer and set up the corresponding wireless modem driver.
3. Run MS HyperTerminal by selecting Start -> Programs -> Accessories -> Communications -> HyperTerminal.
4. In the Connection Description dialog box, enter a name and choose an icon you like for the connection. Then click the OK button.

5. In the Connect to dialog box, choose the COM port that your mobile phone or GSM/GPRS modem is connecting to in the Connect using combo box. For example, choose COM1 if your mobile phone or GSM/GPRS modem is connecting to the COM1 port. Then click the OK button.
6. The Properties dialog box comes out. Enter the correct port settings for your mobile phone or GSM/GPRS modem. Then click the OK button.
20
7. Type "AT" in the main window. A response "OK" should be returned from the mobile phone or GSM/GPRS modem. Type "AT+CPIN?" in the main window. The AT command "AT+CPIN?" is used to query whether the mobile phone or GSM/GPRS modem is waiting for a PIN (personal identification number, i.e. password). If the response is "+CPIN: READY", it means the SIM card does not require a PIN and it is ready for use. If your SIM card requires a PIN, you need to set the PIN with the AT command "AT+CPIN=".


When we get the responses as above, our mobile phone or GSM/GPRS modem is working properly. Now we can start typing your own AT commands to control the mobile phone or GSM/GPRS modem.

SMS GATEWAY

WHAT IS A SMS GATEWAY?
SMS Gateway is an interface between software applications mobile networks. An SMS Gateway allows interfacing software applications to send and/or receive SMS messages over mobile network.
Typically a SMS Gateway uses either one or more GSM modems or a direct network connection (HTTP(S), SMPP, CIMD etc) with the SMSC to send and receive messages to and from mobile networks. Software applications generally interface with the SMS Gateway either using ASCII text files, XML/SOAP or database tables. A good SMS gateway will

provide the developer with an ActiveX component or an API to interact with the gateway to read/write SMS messages, thus reducing the development time for implementing mobile messaging features in software applications
NEED OF SMS GATEWAY
One problem of SMS messaging is that SMSCs developed by different companies use their own communication protocol and most of these protocols are proprietary. For example, Nokia has an SMSC protocol called CIMD whereas another SMSC vendor, CMG, has an SMSC protocol called EMI. We cannot connect two SMSCs if they do not support a common SMSC protocol. To deal with this problem, an SMS gateway is placed between two SMSCs. This is illustrated in the following figure. The SMS gateway acts as a relay between the two SMSCs. It translates one SMSC protocol to another one. This way can be used by two different wireless carriers to interconnect their SMSCs for purposes such as enabling the exchange of inter-operator SMS messages. An SMS gateway acts as a relay between two sms centres.
SMS COMMUNICATION
HOW TO USE MICROSOFT HYPERTERMINAL TO SEND AT COMMANDS TO A MOBILE PHONE OR GSM/GPRS MODEM?

Microsoft HyperTerminal is a small program that comes with Microsoft Windows. We can use it to send AT commands to your mobile phone or GSM/GPRS modem. It can be found at Start -> Programs -> Accessories -> Communications -> HyperTerminal. If there is a problem of not finding it then it means we are using Windows 98, and then probably we have not installed it. We can go to Control Panel -> Add/Remove Programs -> Windows Setup tab -> Communications list box item -> Details button to install MS HyperTerminal.

HOW MANY SMS CAN BE SENT PER MINUTE USING A GSM MODEM?

The exact number of SMS messages that can be sent or received using a GSM modem depends on depends on various factors like GSM network quality (signal strength, network congestion etc) and quality of GSM modem used etc. However, it is safe to assume that GSM modems can send/receive 8 to 10 SMS messages per minute

BASIC CONCEPTS OF SMS TECHNOLOGY. HOW DOES SMS WORK?

Short message service is a mechanism of delivery of short messages over the mobile networks. It is a store and forward way of transmitting messages to and from mobiles. The message (text only) from the sending mobile is stored in a central short message centre (SMSC) which then forwards it to the destination mobile. The figure below shows a typical organization of network elements in a GSM network supporting SMS.

The SMSC (Short Message Service Centre) is the entity which does the job of store and forward of messages to and from the mobile station. The SME (Short Message Entity), which is typically a mobile phone or a GSM modem, can be located in the fixed network or a mobile station, receives and sends short messages.
The SMS GMSC (SMS gateway MSC) is a gateway MSC that can also receive short messages. The gateway MSC is a mobile network’s point of contact with other networks. On receiving the short message from the short message centre, GMSC uses the SS7 network to interrogate the current position of the mobile station form the HLR, the home location register. HLR is the main database in a mobile network. It holds information of the subscription profile of the mobile and also about the routing information for the subscriber, i.e. the area
17
(covered by a MSC) where the mobile is currently situated. The GMSC is thus able to pass on the message to the correct MSC.
MSC (Mobile Switching Centre) is the entity in a GSM network which does the job of switching connections between mobile stations or between mobile stations and the fixed network. A VLR (Visitor Location Register) corresponds to each MSC and contains temporary information about the mobile, information like mobile identification and the cell (or a group of cells) where the mobile is currently situated. Using information form the VLR the MSC is able to switch the information (short message) to the corresponding BSS (Base Station System, BSC + BTSs), which transmits the short message to the mobile. The BSS consists of transceivers, which send and receive information over the air interface, to and from the mobile station. This information is passed over the signalling channels so the mobile can receive messages even if a voice or data call is going on.

Introduction to SMS

INTRODUCTION TO SMS MESSAGING
WHAT DOES SMS TEXT MESSAGES MEAN?
Definition:

Short Message Service (SMS) is the ability to send and receive short alphanumeric messages to and from mobile telephones. The Short Message Service & is a feature available in most modern digital phones, that lets users receive and send short text messages (from 150 to 160 characters) to other cell phones, usually limited to phones activated on the same network.
WHY USE SMS? SMS allows users to directly transmit messages to each other without the use of an operator (it is, however, necessary to have the underlying operator controlled wireless service). The first user can send a message to a mobile unit, via a direct connect computer. The SMS protocol of messaging is also "smarter" then standard paging. SMS is a store and forward method therefore, if the end user is not available, the mobile unit is powered off, or the unit is outside a service area, when the unit comes back on line the message will appear. A SMS message can also be sent "certified," where it will notify the message originator of the end user's receipt of the message.
WHAT ARE AN SMS CENTRE / SMSC?
SMSC is an abbreviation for the words Short Message Service Centre. An SMSC provides a number of services, in particular the regulation of the transfer of text messages between mobile phones. When a user sends a text message (SMS message) to a recipient, the phone actually sends the message to the SMSC. The SMSC stores the message and then delivers it to the destination recipient when they are available. The SMSC usually has a configurable time limit for how long it will store the message Generally speaking there is at least one Short Message Service Centre (SMSC) per network. For bulk transmission and reception of

SMS messages, SMSC's have conventional, fixed, network interfaces as well as mobile network interfaces. A number of protocols have been defined to support this sort of wire-line access. SMPP is the most commonly used of these protocols.

RADIO LINK ASPECT

FREQUENCY HOPPING
The mobile station already has to be frequency agile, meaning it can move between transmit and receive, and monitor time slot within one TDMA frame, which normally are on different frequencies. GSM makes use of this inherent frequency agility to implement slow frequency hopping, where the mobile and BTS transmit each TDMA frame on a different carrier frequency. Since multipath fading is dependent on carrier frequency, slow frequency hopping helps to alleviate the problem.

NETWORK SUBSYSTEM

The central component of the Network Subsystem is the Mobile services Switching Centre (MSC). It acts like a normal switching node of the PSTN or ISDN, and additionally provides all the functionality needed to handle a mobile subscriber, such as registration, authentication, location updating, handovers, and call routing to a roaming subscriber. These services are provided in conjunction with several functional entities, which together form the Network Subsystem. The MSC provides the connection to the fixed networks (such as the PSTN or ISDN).
The Home Location Register (HLR) and Visitor Location Register (VLR), together with the MSC, provide the call-routing and roaming capabilities of GSM. The HLR contains all the administrative information of each subscriber registered in the corresponding GSM network, along with the current location of the mobile. The location of the mobile is typically in the form of the signalling address of the VLR associated with the mobile station. The actual routing procedure will be described later. There is logically one HLR per GSM network, although it may be implemented as a distributed database.
The Visitor Location Register (VLR) contains selected administrative information from the HLR, necessary for call control and provision of the subscribed services, for each mobile
14
currently located in the geographical area controlled by the VLR. Although each functional entity can be implemented as an independent unit, all manufacturers of switching equipment to date implement the VLR together with the MSC, so that the geographical area controlled by the MSC corresponds to that controlled by the VLR, thus simplifying the signalling required. Note that the MSC contains no information about particular mobile stations --- this information is stored in the location registers.
The other two registers are used for authentication and security purposes. The Equipment Identity Register (EIR) is a database that contains a list of all valid mobile equipment on the network, where each mobile station is identified by its International Mobile Equipment Identity (IMEI). An IMEI is marked as invalid if it has been reported stolen or is not type approved. The Authentication Centre (AuC) is a protected database that stores a copy of the secret key stored in each subscriber's SIM card, which is used for authentication and encryption over the radio channel.

BASE STATION SUBSYSTEM

The Base Station Subsystem is composed of two parts,
1. The Base Transceiver Station (BTS) and
2. The Base Station Controller (BSC)
These communicate across the standardized Abis interface, allowing (as in the rest of the system) operation between components made by different suppliers.
The Base Transceiver Station houses the radio transceivers that define a cell and handles the radio-link protocols with the Mobile Station. In a large urban area, there will potentially be a large number of BTSs deployed, thus the requirements for a BTS are ruggedness, reliability, portability, and minimum cost.
The Base Station Controller manages the radio resources for one or more BTSs. It handles radio-channel setup, frequency hopping, and handovers, as described below. The BSC is the connection between the mobile station and the Mobile service Switching Centre (MSC).

MOBILE STATION

The mobile station (MS) consists of the mobile equipment (the terminal) and a smart card called the Subscriber Identity Module (SIM). The SIM provides personal mobility, so that the user can have access to subscribed services irrespective of a specific terminal. By inserting the SIM card into another GSM terminal, the user is able to receive calls at that terminal, make calls from that terminal, and receive other subscribed services.
The mobile equipment is uniquely identified by the International Mobile Equipment Identity (IMEI). The SIM card contains the International Mobile Subscriber Identity (IMSI) used to identify the subscriber to the system, a secret key for authentication, and other information.

ARCHITECTURE OF THE GSM NETWORK

A GSM network is composed of several functional entities, whose functions and interfaces are specified. Figure below shows the layout of a generic GSM network. The GSM network can be divided into three broad parts.
1. The Mobile Station is carried by the subscriber.
2. The Base Station Subsystem controls the radio link with the Mobile Station.
3. The Network Subsystem, the main part of which is the Mobile services Switching Centre (MSC), performs the switching of calls between the mobile users, and between mobile and fixed network users.
12
The MSC also handles the mobility management operations. Not shown is the Operations and Maintenance Centre, which oversees the proper operation and setup of the network. The Mobile Station and the Base Station Subsystem communicate across the Um interface, also known as the air interface or radio link. The Base Station Subsystem communicates with the Mobile services Switching Centre across the A interface.
Figure General Architecture of a GSM network

SERVICES PROVIDED BY GSM

The most basic tele-service supported by GSM is telephony. As with all other communications, speech is digitally encoded and transmitted through the GSM network as a digital stream. There is also an emergency service, where the nearest emergency-service provider is notified by dialling three digits (similar to 911).
A variety of data services is offered. GSM users can send and receive data, at rates up to 9600 bps, to users on POTS (Plain Old Telephone Service), ISDN, Packet Switched Public Data Networks, and Circuit Switched Public Data Networks using a variety of access methods and protocols. Since GSM is a digital network, a modem is not required between the user and GSM network, although an audio modem is required inside the GSM network to interwork with POTS.
A unique feature of GSM, not found in older analog systems, is the Short Message Service (SMS). SMS is a bidirectional service for short alphanumeric (up to 160 bytes) messages. Messages are transported in a store-and-forward fashion. For point-to-point SMS, a message can be sent to another subscriber to the service, and an acknowledgement of receipt is provided to the sender. SMS can also be used in a cell-broadcast mode, for sending messages such as traffic updates or news updates.

THE FEATURE OF GSM

GSM together with other technologies is part of an evolution of wireless mobile telecommunication that includes High-Speed Circuit-Switched Data (HSCSD), General Packet Radio System (GPRS), Enhanced Data rate for GSM Evolution (EDGE), and Universal Mobile Telecommunications Service (UMTS).
GSM Network Operators
T-Mobile and Cingular operate GSM networks in the United States on the 1,900 MHz band. GSM networks in other countries operate at 900, 1,800, or 1,900 MHz.
GSM Security: GSM security issues such as theft of service, privacy, and legal interception continue to raise significant interest in the GSM community (www.gsm-security.net).
In cellular service there are two main competing network technologies: Global System for Mobile Communications (GSM) and Code Division Multiple Access (CDMA).
Coverage: The most important factor is getting service in the areas you will be using your phone. Upon viewing competitors' coverage maps you may discover that only GSM or CDMA carriers offer cellular service in your area.
Data Transfer Speed: With the advent of cellular phones doing double and triple duty as streaming video devices, pod cast receivers and email devices, speed is important to those who use the phone for more than making calls. CDMA has been traditionally faster than GSM, though both technologies continue to rapidly leapfrog along this path. Both boast "3G" standards, or 3rd generation technologies.
Subscriber Identity Module (SIM) cards: In the United States only GSM phones use SIM cards. The removable SIM card allows phones to be instantly activated, interchanged, swapped out and upgraded, all without carrier intervention. The SIM itself is tied to the network, rather than the actual phone. Phones that are card-enabled can be used with any GSM carrier.
Roaming: For the most part, both networks have fairly concentrated coverage in major cities and along major highways. GSM carriers, however, have roaming contracts with other GSM carriers, allowing wider coverage of more rural areas, generally speaking, often without
11
roaming charges to the customer. CDMA networks may not cover rural areas as well as GSM carriers, and though they may contract with GSM cells for roaming in more rural areas, the charge to the customer will generally be significantly higher.

WHAT IS GSM?

GSM (Global System for Mobile communication) is a digital mobile telephone system that is widely used in Europe and other parts of the world. GSM uses a variation of Time Division Multiple Access (TDMA) and is the most widely used of the three digital wireless telephone
10
technologies (TDMA, GSM, and CDMA). GSM digitizes and compresses data, then sends it down a channel with two other streams of user data, each in its own time slot. It operates at either the 900 MHz or 1,800 MHz frequency band.

Wireless Communication

2.1 HISTORY OF GSM
During the early 1980s, analog cellular telephone systems were experiencing rapid growth in Europe, particularly in Scandinavia and the United Kingdom, but also in France and Germany. Each country developed its own system, which was incompatible with everyone else's in equipment and operation. This was an undesirable situation, because not only was the mobile equipment limited to operation within national boundaries, which in a unified Europe were increasingly unimportant, but there was also a very limited market for each type of equipment, so economies of scale and the subsequent savings could not be realized.
The Europeans realized this early on, and in 1982 the Conference of European Posts and Telegraphs (CEPT) formed a study group called the Groupe Spécial Mobile (GSM) to study and develop a pan-European public land mobile system.
In 1989, GSM responsibility was transferred to the European Telecommunication Standards Institute (ETSI), and phase I of the GSM specifications were published in 1990. Commercial service was started in mid-1991, and by 1993 there were 36 GSM networks in 22 countries. Although standardized in Europe, GSM is not only a European standard. Over 200 GSM networks (including DCS1800 and PCS1900) are operational in 110 countries around the world. In the beginning of 1994, there were 1.3 million subscribers worldwide, which had grown to more than 55 million by October 1997. With North America making a delayed entry into the GSM field with a derivative of GSM called PCS1900, GSM systems exist on every continent, and the acronym GSM now aptly stands for Global System for Mobile communications.

7/31/10

SERVICES PROVIDED BY GSM

The most basic tele-service supported by GSM is telephony. As with all other communications, speech is digitally encoded and transmitted through the GSM network as a digital stream. There is also an emergency service, where the nearest emergency-service provider is notified by dialling three digits (similar to 911).
A variety of data services is offered. GSM users can send and receive data, at rates up to 9600 bps, to users on POTS (Plain Old Telephone Service), ISDN, Packet Switched Public Data Networks, and Circuit Switched Public Data Networks using a variety of access methods and protocols. Since GSM is a digital network, a modem is not required between the user and GSM network, although an audio modem is required inside the GSM network to interwork with POTS.
A unique feature of GSM, not found in older analog systems, is the Short Message Service (SMS). SMS is a bidirectional service for short alphanumeric (up to 160 bytes) messages. Messages are transported in a store-and-forward fashion. For point-to-point SMS, a message can be sent to another subscriber to the service, and an acknowledgement of receipt is provided to the sender. SMS can also be used in a cell-broadcast mode, for sending messages such as traffic updates or news updates.

THE FEATURE OF GSM

GSM together with other technologies is part of an evolution of wireless mobile telecommunication that includes High-Speed Circuit-Switched Data (HSCSD), General Packet Radio System (GPRS), Enhanced Data rate for GSM Evolution (EDGE), and Universal Mobile Telecommunications Service (UMTS).
GSM Network Operators
T-Mobile and Cingular operate GSM networks in the United States on the 1,900 MHz band. GSM networks in other countries operate at 900, 1,800, or 1,900 MHz.
GSM Security: GSM security issues such as theft of service, privacy, and legal interception continue to raise significant interest in the GSM community (www.gsm-security.net).
In cellular service there are two main competing network technologies: Global System for Mobile Communications (GSM) and Code Division Multiple Access (CDMA).
Coverage: The most important factor is getting service in the areas you will be using your phone. Upon viewing competitors' coverage maps you may discover that only GSM or CDMA carriers offer cellular service in your area.
Data Transfer Speed: With the advent of cellular phones doing double and triple duty as streaming video devices, pod cast receivers and email devices, speed is important to those who use the phone for more than making calls. CDMA has been traditionally faster than GSM, though both technologies continue to rapidly leapfrog along this path. Both boast "3G" standards, or 3rd generation technologies.
Subscriber Identity Module (SIM) cards: In the United States only GSM phones use SIM cards. The removable SIM card allows phones to be instantly activated, interchanged, swapped out and upgraded, all without carrier intervention. The SIM itself is tied to the network, rather than the actual phone. Phones that are card-enabled can be used with any GSM carrier.
Roaming: For the most part, both networks have fairly concentrated coverage in major cities and along major highways. GSM carriers, however, have roaming contracts with other GSM carriers, allowing wider coverage of more rural areas, generally speaking, often without
11
roaming charges to the customer. CDMA networks may not cover rural areas as well as GSM carriers, and though they may contract with GSM cells for roaming in more rural areas, the charge to the customer will generally be significantly higher.

WHAT IS GSM?

GSM (Global System for Mobile communication) is a digital mobile telephone system that is widely used in Europe and other parts of the world. GSM uses a variation of Time Division Multiple Access (TDMA) and is the most widely used of the three digital wireless telephone
10
technologies (TDMA, GSM, and CDMA). GSM digitizes and compresses data, then sends it down a channel with two other streams of user data, each in its own time slot. It operates at either the 900 MHz or 1,800 MHz frequency band.

HISTORY OF GSM

During the early 1980s, analog cellular telephone systems were experiencing rapid growth in Europe, particularly in Scandinavia and the United Kingdom, but also in France and Germany. Each country developed its own system, which was incompatible with everyone else's in equipment and operation. This was an undesirable situation, because not only was the mobile equipment limited to operation within national boundaries, which in a unified Europe were increasingly unimportant, but there was also a very limited market for each type of equipment, so economies of scale and the subsequent savings could not be realized.
The Europeans realized this early on, and in 1982 the Conference of European Posts and Telegraphs (CEPT) formed a study group called the Groupe Spécial Mobile (GSM) to study and develop a pan-European public land mobile system.
In 1989, GSM responsibility was transferred to the European Telecommunication Standards Institute (ETSI), and phase I of the GSM specifications were published in 1990. Commercial service was started in mid-1991, and by 1993 there were 36 GSM networks in 22 countries. Although standardized in Europe, GSM is not only a European standard. Over 200 GSM networks (including DCS1800 and PCS1900) are operational in 110 countries around the world. In the beginning of 1994, there were 1.3 million subscribers worldwide, which had grown to more than 55 million by October 1997. With North America making a delayed entry into the GSM field with a derivative of GSM called PCS1900, GSM systems exist on every continent, and the acronym GSM now aptly stands for Global System for Mobile communications.

NEW METHODS OF REMOTE ECG MONITORING

The modern electronic and telecommunications equipment permit us to reach one step further in transmission and recording of ECG signals. The new, miniature ECG machines having many possibilities and advantages are offered to physicians and patients. They are much smaller and lighter than standard ECG machines used in telemetry. It is not necessary to connect cumbersome ECG cables and to apply ECG electrodes, because a new recorder has sealed metal contacts. It is interesting that such recorders are made as common daily used small things, like wallet for credit cards, bills, etc.
The education of the patient is very simple. By simply placing the contacts against the chest the user can record a real-time ECG signal. The users can carry such ECG devices not only in their homes, but also while working, traveling or driving a car. Thus, no matter where the user is located, when he feels heart irregularities, he has the ability to record and to transmit the ECG signal by only pressing a button. The recorded data on some models can be completely viewed on a built-in small LCD monitor.

Twenty-four hours a day, all the year round, the centre receives ECG’s from many patients in a real-time, and the patients have a direct access to a cardiologist. Detailed real-time ECG waveforms are displayed on the centre monitors. The trained medical experts retrieve the patient’s medical history, receive his symptoms over the phone (standard or mobile), compare a transmitted ECG with a previously recorded ECG and interpret ECG. A quick initial analysis can be undertaken and instructions for the treatment and clinical advices can be given. If it is necessary, the position of the patient can be determined using GPS and emergency medical service can be contacted.

METHODOLOGY

The methodology of this state-of-the-art design is to attach the leads of a portable Electronic circuit to the subjects' body while the other end of the circuit is interfaced with a cellular phone. After acquiring the bio-signals of electrocardiography from the body, the signal is filtered out by higher order low pass, band pass, high pass and band reject filters to remove the nugatory noise some frequencies of noise and other sort of radio wave interferences. The signal is then digitalized and converted to an appropriate packet form and then uploaded on the cellular network, via the cell phone, as SMS, in form of a text message. With practice, interpreting the ECG is a matter of pattern recognition and if the physicians or heart specialists are provided by the ECG in time, it can recuperate casualties and cessation of meritorious lives. Specialists and physicians can infer the cardiac disorders if provided by a recorded ECG waveform of about a minute span along with brief generic detail about the patient. Thus the transmitted ECG along with embedded brief generic information about subject can be received on either the physician

ECG TRANSMISSION BY MOBILE PHONE (TELEMONITORING IN CARDIOLOGY)

With the development of electronics and its application in medicine it is possible to transmit and process many vital parameters of the human body. The most important, and in this moment the most interesting signal for monitoring and analyzing is the electrocardiography (ECG) signal. For the patient suffering from the cardiac disease it is very important to perform accurate and quick diagnosis. For this purpose a continuous monitoring of the ECG signal and the patient’s current heart activity are necessary. In this medical field, a big progress has been achieved in last few years, especially by applying the latest generation of mobile phones.
Nowadays the ECG signal recording is usually performed in two main ways: by using the ECG machine in short time intervals during the examination by physician, or by using permanent 24 hours ECG recording and a later analysis (the so-called the Holter monitoring). The disadvantage of the first method is that it is not possible to have the complete diagnosis, and the shortcoming of the second method is that it is not possible to intervene immediately, which sometimes can be fatal.

READING A BASIC ECG

The first crude ECG was described in 1903 by Willem Einthoven. His procedure has been expanded, and now the probes used to measure electricity (called electrodes) are placed on the right and left arms, left leg, and across the chest wall. Currently there are 12 standardized “leads” for the standard ECG: bipolar leads I, II and III, described by Einthoven, augmented unipolar leads aVR, aVL and aVF and unipolar precordial leads V1-V6. How do these “leads” work and what do they mean?
When current passes to the positive end of the bipolar (2-sided) electrode, it causes a positive deflection, which corresponds to an upward movement of the pen on the ECG paper. Passage of current away from the positive pole of the bipolar electrode causes a negative deflection and a downward movement of the pen on the ECG paper. Current flowing at an oblique angle to the electrode causes smaller deflection, and current flowing perpendicular to the electrode does not cause any deflection in the recorder. Thus each lead “sees” the heart in a different way. This information is recorded on paper as a series of deflections and waves.

WHAT IS ECG?

An electrocardiogram (ECG) is the representation of the electrical activity of the heart (cardiac) muscle as it is recorded from the body surface. The heart is a muscular organ that beats in rhythm to pump the blood through the body. The signals that make the heart's muscle fibers contract come from the senatorial node, which is the natural pacemaker of the heart. In an ECG test, the electrical impulses made while the heart is beating are recorded and usually shown on a piece of paper. This is known as an electrocardiogram, and records any problems with the heart's rhythm, and the conduction of the heart beat through the heart which may be affected by underlying heart disease.
The muscle cells of the heart are linked so closely to one another that electrical impulses can easily spread from one cell to the next. Certain groups of cardiac cells are designed to rapidly transmit electrical activity through the heart. These specialized cells include the arterial conduction tracks, the atrioventricular (AV) node, the bundle of His, the bundle branches, and the distal ventricular conduction system.
The heart has some very specialized cells. The so-called automatic cells of the heart are capable of spontaneous depolarization. They are important in the generation of heart rhythm, and because of this they are also known as pace making cells.

DELIVERY MECHANISMS

Networked programs link tertiary care hospitals and clinics with outlying clinics and community health centers in rural or suburban areas. The links may use dedicated high-speed lines or the Internet for telecommunication links between sites.
• Point-to-point connections using private networks are used by hospitals and clinics that deliver services directly or contract out specialty services to independent medical service providers at ambulatory care sites. Radiology, mental health and even intensive care services are being provided under contract using telemedicine to delivery the services.
• Primary or specialty care to the home connections involves connecting primary care providers, specialists and home health nurses with patients over single line phone-video systems for interactive clinical consultations.
• Home to monitoring centre links are used for cardiac, pulmonary or fetal monitoring, home care and related services that provide care to patients in the home. Often normal
3
phone lines are used to communicate directly between the patient and the centre although some systems use the Internet.
• Web-based e-health patient service sites provide direct consumer outreach and services over the Internet. Under telemedicine, these include those sites that provide direct patient care.

TELEMEDICINE SERVICES

Specialist referral services typically involves of a specialist assisting a general practitioner in rendering a diagnosis. This may involve a patient "seeing" a specialist over a live, remote consult or the transmission of diagnostic images and/or video along with patient data to a specialist for viewing later. Recent surveys have shown a rapid increase in the number of specialty and subspecialty areas that have successfully used telemedicine. Radiology continues to make the greatest use of telemedicine with thousands of images "read" by remote providers each year. Other major specialty areas include: dermatology, ophthalmology, mental health, cardiology and pathology.
2
According to reports and studies, almost 50 different medical subspecialties have successfully used telemedicine.
• Patient consultations using telecommunications to provide medical data, which may include audio, still or live images, between a patient and a health professional for use in rendering a diagnosis and treatment plan. This might originate from a remote clinic to a physician's office using a direct transmission link or may include communicating over the Web.
• Remote patient monitoring uses devices to remotely collect and send data to a monitoring station for interpretation. Such "home telehealth" applications might include a specific vital sign, such as blood glucose or heart ECG or a variety of indicators for homebound patients. Such services can be used to supplement the use of visiting nurses.
• Medical education provides continuing medical education credits for health professionals and special medical education seminars for targeted groups in remote locations.
• Consumer medical and health information includes the use of the Internet for consumers to obtain specialized health information and on-line discussion groups to provide peer-to-peer support.

WHAT IS TELEMEDICINE?

Telemedicine is the use of medical information exchanged from one site to another via electronic communications to improve patients' health status. Closely associated with telemedicine is the term "telehealth" which is often used to encompass a broader definition of remote healthcare that does not always involve clinical services. Videoconferencing, transmission of still images, e-health including patient portals, remote monitoring of vital signs, continuing medical education and nursing call centers are all considered part of telemedicine and telehealth.
Telemedicine is not a separate medical specialty. Products and services related to telemedicine are often part of a larger investment by health care institutions in either information technology or the delivery of clinical care. Even in the reimbursement fee structure, there is usually no distinction made between services provided on site and those provided through telemedicine and often no separate coding required for billing of remote services.
Telemedicine encompasses different types of programs and services provided for the patient. Each component involves different providers and consumers

WHY WIRELESS?

To dive into a specific technology at this point is getting a bit ahead of the story, though.
Wireless networks share several important advantages, no matter how the protocols are designed, or even what type of data they carry.
The most obvious advantage of wireless networking is mobility. Wireless network users can connect to existing networks and are then allowed to roam freely. A mobile telephone user can drive miles in the course of a single conversation because the phone connects the user through cell towers. Initially, mobile telephony was expensive. Costs restricted its use to highly mobile professionals such as sales managers and important executive decision makers who might need to be reached at a moment's notice regardless of their location. Mobile telephony has proven to be a useful service, however, and now it is relatively common in the United States and extremely common among Europeans. 1
As long as the wireless users remain within the range of the base station, they can take advantage of the network. Commonly available equipment can easily cover a corporate campus; with some work, more exotic equipment, and favorable terrain.
Wireless networks typically have a great deal of flexibility, which can translate into rapid deployment. Wireless networks use a number of base stations to connect users to an existing network.

WIRELESS NETWORKS

Over the past five years, the world has become increasingly mobile. As a result, traditional ways of networking the world have proven inadequate to meet the challenges posed by our new collective lifestyle. If users must be connected to a network by physical cables, their movement is dramatically reduced. Wireless connectivity, however, poses no such restriction and allows a great deal more free movement on the part of the network user. As a result, wireless technologies are encroaching on the traditional realm of "fixed" or "wired" networks.
Wireless telephony has been successful because it enables people to connect with each other regardless of location. New technologies targeted at computer networks promise to do the same for Internet connectivity. The most successful wireless networking technology this far has been 802.11.

Normalization of Database

Normalization is a process for assigning attributes to entities. It reduces data redundancies and helps eliminate the data anomalies.
Normalization works through a series of stages called normal forms:
First normal form (1NF)
Second normal form (2NF)
Third normal form (3NF)
Fourth normal form (4NF)
The highest level of normalization is not always desirable.


Denormalization

Normalization is only one of many database design goals.
Normalized (decomposed) tables require additional processing, reducing system speed.
Normalization purity is often difficult to sustain in the modern database environment. The conflict between design efficiency, information requirements, and processing speed are often resolved through compromises that include denormalization.

Database System Utilities

Loading
Conversion
Backup
File Reorganization
Performance monitoring
Communication

Database Classifications

Single-user vs. Multiuser
Centralized vs. Distributed
Data Model
Relational
Network
Hierarchical
Object-oriented

Data Models

A data model is a description of the structure of a database. Data models generally, fall into 3 categories according to the level of the description.

High-level ( or conceptual) data models closely approximate the miniworld.
Representational ( or, implementational ) data models are intermediate data models close to the miniworld but also reflecting the actual organization of data in the database.
Low-level ( or, physical) data models describe details of physical storage, generally transparent to casual or parametric end users.

A data model is often specified by a database schema typically displayed in a schema diagram that consists of schema constructs.

Database State


The actual data in a data base at a particular instant is the database state, which consists of a set of instances for each schema construct.
Defining a database consists of specifying a schema to the DBMS. We then have a database in an empty state, with no data.
When data is first loaded, the database is in its initial state.
Subsequently, each update creates another state. The DBMS must guarantee that each such state is a valid state that satisfies schema specifications.
The schema is the intension, while a database state is the extension of the schema.

When not to use a DBMS

Main costs of using a DBMS:
- High initial investment in hardware, software,training
and possible need for additional hardware.
- Overhead for providing generality, security, recovery, integrity, and concurrency control.
Generality that a DBMS provides for defining and processing data.
When a DBMS may be unnecessary:
If the database and applications are simple, well defined, and not expected to change.
If there are stringent real-time requirements that may not be met because of DBMS overhead.
If access to data by multiple users is not required.

Advantages of Using DBMs

Controlling Redundancy in data storage and in development and maintenance efforts. ‧duplication efforts ‧waste space ‧inconsistent Restricting Unauthorized Access (security and authorization)
Providing Persistent Storage for Program Objects and Data Structures.
Permitting Inference and Actions Using Rules
Providing Multiple User Interfaces
Representing Complex Relationships Among data.
Enforcing Integrity Constraints
Providing Backup and Recovery

Implications of the Database Approach

Potential for Enforcing Standards.
-Reduced Application Development Time.
-Flexibility.
-Availability of Up-to-date Information.
-Economies of Scale.

Characteristics of the Database Approach

File Processing
Each user defines and implements the files needed for a specific application
Redundancy in defining & storing data
Database Approach
A single repository of data
-Self-describing nature of a database system: A DBMS catalog stores the description of the database. The description is called meta-data . This allows the DBMS software to work with different databases. catalog: structure of each file, type & storage format of each data item, constraints on data
Insulation between programs and data: Called program-data independence.
Allows changing data storage structures without having to change the DBMS access programs.

Data Abstraction: A data model is used to hide storage details and present
the users with a conceptual view of the database.
Abstract operation(OODB)
Support of multiple views of the data: Each user may see a different view of the
database, which describes only the data of interest to that user.
subset or virtual data

Characteristics of the Database Approach

File Processing
Each user defines and implements the files needed for a specific application
Redundancy in defining & storing data
Database Approach
A single repository of data
-Self-describing nature of a database system: A DBMS catalog stores the description of the database. The description is called meta-data . This allows the DBMS software to work with different databases. catalog: structure of each file, type & storage format of each data item, constraints on data
Insulation between programs and data: Called program-data independence.
Allows changing data storage structures without having to change the DBMS access programs.

Data Abstraction: A data model is used to hide storage details and present
the users with a conceptual view of the database.
Abstract operation(OODB)
Support of multiple views of the data: Each user may see a different view of the
database, which describes only the data of interest to that user.
subset or virtual data