How to send sms from a VB application via USB GSM modem (Huawei E1731) - vb6

I am creating a small VB project and I want to send some information through SMS. I tried to find solutions in here many threads but can get one.
I am using Huawei E1731 3G USB modem, which is capable of sending and receiving sms through its official software. How can i use the modem to send a fixed message to particular number by getting the number from text box in a form?

Hopefully you are using VB.NET and not VB6.
Here is a solution in C#.NET which you should easily be able to convert to VB.NET :
http://sharp-coders.blogspot.in/2011/12/send-sms-using-at-commands-via-gms.html

Related

Is it possible to receive sms messages using internet when outside of coverage area of sellular network?

Is there any way to still deliver sms message to Android/iPhone device in ordinary messages app, when device is outside of coverage area of cellular provider but has access, for example to WiFi internet?
Thank you
Regular SMS message can be sent/delivered only when phone is in radio coverage. However, some applications can show message as SMS following its own protocol over the internet.
Such example is iMessage (Iphones).
I believe this can be done. But it is not an easy.
You need to create an app and install it on the phone. This app should inject SMS into the ordinary message app (I am not completely sure this is possible on iPhone). The app should, using WiFi, get the information about the SMS from somewhere. Different companies like https://twilio.com or https://suresms.com have inbound SMS numbers. So, you send SMS to this "virtual" number, then an app will pickup the message and inject it into the phones ordinary app.
I cannot come up with a solution where the message is delivered to the SIM cards phone number when the sim-card is out of reach.

How to receive an sms in a desktop pc?

I am stuck in the midst of a project. The project requires that a desktop pc must receive an sms sent from a mobile phone. How can I accomplish this? Please help.
You can connect a GSM Modem like this one to the serial port. It acts like a mobile phone with its own SIM card. I'm sure there are other products for USB.
On the software side, you can check for SMS messages by talking with AT commands to the device. I've done that in Perl and in .NET "manually", but maybe there are some out-of-the-box solutions.
i know (and have used) 2 ways to do this.
The quick, dirty and hacky way is to buy a mobile phone and connect it to your PC with a serial cable, then use old fashioned AT commands to control the phone (including listening for new SMS messages).
Many older Nokias support this, though it's not hugely well documented - this is about the best resource I found: http://wiki.forum.nokia.com/index.php/AT_Commands.
There are many exciting ways this can fail - you have to keep the phone charged, and in a data centre, reception is often pretty poor.
The alternative is to talk to a mobile aggregator (Google for likely candidates in your area). These are companies that can set up SMS short codes, and have APIs for forwarding the messages to you; APIs vary between the providers. This is usually fairly expensive - shortcodes cost money, sending and receiving SMS messages costs money, and the aggregator may not have deals with countries you care about. Caveat emptor, and all that.
You would also need a library to send/receive the AT commands to and from the modem.
See http://www.codeproject.com/KB/vb/phonesmsrecv.aspx
This software can help you. It uses a GSM/3G modem attached to a PC. It can store incoming SMS messages in a database, save to files, forward them to a webserver, in real-time.
(A 3g/gsm modem has a SIM card and therefore has its own phone number to which sms messages can be sent)

Receive SMS like a modem

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!

connecting computer to a mobile phone - reading sms and use it?

I've absolutely no idea if this is possible and how it would work.
is it possible to give users a phonenumber where they should send an sms to.
e.g. the sms contains
name
some code
i want to track how many sms are sent to this number.
i want to read the sms text and use both nodes
they weird way i imagine this: i buy a prepaid simcard from any phone provider, i plug the simcard into any device (sim-reader :) ) connected to my computer. my computer is ONLINE. so my computer is kind of transformed to a mobile phone. some software is able to retrieve those sms and i can use the data in it.
is that even possible, if yes HOW?
You can use e.g. gammu to send and receive SMS from a cellphone connected to your computer - essentially creating a SMS gateway. I've succesfully used it in the past in this setup (newer phones have serial port emulation through USB, for older ones you need a model-specific serial-to-phone cable):
my program <-> database/textfiles <-> gammu <-> serial port <-> cellphone
The operation was as follows:
gammu ran in the command line/daemon mode, with a watchdog script restarting it (and the cellphone) if the cellphone became unresponsive (this was a really old phone; a watchdog is probably not necessary with anything > 2006)
gammu polled the cellphone for new messages, those were store into a "received" table in the database.
gammu also polled an "outgoing" table in the database for messages I wanted to send, and sent them through the cellphone.
my program was a web frontend for reading the incoming messages or inserting the outgoing ones.
(Gammu has an API to interface with the cellphone directly, without the database; I decided to keep the backend and frontend parts separate, and since the frontend was using the database for other things anyway, it was easiest to go that way; also, I was using an old phone for this, and needed the frontend to run even if the cellphone wasn't responding)
There are several possibilities listed here. But it depends on the phone you are using. Symbian, iOS, Android, Windows Mobile. But basically it is possible using a GSM Modem.

Sending an SMS myself

I'm taking shots in the dark here. I'd like to create a web service where eventually I send an SMS by using my own hardware. I'm not sure what I need in order to send an SMS myself. I don't want to use any of the existing SMS send services out there, I need to be able to send these SMS myself.
It looks like there's one opensource project in particular that deals with this, "Kannel":
http://www.kannel.org/
what I don't understand is, do I need to get a GSM modem to be able to send SMS? Do SMS gateways (like Kannel) eventually need to get to a GSM modem to send messages, or is there some other hardware you need to be able to actually send the messages?
Thanks
Just find an online SMS Gateway. These Gateway providers are your best bet since they have handled all the heavy lifting for you. Just utilize their API and you should be able to do whatever you want. Some of these gateways are free and some are not. I've included a short list below.
https://www.clickatell.com/pricing/message_cost.php
http://www.zeepmobile.com/
(Carrier based SMS transit)
http://en.wikipedia.org/wiki/List_of_carriers_providing_SMS_transit
I'm sure there are a ton more, but this will get you started.
You always need a GSM modem to send the SMS unless you use a provider that handles this for you (but they usually want money for this).
If you want to setup your own Hardware infrastructure, you have to get GSM Modem, A Sim card and use it to send SMS.
Other option, which I recommend, is to use SMS getways and use
SMPP protocol
XML or HTTP Apis
In later, you dont have to create any infrastructure and the starting cost will be very low compared to GSM Modem. You can get up and running in a day.
Note : to reduce the SMS costs, you should choose different getways for different countries. In India you can easily find getways who provides SMS at merely 3 paise
You will have to download an API that handles the sending and recieving of messages for you. I once used this in one project where i had my GSM Phone connected to my computer thru one of the COM ports. Configured the API to communicate thru the COM Port to listen to any incoming text messages also send messages thru my GSM Phone. Here is a great link to the resources i used for that project. I hope this will help. http://www.codeproject.com/KB/cs/SMS.aspx

Resources