Go Down

Topic: sending sms from arduino using free sms website... (Read 4594 times) previous topic - next topic


I'm thinking of using a ethernet arduino as a water leak detector (sponges with stainless steel probes with one side having a resistor and the other side going to a digital input).

But I want it to be able to send my phone an SMS if there is a leak detected and also a daily sms so I know everything is working.

I looked around and found http://txtdrop.net

They let you send an sms via a web form.

after looking over some old threads

Here is the text of the form at txtdrop.net

Code: [Select]
<table width="382" height="100" border="0" cellpadding="2" cellspacing="0">
                <td width="120"><tr>
<form action="" method="post" form name="tabform">
                  <td width="158">From:</td>
                  <td width="179"><div align="center">

<input type="text" name="name" id="name" size="24" maxlength="21" />
                  <td width="258">
                  <input name="number" type="text" id="number" size="13" onKeyup="autotab(this, document.tabform.body)" maxlength="13" /></td>
<select name="carrier" id="carrier" class="style3">
<option value="38"> AT&T Wireless</option>
                  <td><textarea name="body" cols="28" rows="3" wrap="PHYSICAL" class="style4" id="textarea" onkeyup="onTypeNotes()"></textarea></td>
  <input type="hidden" name="submitted" value="1"> <input type="submit" name="submit" value="Send" /></td>

So I can up with:

client.println("POST HTTP/1.1")
client.println("Host: www.mysite.com")
client.println("User-Agent: Mozilla/4.0")
client.println("Content-Length: 39")            // Change to be number of characters in POST line between quotes
client.println("Content-Type: application/x-www-form-urlencoded")

client.println("name=yes@no.com&number=1234567890&carrier=38&textarea=HELP!! Water leak in BASEMENT SENSOR #1&submit=Send");

Is this right?

does the "submit=Send" have to be in there?



Can someone help with a way to call a simple fuction to use txtdrop.com to send txt message from arduino?

There is a widget at the site to create html code for websites. http://www.txtdrop.com/generate.php
The code generated sends variables to http://www.txtdrop.com/send.php

Maybe Browseurl or a get command?

Maybe a function and pass string variable to change to change the message.

I use ethercard library and am trying to do this any help would be appreciated.


When you use one of these services to send a text, they are just sending an email to a specific number. Each cell carrier uses a different email address. For example, to send a text to an AT&T phone, you would send an email to x@txt.att.net, where x = the person's 10 digit phone number. Most of these services just use a lookup table to find out what email address to use with what phone number. Here a site listing all the addresses: http://www.emailtextmessages.com/

Its really simple to use PHP to send an email, just look around for tutorials online.


Txtdrop.com is php.  I need a simple command to use them.

this is the code generated by thier widget

<form>action="http://www.txtdrop.com/send.php" method="POST" target="_blank"><input type="hidden" name="number" value="xxxxxxxxxx">
<textarea>name="body" rows="3" cols="25" size="145">Drop Me A Txt</textarea><br>
<a href=http://www.txtdrop.com>txtDrop.com</a><input type=submit value="Text Me"></form>

this is somthing I came up with and doesnt work. needs more variables?

Stash::prepare(PSTR("GET http://www.txtdrop.com/send.php? type="hidden" name="number" value="xxxxxxxxxx" body="cold" HTTP/1.1"

ether.browseUrl(PSTR("GET http://www.txtdrop.com/send.php?type=hidden name=number value=xxxxxxxxxx body=cold HTTP/1.1")

This should be easy I am just missing something


You can use SMTP to send SMS:



Definitely can use SMTP to send an SMS as you said, but it's definitely more complex to handle the full bi-directional session of SMTP, rather than just issuing a quick GET...  command over port 80..  That's why I'm also looking to do the same thing..

In my case, I'm using a WiFly which is configured for a different port for it's main purpose, and as such, if I have to do more than a packet or two, it's going to interfere with it's normal operation, but I am pretty sure I can at least send the one TCP transaction reliably without messing with my otherwise working syslogging config...

So..  Anyone have any idea of a good way to send a text via a quick HTTP request?


The simplest way to work out what you need to send is to do it in the Chrome browser with developer mode turned on (F12).  This will capture the HTTP request from the browser in the network tab.  Make sure you click on "view source" to view the raw request.

Now that you have a working HTTP request, you just need to reproduce the same request from the Arduino using your wifi board.

If you want to test your request outside of the browser, you can use the Postman add on for Chrome.


Its nice to send sms using arduino forum via free sms and if you are require sms in bulk for commercial purpose than you can use other software like Top 5 Bulk SMS Service Provider in India with SMS API because its way to connect with customers.

Go Up