dieskim
February 11, 2023, 2:07pm
1
Hi,I have been trying to set up a simple Router using a Raspberry Pi 4 and Openwrt but have been running into some issues with the Comfast CF-926AC Multi-State USB wifi.
I have gotten it to switch usb modes after installing "usbmode" when unplugging the device and re-plugging it but it does not seem to want to auto switch on boot. I found this Issue on the Openwrt Github but seems like there is no advice on what to do other than a hardware hack.
Any idea why the CF-926AC wont be auto mode switching on reboot?
Running usbmode -l
after a reboot shows the device with the same info as in /etc/usb-mode.json
but running usbmode -s -v -c /etc/usb-mode.json
does not cause it to modeswitch. The only way I can get it to switch modes is to unplug it and replug it then it switches right away.
Any ideas how I can get this to switch via the usbmode
command or another way?
Thanks any help and info appreciated. Happy to provide any debugging info that could help solve this issue.
Bill
February 11, 2023, 2:34pm
2
I see people want a software fix for this, and beside the other thread with the script, and seeing this is an old well documented issue.. idk why one would not just pop the hood and remove the resistors mentioned and be done with this.
dieskim
February 21, 2023, 7:00am
3
Just an update, I finally gave in an removed the resistors and its working well.
Also of note, I purchased and tried out two other Comfast Adapters, the 953AX and 951AX.
953AX seems to work on the usb 2.0 ports but you have to restart the adapter after every reboot - 953AX seems to work even less consistently but would sometimes work. It seems they dont initialize properly on reboot and you have to restart them. Not sure if its a hardware or software / driver issue but I gave up and removed the resistors on the CF-926AC and its working.
Still seems like there is a software issue somewhere since it switches modes on unplug / replug, but not on reboot, but nothing I can figure out at this stage.
BTW I saw someone made a script as workaround, not sure if it works, will try to test later:
opened 09:50AM - 11 Apr 20 UTC
In OpenWrt 19.07, I installed `kmod-mt76x2u` (version: 4.14.172+2020-03-10-08054… d5a-1-d3f64c5022212753017f85fd9365b83f.0) for Comfast CF-926AC. It is USB 3.0 dual-band 2T2R Wi-Fi dongle with chipset Mediatek MT7612U is detected as mass storage device.
On router:
dmesg:
```
[ 706.765409] usb 2-1: new high-speed USB device number 3 using xhci-hcd
[ 706.956529] usb-storage 2-1:1.0: USB Mass Storage device detected
[ 706.973423] scsi host3: usb-storage 2-1:1.0
[ 707.985568] scsi 3:0:0:0: CD-ROM MediaTek Flash autorun 0.01 PQ: 0 ANSI: 0 CC
```
lsusb -v
```
Bus 002 Device 006: ID 0e8d:2870 MediaTek Inc.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x0e8d MediaTek Inc.
idProduct 0x2870
bcdDevice 0.01
iManufacturer 1 Љ
iProduct 2 Љ
iSerial 3 Љ
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 32
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
MaxPower 160mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 8 Mass Storage
bInterfaceSubClass 6 SCSI
bInterfaceProtocol 80 Bulk-Only
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0002
(Bus Powered)
Remote Wakeup Enabled
```
On GNU/Linux distro with kernel `5.6.0-1-default`:
dmesg
```
[21706.282852] usb 1-2: new high-speed USB device number 6 using xhci_hcd
[21706.305276] usb 1-2: New USB device found, idVendor=0e8d, idProduct=2870, bcdDevice= 0.01
[21706.305281] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[21706.305284] usb 1-2: Product: Љ
[21706.305287] usb 1-2: Manufacturer: Љ
[21706.305289] usb 1-2: SerialNumber: Љ
[21706.308919] usb-storage 1-2:1.0: USB Mass Storage device detected
[21706.309516] scsi host4: usb-storage 1-2:1.0
[21706.967709] usb 1-2: USB disconnect, device number 6
[21707.879244] usb 2-3: new SuperSpeed Gen 1 USB device number 90 using xhci_hcd
[21707.901685] usb 2-3: New USB device found, idVendor=0e8d, idProduct=7612, bcdDevice= 1.00
[21707.901691] usb 2-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[21707.901694] usb 2-3: Product: 802.11ac WLAN
[21707.901697] usb 2-3: Manufacturer: MediaTek Inc.
[21707.901699] usb 2-3: SerialNumber: 000000000
[21708.039806] usb 2-3: reset SuperSpeed Gen 1 USB device number 90 using xhci_hcd
[21708.061751] mt76x2u 2-3:1.0: ASIC revision: 76120044
[21708.100333] mt76x2u 2-3:1.0: ROM patch build: 20141115060606a
[21708.249742] mt76x2u 2-3:1.0: Firmware Version: 0.0.00
[21708.249747] mt76x2u 2-3:1.0: Build: 1
[21708.249750] mt76x2u 2-3:1.0: Build Time: 201507311614____
[21709.208759] ieee80211 phy89: Selected rate control algorithm 'minstrel_ht'
[21709.845941] mt76x2u 2-3:1.0 wlp0s20f0u3: renamed from wlan0
```
lsusb -v
```
Bus 002 Device 102: ID 0e8d:7612 MediaTek Inc.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 3.00
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 9
idVendor 0x0e8d MediaTek Inc.
idProduct 0x7612
bcdDevice 1.00
iManufacturer 1
iProduct 2
iSerial 3
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x007a
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 2
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
MaxPower 800mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 8
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 2
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x84 EP 4 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x85 EP 5 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x08 EP 8 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x04 EP 4 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x05 EP 5 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x06 EP 6 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x07 EP 7 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x09 EP 9 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 1
```
Based on the USB ID, I see that [this](https://github.com/openwrt/mt76/blob/master/mt76x2/usb.c#L16) should be supported with this driver.
If there's anything what you need, let me know.