Teensy Intermittent USB Serial Communication

Status
Not open for further replies.

Eblanken

New member
I am having some trouble with serial communications both on a 3.6 and an LC while running macOS Sierra 10.12.4.

I am only receiving a few print statements at a time, even with a long delay. I originally suspected that something in my main project code was interfering with the USB connection, but even running a simple script with either board isolated on a breadboard has not resolved the problem.

I am sure that this is an issue with my machine, but I do not know how to resolve the issue. I read a few other posts with similar concerns but these were for other systems.

This is my code:

Code:
void setup() {
  Serial.begin(9600);
  Serial.println("Starting");
}

void loop() {
  int x = 0;
  while(true) {
    Serial.println(x++);
    delay(1000);
  }
}

With a sample serial output:
Screen Shot 2018-01-20 at 10.19.13 PM.jpg

This was all done with Teensyduino 1.41 (Arduino IDE).

Please let me know if any additional information would be helpful.

Thanks!
 
We’ve been hearing of this problem on some Macs since El Capitan. So far I can’t reproduce it here and nobody knows why it happens.

As a first step, try setting Tools > USB Type to RawHID, the upload. That will use your Macs HID driver instead of serial.
 
using while(true) prevents exiting loop. I'm completely guessing here, but maybe that inhibits something important that usually happens between loops?
 
I'm completely guessing here, but maybe that inhibits something important that usually happens between loops?

Oh how I wish it were that simple! Just tested this on Linux and Mac (10.13.2). It works perfectly.

sc.png

Same thing we've seen several times now... it's rare but some Macs seem to be missing some of the incoming data. It works perfectly on the 3 Macs I have here, running High Sierra, El Capitan, and Lion. I really want to find a way to reproduce this rare problem, but it seems very elusive.

As you can see in that thread, running other software like screen seems to work. It's definitely not a problem on Teensy, not a hardware issue, and drivers seem to be ok. Seems like some sort of issue between the Arduino software and a very small percentage of Macintosh systems.

I have poured a lot of time & effort into this problem, and so far I'm totally stumped. I'm completely out of ideas, and sadly I just don't have the Java skills (nor the dev time) to dig into the JSSC library.
 
Had a similar problem about one year ago. It was a specific USB modem driver with an unsigned kernel extension which I had installed long time ago for a specific job and which interfered with USB serial. After removing that kext file, things worked normally again. Thus, I'd go first into the network settings of that Mac and remove all unnecessarily configured modems. In a second step, look under About my Mac, system configuration, software, extensions if there are still driver cadavers.
 
If you do find a stray driver or modem config, please make a screenshot (cmd-shift-3) before removing it. If that really does solve the problem, please please please share the screenshot (probably 1 of many attempts) which mattered.

This Mac serial issue has been with us for some time. Anyone who can definitively figure out what causes it will be a hero!
 
Unfortunately, I didn’t document things when that problem happened to me. I also did not think of bothering Paul or these forums, because it was clear to me that the problem was my Mac, knowing that others had not the same problem. Thus I remained silent and cleaned my Mac successfully from this modem stuff.
 
Status
Not open for further replies.
Back
Top