Turns out there's more to the Xbox One Wireless Adapter than I expected
Today I encountered something interesting. I was in the middle of installing Budgie on my desktop to give it a try when a popup appeared. Ubuntu concluded that my WiFi was now disconnected.
Strange, I thought, I don't think installing packages should interfere with my WiFi drivers, should it?
Then I remembered that on my desktop, there is no such thing as WiFi. Or so I thought. So what's up with that?
After experimenting with the settings, I concluded that I could, indeed, use this new WiFi adapter to connect to networks and do all the things I could ever want, although the WiFi settings did indicate that the connection speed was "1 mbps".
First I thought I was accidentally remoted into my laptop, but I realised that couldn't be because it was drying off after accidentally placing it in a puddle of water (not a good experience, in general, wouldn't recommend).
The next thing I did was run
lshw -c network to see where this magical new WiFi adapter was coming from.
*-network:5 description: Wireless interface physical id: 6 bus info: usb@1:13 logical name: wlp0s20f0u13 serial: 62:45:b4:ed:e3:11 capabilities: ethernet physical wireless configuration: broadcast=yes driver=mt76x2u driverversion=5.0.0-20-generic firmware=0.0.00-b1 ip=10.1.1.51 link=yes multicast=yes wireless=IEEE 802.11
Okay, so whatever it is, it's using a driver called
mt76x2u. Interesting; I never heard it. Whatever it is, it's plugged into the USB bus apparently. So, time for a quick Google. The first result was a page about the Linux kernel highlighting some details about the mentioned kernel driver. Good, that makes sense!
Scrolling down, I saw the list of devices being supported by this driver:
The first things I noticed were the third and fourth line, as I don't have any Microsoft networking devices but I do have an AVM Fritz!Repeater 1750E as my access point. I considered the possibility that some magical WiFi-over-LAN protocol existed and was enabled on my AP, but that seemed unlikely. On my second read-through, it hit me.
045e("Microsoft Corp."), product:
02e6("Wireless XBox Controller Dongle")
wait... an Xbox Controller dongle?
Well, it turns out the wireless controller I bought ages ago is interesting. I bought the wireless controller that doesn't have Bluetooth support just two months before the Bluetooth supported version came out. This version comes with a dongle that you plug in over USB. As it turns out, this dongle is just a WiFi adapter with a in disguise. Microsoft doesn't tell you this, so if you have it plugged in to your PC while you're running Windows, it's as if you just have a controller lying around.
Microsoft, being Microsoft, kept the controller protocol propietary. I have already given up getting the controller to work wirelessly months ago. Whatever I did to install Budgie must have awakened the dormant MT76x2U driver though, which doesn't care if it's talking to an Xbox controller or an ASUS WiFi dongle; it just works. I know the Linux kernel is great for making most hardware just work without any annoying driver installation, but this was a major surprise to me. Never before had a WiFi dongle just suddenly appeared on my system.
For those wondering, I'm getting about 60mbps bidirectional over this unexpected USB dongle according to iperf3. This leaves me wondering what other random functionality is lying in wait underneath the third-party drivers of major hardware vendors...Written by Jeroen on July 17, 2019