Macchina and GSM connection

How to get Macchina connected to the internet via a GSM shield.

There are several GSM shields out there, all with very similar features. We decided to use this one, since it was easy to get ahold of.

Available here:

http://www.seeedstudio.com/depot/gprs-shield-v20-p-1379.html?cPath=19_20

and again, amazingly enough, at RadioShack (?!) although this is an older version:

http://www.radioshack.com/product/index.jsp?productId=16518376

First thing to do is set up the hardware.

Insert a SIM card. [More on this later]

Next, decide on how to connect the shield to the Macchina.

The Seeedstudio shield doesn't reach the spare hardware serial lines on the Macchina, so you'll need to run two jumper wires from the shield to TX1 and RX1 on the Macchina. Having spare hardware UARTs is nice, as the other option is software serial, which takes up valuable flash, RAM, and CPU cycles.

Now it is time to set up the libraries:

We're working from library built for a different GSM shield, but it works very well with this shield after some slight modification. It can be found here:

https://code.google.com/p/gsm-shield-arduino/

Just get the latest from Downloads. The Readme file is pretty good, and the examples are also good places to start.

Macchina has the same pinout as the Mega 2560, so you'll want to make sure the "#define 2560" lines are uncommented in HWserial.h and GSM.h, and comment out the "#define UNO" line in GSM.h.

One more thing: There's a rather crucial error in the httpPOST() method in inetGSM.cpp. Lines 101-103 should be:

gsm.SimpleWrite("\r\n\r\n");
gsm.SimpleWrite(parameters);
gsm.SimpleWrite("\r\n\r\n");

I don't know if they dealt with some really permissive servers or what during their development, but most servers need a double carriage return + newline after the HTTP header, and not just newlines. I'll submit a patch to them with the fix, or add an issue to the project.

Once these step are done, we can start coding. To be continued...

Comments

This is a truly good site post. Not too many people would actually, the way you just did. I am really impressed that there is so much information about this subject that have been uncovered and you’ve done your best, with so much class. If wanted to know more about green smoke reviews, than by all means come in and check our stuff. PVC ramen en deuren

That is the excellent mindset, nonetheless is just not help to make every sence whatsoever preaching about that mather. Virtually any method many thanks in addition to i had endeavor to promote your own article in to delicius nevertheless it is apparently a dilemma using your information sites can you please recheck the idea. thanks once more. Warmtepompen Zonhoven

 You have performed a great job on this article. It’s very precise and highly qualitative. You have even managed to make it readable and easy to read. You have some real writing talent. Thank you so much. Houten ramen

Yes i am totally agreed with this article and i just want say that this article is very nice and very informative article.I will make sure to be reading your blog more. You made a good point but I can't help but wonder, what about the other side? !!!!!!Thanks Warmtepompen

Thanks for picking out the time to discuss this, I feel great about it and love studying more on this topic. It is extremely helpful for me. Thanks for such a valuable help again. matka result

It is my first visit to your blog, and I am very impressed with the articles that you serve. Give adequate knowledge for me. Thank you for sharing useful material. I will be back for the more great post. กันแดด

Only aspire to mention ones content can be as incredible. This clarity with your post is superb and that i may think you’re a guru for this issue. High-quality along with your concur permit me to to seize your current give to keep modified by using approaching blog post. Thanks a lot hundreds of along with you should go on the pleasurable get the job done. Ramen deuren Boortmeerbeek

I think this is an informative post and it is very beneficial and knowledgeable. Therefore, I would like to thank you for the endeavors that you have made in writing this article. All the content is absolutely well-researched. Thanks... Zonnepanelen installateur Dilbeek

Hello I am so delighted I located your blog, I really located you by mistake, while I was watching on google for something else, Anyways I am here now and could just like to say thank for a tremendous post and a all round entertaining website. Please do keep up the great work. Zonnepanelen installateur Herne

That is the excellent mindset, nonetheless is just not help to make every sence whatsoever preaching about that mather. Virtually any method many thanks in addition to i had endeavor to promote your own article in to delicius nevertheless it is apparently a dilemma using your information sites can you please recheck the idea. thanks once more. Zonnepanelen installateur Dessel

This article is an appealing wealth of informative data that is interesting and well-written. I commend your hard work on this and thank you for this information. You’ve got what it takes to get attention. Ramen deuren Wilsele

It is a good site post without fail. Not too many people would actually, the way you just did. I am impressed that there is so much information about this subject that has been uncovered and you’ve defeated yourself this time, with so much quality. Good Works! Ramen deuren Rotselaar

I think this is an informative post and it is very beneficial and knowledgeable. Therefore, I would like to thank you for the endeavors that you have made in writing this article. All the content is absolutely well-researched. Thanks... Zonnepanelen installateur Huldenberg

Pages