Unable to send AT commands to a JDY-40

LuigiMacedonia
Posts: 3
Joined: Tue Nov 09, 2021 11:21 am

Unable to send AT commands to a JDY-40

Postby LuigiMacedonia » Tue Nov 09, 2021 11:45 am

Hi!

I am new in this esp32 universe.

I am trying to replicate a remote control with a esp32. I disassembled it, and found a JDY-40 chip inside.

Got one, and connected to the esp32. The JDY is able to read the commands sent by the remote:

Code: Select all

while (Serial2.available()) {
    Serial.print(char(Serial2.read()));
}
but if I try to write the same to the serial, the device don't get it. Probably I need to set some extra parameters with AT commands, but it looks like I am unable to send AT commands to the JDY.

Please let me know if you see something wrong:

In the JDY-40 datasheet it says:
PIN 12, SET: "AT command switching pin (low level AT instruction, high level transparent transmission)"
that's why I connected that pin to GPIO13 and added to my setup():

Code: Select all

pinMode(13, OUTPUT);
digitalWrite(13, LOW);
is it correct??

Later, I tried sending AT commands like "AT+BAUD", "AT+RFID", etc (valid commands to query current params, as seen on the datasheet), but nothing responded.

So I tried "blind" setting the baudrate:

Code: Select all

  Serial2.begin(9600, SERIAL_7N1, RXD2, TXD2);
  Serial2.print("AT+BAUD=6\r\n");
(note that the 2nd line tries to override the communication speed to 19200 bauds so I start getting garbage while reading the remote, but it doesn't affect it at all)

I have tried:

Code: Select all

Serial2.write("AT\r");
Serial2.write("AT\r\n");
Serial2.print("AT\r");
Serial2.print("AT\r\n");
but none of this worked. The datasheet says
"In particular, the JDY-40 module sends the AT instruction need to end the symbol \r\n"
Any suggestion?

Thanks!

Who is online

Users browsing this forum: No registered users and 68 guests