hello everyone, i would like to know if anyone has connected the EC25 module to an arduino. i am trying but i cannot communicate with the serial.
have a read thru how-to-get-the-best-out-of-this-forum
in particular
1.which microcontroller are you planning to use
2. give details of the EC25 module? give a link? or a photo?
3. post your code - select < CODE/ > and paste the code or text where it says “type or paste code here”
Sorry, i'm new on this forum.
I use Arduino UNO R2
This is the module: https://www.quectel.com/product/lte-ec25-series
This is my code:
#include <SoftwareSerial.h>
//Create software serial object to communicate with SIM800L
SoftwareSerial mySerial(4,5); //SIM800L Tx & Rx is connected to Arduino #3 & #2
void setup()
{
//Begin serial communication with Arduino and Arduino IDE (Serial Monitor)
Serial.begin(9600);
//Begin serial communication with Arduino and SIM800L
mySerial.begin(115200);
Serial.println("Initializing...");
delay(1000);
}
void loop()
{
mySerial.println("AT"); //Once the handshake test is successful, it will back to OK
Serial.println("AT");
updateSerial();
mySerial.println("AT+CSQ"); //Signal quality test, value range is 0-31 , 31 is the best
Serial.println("AT+CSQ");
updateSerial();
mySerial.println("AT+CCID"); //Read SIM information to confirm whether the SIM is plugged
Serial.println("AT+CCID");
updateSerial();
mySerial.println("AT+CREG?"); //Check whether it has registered in the network
Serial.println("AT+CREG?");
updateSerial();
delay(2000);
}
void updateSerial()
{
delay(1000);
while (Serial.available())
{
mySerial.write(Serial.read());//Forward what Serial received to Software Serial Port
}
Serial.println(mySerial.available());
while(mySerial.available())
{
Serial.write(mySerial.read());//Forward what Software Serial received to Serial Port
}
}
a couple of things
- run Serial at the same or a high baud rate than any other serial ports or you may overrun the buffers
- SoftwareSerial will not run a 115200baud on a UNO - the fastest is about 38400baud
upload a schematic showing how you have connected the EC25 to the UNO
I have a number of Quectel modems but are in the main on custom PCBs
the exception is a Quectel Mini PCIe EVB Kit fitted with a EC21 evaluation module
using an ESP32 with a RS232-TTL module I cross connected 9-pin D-type connector pins 2 and 3 to the RS232 9-pin D-type connector on the kit, e.g.
ran the following code
// ESP32 Serial1 test - for loopback test connect pins 16 and 17
#define RXD1 16
#define TXD1 17
void setup() {
// initialize both serial ports:
Serial.begin(115200);
//Serial1.begin(115200, SERIAL_8N1, RXD1, TXD1);
Serial1.begin(115200, SERIAL_8N1, RXD1, TXD1);
Serial.println();
Serial.println("\n\nESP32 serial1 test Rx pin 16 Tx pin 17");
Serial.write(" for loopback test connect pin 16 to pin 17\n");
}
void loop() {
// read from port 1, send to port 0:
if (Serial1.available()) {
int inByte = Serial1.read();
Serial.write(inByte);
}
// read from port 0, send to port 1:
if (Serial.available()) {
int inByte = Serial.read();
//Serial.write(inByte);
Serial1.write(inByte);
}
}
typing AT commands on the serial monitor I get response
ESP32 serial1 test Rx pin 16 Tx pin 17
for loopback test connect pin 16 to pin 17
at
OK
at+cgmi
Quectel
OK
at+cgmr
EC21EFAR06A06M4G
OK
at+cgmm
EC21
OK
at+csq
+CSQ: 15,99
OK
at+cimi
+CME ERROR: 3
I get an error to AT+CIMI (returns IMSI of the SIM card) becuase I don't have a SIM card in the holder
how is your EC25 connected to the UNO and how is it powered?
hi, i change my MCU, now i use ESP32 S3.
i have a lot of minipcie of quectel ec25 and a usb minipcie.
I connected it to CH340G (USB2TTL).
Now i connected it to ESP32 S3 to pin 16 and pin 17
This is the pinout of ESP32 S3:
i try also to connect to pin 17 and 18 but it not work.
Do you have some suggestions ?
have you a specification of the USB-TTL module? or a link to it?
is it TTL output 5V logic or 3.3V logic?
the ESP32-S3-DevKitC-1 is 3.3V logic so if the USB-TTL uses 5V logic you will require a potential divider on the USB-TTL Tx to ESP32-S3 Rx
are you sure you have connected to ESP32-S3-DevKitC-1 GPIO17 and GPIO18
the pinout diagram and you photo don't appear to correspond - I think you may be connected to GPIO15 and GPIO16
I also don't see a GND connection between the USB-TTL and ESP32-S3
the following works on my ESP32-S3-DevKitC-1 using pins 18 and 17
// ESP32-S3 DevkitC-1 Serial1 test - for loopback test connect pin GPIO17 U1TXD to pin GPIO18 U1RXD"
// ss https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/_images/ESP32-S3_DevKitC-1_pinlayout_v1.1.jpg
#define RXD1 18
#define TXD1 17
void setup() {
// initialize both serial ports:
Serial.begin(115200);
Serial1.begin(115200, SERIAL_8N1, RXD1, TXD1);
Serial.println();
Serial.println("\n\nESP32-S3 DevkitC-1 serial1 test pin GPIO17 U1TXD pin GPIO18 U1RXD");
Serial.write(" for loopback test connect pin GPIO17 U1TXD to pin GPIO18 U1RXD\n");
}
void loop() {
// read from port 1, send to port 0:
if (Serial1.available()) {
int inByte = Serial1.read();
Serial.write(inByte);
}
// read from port 0, send to port 1:
if (Serial.available()) {
int inByte = Serial.read();
//Serial.write(inByte);
Serial1.write(inByte);
}
}
if you connect pins 18 and 17 you can do a loopback test
characters entered on the serial monitor should echo back and be displayed
it at least proves the serial port works and you have the correct pins
my USB2TTL module is this: https://www.amazon.fr/AZDelivery-Adaptateur-convertisseur-capteur-Raspberry/dp/B07N7MC999
i think it is to 5v logic.
I check all wires, i think all is ok.
With pin 17 and 18 i cannot send command with Serial Monitor.
i send a lot of AT but i don't see nothing:
I think there is a problem with the Serial1.
I can use it with a softwareSerial ?
try connecting the USB-TTL to 3.3V rather than 5V
then connect
USB-TTL Tx to ESP32-S3 GPIO17
USB-TTL Rx to ESP32-S3 GPIO16
avoid posting images of screen shots they waste a lot of disk space and cannot be copied from - copy and paste the text using code tags </>
does the ES25 module show any sign of life, e.g. LEDs lit?
can you give a link to the mother board which has the EC25 attached?
yes the EC25 work because if i connected it to PC i can send it command qith QNavigator
the motherboard of EC25 is the same of this: Mini Pci-e To Usb With Sim Card Wwan Adapter Card 3g/4g Module | Fruugo IT
maybe worth putting the question on the Quectel forum
hi @horace , when i connect the module to my PC, it create 3 port COM. One for AT COMMAND, One for NMEA and another. how did you choose the AT command port?
the Quectel Mini PCIe EVB kit I described in post 5 provides the AT serial port on the 9pin D-type connector - no configuration required
The Mini Pci-e To Usb module you are using appears to present a number of USB CDC device interfaces which on Windows requires a device driver to create the various COM ports
I looks like simply connecting a USB-TTL module to it won't work
you may have to connect it to a USB Host port on a microcontroller such as the ESP32-S3-DevKitC-1 and implement CDC drivers to create the AT command serial port - not a trivial task!
worth asking on the Quectel forum if there is a simple way to connect your EC25 module to a microcontroller such as the ESP32-S3
you could get a Quectel Mini PCIe EVB kit and RS232-TTL module like I used in post 5 - however, the Quectel Mini PCIe EVB kit cost about £120 in the UK
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.