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

I am happy to find this post very useful for me, as it contains lot of information. I always prefer to read the quality content and this thing I found in you post. Thanks for sharing. Isolatie dak

I was surfing the Internet for information and came across your blog. I am impressed by the information you have on this blog. It shows how well you understand this subject. Isolatie muur

Positive site, where did u come up with the information on this posting?I have read a few of the articles on your website now, and I really like your style. Thanks a million and please keep up the effective work. Website laten maken

I visit your blog regularly and recommend it to all of those who wanted to enhance their knowledge with ease. The style of writing is excellent and also the content is top-notch. Thanks for that shrewdness you provide the readers! Vakantiewoning huren

Attractive, post. I just stumbled upon your weblog and wanted to say that I have liked browsing your blog posts. After all, I will surely subscribe to your feed, and I hope you will write again soon! Ramen en Deuren Lubbeek

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. Low lambda isolerende mortel

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 en deuren Antwerpen

Thank you for such a well written article. It’s full of insightful information and entertaining descriptions. Your point of view is the best among many. Chapewerk

I am incapable of reading articles online very often, but I’m happy I did today. It is very well written, and your points are well-expressed. I request you warmly, please, don’t ever stop writing. Isolerende mortels

This is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource for free. Ero massage

Thank you a bunch for sharing this with all of us you actually realize what you are talking about! Bookmarked. Please also seek advice from my site =). We could have a hyperlink change contract between us! Aanleggen zwembad

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. Terrasoverkappingen op maat

I found this is an informative and interesting post so i think so it is very useful and knowledgeable. I would like to thank you for the efforts you have made in writing this article. SEO optimalisatie

This is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource for free. Leads kopen

I really thank you for the valuable info on this great subject and look forward to more great posts. Thanks a lot for enjoying this beauty article with me. I am appreciating it very much! Looking forward to another great article. Good luck to the author! All the best! Zwembad aanleg

Thanks for taking the time to discuss that, I feel strongly about this and so really like getting to know more on this kind of field. Do you mind updating your blog post with additional insight? It should be really useful for all of us. Airco installatie

Thanks for taking the time to discuss that, I feel strongly about this and so really like getting to know more on this kind of field. Do you mind updating your blog post with additional insight? It should be really useful for all of us. Monoblok zwembaden

Excellent .. Amazing .. I’ll bookmark your blog and take the feeds also…I’m happy to find so many useful info here in the post, we need work out more techniques in this regard, thanks for sharing. Vakantiewoning

I really thank you for the valuable info on this great subject and look forward to more great posts. Thanks a lot for enjoying this beauty article with me. I am appreciating it very much! Looking forward to another great article. Good luck to the author! All the best! Zwembad buiten

I was surfing net and fortunately came across this site and found very interesting stuff here. Its really fun to read. I enjoyed a lot. Thanks for sharing this wonderful information. SEO Antwerpen

I am very enjoyed for this blog. Its an informative topic. It help me very much to solve some problems. Its opportunity are so fantastic and working style so speedy. seo Limburg

Pages