Moduli gsm

Mimmofire in questi giorni ho avuto anche io problemi con la funzione callStatus(). Ho quindi modificato la funzione in questo modo:

/**********************************************************
Method checks status of call

return: 
      CALL_NONE         - no call activity
      CALL_INCOM_VOICE  - incoming voice
      CALL_ACTIVE_VOICE - active voice
      CALL_NO_RESPONSE  - no response to the AT command 
      CALL_COMM_LINE_BUSY - comm line is not free
**********************************************************/
byte GSM::CallStatus(void)
{
  byte ret_val = CALL_NONE;
  byte status;
  
  if (CLS_FREE != GetCommLineStatus()) return (CALL_COMM_LINE_BUSY);
  SetCommLineStatus(CLS_ATCMD);
  Serial.flush();
  delay(100);
  Serial.println("AT+CPAS");
  
  // 5 sec. for initial comm tmout
  // 50 msec. for inter character timeout
  if (RX_TMOUT_ERR == WaitResp(5000, 50)) {
    // nothing was received (RX_TMOUT_ERR)
    // -----------------------------------
    ret_val = CALL_NO_RESPONSE;
  }
  else {
    // something was received but what was received?
    // ---------------------------------------------
    // ready (device allows commands from TA/TE)
    // <CR><LF>+CPAS: 0<CR><LF> <CR><LF>OK<CR><LF>
    // unavailable (device does not allow commands from TA/TE)
    // <CR><LF>+CPAS: 1<CR><LF> <CR><LF>OK<CR><LF> 
    // unknown (device is not guaranteed to respond to instructions)
    // <CR><LF>+CPAS: 2<CR><LF> <CR><LF>OK<CR><LF> - NO CALL
    // ringing
    // <CR><LF>+CPAS: 3<CR><LF> <CR><LF>OK<CR><LF> - NO CALL
    // call in progress
    // <CR><LF>+CPAS: 4<CR><LF> <CR><LF>OK<CR><LF> - NO CALL
    if(IsStringReceived("+CPAS: 0")) { 
      // ready - there is no call
      // ------------------------
      ret_val = CALL_NONE;
    }
    else if(IsStringReceived("+CPAS: 3")) { 
      // incoming call
      // --------------
      ret_val = CALL_INCOM_VOICE;
    }
    else if(IsStringReceived("+CPAS: 4")) { 
      // active call
      // -----------
      ret_val = CALL_ACTIVE_VOICE;
    }
	else{ 
      // active call
      // -----------
      ret_val = CALL_NO_RESPONSE;
    }
  }

  SetCommLineStatus(CLS_FREE);
  return (ret_val);

}

rispetto a prima viene ricercato anche il +CPAS: oltre il numero ed ora sembra mi funzioni bene mentre prima probabilmente leggeva degli 0 spuri che facevano pensare a nessuna chiamata in arrivo. Non so perchè ma fino a poco tempo fa funzionava anche con la vecchia funzione, forse cambiando qualche cosa nel mio sketch... Ciao

Se trovate dei problemi sulla libreria segnalatemelo in modo da poter aggiornare il codice

http://code.google.com/p/gsm-shield-arduino/

Gia segnalato tempo fa (ISSUE 2), avevo messo anche qui per le persone che seguono il topic

ottimo, faccio correggere.

Salve a tutti :slight_smile:

Ho acquistato la shield sim900 da futura elettronica e scaricato il codice gprs server da open electronics...mi restituisce questo:

GSM Shield testing.

status=READY
status=ATTACHED

Number of data received:
0
Data received:

Dopo di che non appare niente altro...come devo fare per poter inviare dati all' arduino tramite una connessione gprs?
(posso inviare dati anche tramite una pagina web?)

Grazie per le eventuali risposte....

Ciao a tutti, vorrei qualche info su questo shield, la mia necessità sarebbe quella di utilizzare un arduino singolo per comandare sia lo shield gprs, sia lo shield xbee.

Ho visto che con libelium questa cosa è possibile: Howly | Get Professional Advice & Answers to Your Questions From an Expert

Volevo sapere se si può fare anche con lo shield di futura elettronica FuturaNet: Il portale per makers ed elettronica by Futura Group

sì, è possibile visto che per com,andare lo xbee stano 2 pin qualsiasi