Open Fabian42 opened 6 years ago
Is there any update on this? Im experiencing similar problems.
Hello. I've just had the same problem. From doing some reading a found out this: (Follow italics in terminal) cd /etc/network sudo cp interfaces interfaces.BAK sudo nano interfaces
Replace lines in the interfaces file with: auto lo iface lo inet loopback
iface eth0 inet manual
allow-hotplug wlan0 iface wlan0 inet manual wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
_ctrl+x y (enter button)
cd .. cd wpa_supplicant sudo cp wpa_supplicant.conf wpa_supplicant.conf.BAK sudo nano wpasupplicant.conf
Replace lines with these (Most of this should be already there. For me RPI Wireless Gotspot did not alter this file but it is still worth checking):
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1
network={ ssid="YourRouter" psk="YourRouter'sPassword" }
ctrl+x y (enter button) sudo reboot
That's it!
Optional: For a static ip do the following:
sudo cp dhcpcd.conf dhcpcd.conf.BAK sudo nano dhcpcd.conf
Replace with these lines:
interface eth0 static ip_address=IP you want* static routers=router's ip**
interface wlan0 static ip_address=IP you want* static routers=router's ip**
ctrl+x y (enter button) sudo reboot
OR
You can set a static ip by right-clicking the wi-fi icon in your taskbar then selecting "Wireless & Wired Network Settings"
A few notes: *IP you want - just select an ip for your raspberry pi within your router **Router's IP - You can find this on the bottom or back of your router. You can also using a windows machine open the command prompt and type in "ipconfig" Look for a line that says "Default Gateway" I assume you can do similar on Mac but am not familiar with the apple terminal.
Hope this helps!
After installing the hotspot with this script, the connection to ETH0 is missing on most reboots. I've set my Raspberry up to reboot whenever it has no LAN connection, so every reboot triggers multiple more reboots. Eventually it gets a connection, but it takes a few minutes.
I don't know how to log anything related to this, but it happens on most starts, seemingly randomly.