Go Down

Topic: Which order power on and upload sketch Arduino - Sim808 (Read 427 times) previous topic - next topic

ilteo85

Hi, i'm doing a project with Arduino and sim808.. in my sketch i use SoftwareSerial to send AT commands to my SIM808.
Every time i power on my stuff for testing my project it takes some time to work everithing fine.
Is it possible that depends on the order that i turn on arduino and Sim808?

I usualy turn on sim808, turn on and press the button to power the module, than turn on arduino..
I do all those things with jumpers connected.
I've read something about the need to remove jumpers when i upload sketch on arduino..is it for this?
I ve tried in all the ways turning on one before the other connect and disconnect jumpers..
But all the time seems different..
Than after a while and couple of test it starts working..

What is the right order and the right why to turn it on (when i jus need to turn it on) and to upload a skatch (when i need to modify my sketch on arduino)??


Here is the simple code i use to test AT commands ..

Code: [Select]

#include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 11); // RX, TX

void setup() {
  // Open serial communications and wait for port to open:
  Serial.begin(9600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only
  }
  Serial.println("Serial begin ok");
  // set the data rate for the SoftwareSerial port
  mySerial.begin(9600);
}

void loop() { // run over and over
  if (mySerial.available()) {
    Serial.write(mySerial.read());
  }
  if (Serial.available()) {
    mySerial.write(Serial.read());
  }
}


Before start working (after connect disconnect turn off and on lots of times) when i send "AT"
he just ignore my command.

Thank you very much!

lastchancename

How long is 'some time' ?
The modem takes several seconds to power up, and will ignore any serial commands until then.
Experienced responders have a nose for laziness, (they were beginners once)... Sure, there are trolls, chest-beaters, and pretenders - but the help you'll get here is about as good as it gets - if you try to help youself!.

pamelacastroo


ilteo85

I'm sorry just didn't had time to try before today.. the situation today was that.

1 TRY
Arduino power ON sketch already uploaded then i turned on sim808 then press power button,
after 2 minutes still not working

2 TRY
Arduino ON SIM808 ON then i upload again the sketch,
after 2 minutes still not working

3 TRY
Arduino ON Sketch already uploaded SIM808 ON, I restarted SIM808 pressing power button and turning off WORKS!

Once it has start it continue to work even if i reuload the sketch or other sketch.. Actually first try and third try are the same situation.. becouse when i restart SIM808 turning off everithing i m back to first try.. so i really dont know why sometimes it works and why sometimes i need to restart everithing..

Go Up