Could you be a bit more specific, please?
Have you tried the communication separately with PC terminal SW? PSoC <> PC and ESP <> PC? Do the modules share the same power supply or at least a common ground?
Also, different ESP8266 come with different firmwares and bugs. I personally had a bad experience and would buy some solid wireless module with the manufacturer's support.
Thank you for replying.
Yes, I checked PSoC<>PC and ESP<>PC on TeraTerm. Both are working.
The PSoC is set at 3.3V and ESP through PC.
The data gets transmitted but only partially.
Could you share your archived project and attach a screen shot of the terminal, what is sent and what not?
You say PSoC<>PC sends all bytes, but PSoC<>ESP doesn't send everything?
Can you please post your complete project so that we all can have a look at all of your settings. To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.
Are you using the Arduino IDE for the ESP8266?
I have achieved bidirectional (PSoC 4 <-> ESP8266) communication using the Arduino IDE to program the ESP8266.
From the side of PSoC, I used sprintf() to make my sequence a string, and then i sent it to ESP using UART_UARTPutString() .
For example, I have a variable char str and I use in my main:
sprintf(str, "%1.5lf", 3.14);
From the ESP side, I created this scetch that reads incoming messages:
while (Serial.available () > 0)
processIncomingByte (Serial.read ());
void processIncomingByte (const byte inByte)
static char input_line [MAX_INPUT];
static unsigned int input_pos = 0;
case '\n': // end of text
input_line [input_pos] = 0; // terminating null byte
// terminator reached! process input_line here ...
// reset buffer for next time
input_pos = 0;
case '\r': // discard carriage return
// keep adding if not full ... allow for terminating null byte
if (input_pos < (MAX_INPUT - 1))
input_line [input_pos++] = inByte;
} // end of switch
} // end of processIncomingByte
void process_data (const char * data)
} // end of process_data
When I get odd behavior using sprintf() or scanf() I would increase the heap size. Also check the size of your input/output buffer and any string arrays you are using to make sure they are at least a few bytes bigger than you need. I don't know how many times I have seen people use exactly the same size buffer as the length of the string forgetting about the terminating zero. When your string exceeds the size of the array, weird things can happen depending on the order of your defined variaibles, and it may even almost work for a while.
Sorry if the above suggestions seem too trivial, but when things don't make sense I start looking for the simplest of mistakes. Often I even get too stubborn to look for them and waste time.
Thank you everyone for taking time and replying to the question.
The issue is resolved.
I didn't use any ISR for the code.
I did something like this:
x = UART_UartGetChar();
InBuffer = x;
UART rx-tx buzzer size increased to 100 and nothing else changed in the UART SCB Block.