Go Down

Topic: No respons from AT-commands in IDE´s serial monitor (Read 794 times) previous topic - next topic

tptp

Hi!
For some reason, nothing happens when I type AT in the IDE monitor, we will expect an "OK".
It worked before but I don't know if I did something to hang it...?
I can upload sketches to IDE and ie "Blink" works fine with the Arduino Uno card, I can change and update code, so I have the serial connection from my computer to the card.
I tried with different baud rates and NL/CR...alternatives.
And the monitor monitors communication and values from the sketches.
But the AT-commands....! Nothing??

Any idea where to repair my AT functionality so I can move on with GPrS and WiFi - projects?
Best Regards

mfalkvidd

What device are you trying to send AT commands to? Arduinos won't respond to AT commands unless the sketch has code to handle AT commands.

tptp

Thanks for your answer.
I try to send from the USB-port from an iMac to Arduino Uno (from Kjell&Co) usb port. To the Arduino I have a ESP8266 wifi module connected, also tied with a IOT GA6 gsm/gprs module.

I am neon this with both programming and Arduino but try to learn...

The sketch-example below is one I have tested/struggled with but I have also the one that worked earlier with ESP8266 module.

I think I need to learn something basic ;-)

#include <SoftwareSerial.h>

SoftwareSerial GPRS(7, 8);
unsigned char buffer[64]; // buffer array for data recieve over serial port
int count=0;     // counter for buffer array
void setup()
{
  GPRS.begin(9600);               // the GPRS baud rate   
  Serial.begin(9600);             // the Serial port of Arduino baud rate.     
}

void loop()
{
  if (GPRS.available())              // if date is comming from softwareserial port ==> data is comming from gprs shield
  {
    while(GPRS.available())          // reading data into char array
    {
      buffer[count++]=GPRS.read();   
      if(count == 64)break;
    }
    Serial.write(buffer,count);            // if no data transmission ends, write buffer to hardware serial port
    clearBufferArray();              // call clearBufferArray function to clear the storaged data from the array
    count = 0;                       // set counter of while loop to zero
  }
  if (Serial.available())            // if data is available on hardwareserial port ==> data is comming from PC or notebook
    GPRS.write(Serial.read());       // write it to the GPRS shield
}
void clearBufferArray()              // function to clear buffer array
{
  for (int i=0; i<count;i++)
    { buffer=NULL;}                 
}

Go Up