I'm using now the A6 GPRS/GSM Shield with an arduino uno to ensure the connexion with a server.
The problem is that when i want to send an AT command we should press the button 2 S or more to be sure that our module is ready for serial communication, i want to open and close the A6 GPRS/GSM Shield
without pressing any buttons but with commanding an GPIO_OUTPUT to be high for exemple for 2 seconds and low after.
So, i want to ask you guys if there are a solution that can make us avoid using the power key.
Hi , I have done something similar a few weeks ago only my approach was i used a transistor to switch the module on via the software. So using a NPN or PNP transistor we can either turn a port HIGH or LOW to switch the transistor which will be connected to module
Thanks Newbie, so we should do a hardware modification, can you provide me with the website of the fabricant because i didn't found it, i find only suppliers...
For the project I am working on, I am using the same shield (A6 GSM-GPRS)
Had the same problem, that I wanted it to switch on from somewhere else or by itself,
without having to press the button by hand.
Solved that by putting in a relay, to push the button from a distance.
Don't know if that's the most elegant solution, but it works !
(The button is connected to the power circuit of the shield, 4.12v, Not to 5v !)
Oh, and turning off is much simpler, just give a signal on PIN 9 !
Not much documentation available for this shield, but it is working for now.
I have a new problem now !
The shield was working fine on an Arduino MEGA on Serial1 (Hardware Serial)
it only works with a 115200 baud rate,
but want to use it on a smaller board with software serial !
That does not work yet. It sends the signals, but it does not answer back.
So it is working, but without any feedback to check what it is doing.
I'm using now the A6 GPRS/GSM Shield with an arduino uno to ensure the connexion with a server.
The problem is that when i want to send an AT command we should press the button 2 S or more to be sure that our module is ready for serial communication, i want to open and close the A6 GPRS/GSM Shield
without pressing any buttons but with commanding an GPIO_OUTPUT to be high for exemple for 2 seconds and low after.
So, i want to ask you guys if there are a solution that can make us avoid using the power key.
RamiF, to clarify, would you like to turn the module on and then wait two seconds before you send anything over the serial lines? And when you say, avoid using the power key, do you mean you want to avoid pressing the physical button?
From the link you provided, it looks like you should simply be able to use digital pin D9 to turn the device on.
If you have the shield stacked on a uno or leonardo, you should be able to use the following bit of code to turn it on.
pinMode(9, OUTPUT);
digitalWrite(9,LOW);
delay(2);
digitalWrite(9,HIGH);
delay(2000); //Play with this number a little, you may only need 1500ms or even less to turn it on
digitalWrite(9,LOW);
delay(2000); //Change this number if you want to wait more or less time before sending serial data.
//Put serial communication here.
//Turn off module once you're done
digitalWrite(9,LOW);
delay(1000);
digitalWrite(9,HIGH);
delay(5000); //Change this number, you may need it to be more or less to turn if off
digitalWrite(9,LOW);
delay(60000); //Repeat code every 60 seconds, change if you want.
GerritH:
I have a new problem now !
The shield was working fine on an Arduino MEGA on Serial1 (Hardware Serial)
it only works with a 115200 baud rate,
but want to use it on a smaller board with software serial !
That does not work yet. It sends the signals, but it does not answer back.
So it is working, but without any feedback to check what it is doing.
Anyone has a solution for that ?
Software Serial doesn't work reliably at 115200 baud. I was trying this baud rate last night over softwareserial and 80% of the bytes were correct, 20% of the bytes were out by 1 bit of data, i.e. "O" was coming out as "O" most of the time but sometimes coming out as "N", these two characters or bytes are different by 1 bit.
What are you using the hardware serial for? Could you use software serial for the other device and hardware serial for the GSM shield?
A dirty way could be to add more hardware. Put multiple switches on the Rx and Tx lins of the hardware serial and use arduino to activate the appropriate line/switch
I solved the problem this morning, using softwareSerial for my MP3 player, altSoftSerial for Bluetooth (so I can communicate with the arduino and test the different functions) and the GSM shield on the Serial port (0 and 1). Not always working 100 %, but close enough to be reliable !
So with a little tweaking and learning (about serial ports), we're there !
(That came out nice, just might become my motto !)
And for the other (main) problem of turning the shield on, the software solution you advised is not working. Found it online, too, and tested it, but it just works to turn the shield off, not on !
And another thing: I saw on the shield that PIN 2 is labelled as connected to something,
but cannot find anything online about it. So I wonder what that is for...
Could that be our mystery key ??? Did anyone find out what it's for yet ?
I'm using now the A6 GPRS/GSM Shield with an arduino uno to ensure the connexion with a server.
The problem is that when i want to send an AT command we should press the button 2 S or more to be sure that our module is ready for serial communication, i want to open and close the A6 GPRS/GSM Shield
without pressing any buttons but with commanding an GPIO_OUTPUT to be high for exemple for 2 seconds and low after.
So, i want to ask you guys if there are a solution that can make us avoid using the power key.
Hi All,
I've solved this by adding High to PWR pin of A6 module for 2000 miliseconds.
See PWR position here:
And code was way simple:
int zapni = 4; // Digital pin number of Arduino attached to PWR pin on A6 module
void setup() {
pinMode(zapni, OUTPUT);
digitalWrite(zapni, LOW); // set LOW to ensure smooth run
digitalWrite(zapni, HIGH); // High to start
delay(2000); // Wait 2 seconds (per datasheet of chip
digitalWrite(zapni, LOW); // Low to have it done
}
delay(20000); // Module start at least 20 seconds and then serial can be started on 9600 baud
// to power off the A6 module, from AT command set run this:
// AT+CPOF