Writing AT commands via arduino UNO to SIM7080G module

Hey I'm having problems with writing AT commands to a SIM7080G module via an arduino uno.

#include <SoftwareSerial.h>

SoftwareSerial mySerial(2,3);

void setup()
{
mySerial.begin(115200);
Serial.begin(115200);
pinMode(9, OUTPUT);
digitalWrite(9, HIGH);
delay(2000);
digitalWrite(9, LOW);
}

void loop()
{

if (mySerial.available())
Serial.println(mySerial.read());
if (Serial.available())
mySerial.write(Serial.read());

}

I wrote this code, but when i write "at" I just get a lot of zeros in response:

Hope someone can help :smiley:

please, please never ever again post pictures of text... Not only they are not readable nor usable directly for copy&paste but they use up lots of storage and internet bandwidth which contributes to polluting the planet.

➜ do your part and do yourself a favour and please read How to get the best out of this forum and modify your post accordingly (including code tags and necessary documentation for your ask).


we would not recommend SoftwareSerial at 115200 bauds. Configure your SIM7080 for 9600 bauds or auto-bauding.

make sure you have a proper power supply for your module too and that you connected the correct pins including GNDs

for autobauding set the SIM7080 baudrate to 9600 and type the the sequence at at at at at at at at
the SIM7080 should set the baud rate to 9600, start up (you should see start up information) and AT commands should then work

Thanks for the comment, i changed the picture :smiley:

https://www.aliexpress.com/item/1005002485181032.html
I got this board and I connected it to the arduino uno this way: BAT to 3,3 V, GND to GND, TXD to pin 2 and RXD to pin 3, This should be correct right? A also remembered to turn on board by shorting PWR to ground for a second.

the module requires 500mA when in transmission. The 3.3v pin of an UNO can provide current up to 150mA … ➜ you need a dedicated power supply

and as mentioned, 115200 bauds is usually too much for software serial

Tried all of it, still didn't work...

show us that code and that circuit

Code I'm using:

#include <SoftwareSerial.h>

SoftwareSerial mySerial(2, 3); // RX, TX

void setup() {
  mySerial.begin(9600);
  Serial.begin(9600);
}

void loop() {

  if (mySerial.available())
    Serial.write(mySerial.read());
  if (Serial.available())
    mySerial.write(Serial.read());
}

Pictures of setup:

when you turn the board on do LEDs light?
if you then enter a series of "at" it should autobaud and you see the start up messages

The NET LED on the SIM board does blink which it should, and the RX and TX on the arduino blink when I write in the serial monitor. I tested the SIM via usb (where it works fine btw) and it should be on autobaud already. But in arduino IDE serial monitor I just get 8 squares sent back when I type "at".

when you connected via USB what baudrate did you use?
if it already autobauded was the baudrate the same as the Arduino program? e.g. 9600
if not power off the SIM, power it back on and try autobauding using the arduino code

Tried to use both 115200 and 9600 without changing anything with the SIM, which mean that it must be on auto bauding.

Got it to work with hardware serial on a arduino mega, but how come it only works with hardware serial?

➜ probably

Tried with 9600 baud rate so properly not that.

did you get any answer from AT commands using code like this?

#include <SoftwareSerial.h>
SoftwareSerial SIM7080G(2, 3);

void setup() {
  SIM7080G.begin(9600);
  Serial.begin(115200);
  // reset SIM7080G
  pinMode(9, OUTPUT);
  digitalWrite(9, HIGH);
  delay(2000);
  digitalWrite(9, LOW);
  Serial.println("Ready");
}

void loop() {
  if (SIM7080G.available()) Serial.write(SIM7080G.read());
  if (Serial.available()) SIM7080G.write(Serial.read());
  delayMicroseconds(100);
}

make sure that

  • the SIM7080G is powered externally with enough amps
  • GNDs are connected
  • SIM7080G Tx line to pin 2 of Arduino
  • SIM7080G Rx line to pin 3 of Arduino
  • voltage adaptor if needed for the communication (3.3V versus 5V?)

open the serial monitor at 115200 bauds
configure end of line to be CR+LF
type AT and enter a few times
➜ do you see anything written back from your SIM7080G?

SoftwareSerial cannot transmit and receive data at the same time.
it is possible that as the Arduino was transmitting bytes the receiver was echoing them and causing corruptions
in general the recommendation is use hardware interfaces
software bit-bashing emulations have limitations

Nope I dosen't respond

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.