I have a GSM shield connected with my Intel Galileo board.
I intend to connect the board with serial communication at a baud rate of 115200 instead of the GSM library. I want to print the results of "at" commands in my serial window, how should I do it?
-
Send the commands, read the responses, print the responses. What's so tricky about that?Majenko– Majenko04/01/2016 14:20:34Commented Apr 1, 2016 at 14:20
-
well can u kindly give the syntax for printing those responses ?? plzzAswin Raghavan– Aswin Raghavan04/01/2016 14:21:41Commented Apr 1, 2016 at 14:21
-
arduino.cc/en/Reference/SerialMajenko– Majenko04/01/2016 14:22:20Commented Apr 1, 2016 at 14:22
1 Answer 1
I have only worked with the SIMCOM series of GSM modules like the SIM900 and the SIM808. Here is a sample of the kind of code you should be looking at using. It will send one "AT" to the GSM module and then it will spit out the result in the serial monitor.
void setup()
{
Serial.begin(115200);
int bytesSent = Serial.write("AT\r\n"); //send "AT" and send the end of line characters to signify end of the command
}
void loop()
{
if (Serial.available() > 0) {
// read the incoming byte:
incomingByte = Serial.read();
}
}
-
This seems a bit confused and probably unworkable - the Serial Monitor and the GSM module are both serial-interfaced devices (or at least appear to be so in the Arduino world), but you only use a single serial interface and seem to somehow imagine that it is independently connected to both of them.Chris Stratton– Chris Stratton05/31/2016 19:08:52Commented May 31, 2016 at 19:08
-
I copied the normal serial command and left in the echo by mistake. Thanks for pointing that out.Brandon– Brandon06/01/2016 07:51:03Commented Jun 1, 2016 at 7:51
-
Now it produces no output and so does not achieve the goal of the question. The question requires two serial ports.Chris Stratton– Chris Stratton06/01/2016 12:03:35Commented Jun 1, 2016 at 12:03