Show Posts
Pages: 1 ... 7 8 [9] 10
121  Products / Arduino GSM Shield / Re: GSM Shield weired characters in SMS on: June 07, 2013, 02:03:36 am
hi,

Repeat the same steps for check AT+CSCSI command that I posted, now with the command AT+QMGHEX.

The result should be: +QMGHEX: 0

You can change this configuration with AT+QMGHEX=0.
122  Products / Arduino GSM Shield / Re: Example code ReceiveVoiceCall problem on official Arduino GSM Shield R3 on: June 06, 2013, 03:14:37 am
Hi!,

Please. Could you check that the modem receives a call, and is notified via the software serial connection?

Use this sketch for communicate with modem directly:
Code:
#include <SoftwareSerial.h>
#include <string.h>

char incoming_char = 0;

SoftwareSerial cell(2, 3);

void setup()
{
  Serial.begin(9600);
 
  Serial.println("Start Reset");
  pinMode(7, OUTPUT);
  digitalWrite(7, HIGH);
  delay(1500);
  //digitalWrite(7, LOW);
  delay(1000);
  Serial.println("End Reset"); 

  cell.begin(9600);

  Serial.println("Introduce your AT commands now!:");
}

void loop()
{

  if(cell.available() >0)
  {
    incoming_char=cell.read();
    if((incoming_char >= ' ')&&(incoming_char<='z'))
      Serial.print(incoming_char);
    else
    {
      Serial.print("%");
      Serial.print((int)incoming_char);
      Serial.print("%");
      if(incoming_char==10)
        Serial.println();
    }
  }

  if(Serial.available() >0)
  {
    incoming_char=Serial.read();
    cell.print(incoming_char);
  }
}

You can enter AT commands via Serial Monitor with "Both NL & CR" configuration.
123  Products / Arduino GSM Shield / Re: GSM Shield weired characters in SMS on: June 04, 2013, 02:01:55 am
Try send a SMS, one with Arduino SendSMS example and other with your mobile phone, and receive it in your Arduino with ReceiveSMS example.
Post your SMS messages received.
124  Products / Arduino GSM Shield / Re: Gsm shield prog_char has not been declared on: June 03, 2013, 05:34:54 am
Hello,

Try with this version of GSM library without prog_char.
Download link: http://arduinoshield.tid.es/GSMLibrary/GSM3.zip
125  Products / Arduino GSM Shield / Re: Comparing senderNumber[20] to integer on: June 03, 2013, 02:05:59 am
Hi,

Try with this code:
Code:
if(received.compareTo("On") == 0) {

  lightlight = 1;
   
  Serial.println("LED ON");
}
else if (received.compareTo("Off") == 0) {
 
  lightlight = 0;
 

}
126  Products / Arduino GSM Shield / Re: modem documentation on: May 30, 2013, 04:02:59 am
Hi,

This link is the same document: http://arduino.cc/en/uploads/Main/Quectel_M10_datasheet.pdf

How to connect a microphone or a speaker is on page 49 and subsequent.
127  Products / Arduino GSM Shield / Re: Gsm shield prog_char has not been declared on: May 29, 2013, 09:09:17 am
Sorry, the problem is yet there or is it gone?
128  Products / Arduino GSM Shield / Re: GSM Shield weired charcters in SMS on: May 28, 2013, 03:24:30 am
Hi,

it may be a problem with character set configured by default in the modem.

You can check if character set configured is correct:

1 - Upload this code in your Arduino:
Code:
#include <SoftwareSerial.h>
#include <string.h>

char incoming_char=0;      //Will hold the incoming character from the Serial Port.
SoftwareSerial cell(2,3);  //Create a 'fake' serial port. Pin 2 is the Rx pin, pin 3 is the Tx pin.

void setup()
{

  //Initialize serial ports for communication.
  Serial.begin(9600);

  // reset
  Serial.println("Start Reset");
  pinMode(7, OUTPUT);
  digitalWrite(7, HIGH);
  delay(1500);
  //digitalWrite(7, LOW);
  delay(1000);
  Serial.println("End Reset"); 

  cell.begin(9600);

  Serial.println("Ready for commands...");
}

void loop()
{
  //If a character comes in from the cellular module...
  if(cell.available() >0)
  {
    incoming_char=cell.read();    //Get the character from the cellular serial port.
    if((incoming_char >= ' ')&&(incoming_char<='z'))
      Serial.print(incoming_char);
    else
    {
      Serial.print("%");
      Serial.print((int)incoming_char);
      Serial.print("%");
      if(incoming_char==10)
        Serial.println();
    }
  }

  //If a character is coming from the terminal to the Arduino...

  if(Serial.available() >0)
  {
    incoming_char=Serial.read();  //Get the character coming from the terminal
    cell.print(incoming_char);    //Send the character to the cellular module.
  }
}

2 - Open serial monitor with 9600 baud and both NL & CR, and wait for message "Ready for commands...".

3 - Write AT in your serial monitor and push enter, repeatedly until you see the modem response as OK (ignore other messages).

Example:
AT%13%%13%%10%
OK%13%%10%

4 - Enter AT+CSCS? and push enter, you should see a response similar to:
AT+CSCS?%13%%13%%10%
+CSCS: "GSM"%13%%10% // this is character set configured
%13%%10%
OK%13%%10%

5 - If your character set is not GSM, you can change this with command AT+CSCS="GSM", and push enter. After, you can check it with AT+CSCS? and push enter.

Example:
AT+CSCS="GSM"%13%%13%%10%
OK%13%%10%
AT+CSCS?%13%%13%%10%
+CSCS: "GSM"%13%%10%
%13%%10%
OK%13%%10%


129  Products / Arduino GSM Shield / Re: Comparing senderNumber[20] to integer on: May 21, 2013, 02:03:33 am
You are comparing two array of characters. If you want to compare two numbers mathematically, you should compare two integer variables, in other words, you should cast myCharNumber and senderNumber to integer with atoi function. If you want to compare two array for know if they are exactly equal (with letters and numbers), you should use strcmp(array1, array2).

Comparison of two numbers mathematically:
Code:
  char myCharNumber[20] = "+12223333";
  char senderNumber[20] = "+656543344";
  int myIntNumber = atoi(myCharNumber);
  int myIntSenderNumber = atoi(senderNumber);
 
  if(myIntSenderNumber < myIntNumber)
  {
    Serial.println("SenderNumber is less than myCharNumber");
  }
  else
  {
    Serial.println("SenderNumber is greater than myCharNumber");
  }

Comparison of two arrays (character by character):
Code:
  Serial.begin(9600);
  char myCharNumber[20] = "+656543344";
  char senderNumber[20] = "+656543344";

  if(strcmp(senderNumber, myCharNumber) == 0)
  {
    Serial.println("Equal");
  }
  else
  {
    Serial.println("Not equal");
  }
130  Products / Arduino GSM Shield / Re: Comparing senderNumber[20] to integer on: May 20, 2013, 01:39:48 am
To compare a char array with a integer, you must cast your char array to a integer type. You can do it with this function:

int atoi (const char * str);

For example:
Code:
char myCharNumber[20] = "2000";
int myIntNumber = atoi(myCharNumber);
131  Products / Arduino GSM Shield / Re: Direct AT Commands to shield (for getting time) on: May 16, 2013, 08:48:43 am
Don't use GSM with SoftwareSerial in the same sketch, because this two libraries modify interrupt vector. You can use only SoftwareSerial for enter AT commands and connect to GPRS network manually.
132  Products / Arduino GSM Shield / Re: GSM receive message and make action on: May 16, 2013, 08:44:42 am
You can detect 'on' or 'off' words in a SMS. First, you must concatenate each character received in a String object, after, use compareTo function.

Code:
char c;
String received = "";

while(c=sms.read())
  received += c;

if(received.compareTo("on") == 0)
{
  digitalWrite(YOURPIN, HIGH);
}
else if(received.compareTo("off") == 0)
{
  digitalWrite(YOURPIN, LOW);
}
else
{
}
133  Products / Arduino GSM Shield / Re: How can I stop gsm.begin()? on: May 09, 2013, 02:50:02 am
When your code executes shutdown method, modem will switch off in a interval of 12 seconds. Then, STATUS led will turn off, but ON led always will be on.

If STATUS led never switch off, then you can download this new library version (https://dl.dropboxusercontent.com/u/9093673/GSM3.zip) and try secureShutdown function (object gsmAccess of class GSM).
134  Products / Arduino GSM Shield / Re: Receive SMS example on: April 30, 2013, 03:23:36 am
Hello,

Try to receive sms using AT commands with the next code and sending them via serial monitor (configured CR / NL).

Code:
#include <SoftwareSerial.h>
#include <string.h>

char incoming_char = 0;
SoftwareSerial cell(2, 3);

void setup()
{
  Serial.begin(9600);
  cell.begin(9600);
 
  Serial.print("Starting modem communication...");
  delay(12000);
  Serial.print("OK\nIntroduce your AT commands:\n");
}

void loop()
{
  if(cell.available() > 0)
  {
    incoming_char=cell.read();
    if((incoming_char >= ' ') && (incoming_char <= 'z'))
      Serial.print(incoming_char);
    else
    {
      Serial.print("%");
      Serial.print((int)incoming_char);
      Serial.print("%");
      if(incoming_char==10)
        Serial.println();
    }
  }

  if(Serial.available() > 0)
  {
    incoming_char = Serial.read();
    cell.print(incoming_char);
  }
}

The AT commands for receiving SMS are:

ATE1 --> Set echo ON
AT+CMGF=1 --> Establishes text mode in modem
AT+CMGL="REC UNREAD",1 --> Checks if exists unread SMS. Return OK if not exist any SMS, in other case returns a list with them (the first number of each of them are the index of each of them).
AT+CMGR=[sms_index],0 --> Read SMS with index sms_index from modem memory (ej: AT+CMGR=1,0).
AT+CMGD=[sms_index] --> Delete SMS with index sms_index from modem memory (ej: AT+CMGD=1).

The problem can be attached with your local operator. Are you using the SIM that came with the shield?.
135  Products / Arduino GSM Shield / Re: How can I stop gsm.begin()? on: April 29, 2013, 07:29:13 am
Hi!,

To stop GSM.begin() you can use asynchronous mode with a timeout.

For configurate async mode, you must replace the code line gsmAccess.begin(PINNUMBER) with gsmAccess.begin(PINNUMBER, true, false). The third parameter indicates async mode if it is false, and the second parameter indicates if modem restart at the beginning (default is true).

For example:

Code:
 
  unsigned long myTimeout = 3000; // YOUR LIMIT IN MILLISECONDS

  unsigned long timeConnect = millis();

  while((millis() - timeConnect) < myTimeout)
  {
    if(gsmAccess.begin(PINNUMBER, true, false)==GSM_READY)
      Serial.println("Connected");
    else
    {
      Serial.println("Not connected");
    }
  }


Greetings.
Pages: 1 ... 7 8 [9] 10