There are situations that you need more UART. Or you don’t have any UART ports.
This might help.
Here is an implementation of a software serial. It should work at lower baudrates better than higher.
Note:
No software serial will work perfectly due to many limitations.
1-I tried to use interrupter. It didn’t work for me.
2-I tried multi-threading : This will never work since scheduling of mbed is based on 1ms. This is a huge time relatively to what serial communication require.
3-As for the arudino soft serial library, this works only at one direction at the time. Either sending or receiving.
It is more critical to receive than send.
Try the library, any suggestion will be appreciated. please make a PR and I will look at it.
hope you find it useful.