Serial Monitor Only Works for ~10secs on Linux

Status
Not open for further replies.

gtrmstr53

Member
Hi there,

I'm new to Teensy/Arduino, and am still trying to get everything setup correctly. I've run into an issue with the serial communications with both a Teensy 3.2 and a 3.6, where the serial monitor for the Arduino IDE will only print serial messages for about 10 seconds, and then it will stop. Additionally, during that ~10 seconds the Arduino serial monitor will often drop messages that it should be receiving. If I unplug and replug in the Teensy, the serial monitor will print another ~10 seconds worth of serial messages. After some troubleshooting (details below), I think my problem has something to do with how Linux is handling serial communications on my machine, and that's put me a fair degree out of my depth. If anyone can give me some pointers on what topics to google or what pages in the Arch wiki to comb through that would be a huge help. Or, if anyone else has had this sort of problem and knows the fix, that would be amazing too!

This problem has been cropping up regardless of what code I upload to my Teensy. But as a simple example, the serial monitor looks like the attached image when I edit the generic Blink example to include two Serial.println commands:

int led = 13;
void setup() {
pinMode(led, OUTPUT);
}

void loop() {
digitalWrite(led, HIGH);
Serial.println("Light On");
delay(1000);
digitalWrite(led, LOW);
Serial.println("Light Off");
delay(1000);
}

I left the Teensy running, and although the LED continued to blink the serial monitor didn't print any more messages after the last one in the attached image.

Hardware-wise, I'm working on a Dell XPS 13 laptop running Manjaro (Arch-based) Linux, using kernel version 4.19.20-1. I'm using my Teensys with a 1010music Euroshield (https://1010music.com/product/euroshield1), which is a shield designed to work with the Teensy audio library. I have one Teensy plugged into the Euroshield at a time, and a USB cable connecting the Teensy to my computer. Let me know if there's any other info you can use about my hardware setup.

As for the troubleshooting I've done so far, I don't think my problem has anything to do with my Teensys or the Euroshield because I've been able to set up the Arduino IDE on a MacBook Air running macOS, and the serial monitor is running perfectly with both my Teensy 3.2 and 3.6. Also, I tried using tytools (https://github.com/Koromix/tytools) instead of Arduino IDE on my Linux laptop and still getting the same sort of problem, which leads me to believe it's not my Arduino install but something about Linux more generally.

Again, any pointers on what might be causing this would be a huge help. Thanks!

-Thomas
 

Attachments

  • Serial Monitor.png
    Serial Monitor.png
    58 KB · Views: 83
Have you tried to use "minicom" or other serial terminal software to rule out issues with your IDE and Manjaro? Also try to run dmesg as root to see if there are any relevant log output.
 
Also keep an eye out for that pesky Gnome Modem Manager, or Network Manager.

The udev rules are supposed to tell Modem Manager that Teensy isn't a modem. But if you don't have the udev rules installed properly, or something is broken (Gentoo & Arch have a long history of broken installs), or if there's another new bug in Modem Manager (many years ago these bugs reappeared every few versions)... then Modem Manager might be interfering.
 
Thanks for the pointers! It'll probably be a few days before I can sit down and test them all out, but it's great to have some directions to start exploring. I'll report back if/when I learn more.

Best!
 
Status
Not open for further replies.
Back
Top