Go Down

Topic: SIMCOM SIM900 library to gprs (Read 2980 times) previous topic - next topic

HugoPT

Aug 22, 2013, 10:03 pm Last Edit: Aug 22, 2013, 10:07 pm by HugoPT Reason: 1
Hello friends
I'm looking for a library to work with SIM900.I need to use GPRS to do a method get at Internet ip.
I found some libraries but they just implement send SMS and phone features(dial, answer ..)
I need one that can establish a gprs connection
Any help?
Here is a photo of my shield

Debian,Mint,Ubuntu
Arduino Mega 2560
Arduino Nano
Arduino Duemilanove
MAC OS Montain Lion
Raspberry PI Model B

m_ri

#1
Aug 28, 2013, 07:45 pm Last Edit: Aug 28, 2013, 07:48 pm by m_ri Reason: 1
Is this shield designed by seeedstudio? I think that you can take the official library,change some part(e.g. startup step) and maybe you'll ok..you should also look about pin used by Serial connection.
if you'll use only general method like call a phone,send sms,connection internet, probably you won't have problem..if you want also use GPIO and similar things, you must extend the library.

If you want to implement your library, please DON'T use string and malloc,but only array of chars..

HugoPT

Thanks for your answer.I already accomplished the task of do a http get just using the AT commands with no library.
Quote
If you want to implement your library, please DON'T use string and malloc,but only array of chars..

Uhmm Do you mean Strings, not strings right?

Debian,Mint,Ubuntu
Arduino Mega 2560
Arduino Nano
Arduino Duemilanove
MAC OS Montain Lion
Raspberry PI Model B

m_ri

Ye sorry..I meant the type String..there are two main reasons:
String is heavier than char[]
there is a problem with dinamic allocation of the memory..is not impossible that the arduino couldn't allocate other vectors while the ram is partially free

HugoPT

Quote
Ye sorry..I meant the type String..there are two main reasons:
String is heavier than char[]

String is not a type it's an Object.
Quote
there is a problem with dynamic allocation of the memory..

What problem?
Debian,Mint,Ubuntu
Arduino Mega 2560
Arduino Nano
Arduino Duemilanove
MAC OS Montain Lion
Raspberry PI Model B

m_ri

#5
Aug 29, 2013, 12:17 am Last Edit: Aug 29, 2013, 12:32 am by m_ri Reason: 1
where is the problem? String could be considered as a type,but not as a native type..and String is also a class,NOT an object..in addition, in C++ there are fewer difference between structures and class than common people thinks..

if you'll make some research, you'll see that there are some problem with String(especially during deallocation and subsequent allocation, if I remember correctly), and I don't know if they were fixed..in some cases, especially with an heavy usage of String, the arduino cannot allocate new block..

HugoPT

Yes you are right.I almost never use Strings in arduino.I avoided it at all cost because I know the collateral damage they have in memory consumption.
;)
Debian,Mint,Ubuntu
Arduino Mega 2560
Arduino Nano
Arduino Duemilanove
MAC OS Montain Lion
Raspberry PI Model B

m_ri

#7
Aug 29, 2013, 10:45 am Last Edit: Aug 29, 2013, 10:48 am by m_ri Reason: 1
good..I've also a seedstudio..I've token the library of open-eletronic, changed startup code and reduced various delays..

in any case, consider that all gsm modules use a set of common AT command(and AT extended), plus some personalized command, so you don't need to change lot of things, expect pins and switch-on/off

Go Up