Linux 的 USB 无线适配器驱动程序

Linux 的 USB 无线适配器驱动程序

我正在尝试将 Atheros ar1021x(ath6kl 系列)USB 无线适配器连接到 Raspberry Pi(带有 4.14 内核)。

我的供应商提供了一份驱动程序源代码,但它适用于内核 3.18。由于内核 API 更改,它无法在我的 Raspberry Pi 上编译。

但我注意到内核 4.14 已经集成了 ath6kl 系列的驱动程序。并且dmesg日志包含

[    4.370769] ath6kl: Failed to get board file ath6k/AR6004/hw3.0/bdata.bin (-2), trying to find default board file.
[    4.692766] ath6kl: Failed to init ath6kl core: -2

我猜这个ar1021x芯片需要AR6004/hw3.0/bdata.bin文件,并且ar1021x 与 ar9374x 和 ar6004x 类似。 我发现hw3.0 这里。所以我将hw3.0目录复制到了/lib/firmware/ath6k/AR6004/。在这个目录中,已经存在hw1.2hw1.3

  • 现在我的第一个问题是,hw1.2hw1.3和 是什么hw3.0意思?系统如何确定hw启动 ar1021x 芯片所需的是什么?
  • hw3.0目录中,有一个fw-5.bin文件。这是5版本号吗?

重启后,我可以wlan1在 中获得一个新接口ifconfig。但是,此接口的标志是flags=4099<UP, BROADCAST, MULTICAST>,没有RUNNING。并且 给出的 tx-poweriwconfig为 0 dBm。我尝试使用 来sudo iwconfig wlan1 txpower 20更改传输功率,但它出错了

Error for wireless request "Set Tx Power" (8B26) :
    SET failed on device wlan1 ; Operation not supported.

我可以用来sudo wiliest wlan1 scanning查找一些接入点,但我无法加入这些 AP。我试过这个wpa_supplicant.conf文件,但它不起作用。我还尝试过禁用 Raspberry Pi 的板载无线适配器,但也没有用。

以下信息可能会有所帮助:

dmesg | grep ath输出:

[   10.101457] ath6kl: htc pipe control receive timeout!
[   10.101466] ath6kl: htc wait target timed out, resetting device
[   10.101951] ath6kl: Failed to start hardware: -110
[   10.102079] ath6kl: Failed to init ath6kl core: -110
[   10.102406] ath6kl_usb: probe of 1-1.1.2:1.0 failed with error -110
[   10.102526] usbcore: registered new interface driver ath6kl_usb
[   11.942056] ath6kl: ar6004 hw 3.0 usb fw 3.5.0.349-1 api 5
[   11.942067] ath6kl: firmware supports: 64bit-rates,map-lp-endpoint,ratetable-mcs15,no-ip-checksum
[   11.942696] ath6kl: Firmware lacks RSN-CAP-OVERRIDE, so HT (802.11n) is disabled.

lsusb -v输出:

Bus 001 Device 006: ID 0cf3:9374 Atheros Communications, Inc. 
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass          255 Vendor Specific Class
  bDeviceSubClass       255 Vendor Specific Subclass
  bDeviceProtocol       255 Vendor Specific Protocol
  bMaxPacketSize0        64
  idVendor           0x0cf3 Atheros Communications, Inc.
  idProduct          0x9374 
  bcdDevice            1.00
  iManufacturer           1 
  iProduct                2 
  iSerial                 3 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          118
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              200mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           9
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              2 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               8
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               8
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               8
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               8
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               8
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               8
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               8
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x04  EP 4 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               8
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x05  EP 5 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               8
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       1
      bNumEndpoints           4
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              2 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               8
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               8
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x04  EP 4 OUT
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1

sudo lshw -C network输出:

  *-network:0               
       description: Wireless interface
       physical id: 2
       logical name: wlan0
       serial: b8:27:eb:e7:c4:28
       capabilities: ethernet physical wireless
       configuration: broadcast=yes driver=brcmfmac driverversion=7.45.154 firmware=01-4fbe0b04 ip=192.168.1.102 multicast=yes wireless=IEEE 802.11
  *-network:1
       description: Wireless interface
       physical id: 3
       logical name: wlan1
       serial: 20:32:33:af:4b:7b
       capabilities: ethernet physical wireless
       configuration: broadcast=yes driver=usb driverversion=4.14.98-v7+ firmware=3.5.0.349-1 link=no multicast=yes wireless=IEEE 802.11
  *-network:2
       description: Ethernet interface
       physical id: 4
       logical name: eth0
       serial: b8:27:eb:b2:91:7d
       size: 10Mbit/s
       capacity: 1Gbit/s
       capabilities: ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=lan78xx driverversion=1.0.6 duplex=half link=no multicast=yes port=MII speed=10Mbit/s
  • 那么,这到底是什么问题,以及如何让 ar1021x 芯片工作?

相关内容