SIM908 AT no responde

Hola estimados,

Despues de hacer mil pruebas y sin poder hacer que funcione la comunicacion andruino y sim908, recurro a ustedes. Porque no puedo hacer que me responda los comando AT.

Compre el siguiente placa

Y lo conecte de la siguiente forma. Pin 10 y 11 de arduino al RX y TX de la placa

el codigo que utilice es el siguiente

#include <SoftwareSerial.h>
#include <String.h>

int TX = 11;
int RX = 10;
int modGSM = 8;
int modGPS = 7;
int baud = 9600;
SoftwareSerial mySerial(RX,TX);
int x =0;
char rep[100];
void setup() {
    pinMode(TX,OUTPUT);
    pinMode(RX,INPUT);
    pinMode(modGSM, OUTPUT);
    pinMode(modGPS, OUTPUT);
    
    Serial.begin(baud);
    mySerial.begin(baud);
    delay(500);
    
    Serial.println("Initializing...");
    delay(300);
    mySerial.println("AT");
    delay(300);
    if(mySerial.available())
    {
        Serial.println("Sim908 available");
        rep[x]=mySerial.read();
        x++;
        Serial.print(rep[x]);
    }
    else
    {
         Serial.println("SIM908 not available");
    }    
}

void loop() {

    
}

Siempre me sale SIM908 not available. Intente inveritir el pin 10 y 11 porque no tengo muy claro si el TX de arduino va con el RX del SIM908 o TX va con el TX y el RX va con el RX del sim908. En ambos casos no me funciona.

La primera vez que lo conecte me tiro muchos caracteres raros pero ya no lo hace.

Que estoy haciendo mal??

y vi algunos videos que al conectar la placa les reconoce otro COM ademas de el de arduino y a mi no me lo hace.

[EDIT] Acabo de mover el switch de la placa para acceder de GSM a GPS y luego la volvi a poner en su lugar y ahora por lo menos me dice SIM908 Available pero no veo el OK de commando AT y siempre me retorna 0 (cero)

Siempre me sale SIM908 not available. Intente inveritir el pin 10 y 11 porque no tengo muy claro si el TX de arduino va con el RX del SIM908 o TX va con el TX y el RX va con el RX del sim908. En ambos casos no me funciona.

La primera vez que lo conecte me tiro muchos caracteres raros pero ya no lo hace.

Te estaba por decir que TX del SIM908 va a RX (pin 10)del arduino y RX del SIM908 al TX (pin 11) del arduino
pero ya lo resolviste.

Ademas has puesto una pequeña rutina en tu setup()
Eso se ejecuta solo una vez y es para decirte, SIM908 available o not available. Algo que ya has concluido correctamente.
Asi que agrega la lectura del puerto serie a tu loop() para que vea el resto de las tramas.

Gracias, por responder si tenia conectado mal el RX y TX, lo puse tal cual me lo menciono y ahora me aparece como que no esta disponible, osea no me esta funcionando. Se me habrá roto el modulo?

Como puedo probarlo sin conectarlo a Arduino? ya que vi varios videos que te lo muestran sin conectarlo a arduino pero cuando yo lo conecto a la PC no me aprece ningun COM asociado.

Mira, aca tienes un tutorial del SIM908 que tal vez te pueda servir, luce muy similar a lo que estabas haciendo.
Intenta correrlo a ver si hay progreso.
Rescato el esquema y el código para ilustrar a los demás.

// Based on the 900 sim on cooking-hacks.com by Alejandro Gallego 
// Reworked from from Serial to Software Serial and reformulated for GPS by Lloyd Summers
#include <SoftwareSerial.h>
int txPin = 11;
int rxPin = 10;
int modGSMPin = 8;
int modGPSPin = 7;
int pinDelay = 3000;
int8_t answer;
char aux_str[30];
char phone_number[] = "4036900707";
SoftwareSerial myGSM(rxPin, txPin);
void setup() {
  // put your setup code here, to run once:
  pinMode(txPin, OUTPUT);
  pinMode(rxPin, INPUT); // used to turn on and off GSM
  pinMode(modGSMPin, OUTPUT);
  pinMode(modGPSPin, OUTPUT);
  Serial.begin(115200);
  Serial.println("Initializing...");
  myGSM.begin(9600);
  powerOnGSM();
  Serial.println("Connecting..."); // checks for connection I believe
  while ((sendATcommand("AT+CREG?", "+CREG: 0,1", 500) ||
          sendATcommand("AT+CREG?", "+CREG: 0,5", 500)) == 0);
  // 0 = not registered, not searching
  // 1 = registered on home network
  // 2 = not registered, but searching
  // 3 = registration denied
  // 4 = unknown (out of coverage?)
  // 5 = roaming, registered
  // 6 = SMS only, home network
  // 7 = SMS only, roaming
  // 8 = EMS
  // 9 = CSFB not preferred, home network
  // 10 = CSBFB not preferred, roaming  
  sendATcommand("AT+CREG=?", "OK",1000); // verifies network list
  sendATcommand("AT+GSN","OK",5000); // IEMI
  sendATcommand("ATX4","OK",5000);   // Listen for dialtone + busy signal when dialing
  delay(1000);
  sendSMS("This is a test","4036900707"); // Test SMS
  hangUp();
}
void loop() {
  // put your main code here, to run repeatedly:
}
void hangUp() {
  sendATcommand("ATH", "OK", 3000);
}
void sendSMS(char *message, char *number) {
  Serial.println("Sending SMS...");
  sendATcommand("AT+CMGF=1", "OK", 1000); // prep SMS mode
  // sprintf(aux_str,"AT+CMGS=\"%S\"", number);  
  // answer = sendATcommand(aux_str,">", 2000);
  answer = sendATcommand("AT+CMGS=\"4036900707\"","OK",1000);
  if (answer == 1) {
    // myGSM.println(message);
    myGSM.println("Test message.");
    myGSM.write(0x1A);
    answer = sendATcommand("", "OK", 20000);
    if (answer == 1) {
      Serial.println("Sent.");
    } else {
      Serial.println("Error");
    }
  } else {
    Serial.print("Error ");
    Serial.println(answer, DEC);
  }
}
void dial(char *number) {
  Serial.println("Dialing phone number...");
  sprintf(aux_str, "ATD%s;", number);
  sendATcommand(aux_str, "OK", 10000); // dial
}
void powerOnGSM() {
  uint8_t answer = 0;
  // check if the module is started
  answer = sendATcommand("AT", "OK", 5000);
  if (answer == 0) {
    // Send power on pulse
    digitalWrite(modGPSPin, LOW);
    digitalWrite(modGSMPin, HIGH);
    delay(pinDelay);
    //digitalWrite(modPin, LOW);
    // wait for answer
    while (answer == 0 ) {
      answer = sendATcommand("AT", "OK", 2000);
    }
  }
}
int8_t sendATcommand(char* ATcommand, char* expected_answer, unsigned int timeout) {
  uint8_t x = 0, answer = 0;
  char response[100];
  unsigned long previous;
  memset(response, '\0', 100); // initalize string
  delay(100);
  while (myGSM.available() > 0) {
    myGSM.read(); // clears the buffer
  }
  myGSM.println(ATcommand);
  // Serial.println(ATcommand);
  x = 0;
  previous = millis();
  do {
    if (myGSM.available() != 0) {
      response[x] = myGSM.read();
      x++;
      if (strstr(response, expected_answer) != NULL) {
        answer = 1;
      }
    }
  } while ((answer == 0) && ((millis() - previous) < timeout));
  Serial.println(response);
  return answer;
}

surbyte:
Mira, aca tienes un tutorial del SIM908 que tal vez te pueda servir, luce muy similar a lo que estabas haciendo.
Intenta correrlo a ver si hay progreso.
Rescato el esquema y el código para ilustrar a los demás.

// Based on the 900 sim on cooking-hacks.com by Alejandro Gallego 

// Reworked from from Serial to Software Serial and reformulated for GPS by Lloyd Summers
#include <SoftwareSerial.h>
int txPin = 11;
int rxPin = 10;
int modGSMPin = 8;
int modGPSPin = 7;
int pinDelay = 3000;
int8_t answer;
char aux_str[30];
char phone_number[] = "4036900707";
SoftwareSerial myGSM(rxPin, txPin);
void setup() {
// put your setup code here, to run once:
pinMode(txPin, OUTPUT);
pinMode(rxPin, INPUT); // used to turn on and off GSM
pinMode(modGSMPin, OUTPUT);
pinMode(modGPSPin, OUTPUT);
Serial.begin(115200);
Serial.println("Initializing...");
myGSM.begin(9600);
powerOnGSM();
Serial.println("Connecting..."); // checks for connection I believe
while ((sendATcommand("AT+CREG?", "+CREG: 0,1", 500) ||
sendATcommand("AT+CREG?", "+CREG: 0,5", 500)) == 0);
// 0 = not registered, not searching
// 1 = registered on home network
// 2 = not registered, but searching
// 3 = registration denied
// 4 = unknown (out of coverage?)
// 5 = roaming, registered
// 6 = SMS only, home network
// 7 = SMS only, roaming
// 8 = EMS
// 9 = CSFB not preferred, home network
// 10 = CSBFB not preferred, roaming
sendATcommand("AT+CREG=?", "OK",1000); // verifies network list
sendATcommand("AT+GSN","OK",5000); // IEMI
sendATcommand("ATX4","OK",5000); // Listen for dialtone + busy signal when dialing
delay(1000);
sendSMS("This is a test","4036900707"); // Test SMS
hangUp();
}
void loop() {
// put your main code here, to run repeatedly:
}
void hangUp() {
sendATcommand("ATH", "OK", 3000);
}
void sendSMS(char *message, char number) {
Serial.println("Sending SMS...");
sendATcommand("AT+CMGF=1", "OK", 1000); // prep SMS mode
// sprintf(aux_str,"AT+CMGS="%S"", number);
// answer = sendATcommand(aux_str,">", 2000);
answer = sendATcommand("AT+CMGS="4036900707"","OK",1000);
if (answer == 1) {
// myGSM.println(message);
myGSM.println("Test message.");
myGSM.write(0x1A);
answer = sendATcommand("", "OK", 20000);
if (answer == 1) {
Serial.println("Sent.");
} else {
Serial.println("Error");
}
} else {
Serial.print("Error ");
Serial.println(answer, DEC);
}
}
void dial(char number) {
Serial.println("Dialing phone number...");
sprintf(aux_str, "ATD%s;", number);
sendATcommand(aux_str, "OK", 10000); // dial
}
void powerOnGSM() {
uint8_t answer = 0;
// check if the module is started
answer = sendATcommand("AT", "OK", 5000);
if (answer == 0) {
// Send power on pulse
digitalWrite(modGPSPin, LOW);
digitalWrite(modGSMPin, HIGH);
delay(pinDelay);
//digitalWrite(modPin, LOW);
// wait for answer
while (answer == 0 ) {
answer = sendATcommand("AT", "OK", 2000);
}
}
}
int8_t sendATcommand(char
ATcommand, char
expected_answer, unsigned int timeout) {
uint8_t x = 0, answer = 0;
char response[100];
unsigned long previous;
memset(response, '\0', 100); // initalize string
delay(100);
while (myGSM.available() > 0) {
myGSM.read(); // clears the buffer
}
myGSM.println(ATcommand);
// Serial.println(ATcommand);
x = 0;
previous = millis();
do {
if (myGSM.available() != 0) {
response[x] = myGSM.read();
x++;
if (strstr(response, expected_answer) != NULL) {
answer = 1;
}
}
} while ((answer == 0) && ((millis() - previous) < timeout));
Serial.println(response);
return answer;
}

Copie el ejemplo tal cual...y sigue sin funcionar...me pone inicializando y luego ve que el scroll se la consola de arduino se mueve pero son caracteres en blanco