I found a partial (or maybe permanent) solution, but the issue is as follows:
I have used Teensy 3.6, Ubuntu 18.04 with TyCommander from TyTools, Visual Studio Code and PlatformIO extension with Teensyduino 1.44. I used TyCommander as serial monitor, bootloader/reset tool. And there were no problems or maybe I did not experience them.
I run that program during tests with delay(10) instead of delayMicroseconds(200):
However, since (I'm not 100% sure) I upgraded Ubuntu to 18.10 version I have problems with uploading software, hanging USB connection when reading data in serial monitor or it plot only countable number of lines. TyCommander was reporting with something like system info "resource busy" when trying to reset or use TyCommander monitor. The problem was partially solved by changing Teensy USB features from Serial to Serial MIDI. But there were some minor problems. However, on Windows the same program (I just switched to Windows and run Serial Monitor) there weren't any problems.
Then I reinstall Ubuntu back to 18.04, and everything works as expecteded (PlatformIO, Teensyduino 1.45), but I have to use USB Serial MIDI feature (or probably *any other than Serial feature), on PlatformIO (in platformio.ino file) I'm using
And then serial monitor on Arduino IDE/TyCommander/my Qt app works without problems. When I change USB feature to USB Serial (on PlatformIO it is default ) the connection is hanging or I get only countable number of lines in serial monitor and then the connection is hanging as well the TyCommander / Arduino Serial Monitor is hanging and Teensy is not responding (I have to unplug/plug it).
I can see now, that sometimes increasing the delay time and using USB Serial feature make it possible to read data from Teensy but it is not realiable.
I'm guesing that this is the OS related problem. Am I right or I'm missing something?
I have used Teensy 3.6, Ubuntu 18.04 with TyCommander from TyTools, Visual Studio Code and PlatformIO extension with Teensyduino 1.44. I used TyCommander as serial monitor, bootloader/reset tool. And there were no problems or maybe I did not experience them.
I run that program during tests with delay(10) instead of delayMicroseconds(200):
Code:
#include <Arduino.h>
void setup()
{
Serial.begin(9600);
pinMode(LED_BUILTIN, OUTPUT);
}
void loop()
{
digitalWriteFast(LED_BUILTIN, !digitalReadFast(LED_BUILTIN));
if (Serial.availableForWrite())
{
Serial.println(millis());
}
delayMicroseconds(200);
}
However, since (I'm not 100% sure) I upgraded Ubuntu to 18.10 version I have problems with uploading software, hanging USB connection when reading data in serial monitor or it plot only countable number of lines. TyCommander was reporting with something like system info "resource busy" when trying to reset or use TyCommander monitor. The problem was partially solved by changing Teensy USB features from Serial to Serial MIDI. But there were some minor problems. However, on Windows the same program (I just switched to Windows and run Serial Monitor) there weren't any problems.
Then I reinstall Ubuntu back to 18.04, and everything works as expecteded (PlatformIO, Teensyduino 1.45), but I have to use USB Serial MIDI feature (or probably *any other than Serial feature), on PlatformIO (in platformio.ino file) I'm using
Code:
build_flags = -D USB_MIDI_SERIAL
I can see now, that sometimes increasing the delay time and using USB Serial feature make it possible to read data from Teensy but it is not realiable.
I'm guesing that this is the OS related problem. Am I right or I'm missing something?
Last edited: