lingeshbarani / gsm-shield-arduino

Automatically exported from code.google.com/p/gsm-shield-arduino
0 stars 0 forks source link

Communication troubles with additional serial ports #58

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
-Arduino Uno
-Latest version of the GSM shield
- Using the following pins for TX and RX:
       #define _GSM_TXPIN_ 2
       #define _GSM_RXPIN_ 3

From the example GSM_GPRSLibrary_SMS.ino

1. Create an additional software serial port:
#define SENSOR_PORT_TXPIN 4
#define SENSOR_PORT_RXPIN 6
SoftwareSerial sensorSerial(SENSOR_PORT_RXPIN,SENSOR_PORT_TXPIN);

2. In the setup loop, first initialize the GSM communication and then the 
additional software serial port:

void setup() 
{  
  if (gsm.begin(2400))
  {
      Serial.println("\nstatus=READY");    
  }
  else Serial.println("\nstatus=IDLE");

  sensorSerial.begin(9600);
};

3. Upload the example to the arduino. In the loop functon, plot in the serial 
monitor the string received by SMS (basically the same of the example).

What is the expected output? What do you see instead?
The GSM module didn't answer in timeout, i.e. after executing the function "pos 
= sms.IsSMSPresent(SMS_UNREAD);", the variable "pos" is equal to -2. It remains 
in this state during the whole execution of the main loop.

On the other hand, if you first initialize the the additional software serial 
port and then the GSM module, the transmission and reception of messages via 
SMS (GSM) works perfectly but the software serial port only "transmits" 
successfully and It doesn't receive well, in fact, it does not receive 
anything. I tried to change the digital pin but it is still not working.

What version of the product are you using? On what operating system?
GSMGPRS version 3.09 on linux (Ubuntu)

Please provide any additional information below.

Original issue reported on code.google.com by javii...@gmail.com on 31 Jan 2013 at 11:11

GoogleCodeExporter commented 8 years ago
For what I know, Arduino supports only one SoftwareSerial at the same time.
Check on the site of SoftwareSerial
Marco

Original comment by martines...@gmail.com on 6 Feb 2013 at 6:33

GoogleCodeExporter commented 8 years ago

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

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