Connecting ESP32C6 to AIR780E via serial fails to communicate

Hey all! My first post here and I’m a beginner to the SBCs and MCUs , so…

Got an issue here. My goal is to enable 4G communication for the board xiao esp32c6 via connecting to the AIR780E board (https://www.aliexpress.com/item/1005008058298499.html) through UART\serial (not 100% about terminology). The AIR board supports both USB and UART. Tested via USB - can see 3 com port created. COMs 1 and 2 act identical - can send AT command there, get OK as a response. COM3 throws endless garbage data back to the console upon connection, so not sure what that is. Also it adds an Ethernet NIC to the PC with an IP assigned.

UART hardware:
tried powering AIR board both from the ESP32 5v and with external power, no difference
for UART\serial I connected pin D7 (RX) from ESP32 to TX pin at AIR and D6 TX pin from ESP32 to RX pin at AIR

AIR lights up, but whenever I try to connect the serial, availability check fails. Please advise what I might be missing here? Any additional obvious ways of troubleshooting I might be missing being new to this entire setup?
Coding and flashing via Arduino IDE. Let me know if any additional info may be helpful.

code output is this
============= Testing Air780E communication =============
AIR serial connection failed…
Sending AT…

Sleeping 5 sec
AIR serial connection failed…
Sending AT…

Sleeping 5 sec

here is my sample code I’m using for testing.
//serial samples Pin Multiplexing With Seeed Studio XIAO ESP32C6 | Seeed Studio Wiki

#include <HardwareSerial.h>
HardwareSerial AIR780Serial(0);

void setup() {
Serial.begin(9600);
Serial.println("============= Testing Air780E communication =============");
}

void loop() {
// Initialize the hardware serial port (UART)
AIR780Serial.begin(115200, SERIAL_8N1, 7, 6);

if (AIR780Serial.available()) {
Serial.println(“AIR serial connected successfully”);
} else {
Serial.println(“AIR serial connection failed…”);
}

Serial.println(“Sending AT…”);
AIR780Serial.println(“AT”);
char c = AIR780Serial.read();
Serial.println(c);
Serial.println(“Sleeping 5 sec”);
delay(5000);
}

this is an older device, but maybe you could experiment with it

Hi there,

and Welcome here…

So a couple things, the first would be SLOW down. Don’t be so quick in your actions and throw the kitchen sink at the thing :smile:
You can connect that board to the Serial port of the computer first!
Try to establish a connection using the AT commands. (PASS/FAIL)
Your kind of mixing the IP connection stuff with the Data LINK establishment first.
Did you LOOk at the wiki? for it.


LOTS of info on it…

USB Driver

The driver method used by 780E is the USB serial driver officially recommended by Microsoft . As long as this method is used, driver-free installation is possible, making it convenient for users to develop projects.

win10

  • The USB driver does not need to be installed. After plugging into the computer ( 780E needs the powerkey to be grounded for 1.2S, VBAT power supply 4.2-3.3V, the USB port is connected to the computer, the USB cable is a data transmission cable, not a charging cable, the difference is whether there are DM and DP in the cable. A very convenient verification method is to insert the C port into the mobile phone and see if the computer pops up a large-capacity storage device. If it pops up, it proves that the cable is a data cable. Otherwise, the cable can only be charged, that is, there are only VCC and GND ) the following virtual ports will be displayed: the first two ports 81 and 82 can be used to send AT commands, and the corresponding port 83 is the LOG port (it may also be that the first two ports are LOG ports, which has been tested in practice).
    image.png

Everything is in PDF some needed the translate button turned on…YMMV
You have A SIM for it that works in USA?
check out there PPP dial up and Android app too.

HTH
GL :slight_smile: PJ :v:

Power is the big issue, it takes a LOT of it… to establish a connection then it’s a lot less but initially you’ll need a big cap or a big supply. :+1:

I wouldn’t bother with the USB port, use the serial port and terminal program, because your XIAO stuff will use it too.:+1: Get it going on the bench first then deploy to the Xiao otherwise you’re just waxing your carrot. :sunglasses: :ok_hand:

That’s quite helpful. Thanks!
I’m definitely not rushing. I’ve been kicking this two boards gently for at least couple of weeks before posting this question :slight_smile:
I don’t think I confuse the serial and tcp, probably it’s the way I combined all the findings together made that impression. The AIR board indeed have plenty of documentation, however I cannot fully rely on it as the documentation is actually for the chip itself, not the board I’m using. I did request the seller for the board documentation, but am yet to hear back. E.g. a noticeable difference is that the chip work off 3.3v as per the chip doc on the site, however the board states 5v which was a confusion for me at the beginning. Ended up operation on 5v. Which means I cannot fully reply on the docs depending on what else they injected into the board.

To begin with I’d like to try your suggestion:
You can connect that board to the Serial port of the computer first!
Try to establish a connection using the AT commands. (PASS/FAIL)
However I’m not sure I fully understand this. How do I connect the serial pins to my PC for testing? Through some serial to usb hardware converter? Or are there other methods?
To clarify, the board has two sets of pins each on an opposite side of the board. One provides usb connectivity, the other for serial connection. USB side works fine with a PC, while not sure how to test the serial pins connecting to a PC (the ones I fail to communicate with from the esp32 board). Hope you can advise

And one other question. Just logically thinking, if I shortcut rx and tx pins on the esp32 board, would that just send any sent messages back to the device? Never tried something like this, but theoretically it should work? Are there any drawbacks like burning the device down or making the pins unusable? The goal is to test the code I’m using and the hardware are actually sending the data out and are capable of reading from it so it’s out of the equation and it’s the air780 which doesn’t respond as it should. Any suggestion before I burn it down? :slight_smile:

Hi there,

So , Did you try the App they have in the Add you listed…?(red Arrows)

You don’t mention it if so? partly why I think maybe slow it down and interpret the results and next steps to take.
Do you have a SIM card ? and please answer the questions or your not going to get very far.
Don’t do the USB thing , for one Your not using that way , as Per your goal Statement
Use the TX and RX with a serial to usb device (emulates what you do with a Xiao connected later ) Establish a connection with it and the PC and get the “OK” response from the “AT” command. (pass/Fail) means that does it work or not? no point in going further or hypothesizing stuff. The Serial port is what you need ,So start with that first Use the first one, as the other side is a mirror, the third is “LOGGING port” it’s spitting logs for Diagnostics etc. don’t use that one, it’s output ONLY.
If you read the pins and look at the data sheet and schematics, It is easy to make conclusions about how you connect and how a Xiao would connect , not interfaces are at play, ie. I2C , SPI, etc. just a serial port uart , So Port, Baud Rate, DataBIts, StopBits are required when setting up the Xiao Serial interface. NO MACRO’s so you have to spell it out in the Begin statement :+1:

There’s more, Get that going and report back…
HTH

GL :slight_smile: PJ :v:

PS. I could just do it for you; I will tell you it works" but this and I are more a “teach a man to fish” camp than a live Chat GPT service. :smiley: :+1:

… So if you want a one to one example as to how yours will work? LOOK no further than the Xiao ESP32C3 to AIR530 GPE example thread (with code) a crafty user could easily plug that into this and make the same thing work… :v:

HTH
GL :slight_smile: PJ :v:

Here’s the similar thread FOR nRF52840:spoon: :yum:
this one also is /can be beneficial. HERE