Show Posts
Pages: 1 ... 13 14 [15] 16 17 ... 27
211  Using Arduino / Programming Questions / Re: GSM SHIELD ISSUE on: May 25, 2013, 02:27:40 am
I would suggest you to try

Code:
#define _GSM_TXPIN_ 2
#define _GSM_RXPIN_ 3

212  Using Arduino / Programming Questions / Re: How to create a new function within an existing library on: May 24, 2013, 05:51:10 pm
Any idea? It will help
213  Using Arduino / Programming Questions / Re: How to create a new function within an existing library on: May 24, 2013, 04:39:57 am
May be you cna help e on that matter,

I have that sketch code working:
Code:
void SubmitHttpRequest()
{
 mySerial.println("AT+CSQ");
 delay(100);
 ShowSerialData();// this code is to show the data from gprs shield,
 //in order to easily see the process of
 //how the gprs shield submit a http request, and the following is for this purpose too.
 mySerial.println("AT+CGATT?");
 delay(100);
 ShowSerialData();
 mySerial.println("AT+SAPBR=3,1,\"CONTYPE\",\"GPRS\"");//setting the SAPBR, the connection
 //type is using gprs
 delay(1000);
 ShowSerialData();
 mySerial.println("AT+SAPBR=3,1,\"APN\",\"internet\"");//setting the APN,
 //the second need you fill in your local apn server
 delay(4000);
 ShowSerialData();
 mySerial.println("AT+SAPBR=1,1");//setting the SAPBR, for detail you can refer to
 //the AT command mamual
 delay(2000);
 ShowSerialData();
 mySerial.println("AT+HTTPINIT"); //init the HTTP request
 delay(2000);
 ShowSerialData();
 mySerial.println("AT+HTTPPARA=\"URL\",\"cccc.dyndns.org/opt/updatesql.php\"");// setting the httppara,
 //the second parameter is the website you want to access
 delay(1000);
 ShowSerialData();
 mySerial.println("AT+HTTPACTION=0");//submit the request
 delay(8000);//the delay is very important, the delay time is base on the return from the website,
 //if the return datas are very large, the time required longer.
 //while(!mySerial.available());
 ShowSerialData();
 mySerial.println("AT+HTTPREAD");// read the data from the website you access
 delay(300);
// ShowSerialData();
 checkForResponse();
 mySerial.println("");
 delay(100);
 mySerial.println("AT+HTTPTERM");// read the data from the website you access
 delay(300);
 ShowSerialData();
 
}
void ShowSerialData()
{
 while(mySerial.available()!=0)
 Serial.write(mySerial.read());
}

Tha code is on aFile.ino

I would like to include it into a existing library that I inked above
https://github.com/jgarland79/GSM_Shield
But it does not work

Could you instruct me how to modify my library in order ro have the above code in GPRS_Shield.cpp file, into GPS::?

I tryied from early this morning, and I am still blocked.....



Many thank for your help
214  International / Français / Re: Comment puis-je ajouter un fonction à une librairie existante on: May 24, 2013, 04:19:48 am
J'arrive pas comprendre pourquoi ceci n'affiche rien.

Code:
void GSM::ShowSerialData()
{
// CA NE MARCHE PAS
while(mySerial.available()!=0){
Serial.write(mySerial.read());
}
}

J'espère qe vous pourrez m'aider
215  International / Français / Re: Comment puis-je ajouter un fonction à une librairie existante on: May 24, 2013, 02:14:47 am
Quelqu'un aurait une idée qui pourrait m'aider?

Apparemment, les données ne sont pas envoyées  smiley-fat
216  Using Arduino / Programming Questions / Re: Wath the big difference between Arduiano Mini Pro 5V and 3.3V, excepted of the V on: May 24, 2013, 12:16:45 am
Dear All,

Thank for your answers!!
@KeithRB: I am going to power the attached GPRS shield to send mainly data to a remote server. The data will be a string of about 30 caracaters. I have not defined the frequency of the transmition, but it can be between 10 sec to 1min.

@Tom: Where di you find the datasheet. From the seller web site there is nothing. They really do not provide a lot of information and the support is null. They only quickly reply me that the module works under 3.6V, But I also read something like you stated 3.2-4.2.

My project consist only of Arduino Mini Pro 3.3V, a small data logger the record the last GPS position (in case of the GPRS is not available), the SIM908 module and a battery loader module (to load the battery with USB). I am just worried about the Mini Pro frequency. I would like to make sure that the GPRS module support it for sending mainly data, but to get and send text message, and very occasoly, get phone call.

I also tried to use Arduino mini pro 5V with that SIM908 shield ( with a power regulator to power the GPRS module at 4V), but I have never been able to make it working. It seams to have a power issue, but the seller never provide me clear answer :o(
217  Using Arduino / Programming Questions / Wath the big difference between Arduiano Mini Pro 5V and 3.3V, excepted of the V on: May 23, 2013, 05:29:05 pm
Dear All
What the impact of the difference between Arduiano Mini pro 5V and 3.3V.

Ok, it's seams to be clean, the voltage.
the first works with 5V and the second 3.3V.

But there is another difference, is the frequency. The first work with 16Hrz and the second 8Htz and my worry is here.

I just order the Arduino mini Pro 3.3V-8Hrz and I would like to make it working with that GPRS module
http://store.open-electronics.org/Small_Breakout_SIM908?filter_name=sim908
that web site provide a few information on their module, but I know that it work on 3.6V.

Then I can use a li-ion battery of 3.7V because the Arduino mini pro can "accept" up to 12V. So I can power the Arduinao mini pro 3.3V and the sim908 module with the li-ion 3.7V.

But what about the frequency of 8Hrz vs the 16Hzr of the Arduniano Mini pro 5V?

Does the 8Hrz of the Arduiano Mini pro 3.3V willl be an obstacle for the SIM908 module?
Does it can make a trouble?

Many thank for your point of view.

Cheers
218  International / Français / Comment puis-je ajouter un fonction à une librairie existante on: May 23, 2013, 02:58:25 pm
Bonjour à tous,
je suis débutant et j'aurais voulu savoir si vous pouviez m'aider a ajouter une à cette librairie
https://github.com/jgarland79/GSM_Shield

Elle ne permets pas d'envoyer des données à un serveur et j'aimerais ajouter ceci:
Code:
mySerial.println("AT+CSQ");
  delay(100);
  ShowSerialData();// this code is to show the data from gprs shield,
  //in order to easily see the process of
  //how the gprs shield submit a http request, and the following is for this purpose too.
 
  mySerial.println("AT+CGATT?");
  delay(100);
  ShowSerialData();
 
  mySerial.println("AT+SAPBR=3,1,\"CONTYPE\",\"GPRS\"");//setting the SAPBR, the connection
  //type is using gprs
  delay(1000);
  ShowSerialData();
 
  mySerial.println("AT+SAPBR=3,1,\"APN\",\"internet\"");//setting the APN,
  //the second need you fill in your local apn server
  delay(4000);
  ShowSerialData();
 
  mySerial.println("AT+SAPBR=1,1");//setting the SAPBR, for detail you can refer to
  //the AT command mamual
  delay(2000);
  ShowSerialData();
 
  mySerial.println("AT+HTTPINIT"); //init the HTTP request
  delay(2000);
  ShowSerialData();
 
  mySerial.println("AT+HTTPPARA=\"URL\",\"yyy.dyndns.org/opt/updatesql.php?lat=1.1&long=2.2&alt=3.3&speed=4.4&course=W&date=2013-04-08&time=22:07:07 HTTP/1.1\"");// setting the httppara,
  //the second parameter is the website you want to access
  delay(1000);
  ShowSerialData();
 
  mySerial.println("AT+HTTPACTION=0");//submit the request
  delay(8000);//the delay is very important, the delay time is base on the return from the website,
  //if the return datas are very large, the time required longer.
  //while(!mySerial.available());
  ShowSerialData();
 
  mySerial.println("AT+HTTPREAD");// read the data from the website you access
  delay(300);
ShowSerialData();
 
  checkForResponse();
  mySerial.println("");
  delay(100);
 
  mySerial.println("AT+HTTPTERM");// read the data from the website you access
  delay(300);
  ShowSerialData();

Le probleme c'est qu'il y a les fonction ShowSerialData() et checkResponse(), et là je blocque.

Pouvez-vous m'aider?

Jusqu'à là j'ai cherché et je suis arrivé à ca (corrigez moi, si j'ai fait faut)

J'aimerais aujouter la function

SendData(), du meme genre que la function existante sendSMS(), mais avec une variable data.

Donc:
Dans le fichier GPRS_Shield.h
J'ai ajouté, dans la class GSM, ceci
Code:
char SendDATA(char *data);
void ShowSerialData();
void checkForResponse();

Dans le fichier GRPS_Shield.cpp
J'ai ajouté, j'ai ajouté
Code:
char GSM::SendDATA(char *data)
{
 
char ret_val = -1;
// check comm line
 
    if (CLS_FREE != GetCommLineStatus()) return 0;
  /*
  ret_val = 0 : CommLineStatus KO
  ret_val = 1 : not sent  
  ret_val = 2 : sent
  */
 
    ret_val = 1;
    

  mySerial.println("AT+CSQ");
  delay(100);
  ShowSerialData();// this code is to show the data from gprs shield,
  //in order to easily see the process of
  //how the gprs shield submit a http request, and the following is for this purpose too.
 
  mySerial.println("AT+CGATT?");
  delay(100);
  ShowSerialData();
 
  mySerial.println("AT+SAPBR=3,1,\"CONTYPE\",\"GPRS\"");//setting the SAPBR, the connection
  //type is using gprs
  delay(1000);
  ShowSerialData();
 
  mySerial.println("AT+SAPBR=3,1,\"APN\",\"internet\"");//setting the APN,
  //the second need you fill in your local apn server
  delay(4000);
  ShowSerialData();
 
  mySerial.println("AT+SAPBR=1,1");//setting the SAPBR, for detail you can refer to
  //the AT command mamual
  delay(2000);
  ShowSerialData();
 
  mySerial.println("AT+HTTPINIT"); //init the HTTP request
  delay(2000);
  ShowSerialData();
 
  mySerial.println("AT+HTTPPARA=\"URL\",\"yyy.dyndns.org/opt/updatesql.php?lat=1.1&long=2.2&alt=3.3&speed=4.4&course=W&date=2013-04-08&time=22:07:07 HTTP/1.1\"");// setting the httppara,
  //the second parameter is the website you want to access
  delay(1000);
  ShowSerialData();
 
  mySerial.println("AT+HTTPACTION=0");//submit the request
  delay(8000);//the delay is very important, the delay time is base on the return from the website,
  //if the return datas are very large, the time required longer.
  //while(!mySerial.available());
  ShowSerialData();
 
  mySerial.println("AT+HTTPREAD");// read the data from the website you access
  delay(300);
ShowSerialData();
 
  checkForResponse();
  mySerial.println("");
  delay(100);
 
  mySerial.println("AT+HTTPTERM");// read the data from the website you access
  delay(300);
  ShowSerialData();
 
 
 
return 2;
}
Aisni que ceci, tout en bas du meme fichier
Code:
char GSM::ShowSerialData()
{
/*
// CA NE MARCHE PAS
while(mySerial.available()!=0);
mySerial.write(mySerial.read(),1);
*/
}

void GSM::checkForResponse(){
}

Quand je compile, je n'ai pas de message d'erreurs mais la fonction ShowSerialData() n'affiche rien


je ne crois pas que je fais juste et normal, c'est las premiere fois que je fais ceci.

Pourriez-vous me guider et me corriger ou me dire comment ajouter un la fonction SendDATA() qui elle fait appel a deux autres fonctions??

Je vous remercie tout pleienemnt
219  Using Arduino / Programming Questions / Re: How to create a new function within an existing Class on: May 23, 2013, 09:38:05 am
Yes for now, my function SendDATA() does not have code yet. It's not ready right now. I building taking from another library.
For now I am trying to simply create a function with a simple code, and making it step ba step.

I would like to add that new function SendDATA to that library
https://github.com/jgarland79/GSM_Shield
(I mentionned it to late)

Yes, I will use the GPRS shield for that, for sure.

Thank
220  Using Arduino / Programming Questions / Re: How to create a nre function within an existing Class on: May 23, 2013, 08:56:35 am
This is the code of the function SendSMS.

May be I should have say that earler.
I am trying to add the function SendDATA() to that Library:
https://github.com/jgarland79/GSM_Shield
That possiblity does not exist and I need it

here is the code wich is GPRS_Shield.cpp
Code:
char GSM::SendSMS(char *number_str, char *message_str)
{
  char ret_val = -1;
  byte i;

  if (CLS_FREE != GetCommLineStatus()) return (ret_val);
  
  SetCommLineStatus(CLS_ATCMD);  
  
  ret_val = 0; // still not send
  
  // try to send SMS 3 times in case there is some problem
  for (i = 0; i < 3; i++) {
    // send  AT+CMGS="number_str"
    mySerial.write("AT+CMGS=\"");
    mySerial.write(number_str);  
    mySerial.write("\"\r");

    // 1000 msec. for initial comm tmout
    // 50 msec. for inter character timeout
    if (RX_FINISHED_STR_RECV == WaitResp(1000, 50, ">")) {
      // send SMS text
      mySerial.write(message_str);
 
#ifdef DEBUG_SMS_ENABLED
      // SMS will not be sent = we will not pay => good for debugging
      mySerial.write(0x1b);
      if (RX_FINISHED_STR_RECV == WaitResp(7000, 50, "OK")) {
#else
      mySerial.write(0x1a);
 //mySerial.flush(); // erase rx circular buffer
      if (RX_FINISHED_STR_RECV == WaitResp(7000, 5000, "+CMGS")) {
#endif
        // SMS was send correctly
        ret_val = 1;
#ifdef DEBUG_PRINT
DebugPrint("SMS was send correctly \r\n", 0);
#endif
        break;
      }
      else continue;
    }
    else {
      // try again
      continue;
    }
  }

  SetCommLineStatus(CLS_FREE);
  return (ret_val);
}

Below I create this new
Code:
char GSM::SendDATA(char *data)
{
// Future code
  
}

and in GPRS_Shiel.h I added this
Code:
char SendDATA(char *data);

Just above the existing class
Code:
// SMS's methods
    char SendSMS(char *number_str, char *message_str);

My new class need only one variable "data"
221  Using Arduino / Programming Questions / How to create a new function within an existing library on: May 23, 2013, 08:31:05 am
------------------------------------------------------------------------------------------------
Please, Go to : « Reply #5 on: Today at 09:39:57 am » with better explication.
------------------------------------------------------------------------------------------------

Dear All,

I just get a library with class to use GPRS.
There is function send SMS, get a call, make a call, but there is nothing to send data to a remote server.

In my Sketch code, I have thta function
Code:
error=gsm.SendSMS(number,text);
I also have a file : GPRS_Shield.h
and a file : GPRS_Shield.ccp

In my GRPS_Shield.h, I have a this:
Code:
char SendSMS(char *number_str, char *message_str);
and in my GPRS_Shield.ccp, I have this
Code:
char GSM::SendSMS(char *number_str, char *message_str)
{
... code ...
 }

As I would like to have a new function, I did the following:
In my Sketch code , I add a new function

Code:
error=gsm.SendDATA(data);

In my GRPS_Shield.h, I have a this new:
Code:
char SendDATA(char *data);
and in my GPRS_Shield.ccp, I have this new
Code:
char GSM::SendDATA(char *data)
{
... code ...
 }

When I compile my code I got that error message
Quote
Users/my/Documents/Arduino/libraries/GSM_Shield/GSM_Shield.cpp: In member function 'char GSM::SendDATA(char*)':
/Users/my/Documents/Arduino/libraries/GSM_Shield/GSM_Shield.cpp:1429: error: invalid conversion from 'const char*' to 'char'

Could tell me how to create a new function to send data via http?

Many thank
222  Using Arduino / Networking, Protocols, and Devices / Re: trying to connect an Arduino mini pro (3.3 V) to the SIM908 break out board on: May 21, 2013, 06:29:27 am
Dear 3dotter,

Did you solve your problem?
I have the same configuration excepted that I use a Arduino mini pro 5V.
It would be very nice from you if you can help to make my arduino mini pro 5V working with my SIM908,
Do you have a schema of wire connection, exemple or tuto

Many, many, many thanks to your help if you got a solution
Cheers
223  Using Arduino / Programming Questions / Re: How to create a pulse without a button on: May 21, 2013, 06:05:37 am
Unfortunately it does not change by putting it on the ground  smiley-confuse
224  Using Arduino / Programming Questions / Re: How to create a pulse without a button on: May 20, 2013, 05:13:00 pm
Quote
I did say:-
Quote
If you put a 5V pulse into a module that is powered from only 4V then there is a chance you will fry it.

Yes, I understood. I used a wire from the pin 1 (on/off) and I touched for about 2 sec the 4V output of the voltage regulator. Then I "use" un pulse of 4V. Ist'nt?
225  Using Arduino / Programming Questions / Re: How to create a pulse without a button on: May 20, 2013, 05:09:22 pm
I am checking the max Volt of the GSM module but the the documentation is very very very poor.
Is there a way to check that ecause we are using a SIM900?

Same question with SIM908?
http://store.open-electronics.org/Small_Breakout_SIM908?filter_name=gps
Pages: 1 ... 13 14 [15] 16 17 ... 27