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

Thread: USB Serial port fails on Linux

  1. #1
    Junior Member
    Join Date
    Mar 2020
    Posts
    8

    USB Serial port fails on Linux

    I have implemented a signal generator in a Teensy 4.0 sketch. It uses the USB Serial device: detecting a new connection, writing "SignalGenerator 1.0", and then reading the Serial device for commands and writing responses.

    It works fine on my Mac laptop (Teensyduino IDE not running):
    Code:
    (plug in USB)
    $ cat /dev/cu.usbmodem71506301 &
    SignalGenerator 1.0
    (accepts commands via "echo >/dev/cu.usbmodem71506301 command")
    Note that putting the "cat" in the background keeps the serial device open and lets me see responses to commands.

    On a Raspberry Pi 3B+ running Raspbian, after using lsusb to find it:
    Code:
    (plug in USB)
    $ cat /dev/bus/usb/001/007 &
    @??y	C?2	$$$$?
    That looks like the wrong baud rate. How do I fix this?
    Attached Files Attached Files

  2. #2
    Senior Member pictographer's Avatar
    Join Date
    May 2013
    Location
    San Jose, CA
    Posts
    701
    Perhaps the Pi doesn't have the needed USB serial driver installed. There should be a device like /dev/ttyACM0. You might also need to mess with stty to configure it or use a terminal emulator like screen, picoterm, nanoterm, etc. handle the baud rate, etc. I've been able to connect a Teensy to a Raspberry Pi Zero W, but it was a while ago and I don't remember the exact steps.

Posting Permissions

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