Reputation: 1
Am currently developing an app that receives SMS (using a GSM modem) and take actions depending on that SMS.
For example i will send SMS that contains "ClYellow", the software will detect automatically that incoming SMS, read it and take action, the action will be changing the background color to "ClYellow".
How can i do that using the TComPort ?
Upvotes: -3
Views: 671
Reputation: 6600
The answer to your question depends on the model of the phone you use. Let's assume that you successfully connected the phone to your COM port ans set up the port properly (the BAUD Rate, etc depend on the hardware you use, so nobody can give you better advice than the spec of the phone). The rule of thumb is that if you send the string AT
to the device and it answers OK
, you have successfully established a connection.
Now the next problem is to identify the list of AT commands that your phone supports. Unfortunately there were multiple standards and numerous extensions and exceptions from the standard. Try the AT+CMGL="ALL"
command first.
Even more difficult to set up the connection to notify you of the new messages. This is a separate topic and even more depend on the phone model.
Hope that helps you to start googling the details.
Upvotes: 0