Skip to content

Instantly share code, notes, and snippets.

@winguse
Last active October 20, 2023 09:40
Show Gist options
  • Star 11 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save winguse/f2868016010fc8803a35ef195ea4b1eb to your computer and use it in GitHub Desktop.
Save winguse/f2868016010fc8803a35ef195ea4b1eb to your computer and use it in GitHub Desktop.
Tenda U9 on linux

Two files:

  • /etc/usb_modeswitch.d/rtl8821cu
  • /usr/share/usb_modeswitch/0bda:1a2b
TargetVendor=0x0bda
TargetProduct=0x1a2b
StandardEject=1

append followin lines to /lib/udev/rules.d/40-usb_modeswitch.rules

# Realtek rtl8821cu
# TargetVendor=0x0bda
# TargetProduct=0x1a2b
ATTR{idVendor}=="0bda", ATTR{idProduct}=="1a2b", RUN+="usb_modeswitch '/%k'"

hostapd.conf

interface=wlan1

ssid=ssid_nomap
wpa_passphrase=password



country_code=CN

driver=nl80211

wpa=2
wpa_key_mgmt=WPA-PSK
rsn_pairwise=CCMP

macaddr_acl=0

logger_syslog=0
logger_syslog_level=4
logger_stdout=-1
logger_stdout_level=0

hw_mode=a
wmm_enabled=1

# N
ieee80211n=1
require_ht=1
ht_capab=[MAX-AMSDU-7935][HT40+][SHORT-GI-20][SHORT-GI-40][DSSS_CCK-40]

# AC
ieee80211ac=1
require_vht=1
ieee80211d=0
ieee80211h=0
vht_capab=[MAX-AMSDU-7935]ht_capab=[MAX-AMSDU-7935][HT40][SHORT-GI-40][DSSS_CCK-40]
#vht_oper_chwidth=1
channel=36
#vht_oper_centr_freq_seg0_idx=42
@Moshiour027
Copy link

can you provide the files please or any source to download them ?

@mrpavlikov
Copy link

mrpavlikov commented Mar 23, 2020

First install this driver
https://github.com/brektrou/rtl8821CU

# Realtek rtl8821cu
# TargetVendor=0x0bda
# TargetProduct=0x1a2b
ATTR{idVendor}=="0bda", ATTR{idProduct}=="1a2b", RUN+="usb_modeswitch '/%k'"

these 4 lines ARE source of files you are asking about.

Got this working with Ubuntu 19.10.

@lysukhin
Copy link

Nice, it worked with 18.04. Thanks a lot!

@YuryKaravan
Copy link

Thank you so much. It works on linux mint 19.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment