Partage
  • Partager sur Facebook
  • Partager sur Twitter

arduino gsm

demande d'aide

    25 février 2019 à 21:37:59

    BON JOUR 

    je voudrais vérifier les commendes AT avec le gsm sim900 et arduino uno

    J'ai un gsm sim900 quand je téléverse le programme les commende AT  NE REPOND PAS JE N'arrive pas a comprendre 

    voila le programme

    #include <SoftwareSerial.h>

    //Create software serial object to communicate with SIM900
    SoftwareSerial mySerial(7, 8); //SIM900 Tx & Rx is connected to Arduino #7 & #8

    void setup()
    {
      //Begin serial communication with Arduino and Arduino IDE (Serial Monitor)
      Serial.begin(9600);
      
      //Begin serial communication with Arduino and SIM900
      mySerial.begin(9600);

      Serial.println("Initializing...");
      delay(1000);

      mySerial.println("AT"); //Handshaking with SIM900
      updateSerial();
      mySerial.println("AT+CSQ"); //Signal quality test, value range is 0-31 , 31 is the best
      updateSerial();
      mySerial.println("AT+CCID"); //Read SIM information to confirm whether the SIM is plugged
      updateSerial();
      mySerial.println("AT+CREG?"); //Check whether it has registered in the network
      updateSerial();
    }

    void loop()
    {
      updateSerial();
    }

    void updateSerial()
    {
      delay(500);
      while (Serial.available()) 
      {
        mySerial.write(Serial.read());//Forward what Serial received to Software Serial Port
      }
      while(mySerial.available()) 
      {
        Serial.write(mySerial.read());//Forward what Software Serial received to Serial Port
      }
    }

    j'ai joint  un fichier rar  ( le capture d'ecran de monitor)

    MERCI D'avance 

    • Partager sur Facebook
    • Partager sur Twitter
      27 février 2019 à 8:23:36

      Ces caractères étrange, cela me fait penser à une problème de débit de communication.

      Par défaut, il me semble que le SIM900 est à 19200 bauds et non à 9600 ;)

      • Partager sur Facebook
      • Partager sur Twitter
        8 décembre 2019 à 16:14:51

        BONJOUR j'ai utiliser ce code pour la configuration de mon module GSM avec une carte aarduino mega et je n'ai pas les resultat attendu dans le moniteur serie
        #include <SoftwareSerial.h>
        //Create software serial object to communicate with SIM900
        SoftwareSerial mySerial(7, 8); //SIM900 Tx & Rx is connected to Arduino #7 & #8
        void setup()
        {
          //Begin serial communication with Arduino and Arduino IDE (Serial Monitor)
          Serial.begin(9600);
          //Begin serial communication with Arduino and SIM900
          Serial.begin(9600);
          Serial.println("Initializing...");
          delay(1000);
          Serial.println("AT"); //Handshaking with SIM900
          updateSerial.read();
          Serial.println("AT+CSQ"); //Signal quality test, value range is 0-31 , 31 is the best
          updateSerial();
          Serial.println("AT+CCID"); //Read SIM information to confirm whether the SIM is plugged
          updateSerial();
          Serial.println("AT+CREG?"); //Check whether it has registered in the network
          updateSerial();
        }
        void loop()
        {
          updateSerial();
        }
        void updateSerial()
        {
          delay(500);
          while (Serial.available()) 
          {
            Serial.write(Serial.read());//Forward what Serial received to Software Serial Port
          }
          while(Serial.available()) 
          {
            Serial.write(Serial.read());//Forward what Software Serial received to Serial Port
          }
        }
        • Partager sur Facebook
        • Partager sur Twitter
          9 décembre 2019 à 15:03:29

          Il y a un truc qui me parait étrange... c'est que tu envoie tes commandes AT sur l'objet Serial, qui représente la communication série avec le PC et non la communication série avec le SIM900.

          Ce n'est donc pas étonné que tu n'obtiennent aucun résultat puisque tu n'envoies rien au Sim900.

          Regardes bien le code source de ton tutoriel : https://lastminuteengineers.com/sim900-gsm-shield-arduino-tutorial/

          Les commandes sont envoyées sur mySerial (qui représente la communication avec le SIM900) et non sur Serial.

          • Partager sur Facebook
          • Partager sur Twitter

          arduino gsm

          × Après avoir cliqué sur "Répondre" vous serez invité à vous connecter pour que votre message soit publié.
          × Attention, ce sujet est très ancien. Le déterrer n'est pas forcément approprié. Nous te conseillons de créer un nouveau sujet pour poser ta question.
          • Editeur
          • Markdown