Unable to send AT commands to a JDY-40
Posted: 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:
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:
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:
(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:
but none of this worked. The datasheet says
Thanks!
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()));
}
Please let me know if you see something wrong:
In the JDY-40 datasheet it says:
that's why I connected that pin to GPIO13 and added to my setup():PIN 12, SET: "AT command switching pin (low level AT instruction, high level transparent transmission)"
Code: Select all
pinMode(13, OUTPUT);
digitalWrite(13, LOW);
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");
I have tried:
Code: Select all
Serial2.write("AT\r");
Serial2.write("AT\r\n");
Serial2.print("AT\r");
Serial2.print("AT\r\n");
Any suggestion?"In particular, the JDY-40 module sends the AT instruction need to end the symbol \r\n"
Thanks!