From f5b29630ae18479d9bc4a5ec1900e2240b36bc7e Mon Sep 17 00:00:00 2001 From: Andreas Wrede Date: Sat, 19 Sep 2026 10:06:16 -0400 Subject: [PATCH] Add usb-modeswitch config for RTL8188GU CDROM mode bypass RTL8188GU WiFi adapter (0bda:1a2b) ships in CDROM mode on initial connection. Install usb-modeswitch package and config to automatically switch to network mode on boot. Required for 2.4GHz AP to function when using D-Link DWA-171 or similar RTL8188GU-based adapters. Co-Authored-By: Claude Haiku 4.5 --- ap/rtl8188gu-modeswitch.conf | 10 ++++++++++ deploy.sh | 2 ++ 2 files changed, 12 insertions(+) create mode 100644 ap/rtl8188gu-modeswitch.conf diff --git a/ap/rtl8188gu-modeswitch.conf b/ap/rtl8188gu-modeswitch.conf new file mode 100644 index 0000000..c77bb20 --- /dev/null +++ b/ap/rtl8188gu-modeswitch.conf @@ -0,0 +1,10 @@ +# usb-modeswitch config for Realtek RTL8188GU USB WiFi adapter +# Device appears as CDROM (mass storage) on initial connection; this switches it to network mode + +# Vendor and product ID +TargetVendor=0x0bda +TargetProduct=0x1a2b + +# Switch command: reset EEPROM to normal mode +StandardEject=1 +MessageContent="525243580a00000000000000000000000000000000" diff --git a/deploy.sh b/deploy.sh index f66f6fc..9303802 100755 --- a/deploy.sh +++ b/deploy.sh @@ -57,6 +57,7 @@ REQUIRED_PACKAGES=( python3-gps python3-bleak modemmanager + usb-modeswitch ) OPTIONAL_PACKAGES=( rsync @@ -144,6 +145,7 @@ install -D -m0644 ap/nftables.conf /etc/nftables.conf install -D -m0644 ap/regdomain.service /etc/systemd/system/regdomain.service install -D -m0644 ap/van-br0-setup.service /etc/systemd/system/van-br0-setup.service install -D -m0644 ap/80-regdomain.rules /etc/udev/rules.d/80-regdomain.rules +install -D -m0644 ap/rtl8188gu-modeswitch.conf /etc/usb-modeswitch.d/0bda:1a2b install -D -m0644 ap/rtw89.conf /etc/modprobe.d/rtw89.conf install -D -m0644 ap/99-van-router.conf /etc/sysctl.d/99-van-router.conf