Getting the T-Mobile Jet (Huawei 366) USB Modem to work in Linux

I recently purchased a cheap T-mobile broadband USB stick for use with my Debian Linux laptop. The device is the T-Mobile Jet 2.0 — a rebranded Huawei UMG366.

After putting the SIM card in, I noticed that NetworkManager was unable to see the card. Some DuckDuckGo-ing led me to this Linux Mint forum post.

Apparently these sticks show up as a USB hard drive when you plug them in. This lets them include the drivers with the stick. Ejecting the drive activates the internet connection. You can use a piece of software called usb_modeswitch to change the device mode.

The last post in the aforementioned thread has basically the correct step to take in order to get the device to work properly. Instead of editing the system udev rule file, I added a new rule into /etc/udev/rules.d/41-huawei.rules.

# Huawei E366 (T-mobile Wind)
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1446", RUN+="usb_modeswitch '%b/%k'"

Speed tests were as follows using speedtest-cli from the Debian repository:

Testing from T-Mobile USA (172.56.36.162)...
Selecting best server based on latency...
Hosted by Atlantic Metro (New York City, NY) [6.18 km]: 144.517 ms
Testing download speed........................................
Download: 3.92 Mbits/s
Testing upload speed..................................................
Upload: 0.91 Mbits/s

This is a about 2x faster than Bluetooth tethering to my LTE phone. The download speed from the Ookla app on my smartphone was about 6Mbits/s. The HSPA+ speed from the dongle is perfectly acceptable.