The library code:
void SoftwareSerial::setTX(uint8_t tx)
{
pinMode(tx, OUTPUT);
digitalWrite(tx, HIGH);
...
void SoftwareSerial::setRX(uint8_t rx)
{
pinMode(rx, INPUT);
if (!_inverse_logic)
digitalWrite(rx, HIGH); // pullup for normal logic!
This is leading to a long high pulse on the tx pin which causes my receiving device (a barcode scanner) to hang immediately. A workaround is to do this in my code:
SoftwareSerial barcode = SoftwareSerial(/*rx*/ 3, /*tx*/ 2, /*inverse*/ true);
barcode.begin(1200);
digitalWrite(2, 0);
In my opinion, the library should have the same conditional in setTX as it does in setRX.