From charlesreid1

(Created page with "See the following repo, which has details of how to configure <code>/etc/network/interfaces</code>: https://git.charlesreid1.com/rpi/pi-join-wifi The basics: ==Joining Une...")
 
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
=Wifi Config for UGR Wifi Project=
See the following repo, which has details of how to configure <code>/etc/network/interfaces</code>:
See the following repo, which has details of how to configure <code>/etc/network/interfaces</code>:


Line 7: Line 9:
==Joining Unencrypted Wifi==
==Joining Unencrypted Wifi==


This supposes you want to join a wifi network called MyWifiNetwork that is unencrypted. Add the following wireless network information to </code>/etc/network/interfaces.d/widy.cfg</code>, which is a config file specific to this wifi router that you can use to swap wifi network configurations in and out:
This supposes you want to join a wifi network called MyWifiNetwork that is unencrypted. Add the following wireless network information to <code>/etc/network/interfaces.d/widy.cfg</code>, which is a config file specific to this wifi router that you can use to swap wifi network configurations in and out:


<pre>
<pre>
Line 27: Line 29:
source /etc/network/interfaces.d/mywifi.cfg
source /etc/network/interfaces.d/mywifi.cfg
</pre>
</pre>
Once you get these two network configuration files squared away, the Raspberry Pi should join that wifi network on boot.
==Joining Encrypted Wifi==
To join an encrypted wifi, use a slightly different syntax for the config file. Call this <code>securenet.cfg</code> and put it in <code>/etc/network/interfaces.d/securenet.cfg</code>:
<pre>
auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhp
wpa-ssid SecureNetwork
wpa-psk abcdefg123
</pre>
Next, reference this file in the <code>/etc/network/interfaces</code> file the same way as for unsecured networks:
<pre>
...
source /etc/network/interfaces.d/securenet.cfg
</pre>
This should connect to the wifi network SecureNetwork automatically on boot.
=Making Raspberry Pi a Hotspot=
{{Main|RaspberryPi/Hotspot}}
=Debugging=
If the wifi network is not connecting, or is not connecting on boot, check <code>/var/log/syslog</code>, which will contain a detailed error log from the network.
=Flags=
{{PiFlag}}

Latest revision as of 02:46, 24 November 2019

Wifi Config for UGR Wifi Project

See the following repo, which has details of how to configure /etc/network/interfaces:

https://git.charlesreid1.com/rpi/pi-join-wifi

The basics:

Joining Unencrypted Wifi

This supposes you want to join a wifi network called MyWifiNetwork that is unencrypted. Add the following wireless network information to /etc/network/interfaces.d/widy.cfg, which is a config file specific to this wifi router that you can use to swap wifi network configurations in and out:

auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wireless-essid OpenWrt

Next, include this config file in your /etc/network/interfaces file by adding the last line shown to it:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

source /etc/network/interfaces.d/mywifi.cfg

Once you get these two network configuration files squared away, the Raspberry Pi should join that wifi network on boot.

Joining Encrypted Wifi

To join an encrypted wifi, use a slightly different syntax for the config file. Call this securenet.cfg and put it in /etc/network/interfaces.d/securenet.cfg:

auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhp
wpa-ssid SecureNetwork
wpa-psk abcdefg123

Next, reference this file in the /etc/network/interfaces file the same way as for unsecured networks:

...

source /etc/network/interfaces.d/securenet.cfg

This should connect to the wifi network SecureNetwork automatically on boot.

Making Raspberry Pi a Hotspot

Debugging

If the wifi network is not connecting, or is not connecting on boot, check /var/log/syslog, which will contain a detailed error log from the network.

Flags