
我有一台 Lenovo Ideapad 100S 14'' IBR-14'' Intel Celeron CPU N3060 @ 1.60GHz、32GB SSD、4GB RAM,但我不知道我有什麼 wifi,因為有幾個不同的代,以及如何找到我必須在FreeBSD 中使用的驅動程式。
怎麼辦呢?
答案1
若要尋找驅動程式使用的核心 wifi,請執行以下操作:
$sysctl net.wlan.devices
net.wlan.devices: iwm0
所以我們現在知道我們必須使用 iwm0。
您還可以找到相應的硬體在做什麼:
$ pciconf -lv iwm0
iwm0@pci0:2:0:0: class=0x028000 card=0x82708086 chip=0x08b48086 rev=0x93 hdr=0x00
vendor = 'Intel Corporation'
device = 'Wireless 3160'
class = network
現在我們知道它是一款配備英特爾無線 AC 的型號,而且iwm0
;這是非常好的消息,因為這個型號賣給我時是因為能夠執行 bgn,而不是 802.11n AC。
雖然過去Intel 3160AC驅動程式必須編譯,但現在預設核心已經支援它。
現在進行設置,我們將在以下位置載入模組、韌體和支援的 wifi 身份驗證協定/etc/rc.conf
:
legal.intel.license_ack=1
if_iwm_load="YES"
iwm3160fw_load="YES"
wlan_wep_load="YES"
wlan_ccmp_load="YES"
wlan_tkip_load="YES"
同樣在 中/etc/rc.conf
,將定義wpa_supplicant
DHCP 用戶端,啟動介面並將國家定義為 PT,以便以更適合我國的更強頻率進行傳輸:
wpa_supplicant_enable="YES"
synchronous_dhclient="YES"
wlans_iwm0="wlan0"
create_args_wlan0="country PT"
現在搜尋wpa_config
並安裝它:
#pkg search wpa_config
wpa_gui-2.6 Qt-based frontend for wpa_supplicant
wpa_supplicant-2.6 Supplicant (client) for WPA/802.1x protocols
#pkg install wpa_gui wpa_supplicant
現在編輯/etc/wpa_supplicant.conf
:
ctrl_interface=/var/run/wpa_supplicant
network={
ssid="my_ssid"
priority=146
scan_ssid=1
psk="wifipassword"
}
重新啟動後,您可以看到這些行,或稍後使用dmesg
.
iwm0: hw rev 0x160, fw ver 17.352738.0, address f4:06:69:xx:xx:xx
wlan0: Ethernet address: f4:06:69:xx:xx:xx
iwm0: iwm_update_edca: called
iwm0: iwm_update_edca: called
wlan0: link state changed to UP
我們現在擁有 wifi 連線、IP 位址和網路連線。
$ ifconfig wlan0
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether f4:06:69:xx:xx:xx
inet 192.168.1.9 netmask 0xffffff00 broadcast 192.168.1.255
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
media: IEEE 802.11 Wireless Ethernet OFDM/54Mbps mode 11g
status: associated
ssid xxxx channel 13 (2472 MHz 11g) bssid 30:b5:c2:xx:xx:xx
regdomain ETSI country PT authmode WPA2/802.11i privacy ON
deftxkey UNDEF AES-CCM 2:128-bit AES-CCM 3:128-bit txpower 30 bmiss 10
scanvalid 60 protmode CTS wme roaming MANUAL
groups: wlan
最後,為了以圖形方式配置它,您可以使用wpa_gui
;如果使用 Lumina,您也可以安裝pcbsd-utils
以在托盤上顯示 wifi 圖示。
若要在命令列中列出可用的 SSID,請執行下列操作:
#ifconfig wlan0 list scan
SSID/MESH ID BSSID CHAN RATE S:N INT CAPS
MEO-1608CD c4:ea:1d:16:08:cd 1 54M -87:-96 100 EP RSN HTCAP WPS WPA WME
MEO-WiFi c6:ea:1d:16:08:ce 1 54M -89:-96 100 ES HTCAP WME
Vodafone-11... 9c:97:26:11:ad:10 1 54M -70:-96 100 EP RSN HTCAP WPS WPA WME
NOS-14F0 f0:f2:49:99:14:f8 12 54M -88:-96 100 EPS WPS HTCAP WPA RSN WME BSSLOAD
NOS_WIFI_Fon bc:4d:fb:53:65:d9 12 54M -88:-96 100 ES HTCAP WME BSSLOAD
xxxx 30:b5:c2:xx:xx:xx 13 54M -44:-96 100 EPS RSN HTCAP WME
xxxxx 30:b5:c2:xx:xx:xx 36 54M -50:-96 100 EP RSN HTCAP VHTCAP VHTOPMODE WME
MEO-A8E087-5G e2:b9:e5:a8:e0:87 60 54M -78:-96 100 EP RSN HTCAP VHTCAP VHTOPMODE VHTPWRENV WPS WPA WME
oLi oNe 2c:9d:1e:d3:22:c0 124 54M -75:-96 98 EP RSN BSSLOAD HTCAP VHTCAP VHTOPMODE VHTPWRENV WPS WPA WME
進一步閱讀:FreeBSD 手冊30.3。無線網路