Hi!
Recently (past week), I have been _consistently_ (3 separate machines) observing problems with Serial communication over USB on Ubuntu 18.04. My sketch is below, and have tested each computer using a fresh install of Arduino 1.8.13 and Teensyduino 1.53, and have also copied the udev rules, and apt purged modemmanager. I have obtained the same results using a Teensy 3.2 and 3.6.
The issue is that when I run the following code to just print out one number per millisecond, I get 481 to 569 printed out, and then the data stops.
If I unplug the teensy and replug it (or otherwise reboot it), I get a variable number of lines but it typically starts and stops in the 400 and 500 millisecond range.
I have modified the code to say blink when touchRead(0) exceeds a value; this continues to happen, demonstrating that at least my code is still running even when the serial stops.
Additionally, I run into the same issue using pyserial, suggesting this is a serial port related issue.
In my minimal experimentation on other systems, I have not observed this issue on windows.
Is anyone aware of any recent Ubuntu updates, changes to the udev rules, or other changes that might explain this behavior? In the past I've never had these issues, although my Teensy-related work has been minimal over the last two months or so, so I'm hardpressed to pinpoint exactly when this change happened other than within the last couple months.
Any help would be very very much appreciated!!
Recently (past week), I have been _consistently_ (3 separate machines) observing problems with Serial communication over USB on Ubuntu 18.04. My sketch is below, and have tested each computer using a fresh install of Arduino 1.8.13 and Teensyduino 1.53, and have also copied the udev rules, and apt purged modemmanager. I have obtained the same results using a Teensy 3.2 and 3.6.
The issue is that when I run the following code to just print out one number per millisecond, I get 481 to 569 printed out, and then the data stops.
Code:
void setup() {
Serial.begin(115200);
}
void loop() {
Serial.println(millis());
delay(1);
}
If I unplug the teensy and replug it (or otherwise reboot it), I get a variable number of lines but it typically starts and stops in the 400 and 500 millisecond range.
I have modified the code to say blink when touchRead(0) exceeds a value; this continues to happen, demonstrating that at least my code is still running even when the serial stops.
Additionally, I run into the same issue using pyserial, suggesting this is a serial port related issue.
In my minimal experimentation on other systems, I have not observed this issue on windows.
Is anyone aware of any recent Ubuntu updates, changes to the udev rules, or other changes that might explain this behavior? In the past I've never had these issues, although my Teensy-related work has been minimal over the last two months or so, so I'm hardpressed to pinpoint exactly when this change happened other than within the last couple months.
Any help would be very very much appreciated!!