Jesse Emond
Jesse Emond

Reputation: 7490

Is it possible to reach my computer (with internet access) from my cellphone (through SMS, perhaps)?

I'm looking for a way for my computer (with internet access) to communicate with my cellphone (through SMS). I am aware that it is possible to sens a SMS by using the service provider's SMS gateway (e.g. [email protected] for Koodo mobile in Canada). Even though it works, I can not answer to the SMS and get the message back through the e-mail (not without an internet connection, that is), and that's what I would like to achieve: communicate with my computer even though I am lacking an internet connection.

Basically I'd like to have some kind of server at home (written in C#) that waits for commands through SMS from me and answers through SMS too.

Is this possible with minimal fees? Ideally I would like it if I could try it out for free at first.

I took a look at Twilio and it seems to be exactly what I'm searching for, but from what I understand, it sends back text messages to an app by sending a POST request. The problem is that I'm not making a webpage, I'm making a stand-alone C# application. Is there a way to recover the request anyway? I must admit that I know close to nothing about requests and how to handle them.

Anyway, I've searched for hours and couldn't come up with anything interesting (except Twilio). I would greatly appreciate any kind of help or clarification.

Thank you for your precious time.

Upvotes: 2

Views: 883

Answers (4)

Drahakar
Drahakar

Reputation: 6088

I would suggest that you use the twitter API. If you create an account on twitter for your computer and you register your cellphone with twitter (on your personnal account), you will be able to send tweet that your compute will receive. And you'll receive tweet on your cellphone by sms (if your computer add your name to it).

It has already been done to control botnet network

Upvotes: 2

Tim Lytle
Tim Lytle

Reputation: 17624

(First the disclaimer, I do a little developer evangelism for Nexmo, an SMS API.)

For the most part, SMS APIs use HTTP callbacks to deliver messages. So it seems the gist of your question is how to get a callback based API (in that a HTTP callback is made on a given event) working with code that is not on a webserver.

This is the same basic use case hardware developers (Ardunio, etc) face when wanting the device to interact with an API.

Here are some options:

  • Use a static IP address, and point the callbacks to your non-webserver. Of course the problem here is you've essentially turned your non-webserver into a webserver.

    Somehow your 'stand-alone' application now needs to understand and accept HTTP requests, and the server it runs now has additional security concerns.

    This will work (and is probably the easiest way to get started), but it seems to be quite the opposite of what you're looking for. Also, it means you need to ensure your application stays online (certainly problematic for cases where IP addresses/networks change).

  • Use a webserver as an intermediate. Still requires the web component (after all, most APIs of this kind deliver the SMS via a HTTP callback); however, it means you can pick how the message is delivered to you stand-alone application.

    The webserver could accept the incoming SMS (via the HTTP callback) then send that to your stand-alone application via email, XMPP, etc. The messages could even be ignored, and your stand-alone application could poll the API for a list of messages (since the last poll).

    At that point your stand-alone application could reply using a HTTP request (after all, the stand-alone application should be able to make HTTP requests easily).

  • Use SMPP. This is something I'm not that familiar with, but would completely bypass the need for an HTTP callback. If the API you use supports SMPP (a protocol for SMS), you could just configure your application to connect via SMPP and send/receive all messages though that channel.

    I'm not saying I'd recommend this, but it is another option.

Option 1 and 2 should be possible with any SMS API, for option 3 the only one I know of that provides SMPP is Nexmo (but that's because I do a bit of work there, it's entirely possible other SMS providers offer that).

Also, since you mentioned minimal fees - it might be worth noting that incoming SMS is free with Nexmo.

Upvotes: 1

Kevin Junghans
Kevin Junghans

Reputation: 17540

There is a service provided by Voxeo called SMSIfied that is currently in Beta, and while it is in Beta you can try it out for free. Once it is out of Beta it will just cost you one cent per message without any setup fee. It has a REST API that allows you to receive and send SMS messages from you PC. Here is a blog post that shows how to use the API with C#. It is fairly easy to send an SMS message from a "stand-alone" C# application but a little trickier to receive them. To receive them you will need a fixed IP address that the SMSIfied service can make an HTTP request to. This will also require you to open a port in your firewall for HTTP traffic to come in on. To handle the incoming requests I would recommend using ASP.NET Web API that comes with ASP.NET MVC 4. For a "stand-alone" C# application you can self-host the API.

Upvotes: 2

Vinod
Vinod

Reputation: 4892

You can achieve this either by using a mobile phone or a GSM Module

You should have a program to parse message delivered to ur connected phone or GSM Module

Check this Send and Read SMS through GSM Modem

Upvotes: 2

Related Questions