Sending AT commands to configure JDY-40 using ESP8266 NodeMCU

So, title basically says it, but i'm facing with one issue. i can only see 'START' in the therminal when i reset the JDY-40. Not responding to AT commands. CS and SET is pulled LOW, here's the wiring;

VCC -> 3v3
GND -> GND
SET -> GND
CS -> GND
TX -> D1
RX -> D2

Using softwareserial for the TX,RX.

what am i doing wrong?

Hi, @arteuspw

Code?

Thanks.. Tom... :smiley: :+1: :coffee: :australia:

Hey Tom, here is my code.

#include <SoftwareSerial.h>

#define SS_TX 6
#define SS_RX 5

SoftwareSerial SOFTSerial(SS_RX, SS_TX);

void setup()
{
    delay(2000);
    Serial.begin(115200);
    Serial.println("Setup started");

    SOFTSerial.begin(9600);

    delay(100);

    SOFTSerial.write("AT+CLSS\r\n");
    delay(250);
    while (SOFTSerial.available()) {
        Serial.write(SOFTSerial.read());
    }

    SOFTSerial.write("AT+BAUD\r\n");
    delay(250);
    while (SOFTSerial.available()) {
        Serial.write(SOFTSerial.read());
    }
    delay(100);
}

void loop()
{
    SOFTSerial.write("AT+BAUDr\n");
    SOFTSerial.write("AT+BAUD");
    SOFTSerial.write(Serial.read());
    while (SOFTSerial.available()) {
        Serial.write(SOFTSerial.read());
    }
}

I do not have a JDY-40, but does the device need a [edit]"password" "pairing" number? Like: 123456.

All I can offer is a user document:

No, it doesn't, i already watched and read all sources on the net, im guessing this is not something to do with JDY but ESP, i basically cant send anything or get back anything in return

I should have written "pairing number"... sorry.

Hi, @arteuspw
Are you connected to the correct software serial pins?
Have you tried swapping TX and RX incase you are the wrong way round?

Tom.. :smiley: :+1: :coffee: :australia:

TX and RX is correct, otherwise i wouldnt get START too.

If by "START" you are referring to this message, that will be printed regardless of whether the BT module is connected.

Serial.println("Setup started");

No. JDY-40 sends START via Software serial when i replug it.

How odd! That doesn't seem to be documented in the datasheet/manual linked in post #4.

Do you have a link to a better one? For example, it may be that the line endings you are using with AT transmissions are not correct for the model you have.

I tried all line endings.

Try you code with the JDY disconnected.
See if you get the start.

Tom... :smiley: :+1: :coffee: :australia:

I don't. i am sure it comes from JDY.

@b707 hey! it's me again; can you take a look at this when you have some time?

How do you "reset" the module?
I just got mine out of the box - it doesn't say "START" when it turns on.

JDY-40 is operating on 3v3... does the serial comms need a level shifter to raise the JDY up to 5v, and lower the ESP8266 down to 3v3? (both ways, or one or the other?)

I sure would like to see the "START" happening.

Hi, @arteuspw

Do you have a DMM? (Digital MultiMeter)

Can you post some images of your project?
So we can see your component layout.

Thanks.. Tom.. :smiley: :+1: :coffee: :australia:

the same as ESP8266

1 Like

By reset, i mean power cycling it.