Modify

Opened 3 years ago

Last modified 3 years ago

#19601 assigned defect

Asus RT-N18U broken FTDI

Reported by: Grrruk Owned by: hauke
Priority: normal Milestone: Chaos Calmer 15.05
Component: base system Version: Trunk
Keywords: RT-N18U FTDI Cc:

Description

I have several FTDI modems that work OK with Linux computers and older routers like Asus RT-N16 and TP-Link WDR4300, but nothing happens when I plug any of them into Asus RT-N18U. These modems are based on Telit (GL868-DUAL). That's how such modem looks while plugged into Ubuntu computer:

[ 8766.698948] usb 1-1.4: new full-speed USB device number 11 using ehci-pci
[ 8766.797934] usb 1-1.4: New USB device found, idVendor=0403, idProduct=6001
[ 8766.797938] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 8766.797940] usb 1-1.4: Product: Teleofis RX101-R4
[ 8766.797941] usb 1-1.4: Manufacturer: FTDI
[ 8766.797942] usb 1-1.4: SerialNumber: RXY3PJ3B
[ 8766.800622] ftdi_sio 1-1.4:1.0: FTDI USB Serial Device converter detected
[ 8766.800651] usb 1-1.4: Detected FT232RL
[ 8766.800653] usb 1-1.4: Number of endpoints 2
[ 8766.800654] usb 1-1.4: Endpoint 1 MaxPacketSize 64
[ 8766.800656] usb 1-1.4: Endpoint 2 MaxPacketSize 64
[ 8766.800657] usb 1-1.4: Setting MaxPacketSize 64
[ 8766.801027] usb 1-1.4: FTDI USB Serial Device converter now attached to ttyUSB0

And that's how it looks on serial console in Asus RT-N16:

[   55.650000] usb 2-2: new full-speed USB device number 2 using ohci-platform
[   55.890000] ftdi_sio 2-2:1.0: FTDI USB Serial Device converter detected
[   55.900000] usb 2-2: Detected FT232RL
[   55.900000] usb 2-2: Number of endpoints 2
[   55.900000] usb 2-2: Endpoint 1 MaxPacketSize 64
[   55.910000] usb 2-2: Endpoint 2 MaxPacketSize 64
[   55.910000] usb 2-2: Setting MaxPacketSize 64
[   55.930000] usb 2-2: FTDI USB Serial Device converter now attached to ttyUSB0

But nothing happens when I plug it into Asus RT-N18U. No messages, nothing. And it's strange that both TX and RX leds on the modem are lit while plugged into N18U (usually they are dark and blink briefly during data exchange). Modem finds GSM network as usual and I can call it via another modem (CSD call), but no exchange happens between modem and router. Drivers seems to be loaded:

root@OpenWrt:/# lsmod|grep ftdi
ftdi_sio               28341  0
usbcore               112147 24 ftdi_sio
usbserial              17672  1 ftdi_sio
root@OpenWrt:/# dmesg|grep -i ftdi
[   17.827806] usbcore: registered new interface driver ftdi_sio
[   17.833684] usbserial: USB Serial support registered for FTDI USB Serial Device

I tried both self-compiled trunk (right now it's r45610) and prebuilt images during last month, also I tried to include/exclude usb2 and usb3 support, nothing works.

Attachments (0)

Change History (15)

comment:1 Changed 3 years ago by Grrruk

BTW I have cdc_ether device (LTE modem) and it works OK in both rear and front ports in RT-N18U.

comment:2 Changed 3 years ago by Grrruk

I tried to insert usb serial console into USB port, it's an FTDI device too: www.titan.tw/product/USB-TTL.html It does not work either: all three leds are lit and no messages in logs, nothing.

Any ideas?

comment:3 Changed 3 years ago by anonymous

This is fixed in r45716.

comment:4 Changed 3 years ago by Grrruk

Hmm, I just tried r45745 and it does not work. All leds are lit, and nothing happens in log when I plug FTDI devices into the port.

comment:5 Changed 3 years ago by Grrruk

Ooops. I did make dirclean and now it works!

Great job, guys! You are awesome!

comment:6 Changed 3 years ago by Grrruk

Hmm, sometimes it crashes:

[   93.128757] ohci-platform ohci-platform.0: OHCI Unrecoverable Error, disabled
[   93.135872] ohci-platform ohci-platform.0: HC died; cleaning up
[   93.300162] irq 111: nobody cared (try booting with the "irqpoll" option)
[   93.306929] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.18.14 #1
[   93.312908] Backtrace: 
[   93.315381] [<c0015414>] (dump_backtrace) from [<c0015620>] (show_stack+0x18/0x1c)
[   93.322913]  r6:00000000 r5:c780a51c r4:00000000 r3:00200000
[   93.328593] [<c0015608>] (show_stack) from [<c016fb5c>] (dump_stack+0x7c/0x98)
[   93.335795] [<c016fae0>] (dump_stack) from [<c0050aac>] (__report_bad_irq+0x30/0xc0)
[   93.343501]  r4:c780a4c0 r3:00000000
[   93.347081] [<c0050a7c>] (__report_bad_irq) from [<c0050fe0>] (note_interrupt+0x1f4/0x2a0)
[   93.355304]  r6:00000000 r5:00000000 r4:c780a4c0 r3:0001863c
[   93.360973] [<c0050dec>] (note_interrupt) from [<c004edb0>] (handle_irq_event_percpu+0x110/0x130)
[   93.369802]  r9:c780a4c0 r8:00000000 r7:00000000 r6:00000000 r5:0000006f r4:00000000
[   93.377553] [<c004eca0>] (handle_irq_event_percpu) from [<c004ee18>] (handle_irq_event+0x48/0x68)
[   93.386382]  r10:c03cd040 r9:c68a1e40 r8:00000001 r7:c780e800 r6:c03cfed0 r5:c03dbc80
[   93.394209]  r4:c780a4c0
[   93.396745] [<c004edd0>] (handle_irq_event) from [<c0051b24>] (handle_fasteoi_irq+0xa8/0x130)
[   93.405226]  r5:c03dbc80 r4:c780a4c0
[   93.408804] [<c0051a7c>] (handle_fasteoi_irq) from [<c004e4bc>] (generic_handle_irq+0x28/0x38)
[   93.417374]  r5:c03cc894 r4:0000006f
[   93.420952] [<c004e494>] (generic_handle_irq) from [<c004e7a8>] (__handle_domain_irq+0x84/0xa8)
[   93.429608]  r4:00000000 r3:00000120
[   93.433185] [<c004e724>] (__handle_domain_irq) from [<c0008680>] (gic_handle_irq+0x40/0x64)
[   93.441496]  r8:00000001 r7:c03cfe0c r6:c03d147c r5:c03cfdd8 r4:c8802100 r3:c03cfdd8
[   93.449246] [<c0008640>] (gic_handle_irq) from [<c0009220>] (__irq_svc+0x40/0x54)
[   93.456687] Exception stack(0xc03cfdd8 to 0xc03cfe20)
[   93.461717] fdc0:                                                       c03cfe20 00000000
[   93.469859] fde0: 00000000 c03e93c0 00000040 c03cc894 00000000 c03ce020 00000001 c68a1e40
[   93.477998] fe00: c03cd040 c03cfe6c c03cfe20 c03cfe20 c00576d4 c0022668 60000113 ffffffff
[   93.486130]  r6:ffffffff r5:60000113 r4:c0022668 r3:c00576d4
[   93.491798] [<c00225e4>] (__do_softirq) from [<c0022a64>] (irq_exit+0x8c/0xb0)
[   93.498978]  r10:c03cd040 r9:c68a1e40 r8:00000001 r7:c780e800 r6:00000000 r5:c03cc894
[   93.506806]  r4:00000000
[   93.509336] [<c00229d8>] (irq_exit) from [<c004e7ac>] (__handle_domain_irq+0x88/0xa8)
[   93.517123]  r4:00000000 r3:00000120
[   93.520698] [<c004e724>] (__handle_domain_irq) from [<c0008680>] (gic_handle_irq+0x40/0x64)
[   93.529002]  r8:c7bab040 r7:c03cff04 r6:c03d147c r5:c03cfed0 r4:c8802100 r3:c03cfed0
[   93.536750] [<c0008640>] (gic_handle_irq) from [<c0009220>] (__irq_svc+0x40/0x54)
[   93.544193] Exception stack(0xc03cfed0 to 0xc03cff18)
[   93.549225] fec0:                                     c6ddf040 c794d440 000070a0 00000000
[   93.557365] fee0: c794d440 00000001 c794d440 c03ce030 c7bab040 c68a1e40 c03cd040 c03cff2c
[   93.565503] ff00: c03cff30 c03cff18 c000dee8 c0039258 60000013 ffffffff
[   93.572081]  r6:ffffffff r5:60000013 r4:c0039258 r3:c000dee8
[   93.577759] [<c0039214>] (finish_task_switch) from [<c000dee8>] (__schedule+0x288/0x490)
[   93.585811]  r5:c03cd040 r4:c03d4740
[   93.589385] [<c000dc60>] (__schedule) from [<c000e184>] (schedule+0x94/0x98)
[   93.596395]  r10:c03e8bd0 r9:c7ffc700 r8:c03c5d18 r7:c03e8bd4 r6:c03ce000 r5:c03ce000
[   93.604222]  r4:c03ce010
[   93.606752] [<c000e0f0>] (schedule) from [<c000e4ec>] (schedule_preempt_disabled+0x10/0x14)
[   93.615065] [<c000e4dc>] (schedule_preempt_disabled) from [<c0048500>] (cpu_startup_entry+0x130/0x14c)
[   93.624333] [<c00483d0>] (cpu_startup_entry) from [<c000ca90>] (rest_init+0x68/0x80)
[   93.632054] [<c000ca28>] (rest_init) from [<c03a2c8c>] (start_kernel+0x34c/0x3c8)
[   93.639564] [<c03a2940>] (start_kernel) from [<00008074>] (0x8074)
[   93.645712] handlers:
[   93.648010] [<bf0295bc>] usb_hcd_irq [usbcore]
[   93.652456] [<bf0295bc>] usb_hcd_irq [usbcore]
[   93.656883] Disabling IRQ #111
[   93.661720] usb 2-2: USB disconnect, device number 2
[   93.669032] ftdi_sio ttyUSB0: error from flowcontrol urb
[   93.674543] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0
[   93.683058] ftdi_sio 2-2:1.0: device disconnected

comment:7 Changed 3 years ago by Grrruk

I think I missed beginning of typical crash report:

[ 704.589525] ohci-platform ohci-platform.0: bad entry 6

It happens randomly --sometimes when I poke around inittab and agetty, sometimes when I poke into /dev/ttyUSB0 with socat, sometimes after usbreset.

comment:8 Changed 3 years ago by Grrruk

If I plug FTDI device into usb port and leave it there then crash does not happen. Today I left it to sit idle for 24 hours without problems. But if I run something that opens that port then crash happens soon at random. For example today I ran his:

socat -d -d -d /dev/ttyUSB0,b9600,clocal=1,cs8,nonblock=1,ixoff=0,ixon=0,raw,echo=0,crtscts=1 EXEC:"/usr/bin/ssh -y -y -t -l root -I 600 127.0.0.1 /bin/bash --login",pty,setsid,ctty

And soon crash happened. /dev/ttyUSB0 disappears, reinserting does not help. removing/installing ftdi_sio module does not help either.

comment:9 Changed 3 years ago by Grrruk

Hmm, it seems that crash happens only when I have TWO devices connected -- FTDI and CDC ethernet dongle. BTW, CDC device does not work cleanly, sometimes it complains about kevent 12, but it still works:

[   17.519132] cdc_ether 1-1:1.0 eth3: register 'cdc_ether' at usb-ehci-platform.0-1, CDC Ethernet Device, f8:35:dd:25:fe:db
[   17.530222] usbcore: registered new interface driver cdc_ether
[   20.756135] cdc_ether 1-1:1.0 eth3: kevent 12 may have been dropped

If I connect only FTDI device or only CDC device they work alone OK. If I connect them at once, FTDI dies within few minutes.

CDC device sometimes does not work unless I run usbreset and then it begins to work across several reboots. I don't know if it's a separate issue or not.

comment:10 Changed 3 years ago by hauke

  • Owner changed from developers to hauke
  • Status changed from new to assigned

Is this correct?

  1. When only the FTDI device is connected it works normally.
  2. when the FTDI device and the CDC device are connected and you are using the FTDI device, the FTDI crashes soon.
  3. When you connect the FDTI and the CDC device and do not use the FTDI device, but only the CDC device it works.

comment:11 Changed 3 years ago by Grrruk

Yes, exactly.

I left FTDI device alone on weekend (with socat attached to /dev/ttyUSB0) and nothing happened. Today I connected CDC device and FTDI crashed within 3-5 minutes.

Removing all possible usb modules and reinserting them does not help, after the crash connecting FTDI produces nothing in logs.

comment:12 Changed 3 years ago by rmilecki

I'm a bit confused by USB support on bcm53xx. First of all, Asus RT-N18U has two USB ports: USB 2.0 and USB 3.0. There are two separated bcma cores:

bcma: bus0: Core 11 found: USB 2.0 (manuf 0x4BF, id 0x504, rev 0x01, class 0x0)
bcma: bus0: Core 12 found: USB 3.0 (manuf 0x4BF, id 0x505, rev 0x01, class 0x0)

Since we don't have USB 3.0 driver (BCMA_CORE_NS_USB30) yet, I expected USB 3.0 port to don't work at all.

How is this possible device connected to USB 3.0 gets detected?

comment:13 Changed 3 years ago by Grrruk

How is this possible device connected to USB 3.0 gets detected?

I don't know, but any device works fine if it's alone. In any port. I tried different combination of ports (i.e. CDC into fron port and FTDI into rear port and vice versa) but FTDI always crashes in presence of CDC. And CDC alone or FTDI alone are ok.

comment:14 Changed 3 years ago by rmilecki

Does it work any better with r45997 (trunk) / r45998 (chaos_calmer)?

comment:15 Changed 3 years ago by Grrruk

Just tried r46005, the same crash:

[   46.200858] ohci-platform ohci-platform.0: OHCI Unrecoverable Error, disabled
[   46.207976] ohci-platform ohci-platform.0: HC died; cleaning up
[   46.426298] irq 111: nobody cared (try booting with the "irqpoll" option)
[   46.433058] CPU: 0 PID: 1037 Comm: openvpn Not tainted 3.18.14 #1
[   46.439126] Backtrace: 
[   46.441599] [<c0015414>] (dump_backtrace) from [<c0015620>] (show_stack+0x18/0x1c)
[   46.449130]  r6:00000000 r5:c780a51c r4:00000000 r3:00400140
[   46.454818] [<c0015608>] (show_stack) from [<c016fc3c>] (dump_stack+0x7c/0x98)
[   46.462023] [<c016fbc0>] (dump_stack) from [<c0050aac>] (__report_bad_irq+0x30/0xc0)
[   46.469727]  r4:c780a4c0 r3:00000000
[   46.473306] [<c0050a7c>] (__report_bad_irq) from [<c0050fe0>] (note_interrupt+0x1f4/0x2a0)
[   46.481528]  r6:00000000 r5:00000000 r4:c780a4c0 r3:0001863c
[   46.487200] [<c0050dec>] (note_interrupt) from [<c004edb0>] (handle_irq_event_percpu+0x110/0x130)
[   46.496027]  r9:c780a4c0 r8:00000000 r7:00000000 r6:00000000 r5:0000006f r4:00000000
[   46.503779] [<c004eca0>] (handle_irq_event_percpu) from [<c004ee18>] (handle_irq_event+0x48/0x68)
[   46.512607]  r10:b6fa0ce0 r9:befe9d34 r8:00000001 r7:c780e800 r6:c693ffb0 r5:c03dbc80
[   46.520434]  r4:c780a4c0
[   46.522970] [<c004edd0>] (handle_irq_event) from [<c0051b24>] (handle_fasteoi_irq+0xa8/0x130)
[   46.531450]  r5:c03dbc80 r4:c780a4c0
[   46.535029] [<c0051a7c>] (handle_fasteoi_irq) from [<c004e4bc>] (generic_handle_irq+0x28/0x38)
[   46.543599]  r5:c03cc894 r4:0000006f
[   46.547176] [<c004e494>] (generic_handle_irq) from [<c004e7a8>] (__handle_domain_irq+0x84/0xa8)
[   46.555833]  r4:00000000 r3:00000120
[   46.559412] [<c004e724>] (__handle_domain_irq) from [<c0008680>] (gic_handle_irq+0x40/0x64)
[   46.567721]  r8:00000001 r7:c693feec r6:c03d147c r5:c693feb8 r4:c8802100 r3:c693feb8
[   46.575471] [<c0008640>] (gic_handle_irq) from [<c0009220>] (__irq_svc+0x40/0x54)
[   46.582922] Exception stack(0xc693feb8 to 0xc693ff00)
[   46.587952] fea0:                                                       c693ff00 00000000
[   46.596094] fec0: 00000000 c03e93c0 00000040 c03cc894 00000000 c693e000 00000001 befe9d34
[   46.604232] fee0: b6fa0ce0 c693ff4c c693ff00 c693ff00 c00576d4 c0022668 60000113 ffffffff
[   46.612364]  r6:ffffffff r5:60000113 r4:c0022668 r3:c00576d4
[   46.618033] [<c00225e4>] (__do_softirq) from [<c0022a64>] (irq_exit+0x8c/0xb0)
[   46.625220]  r10:b6fa0ce0 r9:befe9d34 r8:00000001 r7:c780e800 r6:00000000 r5:c03cc894
[   46.633049]  r4:00000000
[   46.635580] [<c00229d8>] (irq_exit) from [<c004e7ac>] (__handle_domain_irq+0x88/0xa8)
[   46.643365]  r4:00000000 r3:00000120
[   46.646941] [<c004e724>] (__handle_domain_irq) from [<c0008680>] (gic_handle_irq+0x40/0x64)
[   46.655245]  r8:10c5387d r7:10c5387d r6:c03d147c r5:c693ffb0 r4:c8802100 r3:c693ffb0
[   46.662993] [<c0008640>] (gic_handle_irq) from [<c00094e8>] (__irq_usr+0x48/0x60)
[   46.670436] Exception stack(0xc693ffb0 to 0xc693fff8)
[   46.675467] ffa0:                                     4ab2bce8 00000008 befe9164 0000061e
[   46.683609] ffc0: 01318e20 befe9164 b6e7e490 4ab2bce8 befe9198 befe9d34 b6fa0ce0 befe93f8
[   46.691745] ffe0: b6ea1a08 befe9134 b6d66160 b6d660a8 20000010 ffffffff
[   46.698324]  r6:ffffffff r5:20000010 r4:b6d660a8 r3:4ab2bce8
[   46.703982] handlers:
[   46.706313] [<bf01d5bc>] usb_hcd_irq [usbcore]
[   46.710763] [<bf01d5bc>] usb_hcd_irq [usbcore]
[   46.715189] Disabling IRQ #111
[   46.718355] usb 2-1: USB disconnect, device number 2
[   46.727587] ftdi_sio ttyUSB0: error from flowcontrol urb
[   46.733151] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0
[   46.741634] ftdi_sio 2-1:1.0: device disconnected

Add Comment

Modify Ticket

Action
as assigned .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.