• Hi @Gordon Looks like with the latest build, software serial is significantly worse than it was for the Espruino Wifi (haven't tested other boards).

    Did some testing before updating, the software serial did lose / CRC error-ed about 15-20% of the 32 byte packets sent by the PMS sensor. But was working.
    With the latest build, my previous PMS driver doesn't work at all with soft-serial. Still works with HW serial tho.

    Here is the simplest test code that shows the issue:

    Serial1.setup(9600, {rx: B7, tx: B6});
    Serial1.on('data', function(d){ print("H", d); });
    
    s3 = new Serial();
    s3.setup(9600, {rx: A5});
    s3.on('data', function(d){ print("s", d); });
    
    // send some data
    setInterval(function() { Serial1.println('abcd'); }, 500)
    

    I use A5 as the software serial RX, I think there is nothing special about this pin. Right?

    Connect B6 (hw tx) to either B7 or A5, or to both at the same time. I had to ground the A5 pin when not in use, as it was picking up some noise.

    2v01 official build:
    Everything (tx -> hw rx; tx -> sw rx; tx -> hw and sw rx) works if the "packet" is short, like 'abcd'.
    If I send 'PM1234567890ABCDEFGHIJKLMNOPQRST', hw serial is perfect. Software serial fails most of the time, I guess because the sample that prints each character to the USB console.

    Latest (33941e) build:
    HW serial works as expected
    SW serial is not reliable even for short messages :/ Some bytes are ok, but usually receives wrong character, occasionally receives more characters than sent. Even for short messages.

    Back to 2v01 official: SW serial back to "normal".

About

Avatar for AkosLukacs @AkosLukacs started