我有 BeagleBone Black Wireless,并且我已经将Ubuntu 16.04 刷到了它。我正在尝试使 WiFi 正常工作,但到目前为止都失败了。我已经尝试/etc/network/interfaces
通过添加以下命令来修改文件wlan0
,但没有任何运气:
auto wlan0
iface wlan0 inet static
address 192.168.1.2
netmask 255.255.255.0
gateway 192.168.1.1
wireless-mode ad-hoc
wireless-essid BBB
在一些论坛中,人们建议使用connmanctl
,但是在 Ubuntu 中没有这样的预安装包。我也不能把它下载到 BBBw,因为它的 WiFi 不工作。我尝试通过与 PC 的 USB 连接将 BBBw 连接到互联网,我将此连接编辑为“与其他计算机共享”,但同样,我没有与 BBBw 的互联网连接。
总而言之,我的问题是:有没有一种简单的方法可以使 BBBw(使用 Ubuntu)的 WiFi 工作,而无需使用connmanctl
?
如果没有,任何有关如何安装的详细信息connmanctl
将不胜感激。
我包括了整个/etc/network/interfaces
文件,以及我添加的部分,它出现在注释“以下行wlan0
由我添加”之后。
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet dhcp
# Example to keep MAC address between reboots
#hwaddress ether DE:AD:BE:EF:CA:FE
# The following lines for the wlan0 were added by me
# Ad-Hoc wifi
auto wlan0
iface wlan0 inet static
address 192.168.1.2
netmask 255.255.25a5.0
gateway 192.168.1.1
wireless-mode ad-hoc
wireless-essid BBB
##connman: ethX static config
#connmanctl services
#Using the appropriate ethernet service, tell connman to setup a static IP address for that service:
#sudo connmanctl config <service> --ipv4 manual <ip_addr> <netmask> <gateway> --nameservers <dns_server>
##connman: WiFi
#
#connmanctl
#connmanctl> tether wifi off
#connmanctl> enable wifi
#connmanctl> scan wifi
#connmanctl> services
#connmanctl> agent on
#connmanctl> connect wifi_*_managed_psk
#connmanctl> quit
# Ethernet/RNDIS gadget (g_ether)
# Used by: /opt/scripts/boot/autoconfigure_usb0.sh
iface usb0 inet static
address 192.168.7.2
netmask 255.255.255.252
network 192.168.7.0
gateway 192.168.7.1