EA, Wookey,
Thank you for your continuing support. You might have seen that I also started a
new thread, describing plan B (1-wire shared with ethernet LAN in one cable).
So, tonight I did a slightly larger and more structured experiment (EA, I agree, an oscilloscope would be a very useful addition to the toolkit.)
As before, I set-up both serial ports identical, all parameters to "-" (minus), except for cs8 hupcl cread clocal.
Then I created two files, and filled one with 0x00, the other with 0xFF, and put a string of ascii charcters "1234567890" at the end.
"sz" is not available on OpenWRT (well, couldn't find it), so I used "dd" to copy each file to /dev/ttyS0
I have two level-shifters. One is a Nokia DLR-3P cable, which as far as I know uses a MAX3232 chip, and the other is a home-made PCB with a MAX232 and a 7805 to provide the 5V supply.
I tested several speed settings, 2400, 4800, 9600, 19200, 38400, and 115200 baud.
For each cable + speed setting, I sent each of the two files 10 times from the router, and recorded what was received on the desktop.
Results
1) At speeds of 19200 baud and above, the result is independent of any of the other parameters: of the "1234567890" string, the trailing "0" was always missing.
2) For 2400 and 4800 baud, the home-made level-shifter worked reliably, whereas the DLR-3P had a failure rate of about 10 to 20%. These failures are always of the type "123
4467890". Notably, the wrong number was always too low, i.e. "1234467890", but never "1244567890". There were a few occasions were the last "0" was read as a "9", though. (bit pattern: "9" : 00111001, "0" : 00110000 ) and "77" instead of "78" (bit pattern: "7" : 00110111, "8" : 00111000), so it doesn't look like single bit mis-reading.
3) 9600 baud shows the same error pattern as 2400 and 4800baud, with very occasionally the leading "1" missing. 100% error rate for DLR-3P cable, and maybe 80% for the home-made PCB.
4) There is very little difference between the two files.
Klaus