Arduino uno and wh-lte-7s4 4g module serial communication

Hi guys, I have an Arduino Uno and WH-LTE-7S4 V2 Module. I am unable to receive responses to the AT commands and also un-able to get the board actively working with my Arduino Board. The Serial monitor displays the Version of the board, but nothing further.
See code and images.

< #include <SoftwareSerial.h>

// Define the RX and TX pins for the WH-LTE-7S4
#define LTE_RX 2
#define LTE_TX 3

SoftwareSerial lteSerial(LTE_RX, LTE_TX);

void setup() {
// Initialize the serial communication with the Arduino and the WH-LTE-7S4
Serial.begin(9600);
lteSerial.begin(9600);

// Wait for the module to initialize
delay(2000);

// Send an AT command to check if the module is responding
lteSerial.println("AT");
delay(1000);
}

void loop() {
// Read the response from the module
if (lteSerial.available()) {
String response = lteSerial.readString();
Serial.println(response);
}
}
/>

Welcome to the forum

Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'

Use code tags (the < CODE/ > icon above the compose window) to make it easier to read and copy for examination

https://forum.arduino.cc/t/how-to-get-the-best-out-of-this-forum

Please post your full sketch, using code tags when you do

Posting your code using code tags prevents parts of it being interpreted as HTML coding and makes it easier to copy for examination

In my experience the easiest way to tidy up the code and add the code tags is as follows

Start by tidying up your code by using Tools/Auto Format in the IDE to make it easier to read. Then use Edit/Copy for Forum and paste what was copied in a new reply. Code tags will have been added to the code to make it easy to read in the forum thus making it easier to provide help.

It is also helpful to post error messages in code tags as it makes it easier to scroll through them and copy them for examination

Thanks a lot @UKHeliBob , I hope this is better;



#include <SoftwareSerial.h>

// Define the RX and TX pins for the WH-LTE-7S4
#define LTE_RX 2
#define LTE_TX 3

SoftwareSerial lteSerial(LTE_RX, LTE_TX);

void setup() {
  // Initialize the serial communication with the Arduino and the WH-LTE-7S4
  Serial.begin(9600);
  lteSerial.begin(9600);

  // Wait for the module to initialize
  delay(2000);

  // Send an AT command to check if the module is responding
  lteSerial.println("AT");
  delay(1000);
}

void loop() {
  // Read the response from the module
  if (lteSerial.available()) {
    String response = lteSerial.readString();
    Serial.println(response);
  }
}

Thank you

See how much easier it is to read, scroll through and copy for examination

@UKHeliBob indeed, many thanks. Do also note that I powered the LTE Module both seperately on 9V, and also using the Arduino board on the 5V pins, still gave me same response.

See link for datasheets, Also see wiring diagram attached.

9 volt coming from what source?

9V coming from an external power supply, able to output a maximum current of 2Amps.

Very good!

Is the begin function returning any status? If it is, it could be worth Serial.print that status. Without an okey nothing will work below.

@Railroader The only response I'm getting is as seen in the attachment below. I commented out the section of code below, but still got an unrelated response on Serial Monitor as attached. Which shows that the function is operational, but that the "AT" commands are not recognized/needed in order to get response currently on Serial Monitor.



#include <SoftwareSerial.h>

// Define the RX and TX pins for the WH-LTE-7S4
#define LTE_RX 2
#define LTE_TX 3

SoftwareSerial lteSerial(LTE_RX, LTE_TX);

void setup() {
  // Initialize the serial communication with the Arduino and the WH-LTE-7S4
  Serial.begin(9600);
  lteSerial.begin(9600);

  // Wait for the module to initialize
  delay(2000);

  **// Send an AT command to check if the module is responding**
**  //lteSerial.println("AT");**
** // delay(1000);**
}

void loop() {
  // Read the response from the module
  if (lteSerial.available()) {
    String response = lteSerial.readString();
    Serial.println(response);
  }
}


delay(1000);

Yes but that's beyond my knowledge.
I suggest You instal some code like:

boolean Status;
Status = lteSerial.begin(9600);
Serial.println(Status");