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);
}
}
/>
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
#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);
}
}
@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.
@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);
}
}