ftdi_sio ttyUSB0: usb_serial_generic_read_bulk_callback - urb stopped: -32

Open
#2,406 64 comments 9 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
linux, raspberry-pi

Research direction

Start by reproducing the failure with the ftdi_sio device using the reported cat and echo commands, then compare behavior with dwc_otg.speed=1. Review the referenced Raspberry Pi USB issues and the dwc_otg and ftdi_sio paths to identify the ARM-specific cause. Done means a root cause is established and stable USB 2.0 serial communication is demonstrated without reducing bus speed.

Written by the indexing model from the issue text.

Description

Waiting for internal comment

Scenario:

Hardware:
RPI3, 4.14.22-v7+, /boot/.firmware_revision: v634741d4199871ab8bd5446a8e63b7e06c1885af (latest by today)
Device: 3D Printer, FTDI Fake Chip: FT232RL, 0403:6001, SerialNumber: A50285BI

Description:
The FTDI Chip of the 3D Printer offers /dev/ttyUSB0 for communication.
The kernel module ftdi_sio creates a serial device.
With a simple

cat /dev/ttyUSB0

the output of the printer can be monitored.
The call:

echo "M155 S1" > /dev/ttyUSB0

initates a automated temperature report every second.

Case:
This scenario works perfect on i.e desktop pc with ubuntu 17.10, 4.13.0-36-generic but also under 3 different distros I tested the same way. Also under Windows 7/10 (cygwin) the connection is stable.

Under OrangePI (armbian), BananaPi (armbian), RPI1/2/3 (wheezy, jessie, stretch) the connection is unpredictable unstable and dies with

ftdi_sio ttyUSB0: usb_serial_generic_read_bulk_callback - urb stopped: -32

I already cross tested the following options (permutations) with no success:

max_usb_current=1
dwc_otg.microframe_schedule=0
dwc_otg.fiq_fsm_enable=0
dwc_otg.fiq_fix_enable=0 
dwc_otg.fiq_split_enable=0
dwc_otg.nak_holdoff_enable=0
dwc_otg.trans_backoff=3000
dwc_otg.fiq_fsm_mask=0x0 

This issue seems only be handled by

dwc_otg.speed=1

which is no option, as the whole bus (network card included) is limited to USB 1.1

From my point of view, also it is a Fake FTDI Chip, is seems to be an ARM linux kernel issue. On Intel/AMD linux and windows the communication is stable.

What would be the best way to investigate and get this issue solved?

References:
https://github.com/raspberrypi/linux/issues/1187
https://github.com/raspberrypi/firmware/issues/88
https://raspberrypi.stackexchange.com/questions/1886/what-kernel-parameters-are-available-for-fixing-usb-problems

Simplification:
I simplied the testing scenario to temperatur monitoring. Of course several applications are available for managing 3D Printers in all their complexity. I encountered communications issues with this applications under RPI3.

Dominant language
C
Stars
13.2k
Forks
5.5k
Avg merge
2d 21h
Merged PRs (30d)
21

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from raspberrypi/linux

All issues in raspberrypi/linux

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.