Database writing through GPRS

Hy guys,

I need some advices.
I need to read data from a sensor over Modbus on the UART and send it trough GPRS in a database.
I implemented the reading of the data on UART, and also made a tcp server on port 23(telnet) and managed to send data trough gprs on a tcp/ip client connected on port 23(putty).

My module is : Fastrack Supreme 10
SIM with public Ip address.

Now i need to write these values to a database. What i need to do for that ?Where do i start? Has anyone did this?
I don’t need an application. I need an ideea…what are my options? I’m new to databases but not totally stranger …i implemented some database operation with php and mysql but long ago and not involving embedded systems.

Thanks in advance.

Where is the database?

Draw a diagram!


+-------------------------+      +------------+
                 |                         |      |            |
TCP Port 23 ---->+  Interface Application  +----->+  Database  |
                 |                         |      |            |
                 +-------------------------+      +------------+

Note that the “interface application” neither knows nor cares how the data reaches its TCP Port 23 - so GPRS and the Fastrack and MODBUS are all irrelevant at this point.

However it isn’t a core in this Forum. There are some programming plataforms that provide specially the connector from your application to your database. Then, you have to make or get a program that placed in a computer like a tcp server stay listening a conection from your fastrack and with the previous processing of the received frame write in the database.
Good luck

I was thinking that i might need an interface application to do that…something like C# or visual basic or i don’t know…but i can’t use web services…for example to publish data on a small website and then to write it to a php script in a mysql database?..

Thanks for your answers…

Why not?

sorry…it was with “?” at the end…i thought at this…and here i need an advice…how can i use web services?..i think making a http server on the wavecom modem and somehow with GET method take the values from there and POST these values on a database…is this a correct way of doing it?

You read the documentation for the web service in question, and then implement that!

No! That’s entirely the wrong way around!
You have the web service on the server, and the modem is the Client

So the modem makes GET and POST requests to the server…

Ok… Than i will start reading the documentation for HTTP client and that article from your other postings about : Http made really easy…and maybe with this i will be able to find a solution…

I think i will need to encode the values on the servers URL and call a cgi, php script to parse the url, take the values and post it to the database…
For example :….

Thanks for your answers…i will come back if i need to…thanks again…

If you’re using an existing web service, you will need to do whatever its documentaion tells you!

That is certainly one way to do it - but by no means the only way!

Im developing this in same way . Try TCP/IP script and send data as

GET /zapis.php?licznik_id=wavecom&stan=321 HTTP/1.1\r\nACCEPT: text/html, application/vnd.wap.xhtml+xml, application/xhtml+xml, text/css, multipart/mixed, text/vnd.wap.wml, application/vnd.wap.wmlc, application/vnd.wap.wmlscriptc, application/java-archive, application/java, application/x-java-archive, text/, application/vnd.oma.drm.message, application/vnd.wap.mms-message, application/vnd.wap.sic, text/x-co-desc, application/vnd.oma.dd+xml, text/, */*, text/x-vcard, text/x-vcalendar, image/gif, image/vnd.wap.wbmp\r\nUser-Agent: Haodew/1.1\r\nHost:\r\nConnection: keep-alive\r\n\r\n";

and put in remote host ip of your server

GET /zapis.php?licznik_id=wavecom&stan=321

where /zapis.php is php file (/folder1/folder2/folder3/file.php) if you use domain you probably need to use

Try to avoid php error to get directory - easiest way (or phpinfo).

When GPRS sent data you can print it:


or put code to insert data to database.