Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- enter disk write mode
- rw
- find wireless adapter:
- commands:
- use either
- ip a
- or
- ls /sys/class/net
- Pi 4 should be wlan0
- create a config file which allows wpa_supplicant to use the network adapter
- vi /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
- contents:
- ctrl_interface=/run/wpa_supplicant
- update_config=1
- p2p_disabled=1
- start wap_supplicant
- wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
- once started use wpa_cli to find and configure wireless
- wpa_cli
- >
- >scan
- once scan completes run
- >scan_results
- Note: this is time sensitive. run scan_results right after scan completes.
- configure the access point
- >add_network
- >set_network 0 ssid <ssid>
- >set_network 0 psk <wpa_password>
- > enable_network 0
- Kill the wpa process so it can re-read the wpa_supplican-wlan0.conf
- pkill wpa
- Restart the wpa process
- wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
- check wlan0 and make sure it is up. Note this just sets the carrier and not the ip address
- # ip link show wlan0
- should return
- wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
- enable wpa_supplicant to start at system start
- systemctl enable wpa_supplicant@wlan0.service
- Setup wlan0 ip address.
- copy /etc/systemd/network/eth0.network to /etc/systemd/network/wlan0.network
- cp /etc/systemd/network/eth0.network /etc/systemd/network/wlan0.network
- vi /etc/systemd/network/wlan0.network
- change
- [Match]
- Name=eth0
- to
- Name=wlan0
- If you are using DHCP for eth0 then you are all set. If you set a static IP on eth0 and what DHCP on wifi then change [Network] to use DHCP
- [Network]
- DHCP=yes
- DNSSEC=no
- For a static IP use
- [Network]
- Address=<ip_address>/<mask cidr value> (255.255.255.0 = 24 etc)
- Gateway=<gateway ip address>
- DNS=<dns 1>
- DNS=<dns 2>
- DNS=<dns 3>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement