How to use
SoftwareSerial.Write without blocking if buffer is full?
Serial.write blocks if the buffer is full. So I need to check
Serial.availableforwrite before calling write to prevent blocking. But there is no
SoftwareSerial.availableforwrite. How can I use
SoftwareSerial.Write without blocking?
How to use
In short, you don't.
This means a call to SoftwareSerial's write simply will block until all of the data you've tried to send has in fact been sent. If you can't afford to wait for your data to go out on the TX line now, then it's up to you to send it later when you can afford to wait.
SoftwareSerial has no flow control. When you write(), the data is sent out on the TX pin regardless of whether anything is present on the other side of the connection. And when present, the data is still transmitted regardless of whether other side considers itself "ready" to receive. There's simply no feedback from the receiver to tell the sender to stop. So SoftwareSerial itself will never block owing to these things.