Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 10 of 10

Thread: No /dev device

  1. #1
    Junior Member
    Join Date
    Dec 2020
    Posts
    11

    No /dev device

    I am new to Teensy but not Arduino or PlatformIO.
    I am on Archliunx, Kernel 5.9.14-arch1-1

    When I plug my Teensy 4.1 in dmesg shows

    Code:
    [ 1704.752767] usb 1-2: new high-speed USB device number 10 using xhci_hcd
    [ 1704.893571] usb 1-2: New USB device found, idVendor=16c0, idProduct=0486, bcdDevice= 2.80
    [ 1704.893577] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [ 1704.893580] usb 1-2: Product: Teensyduino RawHID
    [ 1704.893584] usb 1-2: Manufacturer: Teensyduino
    [ 1704.893586] usb 1-2: SerialNumber: 8720400
    [ 1704.900591] hid-generic 0003:16C0:0486.000D: hiddev0,hidraw3: USB HID v1.11 Device [Teensyduino Teensyduino RawHID] on usb-0000:00:14.0-2/input0
    [ 1704.901496] hid-generic 0003:16C0:0486.000E: hidraw4: USB HID v1.11 Device [Teensyduino Teensyduino RawHID] on usb-0000:00:14.0-2/input1
    
    lsusb
    Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 001 Device 002: ID 046d:c52b Logitech, Inc. Unifying Receiver
    Bus 001 Device 005: ID 8087:0025 Intel Corp. Wireless-AC 9260 Bluetooth Adapter
    Bus 001 Device 004: ID 0c45:6717 Microdia Integrated_Webcam_HD
    Bus 001 Device 003: ID 0a5c:5832 Broadcom Corp. 5880
    Bus 001 Device 006: ID 16c0:0486 Van Ooijen Technische Informatica Teensyduino RawHID
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    /dev device is not created. Seems like a udev rules problem.

    49-teensy.rules are in the rules for platformIO ( I did not add them)

    as an exercise I did remove platformIO rules and copy 49-teensy rules and rebooted, same result

    I must be not understanding something!

  2. #2
    Senior Member
    Join Date
    May 2015
    Location
    USA
    Posts
    863
    Is the teensy loaded with code that emulates a serial port?

  3. #3
    Junior Member
    Join Date
    Dec 2020
    Posts
    11
    No, just out of the box and plugged in to a USB cable
    Just trying to get started with teensy 4.1 and platformIO.
    I expect to see /dev/ttyUSB? or /dev/ttyAMC? that would be used to upload to the teensy

  4. #4
    Senior Member
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    1,450
    They ship as HID device. Try uploading a sketch compiled with the Serial option.

  5. #5
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    24,108
    This is perfectly normal. Teensy defaults to HID. It only becomes USB Serial when you program it, and only if Tools > USB Type is set to one of the options which includes Serial.

    Quote Originally Posted by dk23 View Post
    I expect to see /dev/ttyUSB? or /dev/ttyAMC? that would be used to upload to the teensy
    Uploading is always done using HID protocol, never Serial.

    When you have programmed it to a /dev/ttyACM device, for uploading it will disconnect and reappear as HID. Uploading is always done using HID.

    If your Linux system has the normal set of drivers, while in HID mode you should have a /dev/hidraw device created by the kernel & udev. But this is not the same as a serial device like /dev/ttyACM.

  6. #6
    Junior Member
    Join Date
    Dec 2020
    Posts
    11
    yes /dev/hidraw3 and /dev/hwraw4 are created when I plug teensy in.

    what should be in platformio.ini?
    currently:
    Code:
    [env:teensy41]
    platform = teensy
    board = teensy41
    framework = arduino
    If I try to upload a simple blink test program teeny loader gives the error:

    Code:
    > Executing task in folder teensy: pio run --target upload <
    
    Processing teensy41 (platform: teensy; board: teensy41; framework: arduino)
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Verbose mode can be enabled via `-v, --verbose` option
    CONFIGURATION: https://docs.platformio.org/page/boards/teensy/teensy41.html
    PLATFORM: Teensy (4.11.1) > Teensy 4.1
    HARDWARE: IMXRT1062 600MHz, 512KB RAM, 7.75MB Flash
    DEBUG: Current (jlink) External (jlink)
    PACKAGES: 
     - framework-arduinoteensy 1.153.0 (1.53) 
     - tool-teensy 1.152.200516 (1.52) 
     - toolchain-gccarmnoneeabi 1.50401.190816 (5.4.1)
    LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
    LDF Modes: Finder ~ chain, Compatibility ~ soft
    Found 89 compatible libraries
    Scanning dependencies...
    No dependencies
    Building in release mode
    Compiling .pio/build/teensy41/src/main.cpp.o
    Compiling .pio/build/teensy41/FrameworkArduino/AudioStream.cpp.o
    Compiling .pio/build/teensy41/FrameworkArduino/Blink.cc.o
    Compiling .pio/build/teensy41/FrameworkArduino/DMAChannel.cpp.o
    Compiling .pio/build/teensy41/FrameworkArduino/EventResponder.cpp.o
    Compiling .pio/build/teensy41/FrameworkArduino/HardwareSerial.cpp.o
    Compiling .pio/build/teensy41/FrameworkArduino/HardwareSerial1.cpp.o
    Compiling .pio/build/teensy41/FrameworkArduino/HardwareSerial2.cpp.o
    Compiling .pio/build/teensy41/FrameworkArduino/HardwareSerial3.cpp.o
    Compiling .pio/build/teensy41/FrameworkArduino/HardwareSerial4.cpp.o
    Compiling .pio/build/teensy41/FrameworkArduino/HardwareSerial5.cpp.o
    Compiling .pio/build/teensy41/FrameworkArduino/HardwareSerial6.cpp.o
    Compiling .pio/build/teensy41/FrameworkArduino/HardwareSerial7.cpp.o
    Compiling .pio/build/teensy41/FrameworkArduino/HardwareSerial8.cpp.o
    Compiling .pio/build/teensy41/FrameworkArduino/IPAddress.cpp.o
    Compiling .pio/build/teensy41/FrameworkArduino/IntervalTimer.cpp.o
    Compiling .pio/build/teensy41/FrameworkArduino/Print.cpp.o
    Compiling .pio/build/teensy41/FrameworkArduino/Stream.cpp.o
    Compiling .pio/build/teensy41/FrameworkArduino/Tone.cpp.o
    Compiling .pio/build/teensy41/FrameworkArduino/WMath.cpp.o
    Compiling .pio/build/teensy41/FrameworkArduino/WString.cpp.o
    Compiling .pio/build/teensy41/FrameworkArduino/analog.c.o
    Compiling .pio/build/teensy41/FrameworkArduino/bootdata.c.o
    Compiling .pio/build/teensy41/FrameworkArduino/clockspeed.c.o
    Compiling .pio/build/teensy41/FrameworkArduino/debugprintf.c.o
    Compiling .pio/build/teensy41/FrameworkArduino/delay.c.o
    Compiling .pio/build/teensy41/FrameworkArduino/digital.c.o
    Compiling .pio/build/teensy41/FrameworkArduino/eeprom.c.o
    Compiling .pio/build/teensy41/FrameworkArduino/interrupt.c.o
    Compiling .pio/build/teensy41/FrameworkArduino/keylayouts.c.o
    Compiling .pio/build/teensy41/FrameworkArduino/main.cpp.o
    Compiling .pio/build/teensy41/FrameworkArduino/memcpy-armv7m.S.o
    Compiling .pio/build/teensy41/FrameworkArduino/memset.S.o
    Compiling .pio/build/teensy41/FrameworkArduino/new.cpp.o
    Compiling .pio/build/teensy41/FrameworkArduino/nonstd.c.o
    Compiling .pio/build/teensy41/FrameworkArduino/pwm.c.o
    Compiling .pio/build/teensy41/FrameworkArduino/rtc.c.o
    Compiling .pio/build/teensy41/FrameworkArduino/serialEvent.cpp.o
    Compiling .pio/build/teensy41/FrameworkArduino/serialEvent1.cpp.o
    Compiling .pio/build/teensy41/FrameworkArduino/serialEvent2.cpp.o
    Compiling .pio/build/teensy41/FrameworkArduino/serialEvent3.cpp.o
    Compiling .pio/build/teensy41/FrameworkArduino/serialEvent4.cpp.o
    Compiling .pio/build/teensy41/FrameworkArduino/serialEvent5.cpp.o
    Compiling .pio/build/teensy41/FrameworkArduino/serialEvent6.cpp.o
    Compiling .pio/build/teensy41/FrameworkArduino/serialEvent7.cpp.o
    Compiling .pio/build/teensy41/FrameworkArduino/serialEvent8.cpp.o
    Compiling .pio/build/teensy41/FrameworkArduino/serialEventUSB1.cpp.o
    Compiling .pio/build/teensy41/FrameworkArduino/serialEventUSB2.cpp.o
    Compiling .pio/build/teensy41/FrameworkArduino/startup.c.o
    Compiling .pio/build/teensy41/FrameworkArduino/tempmon.c.o
    Compiling .pio/build/teensy41/FrameworkArduino/usb.c.o
    Compiling .pio/build/teensy41/FrameworkArduino/usb_audio.cpp.o
    Compiling .pio/build/teensy41/FrameworkArduino/usb_desc.c.o
    Compiling .pio/build/teensy41/FrameworkArduino/usb_flightsim.cpp.o
    Compiling .pio/build/teensy41/FrameworkArduino/usb_inst.cpp.o
    Compiling .pio/build/teensy41/FrameworkArduino/usb_joystick.c.o
    Compiling .pio/build/teensy41/FrameworkArduino/usb_keyboard.c.o
    Compiling .pio/build/teensy41/FrameworkArduino/usb_midi.c.o
    Compiling .pio/build/teensy41/FrameworkArduino/usb_mouse.c.o
    Compiling .pio/build/teensy41/FrameworkArduino/usb_rawhid.c.o
    Compiling .pio/build/teensy41/FrameworkArduino/usb_seremu.c.o
    Compiling .pio/build/teensy41/FrameworkArduino/usb_serial.c.o
    Compiling .pio/build/teensy41/FrameworkArduino/usb_serial2.c.o
    Compiling .pio/build/teensy41/FrameworkArduino/usb_serial3.c.o
    Compiling .pio/build/teensy41/FrameworkArduino/usb_touch.c.o
    Compiling .pio/build/teensy41/FrameworkArduino/yield.cpp.o
    Archiving .pio/build/teensy41/libFrameworkArduino.a
    Indexing .pio/build/teensy41/libFrameworkArduino.a
    Linking .pio/build/teensy41/firmware.elf
    Building .pio/build/teensy41/firmware.hex
    Checking size .pio/build/teensy41/firmware.elf
    Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
    RAM:   [=         ]   7.9% (used 41660 bytes from 524288 bytes)
    Flash: [          ]   0.2% (used 14304 bytes from 8126464 bytes)
    Configuring upload protocol...
    AVAILABLE: jlink, teensy-gui
    CURRENT: upload_protocol = teensy-gui
    Uploading .pio/build/teensy41/firmware.hex
    Opening Teensy Loader...
    Teensy Loader could not find the directory /home/dk23/src/SBC/teensy/.pio/build/teensy41
    quitscons: *** [upload] Error 1
    ============================================================================================================================ [FAILED] Took 13.49 seconds ============================================================================================================================
    The terminal process "pio 'run', '--target', 'upload'" terminated with exit code: 1.
    
    Terminal will be reused by tasks, press any key to close it.
    the directory is there and build put files in the directory


    Should I take this issue to platformIO and not here?

  7. #7
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    24,108
    I'd recommend first testing with the Arduino IDE and Teensyduino.

    https://www.pjrc.com/teensy/td_download.html

    Even if you never intend to actually use the Arduino software, it's a very easy way to test if your system and hardware are working. When / if you ask the PlatformIO folks for help, it's easier if you've confirmed everything works using Arduino.

  8. #8
    Junior Member
    Join Date
    Dec 2020
    Posts
    11
    Thanks for your help.
    I'll follow your advice.
    Not used the IDE in a long time should be fun

  9. #9
    Junior Member
    Join Date
    Dec 2020
    Posts
    11
    Paul,

    I am curious what is your work flow for development?
    What tools do you use?

    Thanks

  10. #10
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    24,108
    Quote Originally Posted by dk23 View Post
    I am curious what is your work flow for development?
    Usually I use Arduino with the external editor option (File > Prefs), and then I edit code with vim.

    Other times I use no GUI at all, just makefiles and vim.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •