当前位置:网站首页>Raspberry pie drum set WiFi

Raspberry pie drum set WiFi

2020-11-09 23:48:29 Xiaochen master

Raspberry pie comes with a wireless network card , So you can connect wifi.

The raspberry pie system environment in this paper is Ubuntu Server 20.04, other Linux The systems are all the same .

ssh Go to raspberry pie .

1. The first step is to set the time zone

sudo tzselect

#  choice 4 Aisa

#  And then choose 9 China

#  Then choose 1 Beijing Time

#  The final choice 1  confirm 

sudo cp /usr/share/zoneinfo/Asia/Shanghai  /etc/localtime

Execute after setting date -R See if the time is right .

2. Set up wifi

cd /etc/netplan/
sudo vim 50-cloud-init.yaml

After opening, there should be the following content :

# This file is generated from information provided by the datasource.  Changes
# to it will not persist across an instance reboot.  To disable cloud-init's
# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
    ethernets:
        eth0:
            dhcp4: true
            optional: true
    version: 2

Now we need to add one wifi Configuration of , Examples are as follows :

# This file is generated from information provided by the datasource.  Changes
# to it will not persist across an instance reboot.  To disable cloud-init's
# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
    ethernets:
        eth0:
            dhcp4: true
            optional: true
    wifis:
        wlan0:
            dhcp4: true
            access-points:
                <wifi name >:
                    password: "<wifi password >"
    version: 2

Save after editing , And then execute the command

sudo netplan --debug apply

3. Check the settings

Carry out orders ifconfig Check if there is a network card wlan0 Information about , And got it ip, Finally through this ip Conduct ssh Connect , If the connection is successful , Then there is no problem .

版权声明
本文为[Xiaochen master]所创,转载请带上原文链接,感谢