0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Raspberry Pi OS (Bookworm) でLAN-WH300NU2を認識させる手順

Posted at

環境

  • Raspberry Pi 3B
  • Raspberry Pi OS (Bookworm) 64bit
  • LAN-WH300NU2

手動

事前確認

lsusbでアダプタを認識しているものの、ドライバーが読み込まれていない。

# lsusb -t
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc_otg/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/5p, 480M
        |__ Port 1: Dev 3, If 0, Class=Vendor Specific Class, Driver=smsc95xx, 480M
        |__ Port 4: Dev 4, If 0, Class=Vendor Specific Class, Driver=, 480M

lsmodで確認するとrtl8192cuを読み込んでいない

# lsmod

iw dev で確認すると、当然無線デバイスとしても認識されていない

# iw dev
(内蔵の無線LANしか表示されない)

手動で認識させる

モジュールを読み込ませる

# modprobe rtl8192cu
# lsmod
(rtl8192cuが表示されたことを確認する)

デバイスとモジュールを紐づける

# echo "0789 016d" > /sys/bus/usb/drivers/rtl8192cu/new_id

確認

# lsusb -t
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc_otg/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/5p, 480M
        |__ Port 1: Dev 3, If 0, Class=Vendor Specific Class, Driver=smsc95xx, 480M
        |__ Port 4: Dev 4, If 0, Class=Vendor Specific Class, Driver=rtl8192cu, 480M

# iw dev
(無線デバイスが増えたことを確認できる)

自動設定

以下のように設定ファイルを作成し再起動する

$ cat /etc/udev/rules.d/rtl8192cu.rules
SUBSYSTEM=="usb",ACTION=="add",ATTR{idVendor}=="0789",ATTR{idProduct}=="016d",RUN+="/sbin/modprobe -qba rtl8192cu"
$ cat /etc/modprobe.d/rtl8192cu.conf 
install rtl8192cu /sbin/modprobe --ignore-install rtl8192cu $CMDLINE_OPTS; /bin/echo "0789 016d" > /sys/bus/usb/drivers/rtl8192cu/new_id
# reboot
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?