RN42 connection by using BufferedSerial

I am trying to use Nucleo-L4R5ZI to implement the RN42 bluetooth, I only connect its TX and RX with PC10 and PC11 on Nucleo-L4R5ZI and call BufferedSerial to set it.

BufferedSerial rn42(PC_10, PC_11);

int main() {

    // RN42 baud rate
    char buf[64];

    while (1) {
        if (rn42.readable()) {

But readable() can’t return TRUE even if I continue to send bytes to RN42, how does the BufferedSerial work?


try to add \n, printf usually does not print out until new line.


The readable() method return true as soon as one or more bytes is available.

BR, Jan