New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FS#160 - usb-serial (pl2303) failures on mt7621 dlink dir860l-b1 #5234
Comments
karlp: Try with picocom, that looks like screen is trying to use utmp for locking or something? Arguably a bug with screen. picocom -b 115200 /dev/ttyUSB0 |
mkresin: utmp is implemented only as [[http://wiki.musl-libc.org/wiki/FAQ#Q:why_is_the_utmp.2Fwtmp_functionality_only_implemented_as_stubs.3F|stub in musl]]. Therefore utmp support needs to be disabled in screen, which it at least possible with [[http://git.savannah.gnu.org/cgit/screen.git/commit/?id=df1c012227c95dd7aafe8706f4537445ba8f5d48|commit df1c012227c95dd7aafe8706f4537445ba8f5d48]]. But screen is part of the openwrt (external/additional) packages feed and issues for these packages are tracked at [[https://github.com/openwrt/packages/issues]]. I'll close the report here. Please open a new issue at the location mentioned above. Fell free to forward the information I've provided. Edit: Reopened the bug after getting pointed to the real issue this report is about:
[ 871.510000] pl2303 ttyUSB0: pl2303_get_line_request - failed: -145
[ 871.620000] pl2303 ttyUSB0: pl2303_set_line_request - failed: -145
[ 871.840000] pl2303 ttyUSB0: pl2303_set_control_lines - failed: -145
|
russell: I tried picocom, it gives the same kernel message:
|
russell: I tried an ftdi usb-serial cable with a loopback wire (connecting tx with rx), and that worked in picocom and screen. So, ftdi = okay, pl2303 = broken on dir860l-b1. |
russell: not a screen bug |
russell: The pl2303 usb-serial chip has historically worked fine on OpenWrt platforms, going back to the ancient days (circa 2006) with a pl2303 built in to USB-GPS devices plugged into Netgear WGT634U and as recently as OpenWrt r49063 from late March 2016 on ramips AsiaRF AWM002. Most recent revision with the failure is LEDE r1591. Earliest LEDE version tested on mt7621 was r1279-gc769c1b, which also failed. Suggest changing the title to "usb-serial (pl2303) failures on mt7621 dlink dir860l-b1". |
russell: The physical device is out of my regular kit bag that I use regularly and works fine on my desktop, and has worked fine in the same AsiaRF AWM002 as referenced above, so the adapter itself is okay. I have also tried 4 different pl2303-based devices, all of which work in my Ubuntu 14.04 laptop. I think we can rule out a bad pl2303. |
russell: Plugging a usb2 hub into the dlink's usb3 host port, and then plugging the pl2303 into the hub, and it works fine. It would be nice if someone else with an mt7621 or a dlink dir860l-b1 could try to replicate this problem. |
hngsvtdu: Is the usb2 hub you plugged into external powered? |
russell: Not sure it's relevant, but no, the usb2 hub was not powered externally. The pl2303 usb-serial draws very little power. Nothing else was plugged into the usb2 hub. |
stintel: I can confirm this, tested on DIR-860L B1 running LEDE r2762-ed69e93.
Bus 001 Device 002: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
[ 47.870000] usbcore: registered new interface driver pl2303
[ 47.880000] usbserial: USB Serial support registered for pl2303
[ 47.890000] pl2303 1-1:1.0: pl2303 converter detected
[ 47.900000] usb 1-1: pl2303 converter now attached to ttyUSB0
[ 108.830000] pl2303 ttyUSB0: pl2303_set_control_lines - failed: -145
[ 108.940000] pl2303 ttyUSB0: pl2303_get_line_request - failed: -145
[ 109.050000] pl2303 ttyUSB0: pl2303_set_line_request - failed: -145
[ 109.160000] pl2303 1-1:1.0: pl2303_vendor_write - failed to write [0000]: -145
[ 109.270000] pl2303 ttyUSB0: pl2303_set_control_lines - failed: -145
|
jmar83: same problem with: QinHeng Electronics HL-340 USB-Serial adapter |
jmar83: dmesg: [screen is terminating] p.s.: your servers are DAMN slow!! |
jmar83: do i need to install kmod-usb-ohci OR kmod-usb-uhci after installing kmod-usb-serial-ch341? don't think so..?!? |
jmar83: "do i need to install kmod-usb-ohci OR kmod-usb-uhci after installing kmod-usb-serial-ch341? don't think so..?!?" No, does not help |
jmar83: WHY NO ANSWER?!? |
jmar83: PLEASE FIX THAT PROBLEM!! |
None: We are not your personal support service and shouting really isn't appreciated. |
jmar83: anyway, i was thinking it's positive when i submit some problems...? maybe not... however. is it possible to compile the source code as a kernel module on version 18.06.1 / kernel 4.9.120 as a kernel module, without to compile the whole kernel? |
jmar83: Problem is solved by using a FTDI USB-RS232-Adapter!! |
russell: Jan, yeah, I mentioned the ftdi working two years ago in the original wave of reporting (13.09.2016 17:36), however for the reasons mentioned I don't consider one device working as solving the other group of devices not working. |
russell:
git describe reboot-1497-ga810e77
with diffconfig:
CONFIG_TARGET_ramips=y CONFIG_TARGET_ramips_mt7621=y CONFIG_TARGET_ramips_mt7621_DEVICE_dir-860l-b1=y CONFIG_DEVEL=y CONFIG_BUILD_LOG=y CONFIG_PACKAGE_ip=y CONFIG_PACKAGE_kmod-usb-core=y CONFIG_PACKAGE_kmod-usb-ohci=y CONFIG_PACKAGE_kmod-usb-ohci-pci=y CONFIG_PACKAGE_kmod-usb-serial=y CONFIG_PACKAGE_kmod-usb-serial-ftdi=y CONFIG_PACKAGE_kmod-usb-serial-pl2303=y CONFIG_PACKAGE_kmod-usb2=y CONFIG_PACKAGE_kmod-usb2-pci=y CONFIG_PACKAGE_kmod-usb3=y CONFIG_PACKAGE_screen=y
screen starts, but doesn't work. The usb-relevant dmesg's are:
[ 4.550000] usbcore: registered new interface driver usbfs [ 4.560000] usbcore: registered new interface driver hub [ 4.570000] usbcore: registered new device driver usb [ 4.580000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 4.620000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver [ 4.670000] xhci-mtk 1e1c0000.xhci: new USB bus registered, assigned bus number 1 [ 4.720000] hub 1-0:1.0: USB hub found [ 4.740000] xhci-mtk 1e1c0000.xhci: new USB bus registered, assigned bus number 2 [ 4.760000] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM. [ 4.770000] hub 2-0:1.0: USB hub found [ 5.260000] usb 1-1: new full-speed USB device number 2 using xhci-mtk [ 5.410000] usb 1-1: no of_node; not parsing pinctrl DT [ 10.150000] usbcore: registered new interface driver usbserial [ 10.160000] usbcore: registered new interface driver usbserial_generic [ 10.180000] usbserial: USB Serial support registered for generic [ 10.220000] usbcore: registered new interface driver ftdi_sio [ 10.240000] usbserial: USB Serial support registered for FTDI USB Serial Device [ 10.260000] usbcore: registered new interface driver pl2303 [ 10.270000] usbserial: USB Serial support registered for pl2303 [ 10.290000] pl2303 ttyUSB0: no of_node; not parsing pinctrl DT [ 10.290000] usb 1-1: pl2303 converter now attached to ttyUSB0 [ 871.510000] pl2303 ttyUSB0: pl2303_get_line_request - failed: -145 [ 871.620000] pl2303 ttyUSB0: pl2303_set_line_request - failed: -145 [ 871.840000] pl2303 ttyUSB0: pl2303_set_control_lines - failed: -145
Screen also throws an error (which gets blanked out, but is captured by the serial console):
# screen /dev/ttyUSB0 115200 /dev/null/utmp: Not a directory
The text was updated successfully, but these errors were encountered: