Show Posts
Pages: [1]
1  Using Arduino / Networking, Protocols, and Devices / Re: What GSM / Cellular shield for Arduino on: January 26, 2013, 11:42:01 am
Has anyone had problems with connecting to the GSM network? I have a deal with one of our national operators. When the SIM card is inserted to a normal cell phone, it connects without any problems. But, when inserted to Geetech SIM900 GPRS shield, it has difficulties to register to the net.

On my desk it connects only occasionally, in our kitchen it connects better. Seems, that the shield needs really strong signal to register to the net. Last week in another city it connected every time without problems. What can I do to get it registered more reliably? This leads to antenna related issues, but everything seems to be ok. It has a removable antenna and from the antenna jack a thin lead goes to the board to another really small connector.

Picture in this link:

Any suggestions?
2  Using Arduino / Networking, Protocols, and Devices / Re: Regarding 'GSM' shields on: January 26, 2013, 11:27:53 am
They act like a normal cell phone when connecting to the GSM network. SIM card and a deal with an operator are needed etc.
3  Using Arduino / Programming Questions / Re: reading sms on: January 22, 2013, 02:04:59 am

In your message handling code you assume that a complete message has been received as soon as GSM.available() returns zero, but all that really means is that the Arduino is reading characters from the serial connection faster than the GSM module is writing them. You should keep reading until you know you have received the complete response to your command. I don't know why you're seeing garbled messages but the fact you may only be reading the first few characters of each response from the GSM module could mean that the serial connection is overflowing at the sending side so perhaps that is the problem. In any case you need to sort out the serial port handling here before you look for any further problems.

Sounds very reasonable, but how can I be sure that the serial input is actually finished? I'm not so familiar with these. Or should I read until "\nOK" is received? I think it is in the end of the message given by AT command (if everything goes right). Adding some delay did not work and is not a good idea anyway.
4  Using Arduino / Programming Questions / Re: reading sms on: January 21, 2013, 05:18:42 pm
I'm fighting with a similar issue. I have a bit different code, and yes, it is far away from optimized or good-looking or professional etc. code. But, never mind, it works almost. I took it from the GeeTech GPRS module wiki page and made some modifications.

This code waits and reacts when a new SMS has received. It reads it (or try to read) and in the future it should do something based on the message content and then delete it. Currently it only deletes it. This part works, it notices a new SMS, reads it and deletes it. Next SMS works similar way.

The problem is in the message itself. If I send a SMS "Testing", only part of it will be displayed, like in the example output below, there is only "Test". If I wrote a longer SMS, the result is not truncated but contains random letters from the SMS sent. Any ideas why?

All I want is to get it working, may the code be brilliant or not  smiley

#include <SoftwareSerial.h>
#include <string.h>
SoftwareSerial GSM(7, 8);

char buffer[300];

boolean clear = true;

int count=0;

void setup ()
  GSM.begin (19200);
  Serial.begin (19200);
  delay (4000);

void ClearBufferArray ()
  for (int i=0; i<count; i++)
      buffer[i] = NULL;

void loop ()
  if (clear) {

// First delete possibly existing messages and put into text mode
// Somehow these does not work in Setup (), maybe...
    GSM.println ("AT+CMGD=1,4");
    clear = false; 
    Serial.println ("Existing SMSs deleted");
    delay (1000);
    GSM.println ("AT+CMGF=1");
    Serial.println ("Text mode");

  if (GSM.available()) {
//Read data from GSM into buffer

    while (GSM.available ()) {
      buffer[count++] = ();
      buffer[count] = '\0';
// Avoid overflow     
      if(count == 300)

//New message arrives, print the message announcement
    if (strstr (buffer,"+CMTI:")) {
      Serial.println ("SMS Received");

// Send reading command to GSM     
      GSM.println ("AT+CMGR=1");   

// Handle the message
    if (strstr (buffer,"+CMGR:")) {

// So far only print the new one and delete it (all)
      Serial.println ("Reading SMS");
      GSM.println ("AT+CMGD=1,4");
// If no more data, transmission ends, print the buffer

    Serial.println (buffer);           

    ClearBufferArray ();
    count = 0;

  if (Serial.available ())
    GSM.write ( ());

And output:

Existing SMSs deleted
Text mode




SMS Received

+CMTI: "SM",1


Reading SMS

+CMGR: "REC UNREAD","+358405833XXX","","13/01/21,23:56:46+08"




5  International / Scandinavia / Re: Uudelle foorumille suomalaisaihe on: January 21, 2013, 06:14:39 am
Okei, täytyy pitää mielessä, kiitos vinkistä! Vaikka tämä probleema ei vielä liity edes koodiin mitenkään, kyse on ihan muusta, luullakseni...
6  International / Scandinavia / Re: Uudelle foorumille suomalaisaihe on: January 20, 2013, 04:19:13 pm
Jees, vanha (kronologisesti) koira innostui aiheesta välittömästi nähtyään MicroPC:n artikkelin aiheesta. No, tilaukseen meni saman tien Arduino Uno. Sen saavuttua alkoi oitis värkkääminen ja sainhan sen sitten toimintakuntoon. Siitä sitten seuraavaksi tilaamaan Geetechin GSM shieldiä, joka tuli männä viikolla. DNA:lta halvin liittymä (perusmaksu alle euron kuussa), vehkeet nippuun ja kokeilemaan.

No, siihen se sitten tyssäsikin. Kapineeseen on yhteys olemassa ja AT-komennot menee läpi, mutta probleema on itse GSM-liittymän kirjautuminen verkkoon. Ei vaan mene. Onkohan täällä ketään, joka olisi aiheen kanssa puuhastellut? Tarkemmat selvitykset kiinnostuneille. Samaa tarinaa olen sepustellut tuonne "Networking, protocols and devices" -osastoon, mutta vielä ei ole kukaan ottanut asiaan kantaa.

Tai tunteeko joku jonkun muun, joka olisi näihin perehtynyt?
7  Using Arduino / Networking, Protocols, and Devices / Re: GSM shield does not connect to the cellular net... on: January 18, 2013, 05:31:42 pm
Some misunderstanding...

Of course I need Arduino, proper sketch and serial tool to send AT commands to the shield. I followed the geetech wiki example and I got something into the Arduino serial monitor when the shield was powered. I mean "something", since it was just some garbage like " ÿÿÿÿÿÿ ", not readable text. After some efforts I could see correct text.

Then I followed the sms sending example just step by step. Everything went fine until there was time to send hex 1A to the shield to indicate end of the message. I just cannot get the correct response from the modem. No matter what or how I send the 1A, I get always "ERROR". I installed another serial monitor where I can set the type the input, but no help, always "ERROR".
The led is still blinking to indicate no connect to the net.

The steps are like this. Just like in the exmple, until the end of message.


+CFUN: 1


Call Ready



> Test message


Any idea what's wrong now?
What should the initialization phase look like? Is this one normal?
8  Using Arduino / Networking, Protocols, and Devices / GSM shield does not connect to the cellular net... on: January 18, 2013, 08:39:42 am
Hmmm... Problem just in the beginning.

I have now Geetech GPRS SIM900 shield. I followed the steps (which are pretty same for many brands using the SIM900 chip) in the wiki provided by the supplier. They seem to be ok. The board stacks easily on top of the Arduino Uno. It gets power from Arduino, but that's all. When the shield power button is pressed the red led goes up, indicating power on the SIM900. The green led starts to blink - and keeps blinking until the end of the world... Blinking frequency indicates that it has no connect to the cellular net.

I tried the SIM card in a mobile phone, works ok, no pin code needed. I tried another SIM card to the shield, just the same, no connection.

What can I do since there is not much to do? I think it should get connected to the net even without Arduino, of course the power is needed from an external supply.

One thing I have in my mind... Does the Arduino give enough power to the shield? If it lacks of power, could it behave like this?
9  Using Arduino / Networking, Protocols, and Devices / Re: What GSM / Cellular shield for Arduino on: December 15, 2012, 06:25:30 am
Any updates to this?

I'm still unsure which shield to choose... So many different brands, different prices, etc. Which selection would be a safe solution?
Pages: [1]