Two Nucleo F446RE Bidirectional Serial Communication via TX and RX

Hello everyone, I want to communicate two nucleo F446RE using serial communication, however I can’t use the solution of this post (Two Nucleo Serial Communication via TX and RX and vice versa) to achieve that since in the master board I am using the deprecated Serial class (Using a version above Mbed-os 6) and in the slave board I’m using the BufferedSerial class (Using Mbed 6) which no longer has the putc and getc. I am using the Mbed Online Compiler and for some reason, I can’t use the Serial.write() function even though I am using it the right way (I found in another post that there is a problem with the Online Compiler using this function but couldn’t find the URL to post it here).

I would like to know the best way to achieve such communication. Any ideas or help would be highly appreciated!! Thanks a lot!!

You might find my post on how to use I/O streams in Mbed 6 useful: Hitchhiker's Guide to Printf in Mbed 6