I have recently set up an armhf based board and I have this problem with its network configuration. Right now it has a TP-Link USB WiFi adapter connected to it and seemingly im able to connect to my WiFi to it, but when I unplug the ethernet cable, im not able to connect to the board using the IP address i configured in /etc/network/interfaces. I checked the access point too, but according to it, my device was never connected to it over WiFi.

I'm a bit lost, since it seems to work perfectly according to the stats. This is what i have so far:

$ tail -n [changes] /var/log/syslog

Mar 30 23:09:24 localhost kernel: [  830.968410] sun7i-dwmac 1c50000.ethernet eth0: Link is Down
Mar 30 23:09:50 localhost kernel: [  856.968094] sun7i-dwmac 1c50000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx

Connection seems to be up and running

$ iw wlan0 link
      Connected to xx:67:5x:e1:9f:af (on wlan0)
      SSID: UPCA887FD1
      freq: 2452
      RX: 187653 bytes (1131 packets)
      TX: 500 bytes (6 packets)
      signal: -48 dBm
      tx bitrate: 57.8 MBit/s MCS 5 short GI

      bss flags:    short-slot-time
      dtim period:  1
      beacon int:   100

$ iwconfig
      eth0      no wireless extensions.

      wlan0     IEEE 802.11  ESSID:"nietwurk"
      Mode:Managed  Frequency:2.452 GHz  Access Point: xx:67:5x:e1:9f:af
      Bit Rate=72.2 Mb/s   Tx-Power=20 dBm
      Retry short limit:7   RTS thr:off   Fragment thr:off
      Encryption key:off
      Power Management:off
      Link Quality=66/70  Signal level=-44 dBm
      Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
      Tx excessive retries:0  Invalid misc:0   Missed beacon:0

      lo        no wireless extensions.

$ ifconfig 

      wlan0   Link encap:Ethernet  HWaddr 64:70:02:0e:10:99
              inet addr:  Bcast:  Mask:
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:4494 errors:0 dropped:2 overruns:0 frame:0
              TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:498743 (487.0 KiB)  TX bytes:1338 (1.3 KiB)

$ ifup -vvv wlan0
    Configuring interface wlan0=wlan0 (inet)
    run-parts --exit-on-error --verbose /etc/network/if-pre-up.d
    run-parts: executing /etc/network/if-pre-up.d/bridge
    run-parts: executing /etc/network/if-pre-up.d/ethtool
    run-parts: executing /etc/network/if-pre-up.d/hostapd
    run-parts: executing /etc/network/if-pre-up.d/ifenslave
    + [ inet = meta ]
    + [  ]
    + [  ]
    + [ -z  ]
    + exit
    run-parts: executing /etc/network/if-pre-up.d/vlan
    run-parts: executing /etc/network/if-pre-up.d/wireless-tools
    run-parts: executing /etc/network/if-pre-up.d/wpasupplicant
    wpa_supplicant: wpa-driver nl80211,wext (default)
    wpa_supplicant: /sbin/wpa_supplicant -s -B -P /run/wpa_supplicant.wlan0.pid -i wlan0 -D nl80211,wext -C /run/wpa_supplicant
    Starting /sbin/wpa_supplicant...
    wpa_supplicant: creating sendsigs omission pidfile: /run/sendsigs.omit.d/wpasupplicant.wpa_supplicant.wlan0.pid
    wpa_supplicant: ctrl_interface socket located at /run/wpa_supplicant/wlan0
    wpa_supplicant: configuring network block -- 0
    wpa_supplicant: wpa-ssid "nietwurk" -- OK
    wpa_supplicant: wpa-psk ***** -- OK
    wpa_supplicant: enabling network block 0 -- OK
    ip addr add broadcast    dev wlan0 label wlan0
    ip link set dev wlan0   up

    run-parts --exit-on-error --verbose /etc/network/if-up.d
    run-parts: executing /etc/network/if-up.d/ethtool
    run-parts: executing /etc/network/if-up.d/ifenslave
    + [ inet = meta ]
    + [  ]
    run-parts: executing /etc/network/if-up.d/ip
    run-parts: executing /etc/network/if-up.d/mountnfs
    run-parts: executing /etc/network/if-up.d/openssh-server
    run-parts: executing /etc/network/if-up.d/upstart
    run-parts: executing /etc/network/if-up.d/wpasupplicant


allow-hotplug wlan0
iface wlan0 inet static
        wpa-ssid nietwurk
        wpa-psk <the psk, not in quotes>
        wireless-mode Managed

Any ideas?

  • Can you show the interfaces config? – Daniel Mar 31 '17 at 8:20
  • @Daniel of course. – monkeyboy Mar 31 '17 at 8:35
  1. Restrict the permissions of /etc/network/interfaces, to prevent pre-shared key (PSK) disclosure (alternatively use a separate config file such as /etc/network/interfaces.d/wlan0 on newer Debian versions):

    chmod 0600 /etc/network/interfaces

  2. Use the WPA passphrase to calculate the correct WPA PSK hash for your SSID by altering the following example:

    wpa_passphrase myssid my_very_secret_passphrase

If you don't put the passphrase on the command line, it will be prompted for. The above command gives the output:


you'll need to copy from "psk=" to the end of the line, to put in your /etc/network/interfaces file.

  1. Open /etc/network/interfaces in a text editor :

    nano /etc/network/interfaces

  2. Define appropriate stanzas for your wireless interface, along with the SSID and PSK HASH. For example:

auto wlan0 iface wlan0 inet dhcp wpa-ssid myssid wpa-psk ccb290fd4fe6b22935cbae31449e050edd02ad44627b16ce0151668f5f53c01b

The "auto" stanza will bring your interface up at system startup. If not desired, remove or comment this line.

  1. Save the file and exit the editor.
  2. Bring your interface up. This will start wpa_supplicant as a background process.

    # ifup wlan0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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