Olytechnic Niversity of The Hilippines: College of Engineering Department of Computer Engineering
This document contains source code and documentation for an experiment involving using AT commands to enable communication between a computer and GSM modem to send and receive SMS messages. The objectives are to launch an external application when a message is received by the modem. It describes connecting the broadband stick to the PC, verifying it works with AT commands, coding a program to test it, and concluding that AT commands allow wireless connectivity through SMS. The source code provided implements a GSM communication class to send and receive AT commands and process incoming messages to trigger an application.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
79 views
Olytechnic Niversity of The Hilippines: College of Engineering Department of Computer Engineering
This document contains source code and documentation for an experiment involving using AT commands to enable communication between a computer and GSM modem to send and receive SMS messages. The objectives are to launch an external application when a message is received by the modem. It describes connecting the broadband stick to the PC, verifying it works with AT commands, coding a program to test it, and concluding that AT commands allow wireless connectivity through SMS. The source code provided implements a GSM communication class to send and receive AT commands and process incoming messages to trigger an application.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7
COEN 3244
INPUT / OUTPUT MEMORY SYSTEM
Experiment # 4 AT Commands
Submitted by:
Aquino, Richard F. Daitan, R B. Rodriguez, Joshua Benjamin B. Sarong, Christopher B.
BSCpE 5-4
Submitted to:
Engr. Allan B. Verzo Instructor
Date Submitted: Schedule: July 14, 2014 M/M 7:30-10:30AM/10:30-1:30PM
Republic of the Philippines POLYTECHNIC UNIVERSITY OF THE PHILIPPINES COLLEGE OF ENGINEERING DEPARTMENT OF COMPUTER ENGINEERING
OBJECTIVES:
To launch an external application once the GSM Modem receives a message.
MATERIALS:
Computer x1 Broadband Stick x1 Cellphone
PROCEDURE:
1. Study AT Commands. 2. Connect Broadband Stick to PC. 3. Verify that its working using AT Commands. 4. Start Coding 5. Verify that the program is working.
CONCLUSION: AT Commands are an important part in IO projects because it allows communication to devices that enable wireless connectivity like SMS.
SCREENSHOTS:
SOURCE CODE:
using System; using System.IO.Ports; using System.Threading;
namespace Kippenberger {
public class GsmComm { public SerialPort GsmPort;
private const int BAUDRATE = 9600; private const int DATABITS = 8; private const int SLEEPTIME = 5;
using System; using System.IO.Ports; using System.Text.RegularExpressions; using System.Threading; using Gtk; using IO_SMS_GUI;
public partial class MainWindow: Gtk.Window {
public MainWindow () : base (Gtk.WindowType.Toplevel) { Project.Sms = new Kippenberger.GsmComm (); Project.Sms.GsmPort.DataReceived += new SerialDataReceivedEventHandler (OnMessageReceived);
protected void OnMessageReceived (object sender, SerialDataReceivedEventArgs e) { // Sleep thread to delay execution of Read() when AT+CGML="ALL" is executed // Sleep time must be greater than sleep time in AT+CGML="ALL" Thread.Sleep (1500); //Console.WriteLine (Project.Sms.Read()); string receivedData = Project.Sms.Read ();
if (Regex.IsMatch (receivedData, Regex.Escape ("+CMTI:"))) { Project.ExecFromMessage (receivedData); } }