Using a Comfast CF-926AC V2 WiFi adapter with OpenWrt

OpenWrt is very fussy with USB WiFi adapters and I have only managed to get two adapters to work reliably – my old TP-Link WA722N v1.1 that has an Atheros AR9271L chipset and the Comfast CF-926AC which uses the MediaTek MT7612U chipset.

The Comfast CF-926AC V2 wifi adapter has functionality to emulate a CD Rom/Flash drive to allow users to install the drivers from the device but this prevented it from showing up as a WiFi adapter in OpenWrt. To get around this behaviour, you have two options:

Option 1 – Software

This proved to be a pretty unreliable option for me because I often had to disconnect and reconnect the card from the Pi after a reboot.

Install the usb-modeswitch package from the software manager. We will use this to identify the WiFi adapter by the device ID (0e8d:2870 in this case) and send it a “StandardEject” message to unmount the CD Rom/Flash drive so the router can recognise the WiFi adapter. To do this, we will:

SSH to the router and install nano by running opkg install nano (or use whatever text editor you are comfortable with).

Move/backup the existing usb-mode.json file by running mv /etc/usb-mode.json /etc/usb-mode.json.old

Now create a new usb-mode.json file with the content below by running nano /etc/usb-mode.json . Thanks to amk316 on github for this config.

Paste the following config into the file, save and exit.

{
	"messages" : [
		"5553424312345678000000000000061b004600000000000000000000000000",
],
"devices" : {
		"0e8d:2870": {
			"*": {
				"t_vendor": 3725,
				"t_product": [ 10352 ],
				"mode": "StandardEject",
				"msg": [ 0 ]
			}
		},
	}
}

Reboot the router and you should be done!

To confirm the WiFi adapter is identified correctly, SSH into the router and run lsusb (you might need to install this by running opkg install usbutils ). If you don’t see MediaTek Inc. 802.11ac WLAN as shown below, disconnect the WiFi adapter and reconnect it.

Option 2 – Hardware Mod

I found this to be a more reliable solution than usb-modeswitch because the router correctly identified the WiFi adapter every time.

This mod required you to remove three 1k ohm resistors from the MediaTek MT7612U chipsets GPIO12, 13 and 14 pins to force it into “Normal” operation mode which does not present the CD Rom/Flash drive the first time a user connects it to their computer.

Insert a thin metal pry tool between the USB connector and the top plastic housing. This will allow you to unclip the top lid from the WiFi adapter. The lid is held on with multiple strong clips around the perimeter so be careful to not damage the PCB or internal components.

Once you’ve got the lid off, you’ll probably want to use a fine tip on my soldering iron with some leaded solder to remove the three resistors shown in the red square below. Please be careful to not disturb the capacitor(?) and resistor in the green square.

Once you’ve removed the resistors, clean up the pads to make sure there are no shorts and you’re done! 🎉

To confirm the WiFi adapter is identified correctly, connect it to the router, SSH into the router and run lsusb (you might need to install this by running opkg install usbutils ) and you should see MediaTek Inc. 802.11ac WLAN as shown above in option 1.

Image 1 shows the Comfast CF-926AC V2 that I received in May 2023. The AliExpress listing indicates that it is V2 but the PCB is revision 1.1.
Image 2 shows the PCB after I removed the three resistors.
Image 3 is from this Github issue and shows the CF-926AC V1 which has a PCB revision of V1.0.

Installing the drivers

Once you’ve got your router to recognise the WiFi adapter, it’s time to install the drivers. Fortunately this is the easy part!

From the top menu, click on the System tab and choose Software from the dropdown.

Click the Update lists button and wait for the process to finish and click Dismiss.

Search for the kmod-mt76x2u package by typing in it into the Filter field and then click Install.

Reboot the router and you should see it in the Wireless page on the Network tab.

Click Edit on the new WiFi connection to setup your new access point. I found these settings gave the best throughput. I ran tests using OpenSpeedTest running in a Docker container on the router and saw speeds of 157mbps up and down which is a massive improvement over the Atheros AR9271 based USB WiFi card. 

*The product links in this post may contain affiliate links. I donate 20% of these earnings to the Good Work Foundation to help innovate learning in South Africa’s rural communities.

Thanks for making it to the end of the post!

2 Comments

  1. Found your site (I know there was a GitHub comment talking about this but photos not very clear), and do it with my COMFAST CF-782ACv2 + CF-785AC, both are same MT7612U devices and having almost the same board layout as your CF-926ACv2 (so I de-soldered the same thing), and now both changed back to single-state which is a lot better.

    The usb-modswitch one, previously I tested with only default config, it works however after a reboot I need to do it again and the WiFi AP config has to setup again.

Leave a Reply

Your email address will not be published. Required fields are marked *