i doing a simple application that able to integrate with GSM Modem to send and receive the SMS. i had completed the send SMS part, but i not able to receive the SMS. i get error message said that my SIM card memory is full when trying to send the SMS with other mobile device to my SIM card in the GSM Modem. i tried to use the AT command "AT+CMGL" to remove all the messages, but still same. May i know there are any method to store the message in my computer memory so that i able to receive the SMS with my GSM Modem. I using the sample code from here
http://www.codeproject.com/Articles/38705/Send-and-Read-SMS-through-a-GSM-Modem-using-AT-Com
The AT+CMGL command is for listing messages, not deleting them. Deleting messages is done with the AT+CMGD command. Do yourself a favour and download a copy of the 3GPP 27.005 standard, it defines all the standard sms AT commands (most other mobile phone AT commands are defined in 27.007), and by all means get a copy of the ITU standard V.250 which defines the basic command syntax, structure and behaviour for AT commands - an absolute must read for anyone that issues AT commands (read all of chapter 5 at least). These documents are more valuable than any random internet web site, including stackoverflow.
Speaking of random websites, the web page you linked as source seems to be of dubious value. It gives an example function DeleteMsg which issues AT+CMGF=1 but this command does in no way delete anything, it selects text or PDU mode for the various sms related commands.
It does have response handling that is better than the horrible send-sleep-read mistake that unfortunately is not as uncommon as it ought to be, but it is only half decent and not robust at all.
After sending an AT command to a modem you should continuously read and parse response lines from the modem (over and over again) until you receive a final result code (and not just once). See this answer for details.
All of the the message commands operate on the storage location set by AT+CPMS. And notice that you should always set <mem1> and <mem2> at the same time, e.g.
AT+CPMS="SM","SM"
It both makes little sense to only change one of mem1/mem2, and some phones do not like attempts to set only one of them.
Related
I was tasked with devising a solution to initiate a voice call using a GSM Modem programmatically. The call will be initiated via an API and play and audio file or just ring a number and then drop the call. This is to be used to notify staff during the night about critical alarms on the network.
Does anyone know of a solution or worked on something similar?
GSM network modem with SIM Card is to be used.
I'm not sure the staff will appreciate an autodialer like feature, rather than a text or other message, but as this is your requirement I am guessing your customer must have already made the decision.
One good approach for which there is plenty of documentation is to use an Asterisk based solution.
If you are not familiar with it, Asterisk is a open source PBX which is capable of connecting, initiating and receiving calls.
There are several firms that made GSM/UMTS interfaces cards that you can host in a standard server/PC and use as you have described above (you want to make regular GSM voice calls not VoIP over data over a GSM model I am assuming).
Some specific info on your use case is here for example:
http://www.voip-info.org/wiki/view/Asterisk+auto-dial+out+deliver+message
I'm setting up some higher end security systems for a client. I'm using blue iris (his request) which has alot of great options for alerting you via cell phone or POTS telephone call. Unfortunately the building is 100% VoIP with no POTS and the camera server is in that building. I want it to ring a house number via a Automated VOIP call when an event is triggered in blue Iris then play a pre-recorded message.
We have a couple of Asterisk/Elastix PBXes in the company. I'm not sure how to proceeded:
Blus iris event triggered, it sends message/request/alert to a extension on the PBX
PBX makes the automated call to the group of numbers whenever that extension is dialed/contacted/triggered/etc.
I'd use an external script file (PHP, Ruby, BASH) to generate your call request on the PBX. See my answer at [
Asterisk AGI - Originate a call using php agi
] for more details. However, what you're doing is entirely possible, as I do it myself for a couple of different solution sets.
Essentially, and most easily, you'd generate a call file via script and within it ensure you have a couple of channel variables set that are keys for specific routing. When the call connects at the far end, the near end goes into a dialplan on the ASTPBX where exactly what message is played, after-message behaviour, etc, is managed by the channel variables you've set.
I know there are various programs that sniff packets like WireShark, but I'm pretty sure you can only view the data. I want to know if it's possible to edit incoming packets. I'm not sure if packets are the right term. I just want to edit incoming data that is recieved through the internet and who's destination is a specific application. Let's say I am playing an online game. As it loads my computer, it is recieving information like "This person has 10 coins in their money pouch". Obviously not exactly like that but you get the point. I would like to be able to change the data so it is say 100 instead of 10. I know something like this would be possible if you were to do this: Imagine my computer is connected to the internet with an ethernet cord. There is a device attached to the ethernet cord which recieves the data and changes it and then lets it continue to my computer. I would just like to know if this is possible, and how it could be accomplished.
Thanks!
The way I do it, is one of 2 ways:
1.
If your application supports it set up a HTTP Proxy on your machine and you could software like burp / Fiddler to mess with the data
If not (the protocol is not HTTP) you could use either one of 2 options i'v tried [Both based on Hooking the API calls from the application to the OS]:
EchoMirage software that allow messing around with the packets
[Bit more advanced: ] There is a debugger named OllyDbg which has a plugin named Universal Hooker; it enables to hook any window API function and execute a python script on demend. the uHooker contains examples for how to hook WSASend and WSARecive (which are the API functions used in windows sockets).
I have a project coming up where I need to send and receive messages through a specific mobile operator, which only provides an SMPP interface. The whole project will be a hosted website. I have already read quite a lot, but I do not yet quite understand what is actually needed from my side to use the protocol.
Should my application try to maintain a constant connection to the smpp?
Can I simply connect, send a message and then disconnect?
Are receiving messages based on push or pull?
Thanks for the help.
SMPP is a peer-to-peer protocol. That should mean that SMS Gateway (your side) and SMSC (your mobile operator) need to have a proper bind/connection established. Even when there are no SMS or DLRs to send/receive, there is a continous exchange of smpp PDU (enquire_link/enquire-link_resp) that ensure that the bind is established.
In detail, if you send an enquire_link PDU and you get no response (enquire_link_resp) the bind is broken. Your sms won't be delivered (will remain enqueued in your gateway store), and you won't receive MOs (incoming sms) or DLRs (delivery report). To re-establish the connection you should re-initiate the connection.
So, my answer would be that you need a constant connection to SMSC.
You are stating you want to receive messages, as a result at least a bind_receiver is needed. Because you don't know when messages are going to come in, you will have to be constantly connected, rather than disconnecting after each event.
With regards to your question about "push or pull" this depends on how you solve the first problem. If you can build a solution that is constantly connected, the result will be a push (the carrier will push it to you as soon as they receive the message). If (for some reason) you cannot maintain a constant connection, you'll end up building a pull mechanism. You'll connect to the carrier ever X seconds to see if they have a message waiting for you.
I do need to highlight 2 pitfalls though:
A number of carriers in the world, do not store or even accept messages if you are not connected, therefore, depending on which carrier you interact with, you might be forced to use a continuous connection.
Most carriers do not allow you to open and close connections in quick succession. Once you disconnect, you can not reconnect for a time frame of X seconds.
Therefore a constant connection is really the way to go. Alternatively, you can look into a company like Nexmo, which will provide you with a HTTP Call every time a message arrives.
I'm not sure which language your developing your application in, but if you use any of the popular languages (Java, PHP, Perl) there are modules out there that handle basic SMPP Connectivity for you. A quick google search for your language and "SMPP Client" will give you a list of references.
How to Read SMS/MMS in UIQ ?
I am going to assume that you want information about how to write some C++ source code that will allow an application to receive SMS/MMS and read the content of the messages it receives.
On Symbian OS, the message store can store SMS, MMS, EMAIL...
The API of the message store is generic.
In order to write and read data to/from the message store, you'll need to familiarise yourself with the following classes : TMsvId, CMsvSession, CClientMtmRegistry, TMsvEntry and CMsvEntry.
I am obviously biased but I would advise reading the messaging chapter of http://www.quickrecipesonsymbianos.com in order to get an explanation of how the messaging store works and the sample code to use it easily.
Receiving messages, on the other hand, is more complicated.
Listening for and receiving SMS is done using the generic networking API. That's RSocketServ and RSocket. Mostly, you need to use to the right IOCTL parameters on the socket.
You can specify a specific port in order to only receive SMS that are intended for your application. Trying to receive all SMS could be an issue as the native message viewer engine and the embedded Java virtual machine PushRegistry module could both be listening for all SMS already.
You will find useful classes and constants in the following header files in your SDK:
gsmuset.h smsuaddr.h smsustrm.h gsmubuf.h gsmumsg.h.
TSmsAddr, KSMSDatagramProtocol, KSMSAddrFamily, TSmsUserDataSettings, CSmsBufferBase, CSmsPDU, RSmsSocketReadStream, RSmsSocketWriteStream and CSmsMessage are of particular interest. Asynchronously receiving an SMS is actually done using RSocket.Ioctl().
There are SMS-specific error codes whose names start with "KSmsErr"
Receiving MMS on UIQ is done through a UQI-specific API. One that you won't find on Series60 phones. This is the reason why you won't find much talk of a Symbian-generic MMS API in the litterature. You are better off going directly to the UIQ or Sony-Ericsson development communities when you have more detailled questions.
Your application shouldn't have to use RSocket to receive MMS.
Careful, once again, both the Embedded Java virtual machine PushRegistry module and the native message viewer application engine are probably already listening for all incoming MMS messages.
The interesting header files are mmsclient.h, MmsSettingsStore.h, mmsentry.h, MmsApiExtensions.h
Of particular interest are CMmsClientMtm, MmsApiExtensions, MMsvSessionObserver and MMMSMessageHandler.
Good luck.