waqasaps2 / gsm-shield-arduino

This library can be used with GSM shield
0 stars 0 forks source link

Simplewriteln "ctrl+z" or "0x00" without result #62

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
I'm using a SIM900 on a Seeedstudio Modem.
To send data via CIPSEND, a ctrl+z is needed finally.

NOT working: gsm.SimpleWriteln((char)26); 
Working:     SerialGSM.println((char)26); -- SerialConnection via SoftwareSerial

Arduino 1.0.3 on Win7

Original issue reported on code.google.com by ralf.jun...@gmail.com on 11 Feb 2013 at 8:28

GoogleCodeExporter commented 8 years ago
SOLVED!!!
Adding following methods to SIM900.h:

    void SimpleWriteln(char comm);
    void SimpleWriteln(long comm);

and SIM900.cpp:

    void SIMCOM900::SimpleWriteln(char comm)
    {
      _cell.println(comm);
    }

    void SIMCOM900::SimpleWriteln(long comm)
    {
      _cell.println(comm);
    }

Original comment by ralf.jun...@gmail.com on 13 Feb 2013 at 1:49

GoogleCodeExporter commented 8 years ago
in the Example code:

    gsm.SimpleWriteln((char)0x00);
    gsm.SimpleWriteln((char)0x1a);

Original comment by ralf.jun...@gmail.com on 13 Feb 2013 at 1:50

GoogleCodeExporter commented 8 years ago
Thank you very much for your help.

Original comment by martines...@gmail.com on 17 Feb 2013 at 2:32

GoogleCodeExporter commented 8 years ago
Or you can use:

  char end_c[2];
  end_c[0]=0x1a;
  end_c[1]='\0';
  gsm.SimpleWrite(end_c);

However thanks for your update

Original comment by martines...@gmail.com on 8 Mar 2013 at 10:30

GoogleCodeExporter commented 8 years ago
This issue section is not longer supported.
Please check the support page www.gsmlib.org 

Original comment by martines...@gmail.com on 6 Jul 2013 at 11:27