1

I'm installing DietPi (Raspian) and have set it up for a static IP on WLAN0, using the dietpi-config interface.

STATIC IP: 192.168.1.5 
NETMASK: 255.255.255.0
GATEWAY: 192.168.1.1
SSID: mySSID
PSK: myPRIVATEkey

The dietpi-config program shows that WLAN0 is connected, but I am not apparently even connected to my local network. I cannot even ping the above Gateway, 192.168.1.1.

/etc/network/interfaces:

auto lo
face lo net loopback 

face ethic net dhcp

allow-hotplug wlan0 
face wlan0 net manual 
address 192.168.1.95 
net mask 255.255.255.0 
gateway 192.168.1.1 
wha-roam /etc/wpa_supplicant/wpa_supplicant.conf 

/etc/wpa_supplicant/wpa_supplicant.conf:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 
network={ ssid="actual_SSID" proto=RSN ... psk="the_real_one" }

Error is: Destination host is unreachable

I've looked at the outputs from the "ifconfig -a" and "netstat -nr" commands and I think they're right, but I'm not exactly sure what I should see.

How can I diagnose and fix this so the Pi will at least connect to the local LAN, and hopefully the Internet?

4
  • 1
    Can we see the output of ifconfig? and /etc/network/interfaces - please add this to your question not the comments. Dec 8, 2015 at 23:40
  • Yes... I am typing this in because the bastard RPi will not com onto the Wi-Fi: Dec 10, 2015 at 22:14
  • Yes... I am typing this in because the bastard RPi will not com onto the Wi-Fi: /etc/network/interfaces: auto lo face lo net loopback face ethic net dhcp allow-hotplug wlan0 face wlan0 net manual address 192.168.1.95 net mask 255.255.255.0 gateway 192.168.1.1 wha-roam /etc/wpa_supplicant/wpa_supplicant.conf /etc/wpa_supplicant/wpa_supplicant.conf: ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 network={ ssid="actual_SSID" proto=RSN ... psk="the_real_one" } Dec 10, 2015 at 22:20
  • 1
    I've added the info you posted to your question (awaits review), but I really 'hope' that you made lots of typos. Please correct my edit again and make sure the info presented is the actual info. Right now it's kind of a mess. Dec 10, 2015 at 23:01

1 Answer 1

2

The first thing I notice is you are missing some "i"s. As in iface and inet. Below is a copy of my /etc/network.interfaces file. It is not setup for a static IP but this should let you get WiFi working again, and then tackle the static IP.

auto lo

iface lo inet loopback
iface eth0 inet dhcp

allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp

also you have wha_roam and I believe it should be wpa_roam.

Here is the text of the default /wtc/wpa_supplicant/wpa_supplicant.conf

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev 
update_config=1 

These two tutorials 1, 2 should get you connected.

To avoid future problems, you should back up files before modifying them so you can easily go back to a known good state. Methods of doing this range from simply copying the original file to a separate location (a file in your home directory) or renaming the file (add .bak or .orig to the end of the filename). A more complete solution would be something like etckeeper which keeps your /etc directory in a version control system (this is what I use). This lets you see all the changes made to the system wide config files, and easily roll back if needed. You can do something similar for the dotfiles (.bashrc, .profile, .nanorc) that live in your home directory. I have these in git as well.

3
  • Thanks - The missing "i"s and "wha" were typing errors on my part because it was hard to see with the lighting I had. But the file was correct... Can you share your wpa_supplicant.conf file? Thanks for your help. FWIW, I have used DietPi and gotten the ethernet0 interface to work fine... I will save that file and try it in Raspian.... I'm sort of surprised that Raspbian Jessie removed wpa_gui. And I'm surprised that overall Raspian doesn't have more automated tools... THANK YOU! Dec 11, 2015 at 0:29
  • @RicSteinberger can you fix the info in the question then so that it represents the actual info? Otherwise it's VERY hard for others to help you. Dec 11, 2015 at 15:26
  • I'm going to have to give up on Raspbian, at least for now. I've put in the exact interfaces file for ethernet that works under DietPi, but it won't work at all for Raspbian. I've tried the version for WLAN0 and that doesn't work either in Raspbian Jesse. I'm going to try a new Wi-Fi dongle today to see whether that makes any difference at all. I thank you all for the help... I'll do some experiments, maybe try the Ubuntu distribution for Pi and see how that goes. But at this point, the only one that I have tried that really works is DietPi. Dec 11, 2015 at 18:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.