I would like to be able to output information from a quad band GSM modem. The modem would be connected to a computer, and the idea is that I could send AT commands or SMS from very large distances to the modem. The modem would receive the instructions and would reply in SMS to the sender with the proper information. I am a little overwhelmed in how to approach this however, does anyone have any experience or insight with this? In particular, I am pretty lost on how I would process the received instructions and have the computer execute them.
An example of what I'm trying to do:
Send SMS reading "Power info" to modem
Modem receives SMS, relays it to the computer
Computer sees instruction, fetches necessary data
Computer outputs data to the modem
Modem sends SMS to sender with the proper data (in this case volts/amps being used or something)
Please let me know if anything is unclear, it is my first time posting here.
Related
Is there a way to receive SMS messages sent to a GSM module (like sim800) as soon as the module boots up?
Usually if the SMS is sent while the receiving module is off, and then boots up the SMS messages take tens of minutes to arrive. However if the module is turned on, the messages arrive almost immediately.
Is there a way to signal the network that we are now connected and request all SMS messages?
I have tried network deregistration/registration (AT+COPS=2 AT+COPS=0) with no results
Not having a lot of experience on this module, I believe this is rather a question about triggering the network provider to send SMS sooner (e.g. as soon as you're registered). This might depend on the network provider you're connecting to.
With a standard phone I've made the experience that triggering some network activity (e.g. calling someone or sending an SMS myself) seems to flush any SMS queues that they have waiting for me. You might try sending an SMS as soon as you're up
I am currently working on a project for which it is required to receive SMS messages using a dongle. The dongle being used is a Huawei E3131 Hi-Link dongle, which is configured in serial mode via USB-modeswitch. Communication to the dongle is done via AT-commands.
The problem is that SMS messages are not being received. After alot of attempts to fix this I found that SMS messages are ony received after sending out an SMS on the dongle itself. I've also tested with another dongle (Huawei E173), but this works fine.
For testing purposes I am not using any code yet. I am manually execute the following AT-commands to initialize the dongle:
Pin is ready according to "AT+CPIN?".
Dongle is set to text mode via "AT+CMGF=1".
SIM storage is used via "AT+CPMS="SM","SM","SM"".
Message indicators (AT+CNMI) is set to "1,2", but "0,0,0,0,0" and other combinations have been tried as well.
After executing these commands I check the received SMS messages via "AT+CMGL" and none show up (as expected).
Then I will send an SMS to the dongle. After waiting for a while still no messages show up (though you'd expect them to). Then I will use the dongle to send an SMS to another device via the AT+"CMGS" command. This SMS is correctly received on the other device. After sending this SMS suddenly the SMS sent to the dongle show up via "AT+CMGL".
I've read through the Huawei AT commands manual but have still no clue what's going on. I've excluded the following possible issues:
According to "CFUN?" the dongle is in "Online" mode, like you'd expect.
The SIM is not full as "AT+CPMS?" shows.
Enabling mobile equipment errors does not produce any extra output ("AT+CMEE=2").
CREG shows that we are registered (on a roaming network).
CSQ shows a signal is available (strength of 16,99).
I've tested with another E3131 dongle, but this produces the same problems.
RSSI messages are still being received.
Sometimes switching on the internet on the dongle produces the same result as sending out an SMS.
In the SMS gateway which can be used for sending SMS, the SMS will stay in the "pending" state until the message is delivered in the storage on the dongle.
Does anyone know what's going on?
I working on a website which have function for sending SMS messages. What i know is the GSM modem use AT COMMAND to send/receive the message. I already have the modem but i can't find a way to sending the AT COMMAND from php script to the modem. Can someone give me a clear direction.
Many thanks.
I have an application which can only send SMS to a serial AT modem, but I want to send this SMS via an web service.
My idea is to connect a virtual software modem to the (virtual) serial port of the application and receive the SMS in software, then I would pass this SMS to the web API.
My problem is, that i nether find a software which can recieve SMS like a modem nor find a library which offers ability to act like a modem.
Any ideas?
Your existing application expects to connect to a serial port. That means you need some kind of virtual serial port. Google will give you perfectly usable hits for that term. Any of those libs should give you a character stream.
Parsing this stream should be fairly straightforward. You can toss out all modem initialization, and just focus on the SMS command. In theory, there's a "write" and a "send" command, but you can safely assume that a PC application will send any SMS that it writes. It's not like PC's make typo's. Hence, you just need to parse the AT+CMGW command; all other commands can get a standard OK response.
Grab the phone number and message from the AT+CMGW command, and pass it to the webservice. Done!
I am trying to implement my own theoretical SMS web service (just to understand how this stuff works, I have posted a few other related questions, I think this is it).
Set up a PC. It takes requests from a website I make to send out SMS messages: a user-entered destination phone number, and a user-entered text message
I get a GSM modem, or just a GSM phone. I connect it to the computer.
I get a service plan from Verizon or whoever, some sort of unlimited SMS messaging plan.
They give me a SIM card, which has my unique phone # attached to it (ex: 555-5555). I stick this in the GSM modem.
I get some application (like Kannel) which handles interfacing with the modem and sending out the messages from my machine.
Now users can visit my theoretical website, enter a phone # and message. I grab that data, forward it to Kannel. Kannel interacts with the modem, passing it the data for the message. The modem interacts with the carrier network I signed up with, and broadcasts the actual SMS to it. The carrier network handles routing the message to the actual destination.
This is my understanding of how it works. Now the recipient of this text message will see this message pop up on their device from my modem's number (555-5555). In fact, all the thousands of people using my service will all see the same origin phone number.
If that's so, how do these 3rd party SMS applications give people unique #s for replying to messages they send out?
For example, when I sign up for one of these 'free' SMS services on iPhone, they assign me a unique user ID, like '123'. My friend is on a normal AT&T phone plan. He can send an SMS addressed to '123', and somehow I will get the message. How does AT&T know to route that to this third party service? I can't imagine that they would somehow get a new SIM card with a unique phone number per user that signs up for their service!
Thanks for all your help.
Thanks
The cell network carriers (e.g. AT&T, Verizon) actually rent out custom phone numbers (called "short codes") to 3rd parties to use.
You usually can't acquire these short codes directly from the carrier, but you can go through a 3rd party company to rent the short code. I've worked with companies like MBlox and OpenMarket to use carrier short codes. These companies are sometimes referred to as "SMS/MMS messaging aggregators," because they aggregate messaging services across multiple carriers and offer them to people/companies like you. Most of the time the aggregator will expose some sort of API (SOAP/XML or binary protocol) to access the messaging services to send and receive messages.
There may be other ways to do it, this is just my experience.
I think your comment at the bottom of your message is misleading.
Your friend probably doesn't send a message to "123" infact he probably sends "123 hello george" to a central number, which in turns routes "123" on to you, behind the scenes.
FWIW, mobile messages can appear as though they come from anything (including, for example, a word, and not a number).
Your general underlying assumption as to how gateways work (acquiring simcards) is accurate enough.