no serial port name defined

Status
Not open for further replies.

wolfv

Well-known member
This is my first attempt at using Serial.print() on Linux.
This sketch compiles and uploads, but when I click on the "Serial Monitor" button, error message says, "no serial port name defined".
From the Aduino IDE menu, Serial ports is dimmed
Tools > USB Type: Serial
Tools > Port > Serial ports (dimmed)

Do I need to set something on Linux to use Serial ports?:confused:
I am using Arduino 1.6.5 Teensyduino 1.24 on fedora 22.

Code:
void setup()
{                
  delay(1000);
  Serial.begin (115200);
  Serial.println ("in setup()");
}

void loop()
{
    Serial.println ("test ");
    delay(1000);
}

Code:
Arduino: 1.6.5 (Linux), TD: 1.24, Board: "Teensy 2.0, Serial, 16 MHz, US English"

Build options changed, rebuilding all

/home/wolfv/Downloads/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-g++ -c -Os -g -Wall -ffunction-sections -fdata-sections -MMD -fno-exceptions -felide-constructors -std=c++0x -mmcu=atmega32u4 -DTEENSYDUINO=124 -DARDUINO=10605 -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/wolfv/Downloads/arduino-1.6.5/hardware/teensy/avr/cores/teensy /tmp/build4676105813708626320.tmp/serial.cpp -o /tmp/build4676105813708626320.tmp/serial.cpp.o 
/home/wolfv/Downloads/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-gcc -c -Os -g -Wall -ffunction-sections -fdata-sections -MMD -mmcu=atmega32u4 -DTEENSYDUINO=124 -DARDUINO=10605 -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/wolfv/Downloads/arduino-1.6.5/hardware/teensy/avr/cores/teensy /home/wolfv/Downloads/arduino-1.6.5/hardware/teensy/avr/cores/teensy/keylayouts.c -o /tmp/build4676105813708626320.tmp/keylayouts.c.o 
/home/wolfv/Downloads/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-gcc -c -Os -g -Wall -ffunction-sections -fdata-sections -MMD -mmcu=atmega32u4 -DTEENSYDUINO=124 -DARDUINO=10605 -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/wolfv/Downloads/arduino-1.6.5/hardware/teensy/avr/cores/teensy /home/wolfv/Downloads/arduino-1.6.5/hardware/teensy/avr/cores/teensy/pins_teensy.c -o /tmp/build4676105813708626320.tmp/pins_teensy.c.o 
/home/wolfv/Downloads/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-gcc -c -Os -g -Wall -ffunction-sections -fdata-sections -MMD -mmcu=atmega32u4 -DTEENSYDUINO=124 -DARDUINO=10605 -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/wolfv/Downloads/arduino-1.6.5/hardware/teensy/avr/cores/teensy /home/wolfv/Downloads/arduino-1.6.5/hardware/teensy/avr/cores/teensy/WInterrupts.c -o /tmp/build4676105813708626320.tmp/WInterrupts.c.o 
/home/wolfv/Downloads/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-gcc -c -Os -g -Wall -ffunction-sections -fdata-sections -MMD -mmcu=atmega32u4 -DTEENSYDUINO=124 -DARDUINO=10605 -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/wolfv/Downloads/arduino-1.6.5/hardware/teensy/avr/cores/teensy /home/wolfv/Downloads/arduino-1.6.5/hardware/teensy/avr/cores/teensy/usb.c -o /tmp/build4676105813708626320.tmp/usb.c.o 
/home/wolfv/Downloads/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-gcc -c -Os -g -Wall -ffunction-sections -fdata-sections -MMD -mmcu=atmega32u4 -DTEENSYDUINO=124 -DARDUINO=10605 -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/wolfv/Downloads/arduino-1.6.5/hardware/teensy/avr/cores/teensy /home/wolfv/Downloads/arduino-1.6.5/hardware/teensy/avr/cores/teensy/wiring.c -o /tmp/build4676105813708626320.tmp/wiring.c.o 
/home/wolfv/Downloads/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-gcc -c -Os -g -Wall -ffunction-sections -fdata-sections -MMD -mmcu=atmega32u4 -DTEENSYDUINO=124 -DARDUINO=10605 -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/wolfv/Downloads/arduino-1.6.5/hardware/teensy/avr/cores/teensy /home/wolfv/Downloads/arduino-1.6.5/hardware/teensy/avr/cores/teensy/malloc.c -o /tmp/build4676105813708626320.tmp/malloc.c.o 
/home/wolfv/Downloads/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-g++ -c -Os -g -Wall -ffunction-sections -fdata-sections -MMD -fno-exceptions -felide-constructors -std=c++0x -mmcu=atmega32u4 -DTEENSYDUINO=124 -DARDUINO=10605 -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/wolfv/Downloads/arduino-1.6.5/hardware/teensy/avr/cores/teensy /home/wolfv/Downloads/arduino-1.6.5/hardware/teensy/avr/cores/teensy/main.cpp -o /tmp/build4676105813708626320.tmp/main.cpp.o 
/home/wolfv/Downloads/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-g++ -c -Os -g -Wall -ffunction-sections -fdata-sections -MMD -fno-exceptions -felide-constructors -std=c++0x -mmcu=atmega32u4 -DTEENSYDUINO=124 -DARDUINO=10605 -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/wolfv/Downloads/arduino-1.6.5/hardware/teensy/avr/cores/teensy /home/wolfv/Downloads/arduino-1.6.5/hardware/teensy/avr/cores/teensy/WString.cpp -o /tmp/build4676105813708626320.tmp/WString.cpp.o 
/home/wolfv/Downloads/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-g++ -c -Os -g -Wall -ffunction-sections -fdata-sections -MMD -fno-exceptions -felide-constructors -std=c++0x -mmcu=atmega32u4 -DTEENSYDUINO=124 -DARDUINO=10605 -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/wolfv/Downloads/arduino-1.6.5/hardware/teensy/avr/cores/teensy /home/wolfv/Downloads/arduino-1.6.5/hardware/teensy/avr/cores/teensy/IPAddress.cpp -o /tmp/build4676105813708626320.tmp/IPAddress.cpp.o 
/home/wolfv/Downloads/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-g++ -c -Os -g -Wall -ffunction-sections -fdata-sections -MMD -fno-exceptions -felide-constructors -std=c++0x -mmcu=atmega32u4 -DTEENSYDUINO=124 -DARDUINO=10605 -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/wolfv/Downloads/arduino-1.6.5/hardware/teensy/avr/cores/teensy /home/wolfv/Downloads/arduino-1.6.5/hardware/teensy/avr/cores/teensy/HardwareSerial.cpp -o /tmp/build4676105813708626320.tmp/HardwareSerial.cpp.o 
/home/wolfv/Downloads/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-g++ -c -Os -g -Wall -ffunction-sections -fdata-sections -MMD -fno-exceptions -felide-constructors -std=c++0x -mmcu=atmega32u4 -DTEENSYDUINO=124 -DARDUINO=10605 -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/wolfv/Downloads/arduino-1.6.5/hardware/teensy/avr/cores/teensy /home/wolfv/Downloads/arduino-1.6.5/hardware/teensy/avr/cores/teensy/new.cpp -o /tmp/build4676105813708626320.tmp/new.cpp.o 
/home/wolfv/Downloads/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-g++ -c -Os -g -Wall -ffunction-sections -fdata-sections -MMD -fno-exceptions -felide-constructors -std=c++0x -mmcu=atmega32u4 -DTEENSYDUINO=124 -DARDUINO=10605 -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/wolfv/Downloads/arduino-1.6.5/hardware/teensy/avr/cores/teensy /home/wolfv/Downloads/arduino-1.6.5/hardware/teensy/avr/cores/teensy/WMath.cpp -o /tmp/build4676105813708626320.tmp/WMath.cpp.o 
/home/wolfv/Downloads/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-g++ -c -Os -g -Wall -ffunction-sections -fdata-sections -MMD -fno-exceptions -felide-constructors -std=c++0x -mmcu=atmega32u4 -DTEENSYDUINO=124 -DARDUINO=10605 -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/wolfv/Downloads/arduino-1.6.5/hardware/teensy/avr/cores/teensy /home/wolfv/Downloads/arduino-1.6.5/hardware/teensy/avr/cores/teensy/usb_api.cpp -o /tmp/build4676105813708626320.tmp/usb_api.cpp.o 
/home/wolfv/Downloads/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-g++ -c -Os -g -Wall -ffunction-sections -fdata-sections -MMD -fno-exceptions -felide-constructors -std=c++0x -mmcu=atmega32u4 -DTEENSYDUINO=124 -DARDUINO=10605 -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/wolfv/Downloads/arduino-1.6.5/hardware/teensy/avr/cores/teensy /home/wolfv/Downloads/arduino-1.6.5/hardware/teensy/avr/cores/teensy/Print.cpp -o /tmp/build4676105813708626320.tmp/Print.cpp.o 
/home/wolfv/Downloads/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-g++ -c -Os -g -Wall -ffunction-sections -fdata-sections -MMD -fno-exceptions -felide-constructors -std=c++0x -mmcu=atmega32u4 -DTEENSYDUINO=124 -DARDUINO=10605 -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/wolfv/Downloads/arduino-1.6.5/hardware/teensy/avr/cores/teensy /home/wolfv/Downloads/arduino-1.6.5/hardware/teensy/avr/cores/teensy/yield.cpp -o /tmp/build4676105813708626320.tmp/yield.cpp.o 
/home/wolfv/Downloads/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-g++ -c -Os -g -Wall -ffunction-sections -fdata-sections -MMD -fno-exceptions -felide-constructors -std=c++0x -mmcu=atmega32u4 -DTEENSYDUINO=124 -DARDUINO=10605 -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/wolfv/Downloads/arduino-1.6.5/hardware/teensy/avr/cores/teensy /home/wolfv/Downloads/arduino-1.6.5/hardware/teensy/avr/cores/teensy/Stream.cpp -o /tmp/build4676105813708626320.tmp/Stream.cpp.o 
/home/wolfv/Downloads/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-g++ -c -Os -g -Wall -ffunction-sections -fdata-sections -MMD -fno-exceptions -felide-constructors -std=c++0x -mmcu=atmega32u4 -DTEENSYDUINO=124 -DARDUINO=10605 -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/wolfv/Downloads/arduino-1.6.5/hardware/teensy/avr/cores/teensy /home/wolfv/Downloads/arduino-1.6.5/hardware/teensy/avr/cores/teensy/Tone.cpp -o /tmp/build4676105813708626320.tmp/Tone.cpp.o 
/home/wolfv/Downloads/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-ar rcs /tmp/build4676105813708626320.tmp/core.a /tmp/build4676105813708626320.tmp/keylayouts.c.o 
/home/wolfv/Downloads/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-ar rcs /tmp/build4676105813708626320.tmp/core.a /tmp/build4676105813708626320.tmp/pins_teensy.c.o 
/home/wolfv/Downloads/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-ar rcs /tmp/build4676105813708626320.tmp/core.a /tmp/build4676105813708626320.tmp/WInterrupts.c.o 
/home/wolfv/Downloads/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-ar rcs /tmp/build4676105813708626320.tmp/core.a /tmp/build4676105813708626320.tmp/usb.c.o 
/home/wolfv/Downloads/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-ar rcs /tmp/build4676105813708626320.tmp/core.a /tmp/build4676105813708626320.tmp/wiring.c.o 
/home/wolfv/Downloads/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-ar rcs /tmp/build4676105813708626320.tmp/core.a /tmp/build4676105813708626320.tmp/malloc.c.o 
/home/wolfv/Downloads/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-ar rcs /tmp/build4676105813708626320.tmp/core.a /tmp/build4676105813708626320.tmp/main.cpp.o 
/home/wolfv/Downloads/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-ar rcs /tmp/build4676105813708626320.tmp/core.a /tmp/build4676105813708626320.tmp/WString.cpp.o 
/home/wolfv/Downloads/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-ar rcs /tmp/build4676105813708626320.tmp/core.a /tmp/build4676105813708626320.tmp/IPAddress.cpp.o 
/home/wolfv/Downloads/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-ar rcs /tmp/build4676105813708626320.tmp/core.a /tmp/build4676105813708626320.tmp/HardwareSerial.cpp.o 
/home/wolfv/Downloads/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-ar rcs /tmp/build4676105813708626320.tmp/core.a /tmp/build4676105813708626320.tmp/new.cpp.o 
/home/wolfv/Downloads/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-ar rcs /tmp/build4676105813708626320.tmp/core.a /tmp/build4676105813708626320.tmp/WMath.cpp.o 
/home/wolfv/Downloads/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-ar rcs /tmp/build4676105813708626320.tmp/core.a /tmp/build4676105813708626320.tmp/usb_api.cpp.o 
/home/wolfv/Downloads/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-ar rcs /tmp/build4676105813708626320.tmp/core.a /tmp/build4676105813708626320.tmp/Print.cpp.o 
/home/wolfv/Downloads/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-ar rcs /tmp/build4676105813708626320.tmp/core.a /tmp/build4676105813708626320.tmp/yield.cpp.o 
/home/wolfv/Downloads/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-ar rcs /tmp/build4676105813708626320.tmp/core.a /tmp/build4676105813708626320.tmp/Stream.cpp.o 
/home/wolfv/Downloads/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-ar rcs /tmp/build4676105813708626320.tmp/core.a /tmp/build4676105813708626320.tmp/Tone.cpp.o 
/home/wolfv/Downloads/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-gcc -Os -Wl,--gc-sections,--relax -mmcu=atmega32u4 -o /tmp/build4676105813708626320.tmp/serial.cpp.elf /tmp/build4676105813708626320.tmp/serial.cpp.o /tmp/build4676105813708626320.tmp/core.a -L/tmp/build4676105813708626320.tmp -lm 
/home/wolfv/Downloads/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-objcopy -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 /tmp/build4676105813708626320.tmp/serial.cpp.elf /tmp/build4676105813708626320.tmp/serial.cpp.eep 
/home/wolfv/Downloads/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-objcopy -O ihex -R .eeprom /tmp/build4676105813708626320.tmp/serial.cpp.elf /tmp/build4676105813708626320.tmp/serial.cpp.hex 
/home/wolfv/Downloads/arduino-1.6.5/hardware/tools/teensy_post_compile -file=serial.cpp -path=/tmp/build4676105813708626320.tmp -tools=/home/wolfv/Downloads/arduino-1.6.5/hardware/tools -board=TEENSY2 

Sketch uses 3,248 bytes (10%) of program storage space. Maximum is 32,256 bytes.
Global variables use 65 bytes (2%) of dynamic memory, leaving 2,495 bytes for local variables. Maximum is 2,560 bytes.
no serial port name defined

Thank you.
 
Where is this "drop down box" you speak of?
I click the "Serial Monitor" button on the top-right (magnifying glass icon) of the Arduino IDE, but the Serial port does not open.

I already have the udev rules installed. Blink compiles and runs successfully.
I read the serial and Linux tips under "Known Issues". No joy.
 
Hi MichaelMeissner,

I found the dropdown on the top-right, under the magnifying glass icon.
I click "serial" in the dropdown, and then click the "Serial Monitor" button.
The error message still says, "no serial port name defined".
"Serial ports" is still dimmed in the Aduino IDE menu.
Tools > Port > Serial ports (dimmed)

Should the serial port be defined in Linux or defined in Arduino IDE?

Thank you.
 
Last edited:
Sorry, when I wrote the previous, I was at work, and I didn't have access to the IDE.

It is under the tools menu:
Tools -> USB Type -> Serial

Then you need to select which Serial port:
Tools -> Port -> /dev/ttyACM0

If there is no option for Port, try rebuilding your app, and re-downloading it. On most Linux systems, the USB serial devices are /dev/ttyACM<x>. If there is still no serial port, something is preventing the USB device from being registered. I vaguely recall there were issues with pass Linux systems where the Gnome modemmanger was holding the port open after it had been closed. In those systems, I had to remove the modemmanager. This is mentioned in the trouble-shooting page (https://www.pjrc.com/teensy/troubleshoot.html).

After selecting both, you have to recompile and reload your sketch. The serial device will not appear until after the Serial.begin command (so if you have a delay of 5000, you might need to wait at least 5 seconds before trying to open the device). Modern versions of the IDE will re-attach to the serial port when the Teensy reboots.
 
Selecting Serial in the Tools > USB Type only affects what Teensy will become *after* the next upload.

You must upload a sketch to reprogram Teensy with new code, which is built using that setting. Please allow a couple seconds for Teensy to boot and your machine to detect it. The Tools > Ports menu should update a few seconds later.

On Linux, you can run "tail -f /var/log/syslog" in a terminal, to observe messages from the Linux kernel. As Teensy reboots, you should see info about USB disconnect and reconnect events, and what the kernel is actually detecting and which drivers it is loading. When things are working, those kernel messages can really help.
 
On my Fedora 22 system, neither /var/log/syslogd nor /var/log/messages are written. Instead the journalctl command can display the messages (typically using -f on a separate terminal window to watch the messages in real time).

Here is an example of what is shown, when I unplugged and re-plugged in my Teensy 3.1:
Code:
Sep 23 10:21:03 gnome-king.the-meissners.org kernel: usb 1-4.4.1: USB disconnect, device number 9
Sep 23 10:21:03 gnome-king.the-meissners.org kernel: usb 1-4.4.1.4: USB disconnect, device number 24
Sep 23 10:21:03 gnome-king.the-meissners.org systemd-udevd[456]: error opening USB device 'descriptors' file
Sep 23 10:21:03 gnome-king.the-meissners.org systemd-udevd[456]: error opening USB device 'descriptors' file
Sep 23 10:21:05 gnome-king.the-meissners.org kernel: usb 1-4.4.1: new full-speed USB device number 25 using xhci_hcd
Sep 23 10:21:06 gnome-king.the-meissners.org kernel: usb 1-4.4.1: not running at top speed; connect to a high speed hub
Sep 23 10:21:06 gnome-king.the-meissners.org kernel: usb 1-4.4.1: New USB device found, idVendor=1a40, idProduct=0101
Sep 23 10:21:06 gnome-king.the-meissners.org kernel: usb 1-4.4.1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
Sep 23 10:21:06 gnome-king.the-meissners.org kernel: usb 1-4.4.1: Product: USB 2.0 Hub
Sep 23 10:21:06 gnome-king.the-meissners.org kernel: usb 1-4.4.1: ep 0x81 - rounding interval to 1024 microframes, ep desc says 2040 microframes
Sep 23 10:21:06 gnome-king.the-meissners.org kernel: hub 1-4.4.1:1.0: USB hub found
Sep 23 10:21:06 gnome-king.the-meissners.org kernel: hub 1-4.4.1:1.0: 4 ports detected
Sep 23 10:21:06 gnome-king.the-meissners.org kernel: usb 1-4.4.1.4: new full-speed USB device number 26 using xhci_hcd
Sep 23 10:21:06 gnome-king.the-meissners.org kernel: usb 1-4.4.1.4: New USB device found, idVendor=16c0, idProduct=0483
Sep 23 10:21:06 gnome-king.the-meissners.org kernel: usb 1-4.4.1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Sep 23 10:21:06 gnome-king.the-meissners.org kernel: usb 1-4.4.1.4: Product: USB Serial
Sep 23 10:21:06 gnome-king.the-meissners.org kernel: usb 1-4.4.1.4: Manufacturer: Teensyduino
Sep 23 10:21:06 gnome-king.the-meissners.org kernel: usb 1-4.4.1.4: SerialNumber: 370690
Sep 23 10:21:06 gnome-king.the-meissners.org kernel: cdc_acm 1-4.4.1.4:1.0: ttyACM0: USB ACM device
 
update

Thank you for the leads MichaelMeissner and PaulStoffrengen.
Unfortunately my "Tools -> Port-> Serial ports" menu does not update and remains dimmed.
A summary of the situation follows.

The sketch:
Code:
/*
To serial print:
    1) Tools > USB Type: Serial
    2) click "Upload" button
    3) allow a couple seconds for Teensy to boot and your machine to detect it
                 problem: "Tools -> Ports" menu does not update
    4) select Serial port: Tools -> Port -> /dev/ttyACM0
    5) click the "Serial Monitor" button on the top-right of IDE
*/
void setup()
{                
  Serial.begin (115200);
  Serial.println ("in setup()");
}

void loop()
{
    Serial.println ("test ");
    delay(1000);
}
fedora does not have a syslog, it uses systemd journal instead.
The following is from the systemd journal.
The "Upload" button was clicked at 08:27:05, but I don't know what to make of the log entries:
Code:
-- Logs begin at Sat 2011-12-31 17:00:18 MST, end at Wed 2015-09-23 08:27:07 MDT. --
Sep 23 08:27:05 localhost.localdomain alacarte-made-1.desktop[13251]: /opt/arduino-1.6.5-r5/hardware/tools/avr/bin/avr-g++ -c -Os -g -Wall -ffunction-sections -fdata-sections -MMD -fno-ex
Sep 23 08:27:05 localhost.localdomain alacarte-made-1.desktop[13251]: Using previously compiled file: /tmp/build7957175450812955120.tmp/malloc.c.o
Sep 23 08:27:05 localhost.localdomain alacarte-made-1.desktop[13251]: Using previously compiled file: /tmp/build7957175450812955120.tmp/pins_teensy.c.o
Sep 23 08:27:05 localhost.localdomain alacarte-made-1.desktop[13251]: Using previously compiled file: /tmp/build7957175450812955120.tmp/keylayouts.c.o
Sep 23 08:27:05 localhost.localdomain alacarte-made-1.desktop[13251]: Using previously compiled file: /tmp/build7957175450812955120.tmp/usb.c.o
Sep 23 08:27:05 localhost.localdomain alacarte-made-1.desktop[13251]: Using previously compiled file: /tmp/build7957175450812955120.tmp/wiring.c.o
Sep 23 08:27:05 localhost.localdomain alacarte-made-1.desktop[13251]: Using previously compiled file: /tmp/build7957175450812955120.tmp/WInterrupts.c.o
Sep 23 08:27:05 localhost.localdomain alacarte-made-1.desktop[13251]: Using previously compiled file: /tmp/build7957175450812955120.tmp/Stream.cpp.o
Sep 23 08:27:05 localhost.localdomain alacarte-made-1.desktop[13251]: Using previously compiled file: /tmp/build7957175450812955120.tmp/usb_api.cpp.o
Sep 23 08:27:05 localhost.localdomain alacarte-made-1.desktop[13251]: Using previously compiled file: /tmp/build7957175450812955120.tmp/IPAddress.cpp.o
Sep 23 08:27:05 localhost.localdomain alacarte-made-1.desktop[13251]: Using previously compiled file: /tmp/build7957175450812955120.tmp/new.cpp.o
Sep 23 08:27:05 localhost.localdomain alacarte-made-1.desktop[13251]: Using previously compiled file: /tmp/build7957175450812955120.tmp/HardwareSerial.cpp.o
Sep 23 08:27:05 localhost.localdomain alacarte-made-1.desktop[13251]: Using previously compiled file: /tmp/build7957175450812955120.tmp/WMath.cpp.o
Sep 23 08:27:05 localhost.localdomain alacarte-made-1.desktop[13251]: Using previously compiled file: /tmp/build7957175450812955120.tmp/Print.cpp.o
Sep 23 08:27:05 localhost.localdomain alacarte-made-1.desktop[13251]: Using previously compiled file: /tmp/build7957175450812955120.tmp/Tone.cpp.o
Sep 23 08:27:05 localhost.localdomain alacarte-made-1.desktop[13251]: Using previously compiled file: /tmp/build7957175450812955120.tmp/WString.cpp.o
Sep 23 08:27:05 localhost.localdomain alacarte-made-1.desktop[13251]: Using previously compiled file: /tmp/build7957175450812955120.tmp/yield.cpp.o
Sep 23 08:27:05 localhost.localdomain alacarte-made-1.desktop[13251]: Using previously compiled file: /tmp/build7957175450812955120.tmp/main.cpp.o
Sep 23 08:27:05 localhost.localdomain alacarte-made-1.desktop[13251]: Using previously compiled file: /tmp/build7957175450812955120.tmp/core.a
Sep 23 08:27:05 localhost.localdomain alacarte-made-1.desktop[13251]: /opt/arduino-1.6.5-r5/hardware/tools/avr/bin/avr-gcc -Os -Wl,--gc-sections,--relax -mmcu=atmega32u4 -o /tmp/build7957
Sep 23 08:27:05 localhost.localdomain alacarte-made-1.desktop[13251]: /opt/arduino-1.6.5-r5/hardware/tools/avr/bin/avr-objcopy -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --
Sep 23 08:27:05 localhost.localdomain alacarte-made-1.desktop[13251]: /opt/arduino-1.6.5-r5/hardware/tools/avr/bin/avr-objcopy -O ihex -R .eeprom /tmp/build7957175450812955120.tmp/serial.
Sep 23 08:27:05 localhost.localdomain alacarte-made-1.desktop[13251]: /opt/arduino-1.6.5-r5/hardware/tools/teensy_post_compile -file=serial.cpp -path=/tmp/build7957175450812955120.tmp -to
Sep 23 08:27:06 localhost.localdomain alacarte-made-1.desktop[13251]: Sketch uses 3,248 bytes (10%) of program storage space. Maximum is 32,256 bytes.
Sep 23 08:27:06 localhost.localdomain alacarte-made-1.desktop[13251]: Global variables use 65 bytes (2%) of dynamic memory, leaving 2,495 bytes for local variables. Maximum is 2,560 bytes
Sep 23 08:27:06 localhost.localdomain kernel: cdc_acm 1-1.2:1.0: failed to set dtr/rts
Sep 23 08:27:06 localhost.localdomain kernel: usb 1-1.2: USB disconnect, device number 42
Sep 23 08:27:06 localhost.localdomain systemd-udevd[540]: error opening USB device 'descriptors' file
Sep 23 08:27:06 localhost.localdomain kernel: usb 1-1.2: new full-speed USB device number 43 using ehci-pci
Sep 23 08:27:06 localhost.localdomain kernel: usb 1-1.2: New USB device found, idVendor=16c0, idProduct=0478
Sep 23 08:27:06 localhost.localdomain kernel: usb 1-1.2: New USB device strings: Mfr=0, Product=0, SerialNumber=0
Sep 23 08:27:06 localhost.localdomain kernel: hid-generic 0003:16C0:0478.012D: hidraw3: USB HID v1.11 Device [HID 16c0:0478] on usb-0000:00:1d.0-1.2/input0
Sep 23 08:27:07 localhost.localdomain kernel: usb 1-1.2: USB disconnect, device number 43
Sep 23 08:27:07 localhost.localdomain systemd-udevd[540]: error opening USB device 'descriptors' file
Sep 23 08:27:07 localhost.localdomain kernel: usb 1-1.2: new full-speed USB device number 44 using ehci-pci
Sep 23 08:27:07 localhost.localdomain kernel: usb 1-1.2: New USB device found, idVendor=16c0, idProduct=0483
Sep 23 08:27:07 localhost.localdomain kernel: usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Sep 23 08:27:07 localhost.localdomain kernel: usb 1-1.2: Product: USB Serial
Sep 23 08:27:07 localhost.localdomain kernel: usb 1-1.2: Manufacturer: Teensyduino
Sep 23 08:27:07 localhost.localdomain kernel: usb 1-1.2: SerialNumber: 12345
Sep 23 08:27:07 localhost.localdomain kernel: cdc_acm 1-1.2:1.0: ttyACM0: USB ACM device
From https://www.pjrc.com/teensy/troubleshoot.html
On Ubuntu 9.10, when using a serial device type, the kernel assigns a new number each time, /dev/ttyACM0, /dev/ttyACM1, /dev/ttyACM2, etc.
Does the following output mean that my kernel assigns the same number "ttyACM0" each time?:
Code:
$ dmesg | grep tty
[    0.000000] console [tty0] enabled
[    0.460307] serial8250: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[506069.337883] cdc_acm 1-1.2:1.0: ttyACM0: USB ACM device
[506104.922539] cdc_acm 1-1.2:1.0: ttyACM0: USB ACM device
[507237.032400] cdc_acm 1-1.2:1.0: ttyACM0: USB ACM device
[507676.194920] cdc_acm 1-1.2:1.0: ttyACM0: USB ACM device
[509003.305728] cdc_acm 1-1.2:1.0: ttyACM0: USB ACM device
[509062.935192] cdc_acm 1-1.2:1.0: ttyACM0: USB ACM device
[509093.924406] cdc_acm 1-1.2:1.0: ttyACM0: USB ACM device
[509098.759611] cdc_acm 1-1.2:1.0: ttyACM0: USB ACM device
[509528.685929] cdc_acm 1-1.2:1.0: ttyACM0: USB ACM device
[517072.584746] cdc_acm 1-1.2:1.0: ttyACM0: USB ACM device
[518022.257547] cdc_acm 1-1.2:1.0: ttyACM0: USB ACM device
[518127.179237] cdc_acm 1-1.2:1.0: ttyACM0: USB ACM device
[533803.570479] cdc_acm 1-1.2:1.0: ttyACM0: USB ACM device
[533809.482398] cdc_acm 1-1.2:1.0: ttyACM0: USB ACM device
[534004.969289] cdc_acm 1-1.2:1.0: ttyACM0: USB ACM device
[534012.672107] cdc_acm 1-1.2:1.0: ttyACM0: USB ACM device
[535275.040183] cdc_acm 1-1.2:1.0: ttyACM0: USB ACM device
[536875.230566] cdc_acm 1-1.2:1.0: ttyACM0: USB ACM device
[571620.831069] cdc_acm 1-1.2:1.0: ttyACM0: USB ACM device
[574042.996036] cdc_acm 1-1.2:1.0: ttyACM0: USB ACM device
Thank you.
 
User Name

MichaelMeissner,

Does this look OK?
My systemd log when I unplugged and re-plugged in my Teensy 2.0 on Fedora 22.
Unplug at 09:09:43 and plug in at 09:09:52:
Code:
$ journalctl --since 09:09
-- Logs begin at Sat 2011-12-31 17:00:18 MST, end at Wed 2015-09-23 09:09:52 MDT. --
Sep 23 09:09:43 localhost.localdomain kernel: usb 1-1.2: USB disconnect, device number 45
Sep 23 09:09:43 localhost.localdomain systemd-udevd[540]: error opening USB device 'descriptors' file
Sep 23 09:09:52 localhost.localdomain kernel: usb 1-1.2: new full-speed USB device number 46 using ehci-pci
Sep 23 09:09:52 localhost.localdomain kernel: usb 1-1.2: New USB device found, idVendor=16c0, idProduct=0483
Sep 23 09:09:52 localhost.localdomain kernel: usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Sep 23 09:09:52 localhost.localdomain kernel: usb 1-1.2: Product: USB Serial
Sep 23 09:09:52 localhost.localdomain kernel: usb 1-1.2: Manufacturer: Teensyduino
Sep 23 09:09:52 localhost.localdomain kernel: usb 1-1.2: SerialNumber: 12345
Sep 23 09:09:52 localhost.localdomain kernel: cdc_acm 1-1.2:1.0: ttyACM0: USB ACM device
 
Yeah, it looks ok. If you have the udev rules applied and they are being used, you should see /dev/ttyACM0 as a character special device. Try doing:
Code:
$ ls -lh /dev/ttyACM*

to see if the serial port device was created. If it was created, but you do not have access, it likely means the udev rules are not being implemented (or the modemmanger is hogging the line). I don't run Ubuntu, so I can't say what things they do on their system.
 
reply to MichaelMeissner

Does this mean that the serial port device was created?:
Code:
$ ls -lh /dev/ttyACM*
crw-rw-rw-. 1 root dialout 166, 0 Sep 23 09:09 /dev/ttyACM0
If so, the next step is for me to uninstall the Modem Manager.

The udev rules look OK:
Code:
$ ls /etc/udev/rules.d
49-teensy.rules
 
Yes it looks like it was created. You might want to do:
Code:
$ id

And see if your login id is in the dialout group. If it is not in the group, then perhaps something like:
Code:
$ sudo usermod -a -G dialout $USER

Then log out, and log back in, and do id once again to make sure you are in the group.
 
reply to MichaelMeissner

The first time I ran "id" there was no "dialout".
After logging out and back in there is a "dialout":
Code:
$ id
uid=1000(wolfv) gid=1000(wolfv) groups=1000(wolfv),10(wheel),18(dialout) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
Arduino IDE "Tools -> Port-> Serial ports" is still dimmed.
Does that mean I should uninstall the Modem Manager?

I have also upgraded/installed Arduino 1.6.5-r5 Teensyduino 1.25
Now when I upload, the IDE progress bar hangs on "Opening Teensy Loader..."
"Done uploading" does not appear in message. But it doesn't seem to effect anything.
Blink sketch blinks the Teensy LED as expected.
The above Serial.print example still has "Tools -> Port-> Serial ports" dimmed.
 
User Name

I uninstall Modem Manager and rebooted.
Code:
$ sudo dnf remove ModemManager
But "Serial ports" is still dimmed in the Aduino IDE menu:(:
Tools > Port > Serial ports (dimmed)

Thank you for all your help. I will try again next year.
 
Last edited:
Status
Not open for further replies.
Back
Top