Unstable USB Serial

Host A: Intel 64bit - Debian 9
Host B: RaspberryPi 3 - Rasbian Latest
Electron firmware: v0.6.2
Demonstration application provided.

I’m having issues with the USB serial port on the electron. For some reason the serial connection keeps “terminating”. The console on the host (I’ve used both screen and minicom) stops receiving messages, however the LED in the test code keeps flashing indicating the loop is still running. If I terminate and restart the host software the counter in the example application has incremented (about 1PPS) and the messages start coming through again. I’ve tried changing cables, USB ports and host devices and the same behaviour is seen across all of them. I have not changed the firmware version yet. I do have another electron and will try that one as well.

Any ideas?

<EDIT
In addition to the above, the serial connection becomes even more unstable when using TCP sockets or interrogating cellular information (eg towers/rssi/location of connected tower/etc) using CellularHelpers library. This may or may not be related.
EDIT>

In short:

  1. 1 PPS message with counter and LED blinking
  2. Electron stops sending data
  3. Restarting host software starts receiving data again - gap in counter
  4. Time between breaks varies from as little as 5 pulses to ~500 pulses (and possibly longer)
#include "particle.h"

int counter = 0;

void delayWithProcessing(int msec)
{
    for(int i = 0; i < msec / 10; i++)
    {
        delay(10);
        Particle.process();
    }
}

void setup()
{
    Serial.begin(115200);
    
    // wait for user to connect serial + press enter
    while(!Serial.available()) Particle.process();
    
    pinMode(D7, OUTPUT);
    digitalWrite(D7, LOW);
}

void loop()
{
    Serial.print("hello = ");
    Serial.println(counter++);
    
    // flash the led so user knows loop is still working
    digitalWrite(D7, HIGH);
    delayWithProcessing(500);
    digitalWrite(D7, LOW);
    delayWithProcessing(500);
}