EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise
You are here: Home / Replies / The GSM modem can be

The GSM modem can be

|

Microcontroller › 8051 › how to read the received message/number from microcontroller › The GSM modem can be

April 21, 2012 at 6:27 pm #7531
AJISH ALFRED
Participant

The GSM modem can be configured like the following to response immediate when a SMS is received, the SMS’s details are immediately sent serially

AT+CMGF=1 To format SMS as a TEXT message
AT+CNMI=1,2,0,0,0   Set how the modem will response when a SMS is received

When a new SMS is received by the GSM modem serially send the following data

+CMT :  “+91xxxxxxxxxx” , , “04/08/30,23:20:00+40”
This the text SMS message sent to the modem

If you take a close look, it can be found that the 8th character is the starting of the mobile number after a character ‘+’ has been received for the first time.

So just wait till the ‘+’ is received for the first time, then count the next 7 characters received, start storing from the 8 th charater onwards into an array till the 20 th character and you have the mobile number in that array, like +91xxxxxxxxxx

RSS Recent Posts

  • factory device from 2017'ish with web ui - too old to function with Microsoft Edge ? January 14, 2026
  • flexible copper cable January 14, 2026
  • renewed interest in old project I call it WICKED 8 January 14, 2026
  • updating circuit with power on off switching January 14, 2026
  • Steering angle sensor question January 13, 2026

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2026 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise