# Send data to database in server with wip at commads

**URL:** <https://forum.sierrawireless.com/t/send-data-to-database-in-server-with-wip-at-commads/4346>\
**Category:** Open AT\
**Created:** [April 9, 2010, 12:20am UTC](https://forum.sierrawireless.com/t/send-data-to-database-in-server-with-wip-at-commads/4346 "2010-04-09T00:20:40Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![bygelogelo](https://avatars.discourse-cdn.com/v4/letter/b/c67d28/32.png) [@bygelogelo](https://forum.sierrawireless.com/u/bygelogelo)\
**Post date:** [April 9, 2010, 12:20am UTC](https://forum.sierrawireless.com/t/send-data-to-database-in-server-with-wip-at-commads/4346/1 "2010-04-09T00:20:40Z")

</div>

Hi.

I need send data to database ina server with at commands. I need insert the data in the next chart:

unit date tank1 tank2 tank3 state

Here a direction through which are sent the data:

[www.xxxxxxxxxxxxxxx.com.mx/Demo/clases/MovimientosW.php](http://www.xxxxxxxxxxxxxxx.com.mx/Demo/clases/MovimientosW.php)?Unit=201  
0069468&Date=25-01-2010%2011:20:00&Tank1=200&Tank2=123&Tank3=  
012&State=E

The data are sent through the previous league, but not as making the connection to send data to each field,I am not sure but i have done this:

at+wipcfg=1  
OK  
at+wipcfg=3  
WIP Soft v501 on Open AT OS v610  
Aug 21 2008 17:38:37 WIPlib:v5a03 WIPSoft:3a04a  
OK  
at+cmee=1  
OK  
at+wipbr=1,6  
OK  
at+wipbr=2,6,11,“APN”  
OK  
at+wipbr=2,6,0,“user”  
OK  
at+wipbr=2,6,1,“password”  
OK  
at+wipbr=4,6,0  
OK  
at+wipbr=3,6,15  
+WIPBR: 6,15,“10.4.138.146”

OK  
at+wipcreate=2,1,“www.xxxxxxxxxx.com.mx”,80  
OK

+WIPREADY: 2,1  
at+wipdata=2,1,1  
CONNECT

Up here every good, but not as insert the data in each field and not meeting documentation of how to do,

Please somebody help me, is urgent

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [April 9, 2010, 6:53am UTC](https://forum.sierrawireless.com/t/send-data-to-database-in-server-with-wip-at-commads/4346/2 "2010-04-09T06:53:06Z")

</div>

> [@bygelogelo](#):
>
> Here a direction through which are sent the data:
> 
> [xxxxxxxxxxxxxxx.com.mx/Demo/ … entosW.php](http://www.xxxxxxxxxxxxxxx.com.mx/Demo/clases/MovimientosW.php)?Unit=201  
> 0069468&Date=25-01-2010%2011:20:00&Tank1=200&Tank2=123&Tank3=  
> 012&State=E

So you’re encoding your data into the URL?

Therefore, you’ll need to make the appropriate HTTP Request to that URL, won’t you…?

---

<div class="post-metadata">

**Author:** ![bygelogelo](https://avatars.discourse-cdn.com/v4/letter/b/c67d28/32.png) [@bygelogelo](https://forum.sierrawireless.com/u/bygelogelo)\
**Post date:** [April 9, 2010, 2:07pm UTC](https://forum.sierrawireless.com/t/send-data-to-database-in-server-with-wip-at-commads/4346/3 "2010-04-09T14:07:12Z")

</div>

Good day, thank you for your response; no, the data is not are encoded, a partner undertook this task in C language but does not work properly and gave me the league of previous message and said that the data are sent through the league. The parameter “=” indicates the data to send to each field. the values after the “=” are the ones that require insert in the database.

Please need to know how to send data to the address.

---

<div class="post-metadata">

**Author:** ![bygelogelo](https://avatars.discourse-cdn.com/v4/letter/b/c67d28/32.png) [@bygelogelo](https://forum.sierrawireless.com/u/bygelogelo)\
**Post date:** [April 9, 2010, 2:26pm UTC](https://forum.sierrawireless.com/t/send-data-to-database-in-server-with-wip-at-commads/4346/4 "2010-04-09T14:26:15Z")

</div>

Hi awneil, have you messenger to communicate more quickly?

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [April 9, 2010, 2:28pm UTC](https://forum.sierrawireless.com/t/send-data-to-database-in-server-with-wip-at-commads/4346/5 "2010-04-09T14:28:06Z")

</div>

> [@bygelogelo](#):
>
> Good day, thank you for your response; no, the data is not are encoded

OK, maybe “embedded” would be a better word: the data you are sending is actually embedded into the URL - isn’t it?

That is, the URL is made-up from the data values.

You are passing your data as a Query String as part of the URL - see: [en.wikipedia.org/wiki/Query\_string](http://en.wikipedia.org/wiki/Query_string)

> [@](#):
>
> Please need to know how to send data to the address.

But you aren’t actually sending any “payload” data here at all, are you?

Everything is in the URL - isn’t it?  
There isn’t anything else to send.

You might find this HTTP tutorial useful: [jmarshall.com/easy/http/](http://www.jmarshall.com/easy/http/)

---

<div class="post-metadata">

**Author:** ![bygelogelo](https://avatars.discourse-cdn.com/v4/letter/b/c67d28/32.png) [@bygelogelo](https://forum.sierrawireless.com/u/bygelogelo)\
**Post date:** [April 9, 2010, 5:03pm UTC](https://forum.sierrawireless.com/t/send-data-to-database-in-server-with-wip-at-commads/4346/6 "2010-04-09T17:03:22Z")

</div>

yes, the url is made from data values, as i read wikipedia, but how i do this with at commands. I think that i have to start a http session but do not get done. please help

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [April 9, 2010, 5:07pm UTC](https://forum.sierrawireless.com/t/send-data-to-database-in-server-with-wip-at-commads/4346/7 "2010-04-09T17:07:56Z")

</div>

Have you read the WIP AT Commands manual?  
Especially the examples…

---

<div class="post-metadata">

**Author:** ![bygelogelo](https://avatars.discourse-cdn.com/v4/letter/b/c67d28/32.png) [@bygelogelo](https://forum.sierrawireless.com/u/bygelogelo)\
**Post date:** [April 9, 2010, 5:19pm UTC](https://forum.sierrawireless.com/t/send-data-to-database-in-server-with-wip-at-commads/4346/8 "2010-04-09T17:19:06Z")

</div>

Yes, i read the examples, in fact i have been trying, but i see no way to do so, i have only a manual, there are more?  
i have this WIPAT\_Commands\_User\_Guide\_V5\_11.pdf

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [April 9, 2010, 5:49pm UTC](https://forum.sierrawireless.com/t/send-data-to-database-in-server-with-wip-at-commads/4346/9 "2010-04-09T17:49:31Z")

</div>

> [@bygelogelo](#):
>
> i have this WIPAT\_Commands\_User\_Guide\_V5\_11.pdf

That’s the one.

Look at section 9.5, the HTTP example - it shows you how to connect to the HTTP server, and howto issue a GET request.

That should be sufficient - shouldn’t it?

---

<div class="post-metadata">

**Author:** ![bygelogelo](https://avatars.discourse-cdn.com/v4/letter/b/c67d28/32.png) [@bygelogelo](https://forum.sierrawireless.com/u/bygelogelo)\
**Post date:** [April 9, 2010, 10:43pm UTC](https://forum.sierrawireless.com/t/send-data-to-database-in-server-with-wip-at-commads/4346/10 "2010-04-09T22:43:08Z")

</div>

I read the example of http but this returns +cme error: 3 to write at+wipcreate=5,1,“xxxxxxx”,80

Only accepts at+wipcreate=2,1,…

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [April 10, 2010, 8:19am UTC](https://forum.sierrawireless.com/t/send-data-to-database-in-server-with-wip-at-commads/4346/11 "2010-04-10T08:19:41Z")

</div>

Hmmm - so HTTP fails (“not allowed”), but TCP works.

Could this be another case where your modem doesn’t have the necessary “Commercial Features” enabled?

See: [https://forum.sierrawireless.com/t/smtp-internet-protocol-feature-not-activated/3845/9](https://forum.sierrawireless.com/t/smtp-internet-protocol-feature-not-activated/3845/9)

And: [https://forum.sierrawireless.com/t/faq-forum-wiki/3491/15](https://forum.sierrawireless.com/t/faq-forum-wiki/3491/15)

You should talk to your Distributor about this!

---

<div class="post-metadata">

**Author:** ![bygelogelo](https://avatars.discourse-cdn.com/v4/letter/b/c67d28/32.png) [@bygelogelo](https://forum.sierrawireless.com/u/bygelogelo)\
**Post date:** [April 13, 2010, 2:47pm UTC](https://forum.sierrawireless.com/t/send-data-to-database-in-server-with-wip-at-commads/4346/12 "2010-04-13T14:47:11Z")

</div>

Hi again here, i continue to work, talk to my distributor and gave me a code of activation, writing at+wipfile=5,1,“www.xxxxx.xxx”,etc. mark +cme error 839 “error during creation of channel” What am i doing wrong?

In addition, are possible my pretenses?

---

<div class="post-metadata">

**Author:** ![bygelogelo](https://avatars.discourse-cdn.com/v4/letter/b/c67d28/32.png) [@bygelogelo](https://forum.sierrawireless.com/u/bygelogelo)\
**Post date:** [April 16, 2010, 4:14pm UTC](https://forum.sierrawireless.com/t/send-data-to-database-in-server-with-wip-at-commads/4346/13 "2010-04-16T16:14:58Z")

</div>

Hi again, i am finalized the project, but to write:  
at+wipfile=5,1,1,“[http://www.abcdefghijklmn.com.mx/xxxx/xxxx/xxxxxxxW.p](http://www.abcdefghijklmn.com.mx/xxxx/xxxx/xxxxxxxW.p)  
hp?Unit=2010480418&Date=15-04-2010%2015:50:00&Tank=000&Tank2=000&Tank3  
=000&State=A”

return this:

CONNECT  
  
+WIPFILE: 5,1,1,200,“OK”

But not data is stored in the DB

the “” is the only character that returns. how i do it wrong?

I tried with put, post method and nothing.

Please beg help!!!

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [April 16, 2010, 4:31pm UTC](https://forum.sierrawireless.com/t/send-data-to-database-in-server-with-wip-at-commads/4346/14 "2010-04-16T16:31:27Z")

</div>

> [@bygelogelo](#):
>
> +WIPFILE: 5,1,1,200,“OK”

This means that your HTTP server has accepted the Request, and returned the “OK” (code 200) response to you.

Therefore the modem has done its job - it has made a request to the Server, and the server has accepted it.

> [@](#):
>
> But not data is stored in the DB

You need to be looking on the Server to determine why it accepted the Request, but then didn’t store the data…

---

<div class="post-metadata">

**Author:** ![bygelogelo](https://avatars.discourse-cdn.com/v4/letter/b/c67d28/32.png) [@bygelogelo](https://forum.sierrawireless.com/u/bygelogelo)\
**Post date:** [April 16, 2010, 7:39pm UTC](https://forum.sierrawireless.com/t/send-data-to-database-in-server-with-wip-at-commads/4346/15 "2010-04-16T19:39:58Z")

</div>

To make a request to the page [xxxxxxxxxx.com.mx/ejem.htm](http://www.xxxxxxxxxx.com.mx/ejem.htm) should return “hello” but nothing, appears CONNECT and responds only to the sequence “+++”

I’m using the same code to send data to the DB only I change the URL, If i conclude that i have finished all, because i need a true response of server.

I put the url [xxxxxxxxxx.com.mx/ejem.htm](http://www.xxxxxxxxxx.com.mx/ejem.htm) in the browser and it return “hello” correctly. what i need to do it? I try all but nothing works.

Here the code:  
at+cgatt=1  
at+cmee=1  
at+wipcfg=1  
at+wipbr=1,6  
at+wipbr=2,6,11,“APN”  
at+wipbr=2,6,0,“user”  
at+wipbr=2,6,1,“password”  
at+wipbr=6,6,0  
at+wipbr=4,6,0  
at+wipopt=5,1,1,51  
at+wipopt=5,1,2,53,6  
at+wipcreate=5,1,“[http://www.xxxxxxxxxxx.com.mx/ejem.htm](http://www.xxxxxxxxxxx.com.mx/ejem.htm)”,80  
at+wipfile=5,1,1,“[http://www.xxxxxxxxxxx.com.mx/ejem.htm](http://www.xxxxxxxxxxx.com.mx/ejem.htm)”

need something else?

---

<div class="post-metadata">

**Author:** ![bygelogelo](https://avatars.discourse-cdn.com/v4/letter/b/c67d28/32.png) [@bygelogelo](https://forum.sierrawireless.com/u/bygelogelo)\
**Post date:** [April 26, 2010, 5:29pm UTC](https://forum.sierrawireless.com/t/send-data-to-database-in-server-with-wip-at-commads/4346/16 "2010-04-26T17:29:56Z")

</div>

Hi again, i made it, i send data to the DB. The DB had an error but all resolved Thank you very much.
