Arduino Uno + GSM Shield upload data to Hosted MYSQL database

To all the Pros out there, please help.

We have an Arduino Uno with a GSM Shield which we want to use to upload a temperature value to a hosted MySQL database. All the examples we can find the people are using Ethernet or WiFi shields, which does not seem to work in the arduino builder...
We have created a website that has a SQL database. We created the database as follows:
https://docs.google.com/document/d/1KU8zbAjQpVb07Dvx4L78_UioLdIzwgrPzhr3AsGRErQ/edit?usp=sharing

What we want to achieve is to capture the temperature on the Uno, send it to the SQL Database via the GSM Shield, and display the table with the value in our website. Please refer to the following website www.planit-home.co.za.

We copied a bit of PHP Code which we need to place on the webpage (we doubt that this is correct) to display the tables and we need to send the captured information from the GSM to the hosted SQL database?

Can anyone assist please.

I went to the web site, clicked on the MySQL Table link and:

Parse error: syntax error, unexpected ')' in /home/planipth/public_html/MySQL-Table/index.php on line 8

How were you planning on uploading the data to MySQL?

Hi There;

I Copied the PHP Script into the .php file in the back end through Filezilla. This gave an error because it was copied into the wrong place. The web development that I used was a drag and drop type website builder, en the code is a bit different than the PHP that is in the document (We are currently looking at this)

I am not too worried about the display on the website (Which is obviously the main thing that we would need), I just dont know if the code is correct. If it is we then know where to look.

Any advice?

In outline - submit the data to the web site / php script using a GET request. The php script can then parse the data and write it to the MySQL database.

You'll need the APN settings for your mobile / cell network operator.

Hi there;

We managed to get the Database to show in our webpage, It is not showing correctly because the "Drag and Drop" website builder don't allow php to be embedded into the code. (Still a couple of miner snags to sort out but should have this done by the end of the weekend)

However, we now need to send the captured temperature to the SQL Database. I got the APN Settings which we will insert on Sunday, but I highly doubt that it will work after doing this...

If anyone is keen to look at the Arduino code then please do so and please let me know your views and what you would change.

Seeing that there is nothing on the web about this, I will post all the code and results after this weekend if everything was successful.

Thank you very much.

I'll look at the code but only if it is posted on here - and using the code (#) tags!

actually i am still confused about your code. what is for Wiz550io Ethernet Module at your code?.
sorry i do not have GSM Shield because this shield is very expensive for me so i can not test help you.

There is actually zero info on the web where someone used a GSM Shield and uploaded data to a MYSQL Database. This is code we copied from someone who used an ethernet shield to do the same.

Any suggestions welcome.

What do you mean with # tags?
The code in the document is all we have. Should I just copy and paste it into this Forum?

Thank you all.

Yes please, and when you do so you will notice a key with a '#' on it on the second row. This makes it easier to read and doesn't mangle it.

Read the sticky thread right at the top of the forum, to see how to post code

Has there been any joy/advancements in this?

I'm about to do the exact same thing, but I also want my server to send data back to the Arduino
(using GSM shield too).

Currently I am successfully posting data to a Google Spreadsheet but, as mentioned above I, need to process that data and send some of it back to the Ardunio, which Spreadsheets won't (nicely) allow.

I want to know if there are any major snags/impossibilities, such that I can use a different method if need be.

Thanks!

Hell everyone,

imbatronics - I am interested in how you have got the data to lg to google spreadsheets. I have been trying to get sensor data to post there but I have been hitting some problems on the way.

Any help would be great.

Thanks

hello people ,

i'm trying to upload data to cloud or google spreed sheet using my arduino uno and gsm shield ..if any one have code or any information about it would be helpful..
thank you :slight_smile:

hello people ,

i'm trying to upload data to cloud or google spreed sheet using my arduino uno and gsm shield ..if any one have code or any information about it would be helpful..
thank you :slight_smile:

can i connect the GSM shield with the arduino LEonardo? the coding is same as arduino uno or not?

Hi Quinton,

I see this post is old - but I looked into your code and - it does not make sense, you can not use this code. You can't simply send a SQL query to a webserver on port 80. Your question has allready been answered - make a HTTP GET request. You wll have your value in a variable in the PHP script then. Let the PHP handle the insert into MYSQL. Of course you can talk to MYSQL directly, too - but as mentioned in the docs, it's possible the GSM provider will block such connections. The HTTP GET / PHP solution is the most practical I can think of.

Also the IP-Addresses you can not use them .... they will not be routed in the internet (192.168.xx.xx). But I recall you connect via a server name.

And I also wonder - SyamsulHasri - I mean this is one of the first infos when you look at the GSM shield pages. It is all documented. YES and NOT.