at set

55
1) Test commands - used to check whether a command is supported or not by the MODEM. SYNTAX: AT<command name>=? For example: ATD=? 2) Read command - used to get mobile phone or MODEM settings for an operation. SYNTAX: AT<command name>? For example: AT+CBC? 3) Set commands - used to modify mobile phone or MODEM settings for an operation. SYNTAX: AT<command name>=value1, value2, …, value N Some values in set commands can be optional. For example: AT+CSCA=”+9876543210”, 120 4) Execution commands - used to carry out an operation. SYNTAX: AT<command name>=parameter1, parameter2, …, parameterN The read commands are not available to get value of last parameter assigned in execution commands because parameters of execution commands are not stored. For example: AT+CMSS=1,”+ 9876543210”, 120 AT commands are used to control MODEMs. AT is the abbreviation for Attention. These commands come from Hayes commands that were used by the Hayes smart modems. The Hayes commands started with AT to indicate the attention from the MODEM. The dial up and wireless MODEMs (devices that involve machine to machine communication) need AT commands to interact with a computer. These include the Hayes command set as a subset, along with other extended AT commands. AT commands with a GSM/GPRS MODEM or mobile phone can be used to access following information and services: 1. Information and configuration pertaining to mobile device or MODEM and SIM card. 2. SMS services.

Upload: sai-nandhini

Post on 22-Oct-2014

19 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: at set

1)      Test commands - used to check whether a command is supported or not by the MODEM.

SYNTAX:                    AT<command name>=? 

For example:              ATD=?

2)      Read command - used to get mobile phone or MODEM settings for an operation.

SYNTAX:                    AT<command name>?

For example:              AT+CBC?

 

3)      Set commands - used to modify mobile phone or MODEM settings for an operation. SYNTAX:                   

AT<command name>=value1, value2, …, value N

Some values in set commands can be optional.

For example:              AT+CSCA=”+9876543210”, 120

4)      Execution commands - used to carry out an operation.

SYNTAX:                    AT<command name>=parameter1, parameter2, …, parameterN

The read commands are not available to get value of last parameter assigned in execution commands

because parameters of execution commands are not stored.

For example:               AT+CMSS=1,”+ 9876543210”, 120

AT commands are used to control MODEMs. AT is the abbreviation for Attention. These commands

come from Hayes commands that were used by the Hayes smart modems. The Hayes commands

started with AT to indicate the attention from the MODEM. The dial up and wireless MODEMs (devices

that involve machine to machine communication) need AT commands to interact with a computer. These

include the Hayes command set as a subset, along with other extended AT commands.

AT commands with a GSM/GPRS MODEM or mobile phone can be used to access following information

and services: 1.      Information and configuration pertaining to mobile device or MODEM and SIM card. 2.      SMS services. 3.      MMS services. 4.      Fax services. 5.      Data and Voice link over mobile network.

The Hayes subset commands are called the basic commands and the commands specific to a GSM

network are called extended AT commands.

Page 2: at set

Explanation of commonly used AT commands:1)           AT - This command is used to check communication between the module and the computer.For example,AT        OK

The command returns a result code OK if the computer (serial port) and module are connected properly.

If any of module or SIM is not working, it would return a result code ERROR.

2)            +CMGF - This command is used to set the SMS mode. Either text or PDU mode can be selected by

assigning 1 or 0 in the command.   SYNTAX:         AT+CMGF=<mode>

0: for PDU mode 1: for text mode

 The text mode of SMS is easier to operate but it allows limited features of SMS. The PDU      (protocol

data unit) allows more access to SMS services but the operator requires bit level knowledge of TPDUs.

The headers and body of SMS are accessed in hex format in PDU mode so it allows availing more

features. For example,  

                     AT+CMGF=1                     OK

3)            +CMGW - This command is used to store message in the SIM.

SYNTAX:         AT+CMGW=” Phone number”> Message to be stored Ctrl+z

As one types AT+CMGW and phone number, ‘>’ sign appears on next line where one can type the

message. Multiple line messages can be typed in this case. This is why the message is terminated by

providing a ‘Ctrl+z’ combination. As Ctrl+z is pressed, the following information response is displayed on

the screen.

+CMGW: Number on which message has been stored

4)            +CMGS - This command is used to send a SMS message to a phone number.

SYNTAX:         AT+CMGS= serial number of message to be send.

         

Page 3: at set

As the command AT+CMGS and serial number of message are entered, SMS is sent to the particular

SIM.            For example,            AT+CMGS=1

OK

 

5)            ATD - This command is used to dial or call a number.SYNTAX:         ATD<Phone number>(Enter)For example,ATD123456789

 

6)            ATA - This command is used to answer a call. An incoming call is indicated by a message ‘RING’ which

is repeated for every ring of the call. When the call ends ‘NO CARRIER’ is displayed on the screen. 

SYNTAX:         ATA(Enter)

            

As ATA followed by enter key is pressed, incoming call is answered.For example,

RINGRINGATA

 

7)            ATH - This command is used to disconnect remote user link with the GSM module.

SYNTAX:         ATH (Enter)

List of AT commands:The AT commands for both, GSM module and the mobile phone, are listed below. Some of these

commands may not be supported by all the GSM modules available. Also there might be some

commands which won’t be supported by some mobile handsets. Testing :Command DescriptionAT Checking communication between the module and

computer. Call control :Command DescriptionATA Answer commandATD Dial commandATH Hang up callATL Monitor speaker loudnessATM Monitor speaker modeATO Go on-lineATP Set pulse dial as defaultATT Set tone dial as defaultAT+CSTA Select type of addressAT+CRC Cellular result codes

Page 4: at set

 Data card Control :Command DescriptionATI IdentificationATS Select an S-registerATZ Recall stored profileAT&F Restore factory settingsAT&V View active configurationAT&W Store parameters in given profileAT&Y Select Set as power up optionAT+CLCK Facility lock commandAT+COLP Connected line identification presentationAT+GCAP Request complete capabilities listAT+GMI Request manufacturer identificationAT+GMM Request model identificationAT+GMR Request revision identificationAT+GSN Request product serial number identification (IMEI)

 Phone control :Command DescriptionAT+CBC Battery chargeAT+CGMI Request manufacturer identificationAT+CGMM Request model identificationAT+CGMR Request revision identificationAT+CGSN Request product serial number identificationAT+CMEE Report mobile equipment errorAT+CPAS Phone activity statusAT+CPBF Find phone book entriesAT+CPBR Read phone book entryAT+CPBS Select phone book memory storageAT+CPBW Write phone book entryAT+CSCS Select TE character setAT+CSQ Signal quality

 Computer data interface :Command DescriptionATE Command EchoATQ Result code suppressionATV Define response formatATX Response range selectionAT&C Define DCD usageAT&D Define DTR usageAT&K Select flow controlAT&Q Define communications mode optionAT&S Define DSR optionAT+ICF DTE-DCE character framingAT+IFC DTE-DCE Local flow controlAT+IPR Fixed DTE rate

 Service :Command DescriptionAT+CLIP Calling line identification presentation

Page 5: at set

AT+CR Service reporting controlAT+DR Data compression reportingAT+ILRR DTE-DCE local rate reporting

 Network Communication parameter :Command DescriptionATB Communications standard optionAT+CBST Select bearer service typeAT+CEER Extended error reportAT+CRLP Radio link protocolAT+DS Data compression

 Miscellaneous :Command DescriptionA/ Re-execute command lineAT? Command helpAT*C Start SMS interpreterAT*T Enter SMS block mode protocolAT*V Activate V.25bis modeAT*NOKIATEST Test commandAT+CESP Enter SMS block mode protocol

 SMS Text mode :Command DescriptionAT+CSMS Select message serviceAT+CPMS Preferred message storageAT+CMGF Message formatAT+CSCA Service centre addressAT+CSMP Set text mode parametersAT+CSDH Show text mode parametersAT+CSCB Select cell broadcast message typesAT+CSAS Save settingsAT+CRES Restore settingsAT+CNMI New message indications to TEAT+CMGL List messagesAT+CMGR Read messageAT+CMGS Send messageAT+CMSS Send message from storageAT+CMGW Write message to memoryAT+CMGD Delete message

 SMS PDU mode :Command DescriptionAT+CMGL List MessagesAT+CMGR Read messageAT+CMGS Send messageAT+CMGW Write message to memory

 

Page 6: at set

The MAX232 IC is used to convert the TTL/CMOS logic levels to RS232 logic levels during serial

communication of microcontrollers with PC. The controller operates at TTL logic level (0-5V) whereas the

serial communication in PC works on RS232 standards (-25 V to + 25V). This makes it difficult to

establish a direct link between them to communicate with each other.

 

The intermediate link is provided through MAX232. It is a dual driver/receiver that includes a capacitive

voltage generator to supply RS232 voltage levels from a single 5V supply. Each receiver converts RS232

inputs to 5V TTL/CMOS levels. These receivers (R1& R2) can accept ±30V inputs. The drivers (T1 & T2),

also called transmitters, convert the TTL/CMOS input level into RS232 level.

 

The transmitters take input from controller’s serial transmission pin and send the output to RS232’s

receiver. The receivers, on the other hand, take input from transmission pin of RS232 serial port and give

serial output to microcontroller’s receiver pin.MAX232 needs four external capacitors whose value ranges

from 1µF to 22µF.

 Microcontroller MAX232 RS232

Tx T1/2 In T1/2 Out RxRx R1/2 Out R1/2 In Tx

 Pin Diagram: 

Page 7: at set

Pin Description: 

Pin No Function Name1

Capacitor connection pins

Capacitor 1 +2 Capacitor 3 +3 Capacitor 1 -4 Capacitor 2 +5 Capacitor 2 -6 Capacitor 4 -7 Output pin; outputs the serially transmitted data at RS232 logic level;

connected to receiver pin of PC serial port T2 Out

8 Input pin; receives serially transmitted data at RS 232 logic level; connected to transmitter pin of PC serial port

R2 In

9 Output pin; outputs the serially transmitted data at TTL logic level; connected to receiver pin of controller.

R2 Out

10 Input pins; receive the serial data at TTL logic level; connected to serial transmitter pin of controller.

T2 In11 T1 In12 Output pin; outputs the serially transmitted data at TTL logic level;

connected to receiver pin of controller.R1 Out

13 Input pin; receives serially transmitted data at RS 232 logic level; connected to transmitter pin of PC serial port

R1 In

Page 8: at set

14 Output pin; outputs the serially transmitted data at RS232 logic level; connected to receiver pin of PC serial port

T1 Out

15 Ground (0V) Ground16 Supply voltage; 5V (4.5V – 5.5V) Vcc

 

LCD (Liquid Crystal Display) screen is an electronic display module and find a wide range of applications. A 16x2 LCD display is very basic module and is very commonly used in various devices and circuits. These modules are preferred over seven segmentsand other multi segment LEDs. The reasons being: LCDs are economical; easily programmable; have no limitation of displaying special & even custom characters (unlike in seven segments), animations and so on.

A 16x2 LCD means it can display 16 characters per line and there are 2 such lines. In this LCD each character is displayed in 5x7 pixel matrix. This LCD has two registers, namely, Command and Data.

The command register stores the command instructions given to the LCD. A command is an instruction

given to LCD to do a predefined task like initializing it, clearing its screen, setting the cursor position,

controlling display etc. The data register stores the data to be displayed on the LCD. The data is the

ASCII value of the character to be displayed on the LCD.

 

Pin Diagram: 

Page 9: at set

Pin Description:  Pin No  Function  Name

1 Ground (0V) Ground2 Supply voltage; 5V (4.7V – 5.3V)  Vcc3 Contrast adjustment; through a variable resistor  VEE

4 Selects command register when low; and data register when high Register Select

5 Low to write to the register; High to read from the register Read/write6 Sends data to data pins when a high to low pulse is given Enable7

8-bit data pins

DB08 DB19 DB2

10 DB311 DB412 DB513 DB614 DB715 Backlight VCC (5V) Led+16 Backlight Ground (0V) Led-

 

Page 10: at set

Recently, the health care sensors are playing a vital role in hospitals. The patient monitoring systems is

one of the major improvements because of its advanced technology. A wireless patient monitoring system

to measure heartbeat and body temperature of the patient by using embedded technology is developed.

 

So we are here, just connecting the temperature sensor and heartbeat sensor so that simultaneously we

can monitor the patient’s condition and hence ruling out the use of the thermometer and other devices to

check the condition of the patient.

 

This project describes the design of a simple, low-cost microcontroller based heart rate & body

temperature measuring device with LCD output. Heart rate of the subject is measured from the index

finger using IRD (Infra Red Device sensors and the rate is then averaged and displayed on a text based

LCD).

 

The device alarms when the heart beat & the body temperature exceed the provided threshold value. This

threshold value is defined by the programmer at the time of programming the microcontroller 89C8051.

The threshold value given for the project is as 20 to 120 pulses per minute for heart beat indication &

18°C to 38°C for temperature.

 

This information i.e. the Heart Rate & the Body Temperature is then transmitted wirelessly to the doctor

which in not in the vicinity of the patient through GSM technique. The sensors measure the information

and transmit it through GSM Modem on the same frequency as on which cell phones work.MICROCONTROLLER – MODEM INTERFACING

DTE and DCE

The terms DTE and DCE are very common in the data communications market. DTE is short for Data

Terminal Equipment and DCE stands for Data Communications Equipment. As the full DTE name

indicates this is a piece of device that ends a communication line, whereas the DCE provides a path for

communication.

Page 11: at set

For example, the PC is a Data Terminal (DTE). The two modems (yours and that one of your provider)

are DCEs, they make the communication between you and your provider possible.

  

RS-232

In telecommunications, RS-232 is a standard for serial binary data signals connecting between a DTE

(Data terminal equipment) and a DCE (Data Circuit-terminating Equipment). It is commonly used in

computer serial ports. In RS-232, data is sent as a time-series of bits. Both synchronous and

asynchronous transmissions are supported by the standard. In addition to the data circuits, the standard

defines a number of control circuits used to manage the connection between the DTE and DCE. Each

data or control circuit only operates in one direction that is, signaling from a DTE to the attached DCE or

the reverse. Since transmit data and receive data are separate circuits, the interface can operate in a full

duplex manner, supporting concurrent data flow in both directions. The standard does not define

character framing within the data stream, or character encoding.

 Female 9 pin plug 

Functions Signals PIN DTE DCE

Data TxD 3 Output Input

RxD 2 Input Output

  RTS 7 Output Input

Page 12: at set

 

Handshake

CTS 8 Input Output

DSR 6 Input Output

DCD 1 Input Output

STR 4 Output Input

Common Com 5 -- --

Other RI 9 Output Input

RS-232 Signals

 

 

RS-232 Signals  1. Transmitted Data (TxD)

Data sent from DTE to DCE.

 

2. Received Data (RxD)

Data sent from DCE to DTE.

 

3. Request To Send (RTS)

Asserted (set to 0) by DTE to prepare DCE to receive data. This may require action on the part of the

DCE, e.g. transmitting a carrier or reversing the direction of a half-duplex line.

 

4. Clear To Send (CTS)

Asserted by DCE to acknowledge RTS and allow DTE to transmit.

 

Page 13: at set

5. Data Terminal Ready (DTR)

Asserted by DTE to indicate that it is ready to be connected. If the DCE is a modem, it should go "off

hook" when it receives this signal. If this signal is de-asserted, the modem should respond by immediately

hanging up.

 

6. Data Set Ready (DSR)

Asserted by DCE to indicate an active connection. If DCE is not a modem (e.g. a null-modem cable or

other equipment), this signal should be permanently asserted (set to 0), possibly by a jumper to another

signal.

 

7. Carrier Detect (CD)

Asserted by DCE when a connection has been established with remote equipment.

 

8. Ring Indicator (RI)

Asserted by DCE when it detects a ring signal from the telephone line.

 RTS/CTS Handshaking 

The standard RS-232 use of the RTS and CTS lines is asymmetrical. The DTE asserts RTS to indicate a

desire to transmit and the DCE asserts CTS in response to grant permission. This allows for half-duplex

modems that disable their transmitters when not required and must transmit a synchronization preamble

to the receiver when they are re-enabled. There is no way for the DTE to indicate that it is unable to

accept data from the DCE. A non-standard symmetrical alternative is widely used: CTS indicates

permission from the DCE for the DTE to transmit, and RTS indicates permission from the DTE for the

DCE to transmit. The "request to transmit" is implicit and continuous. The standard defines RTS/CTS as

the signaling protocol for flow control for data transmitted from DTE to DCE. The standard has no

Page 14: at set

provision for flow control in the other direction. In practice, most hardware seems to have repurposed the

RTS signal for this function. A minimal “3-wire” RS-232 connection consisting only of transmits data,

receives data and

 Ground, and is commonly used when the full facilities of RS-232 are not required. When only flow control

is required, the RTS and CTS lines are added in a 5-wire version. In our case it was imperative that we

connected the RTS line of the microcontroller (DTE) to ground to enable receipt of bit streams from the

modem.

  

Specifying Baud Rate, Parity & Stop bits 

Serial communication using RS-232 requires that you specify four parameters: the baud rate of the

transmission, the number of data bits encoding a character, the sense of the optional parity bit, and the

number of stop bits. Each transmitted character is packaged in a character frame that consists of a single

start bit followed by the data bits, the optional parity bit, and the stop bit or bits. A typical character frame

encoding the letter "m" is shown here.

 

 

Character Frame Encoding ‘m’

Page 15: at set

 

We specified the parameters as baud rate – 2400 bps, 8 data bits, no parity, and 1 stop bit (2400-8-N-1).

This was set in pre-operational phase while setting up the modem through the hyper terminal, as per the

serial transmission standards in 8051 microcontroller.

 

 

MICROCONTROLLER – LCD INTERFACING

See the article Microcontroller interfacing with LCD

 

MAX 232 See details of  MAX 232

ANALOG / DIGITAL CONVERTER

See ADC0804

 

TEMPERATURE SENSOR (LM 35)

See LM35

 OPERATIONAL AMPLIFIER (LM 324) 

The LM124 series consists of four independent, high gain, internally frequency compensated operational

amplifiers which were designed specifically to operate from a single power supply over a wide range of

voltages. Operation from split power supplies is also possible and the low power supply current drain is

independent of the magnitude of the power supply voltage.

 

Page 16: at set

Application areas include transducer amplifiers, DC gain blocks and all the conventional op amp circuits

which now can be more easily implemented in single power supply systems. For example, the LM124

series can be directly operated off of the standard +5V power supply voltage which is used in digital

systems and will easily provide the required interface electronics without requiring the additional ±15V

power supplies.

  

Pin

Configuration: 

  

 UNIQUE FEATURES: 

Page 17: at set

In the linear mode, the input common-mode voltage range includes ground and the output voltage can

also swing to ground, even though operated from only a single power supply voltage. The unity gain

crossover frequency and the input bias current are temperature-compensated.

 FEATURES: 

Internally frequency-compensated for unity gain.

Large DC voltage gain: 100 dB.

Wide bandwidth (unity gain): 1 MHz (temperature-compensated)

Wide power supply range Single supply: 3 VDC to 30 VDC or dual supplies: ±1.5 VDC to ±15 VDC.

Very low supply current drain: essentially independent of supply voltage (1 mW/op amp at +5 VDC).

Low input biasing current: 45 nADC (temperature-compensated)

Low input offset voltage: 2 mVDC and offset current: 5 nADC.

Differential input voltage range equal to the power supply voltage.

Large output voltage: 0VDC to VCC–1.5 VDC swing.APPLICATIONS

The project is used to transfer the information from the transmitter side to the receiver side wirelessly. The

project is an advance application of GSM based DISPLAY TOOLKIT.

In our project we are basically focussing on the situation where the where the patient(s) and the doctor

are at the distant location and it is quite necessary to give the details about the patient(s) heartbeat and

the tempearture to the doctor. In this type of situation where the information becomes the indespensable

part of the life this project emerges out as best to acknowledge the doctor witth he correct and the fast

information.

Besides this if made certain changes in the project, it can also be used as way of acknowledging the

students of the institutes with the fastest mode of information regarding certain Notices. Again it is the

application of GSM BASED DISPLAY TOOLKIT.

 

Page 18: at set

Looking into current trend of information transfer in the campus, it is seen that important notice take time

to be displayed in the notice boards. This latency is not expected in most of the cases and must be

avoided.

 

Also the electronics displays which are currently used are programmable displays which need to be

reprogrammed each time a new notice comes. The process of reprogramming includes burning the

microcontroller again and again. This makes it inefficient for immediate information transfer, and thus the

display board looses its importance.

  

CONCLUSION

This Project which demonstrates an automated patient monitoring system has its own merits and

demerits which are discussed below:

Merits:The wireless alert system using WAP notifies physicians of critical results on their Display (Cellular Phones can also be used as a display).

1. With online recording of medical parameters, the workload of the case providers and the nursing

staff is reduced.

2. The clinical information database contains all data regarding the patients in electronic form.

3. The patient call switches help emergency situations to be handled quickly. Future enhancements can be easily implemented with the PLC controller.

  

De-Merits: 

1. The heart beat sensor is highly temperature dependent and the dynamic characteristics change with

different levels of ambient light and temperature level.

Page 19: at set

2. The dual operational amplifier needs a high CMRR and additional narrowband filters are necessary

to attenuate effects of the noise interference.

3. Network Congestion and Noise interference involved, delays the transmission and reception of the

signal, hence delayed observations are obtained.

  

FUTURE ENHANCEMENTS

The entire medical data acquisition could be made wireless and wearable. Such a package would contain

the circuiting for inputs from ECG sensors, EEG sensors, pressure measurement and pulse rate

transducers. This wearable module can transmit the data continuously over a fiber optic link or through an

internet digital radio. The received data can be stored in separate memory and be processed by a

microcontroller. This enhancement will enable monitoring of patients to be more flexible and strain-free.

 

In addition to above the following enhancement can also be made: 

•         A graphical LCD can be used to display a graph of the change of heart rate over time.

•         Sound can be added to the device so that a sound is output each time a pulse is received.

•         The maximum and minimum heart rates over a period of time can be displayed.

•         Serial output can be attached to the device so that the heart rates can be sent to a PC for further online

or offline analysis.

Page 20: at set
Page 21: at set
Page 22: at set
Page 23: at set
Page 24: at set
Page 25: at set
Page 26: at set
Page 27: at set
Page 28: at set
Page 29: at set
Page 30: at set
Page 31: at set
Page 32: at set
Page 33: at set
Page 34: at set
Page 35: at set
Page 36: at set
Page 37: at set
Page 38: at set
Page 39: at set
Page 40: at set
Page 41: at set
Page 42: at set
Page 43: at set
Page 44: at set
Page 45: at set
Page 46: at set
Page 47: at set
Page 48: at set
Page 49: at set
Page 50: at set
Page 51: at set