Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wifi cant connect: Edimax EW-7811UTC (AC600) Realtek RTL8812au #337

Closed
avs-code opened this issue May 13, 2016 · 42 comments
Closed

Wifi cant connect: Edimax EW-7811UTC (AC600) Realtek RTL8812au #337

avs-code opened this issue May 13, 2016 · 42 comments

Comments

@avs-code
Copy link

avs-code commented May 13, 2016

https://www.raspberrypi.org/forums/viewtopic.php?p=849631#p849631

Driver not is detected by dietpi, then I install following the above steps:

root@DietPi:~# uname -a
Linux DietPi 4.1.19-v7+ #858 SMP Tue Mar 15 15:56:00 GMT 2016 armv7l GNU/Linux
root@DietPi:~# sudo wget https://dl.dropboxusercontent.com/u/80256631/8812au-4.1.19-v7-858.tar.gz
--2016-05-13 18:27:30--  https://dl.dropboxusercontent.com/u/80256631/8812au-4.1.19-v7-858.tar.gz
Resolving dl.dropboxusercontent.com (dl.dropboxusercontent.com)... 108.160.173.69
Connecting to dl.dropboxusercontent.com (dl.dropboxusercontent.com)|108.160.173.69|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 718104 (701K) [application/octet-stream]
Saving to: ‘8812au-4.1.19-v7-858.tar.gz’

8812au-4.1.19-v7-85 100%[=====================>] 701.27K  1.10MB/s   in 0.6s

2016-05-13 18:27:32 (1.10 MB/s) - ‘8812au-4.1.19-v7-858.tar.gz’ saved [718104/718104]

root@DietPi:~# sudo tar xzf 8812au-4.1.19-v7-858.tar.gz
root@DietPi:~# ./install.sh
sudo cp 8812au.conf /etc/modprobe.d/.
sudo install -p -m 644 8812au.ko /lib/modules/4.1.19-v7+/kernel/drivers/net/wireless
sudo depmod 4.1.19-v7+

Reboot to run the driver.

If you have already configured your wifi it should start up and connect to your
wireless network.

If you have not configured your wifi you will need to do that to enable the wifi.

Bus 001 Device 005: ID 7392:a812 Edimax Technology Co., Ltd
[    2.257287] usb 1-1.4: new high-speed USB device number 5 using dwc_otg
[    2.365958] usb 1-1.4: New USB device found, idVendor=7392, idProduct=a812
[    2.369953] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    2.369964] usb 1-1.4: Product: Edimax AC600 USB
[    2.369977] usb 1-1.4: Manufacturer: Realtek
[    2.369985] usb 1-1.4: SerialNumber: 00e04c000001
[    5.275050] usbcore: registered new interface driver rtl8821au

Scan & connect:

Connecting to ESM_EF2000_T3B
 , please wait

 DietPi-Services
 Mode: stop
 Please wait...
 Completed

 - Dropping connections..

 - Restarting networking services...
ifup: interface eth0 already configured
run-parts: /etc/network/if-pre-up.d/wireless-tools exited with return code 2
Failed to bring up wlan0.

 DietPi-Services
 Mode: start
 Please wait...
 Completed

 DietPi-Process Tool
 Applying settings, please wait...

Cron (26239)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0

DHCP Client (26811)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0

MiniDLNA (26755)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0

NetData (26930)
Ok | Nice      19
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0
NetData (26933)
Ok | Nice      19
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0
NetData (26941)
Ok | Nice      19
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0
NetData (26944)
Ok | Nice      19
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0
NetData (26945)
Failed | Nice      19
Failed | Affinity  0-3
Failed | Scheduler SCHED_OTHER 0

OpenSSH Server (409)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0
OpenSSH Server (3026)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0

ProFTP (26249)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0

Webserver Nginx (26258)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0
Webserver Nginx (26259)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0
Webserver Nginx (26260)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0
Webserver Nginx (26261)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0
Webserver Nginx (26262)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0

Webserver MySql (26308)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0
Webserver MySql (26656)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0

Webserver Php-fpm (26272)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0
Webserver Php-fpm (26275)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0
Webserver Php-fpm (26276)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0
Webserver Php-fpm (26277)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0
Webserver Php-fpm (26278)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0

 Completed

┌────────────┤ DietPi - Network Options: Adapters ├─────────────┐
│                                                               │
│  Ethernet     : Available | Enabled | Connected               │
│  Wifi         : Available | Enabled | Disconnected            │
│  IPv6         : Enabled                                       │
│  Internet     : Online                                        │
│  Proxy        : Disabled                                      │
│                                                               │
│           Ethernet Change Wired Network Settings              │
│           WiFi     Change Wireless Network Settings           │
│           IPv6     Toggle IPv6 Support                        │
│           Test     Run the Internet Connection Test           │
│           Proxy    Configure proxy settings                   │
│                                                               │
│                                                               │
│                                                               │
│                <Ok>                    <Back>                 │
│                                                               │
└───────────────────────────────────────────────────────────────┘
@Fourdee
Copy link
Collaborator

Fourdee commented May 13, 2016

@arv187
I've got a note to purchase a AC600 so I can test 5ghz band :)

Can you provide the kernel version.
EDIT. Seen: 4.1.19-v7+

Have you tried updating the RPi firmware? Run rpi-update. Either via dietpi-config advanced, or :

apt-get install -y rpi-update
rpi-update

@avs-code
Copy link
Author

avs-code commented May 13, 2016

I updated firmware and I downloaded the driver corresponding to new firmware but i have same error:

- Dropping connections..

 - Restarting networking services...
ifup: interface eth0 already configured
run-parts: /etc/network/if-pre-up.d/wireless-tools exited with return code 2
Failed to bring up wlan0.

http://pastebin.com/gw3rvtLX

I only update firmware and reinstall wifi driver to 4.4.10-v7+ #885 not update packages.

root@DietPi:# sudo ifdown wlan0 && sudo ifup -v wlan0
ifdown: interface wlan0 not configured
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/wireless-tools
run-parts: /etc/network/if-pre-up.d/wireless-tools exited with return code 2
Failed to bring up wlan0.
root@DietPi:
# iwconfig
wlan0 unassociated Nickname:"WIFI@REALTEK"
Mode:Managed Frequency=2.412 GHz Access Point: Not-Associated
Sensitivity:0/0
Retry:off RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality:0 Signal level:0 Noise level:0
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.

eth0 no wireless extensions.

Can scan others networks, but not connect. /etc/wpa_supplicant/wpa_supplicant.conf show this:

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

But in var/run not there wpa_supplicant folder

root@DietPi:~# sudo ls /etc | grep wpa
wpa_supplicant

@k-plan
Copy link
Contributor

k-plan commented May 14, 2016

@arv187

have a look in all your posted output.
In your second installation you have loaded and installed the wrong driver:

uname -a
Linux DietPi 4.4.10-v7+ #885 SMP Fri May 13 15:44:27 BST 2016 armv7l GNU/Linux
root@DietPi:~# sudo wget https://dl.dropboxusercontent.com/u/80256631/8812au-4.1
.19-v7-858.tar.gz

If I follow your posted link and read it correct, it should have to be:

https://dl.dropboxusercontent.com/u/80256631/8812au-4.4.10-v7-885.tar.gz

But in var/run not there wpa_supplicant folder

It's okay.Your WiFi credentials will be set via "dietpi-config" menu.

Have tested it for you on my RPi with a USB WiFi Adapter which use the same 8812au driver:

 ───────────────────────────────────────
 DietPi     | 18:29 | Sat 14/05/16
 ───────────────────────────────────────
 V117       | Raspberry Pi B+
 ───────────────────────────────────────

root@RPi-B-Plus:~# lsusb
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@RPi-B-Plus:~# lsmod
Module                  Size  Used by
evdev                  10534  0
sg                     20575  0
bcm2835_gpiomem         3703  0
bcm2835_rng             2207  0
uio_pdrv_genirq         3526  0
uio                    10078  1 uio_pdrv_genirq
fuse                   86348  3
ipv6                  358811  12
root@RPi-B-Plus:~# uname -a
Linux RPi-B-Plus 4.1.19+ #851 Sat Mar 5 22:26:57 GMT 2016 armv6l GNU/Linux
root@RPi-B-Plus:~# wget https://dl.dropboxusercontent.com/u/80256631/8812au-4.1.19-851.tar.gz

root@RPi-B-Plus:~# tar xzf 8812au-4.1.19-851.tar.gz

root@RPi-B-Plus:~# ./install.sh

root@RPi-B-Plus:~# poweroff
  • Plug in your USB WiFi adapter, power on device and wait until it have completely boot up, to login.
root@RPi-B-Plus:~# lsusb
Bus 001 Device 004: ID 0bda:8812 Realtek Semiconductor Corp.
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@RPi-B-Plus:~# lsmod
Module                  Size  Used by
8812au               1759630  0
evdev                  10534  0
sg                     20575  0
cfg80211              479279  1 8812au
rfkill                 21508  1 cfg80211
bcm2835_gpiomem         3703  0
bcm2835_rng             2207  0
uio_pdrv_genirq         3526  0
uio                    10078  1 uio_pdrv_genirq
fuse                   86348  3
ipv6                  358811  12

root@RPi-B-Plus:~# dietpi-config

  • enable WiFi adapter
    160514-0004
  • It will happen, that the first Restarting networking services ... fail, because the default WiFi credentials don't fit to your network. But it is no problem, be patient!
  • Set up your Wireless Network Options via menu (Change Mode: STATIC or DHCP) and Scan your WLAN.
  • Choose wanted AP in the list and "Enter the Access Key (WPA/WEP)."
    160514-0005
  • After automatically restarting networking and services by dietpi-config, you should be connected.
    160514-0006
  • Test your internet connection and your ip addresses root@RPi-B-Plus:~# ip a
root@RPi-B-Plus:~# iwlist wlan0 channel
wlan0     32 channels in total; available frequencies :
          Channel 01 : 2.412 GHz
          Channel 02 : 2.417 GHz
          Channel 03 : 2.422 GHz
          Channel 04 : 2.427 GHz
          Channel 05 : 2.432 GHz
          Channel 06 : 2.437 GHz
          Channel 07 : 2.442 GHz
          Channel 08 : 2.447 GHz
          Channel 09 : 2.452 GHz
          Channel 10 : 2.457 GHz
          Channel 11 : 2.462 GHz
          Channel 12 : 2.467 GHz
          Channel 13 : 2.472 GHz
          Channel 36 : 5.18 GHz
          Channel 40 : 5.2 GHz
          Channel 44 : 5.22 GHz
          Channel 48 : 5.24 GHz
          Channel 52 : 5.26 GHz
          Channel 56 : 5.28 GHz
          Channel 60 : 5.3 GHz
          Channel 64 : 5.32 GHz
          Channel 100 : 5.5 GHz
          Channel 104 : 5.52 GHz
          Channel 108 : 5.54 GHz
          Channel 112 : 5.56 GHz
          Channel 116 : 5.58 GHz
          Channel 120 : 5.6 GHz
          Channel 124 : 5.62 GHz
          Channel 128 : 5.64 GHz
          Channel 132 : 5.66 GHz
          Channel 136 : 5.68 GHz
          Channel 140 : 5.7 GHz
          Current Frequency:5.3 GHz (Channel 60)

@k-plan
Copy link
Contributor

k-plan commented May 14, 2016

@Fourdee

Note: no such fiddling around with Odroid C1. Driver for Realtek 8812au in here:

root@oDroid-C1-TEST:~# cat /sys/module/8812au/version
v4.2.5_10143.20140103_ASUS

root@oDroid-C1-TEST:~# uname -a
Linux oDroid-C1-TEST 3.10.80 #1 SMP PREEMPT Sun Mar 13 15:50:53 CET 2016 armv7l GNU/Linux

But can't find it on C2 ...

@avs-code
Copy link
Author

You are right respect my wrong download, but one minute after (line n15) I installed the right versión. After try again and comment here.

@k-plan
Copy link
Contributor

k-plan commented May 14, 2016

@arv187

hmmm ... line nr. 31

root@DietPi:~# sudo tar xzf 8812au-4.1.19-v7-858.tar.gz


Petición HTTP enviada, esperando respuesta... 200 OK

🇪🇸 ? 😃

@avs-code
Copy link
Author

Yes, im from spain xD.
Still not working, in test connection its ok because eth0 is plugin, if not wifi dongle power led on, but connect.

  • Restarting networking services...
    ifup: interface eth0 already configured
    run-parts: /etc/network/if-pre-up.d/wireless-tools exited with return code 2
    Failed to bring up wlan0.

log: http://pastebin.com/6w6SrfNL

@k-plan
Copy link
Contributor

k-plan commented May 14, 2016

@arv187

  • You are on DietPi v117?
  • Can you please post root@RPi-B-Plus:~# cat /etc/network/interfaces ?
  • Your access point is visible on the scan list ?
  • Access Point is on 2.4 or 5 GHz? What channel no.?
  • Max Usb Current : Enabled ?
root@DietPi:~# iwlist wlan0 channel
wlan0     17 channels in total; available frequencies :
          Channel 01 : 2.412 GHz
          Channel 02 : 2.417 GHz
          Channel 03 : 2.422 GHz
          Channel 04 : 2.427 GHz
          Channel 05 : 2.432 GHz
          Channel 06 : 2.437 GHz
          Channel 07 : 2.442 GHz
          Channel 08 : 2.447 GHz
          Channel 09 : 2.452 GHz
          Channel 10 : 2.457 GHz
          Channel 11 : 2.462 GHz
          Channel 12 : 2.467 GHz
          Channel 13 : 2.472 GHz
          Channel 36 : 5.18 GHz
          Channel 40 : 5.2 GHz
          Channel 44 : 5.22 GHz
          Channel 48 : 5.24 GHz
          Current Frequency:2.412 GHz (Channel 1)
  • Output in dmesg with cfg80211, usbcore, RTL871X ?
  • Have you manually edit config files, to get WLAN on work?
  • Have install packets via apt-get, to become WLAN on work?

@avs-code
Copy link
Author

avs-code commented May 14, 2016

I reinstalled image in sd card, because not boot, i record this video in slowmotion (I dont have usb keyboard not hdmi screen near of router) https://drive.google.com/open?id=0B8EMglGxQawZbWNZUTNyWTRIbWs
Not is the first time.

Well, @k-plan @Fourdee here are the data:

1 You are on DietPi v117?
2 Can you please post root@RPi-B-Plus:~# cat /etc/network/interfaces ?
3 Your access point is visible on the scan list ?
4 Access Point is on 2.4 or 5 GHz? What channel no.?
5 Max Usb Current : Enabled ?
6 Output in dmesg with cfg80211, usbcore, RTL871X ?
7 Have you manually edit config files, to get WLAN on work?
8 Have install packets via apt-get, to become WLAN on work?

1.
───────────────────────────────────────
DietPi | 23:21 | Sat 14/05/16
───────────────────────────────────────
V117 | Raspberry Pi 2 Model B

2.

root@DietPi:~# cat /etc/network/interfaces
#/etc/network/interfaces
#Please use DietPi-Config to modify network settings.

# Local
auto lo
iface lo inet loopback

# Ethernet
allow-hotplug eth0
iface eth0 inet dhcp
metric 0
address 192.168.0.100
netmask 255.255.255.0
gateway 192.168.0.1
#dns-nameservers 8.8.8.8 8.8.4.4

# Wifi
allow-hotplug wlan0
iface wlan0 inet dhcp
metric 1
address 192.168.0.100
netmask 255.255.255.0
gateway 192.168.0.1
wireless-essid ESM_EF2000_T3B
wireless-key xxxxx
wireless-mode Managed
wireless-power off
wpa-ssid ESM_EF2000_T3B
wpa-psk xxxxx
#dns-nameservers 8.8.8.8 8.8.4.4

3.
Yes.

4.

5Ghz, my router have configured channel nº 36

root@DietPi:~# iwlist wlan0 channel
wlan0     17 channels in total; available frequencies :
          Channel 01 : 2.412 GHz
          Channel 02 : 2.417 GHz
          Channel 03 : 2.422 GHz
          Channel 04 : 2.427 GHz
          Channel 05 : 2.432 GHz
          Channel 06 : 2.437 GHz
          Channel 07 : 2.442 GHz
          Channel 08 : 2.447 GHz
          Channel 09 : 2.452 GHz
          Channel 10 : 2.457 GHz
          Channel 11 : 2.462 GHz
          Channel 12 : 2.467 GHz
          Channel 13 : 2.472 GHz
          Channel 36 : 5.18 GHz
          Channel 40 : 5.2 GHz
          Channel 44 : 5.22 GHz
          Channel 48 : 5.24 GHz
          Current Frequency:2.412 GHz (Channel 1)

5.
Yes.
┌──────────────┤ DietPi - Advanced Options ├───────────────┐
│ Choose an option │
│ │
│ 1 Swapfile Size : 100 MB │
│ 2 Time sync (ntpd) : Boot + Daily │
│ 3 Max Usb Current : Enabled │
│ 4 Update Firmware │
│ 5 RPI i2c : Disabled │
│ 6 RPI i2c freq : 100 kHz │
│ │
│ │
│ │
│ │
│ │
└─────────────────────────────────────────────────┘

6.

root@DietPi:~# dmesg | grep -i cfg80211
[    5.339882] cfg80211: World regulatory domain updated:
[    5.339919] cfg80211:  DFS Master region: unset
[    5.339932] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[    5.339951] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[    5.339967] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[    5.339982] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
[    5.340001] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (N/A)
[    5.340019] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
[    5.340035] cfg80211:   (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[    5.340050] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[    5.340066] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)

root@DietPi:~# dmesg | grep -i usbcore
[    0.122209] usbcore: registered new interface driver usbfs
[    0.122301] usbcore: registered new interface driver hub
[    0.122432] usbcore: registered new device driver usb
[    1.051233] usbcore: registered new interface driver smsc95xx
[    1.520438] usbcore: registered new interface driver usb-storage
[    1.630923] usbcore: registered new interface driver usbhid
[    5.433036] usbcore: registered new interface driver rtl8821au

root@DietPi:~# dmesg | grep -i 8812au
root@DietPi:~# dmesg | grep -i rtl8812au
root@DietPi:~# dmesg | grep -i RTL8812au
root@DietPi:~# dmesg | grep -i RTL871X
[    5.173096] RTL871X: module init start
[    5.173135] RTL871X: rtl8821au v4.3.14_13455.20150212_BTCOEX20150128-51
[    5.173146] RTL871X: build time: May 13 2016 16:55:31
[    5.173156] RTL871X: rtl8821au BT-Coex version = BTCOEX20150128-51
[    5.430576] RTL871X: rtw_ndev_init(wlan0)
[    5.433062] RTL871X: module init ret=0
[   10.760750] RTL871X: nolinked power save enter

7.

No I dont.

8.

Only wget to wifi driver, apt-get update & apt-get upgrade.

I try unplugin ethernet cable, but not connect, some times the boot crash doing this.
My wifi dongle work well in openelec, in raspbian I install driver wifi from here https://www.raspberrypi.org/forums/viewtopic.php?p=849631#p849631 to work.

@k-plan
Copy link
Contributor

k-plan commented May 15, 2016

@arv187

thanks for sharing your boot-up video. Cool idea! 👍

Video:

  • in the boot-up screen output, there is running a file check (00:00:20) /dev/mmcblk0p2
  • same at /dev/mmcblk0p1 FAT Dirty bit is set. Fs was not properly unmounted and some data may be corrupt.
    Not a good sign. I hate to said this, problem with sd-card or worst PSU ?

160515-0001

  • show a Flash_Drive_Fit Samsung_USB ? Have you a USB drive attached?
    Fail to mount /dev/usb_1
  • one of the NetData processes fail (with Nginx) but this is a incidental defect.
  • BUT there is NO IP ADDRESS at login prompt.
    160515-0002

So I have test (on my RPi B+) if it is a non-english system locale issue.

root@RPi-B-Plus:~# locale
LANG=es_ES.UTF-8

But it works here. It will show me the correct IP Address at login.

Posted output:

  • your /etc/network/interfaces looks fine. Both interfaces use DHCP

If it is possible, can you test eth0 = STATIC ?

  • Please do this via dietpi-config. Best practice, disable WiFi via menu first.
  • Then set ethernet to static (incl. DNS), save and restart network via menu.
  • Test internet connection via menu.
  • Exit menu and logout ( ssh = exit ). If you now login (ssh) again, is a IP Address printed in login screen?
  • If so, do a reboot.
  • After fully boot-up, is a IP Address printed in login screen (e.g. ssh)?

@avs-code
Copy link
Author

avs-code commented May 15, 2016

Thanks K-plan,
Forget the video hehe, I restored imagen in Sony class 10 sd card and after perform the test that I wrote before. worst psu, may be, its a apokin 2.1A, and I have a samsung usb memory, but system is installed in sd card only.

Sometimes in reboot no wifi or lan work, then I unplug PSU to reboot because I haven't usb keyboard or hdmi screen, may be that data is corrupted because this.
In video raspberry its attach to my hdmi tv that is in my living room, and not IP address because wifi isn't working and my router with ethernet cable is in my room, then not there wan or eth0 up, is headless. Was only to know because not boot in my room with ethernet cable plug and ssh putty.

Appart of video, continuing with a fresh working system where all work via putty (except wifi)....
Yes both interfaces are in dhcp. I have doubt about if I can get eth0 and wifi working together or I need disable eth0 to wifi work, in that case if wifi not work I couldn't connect via putty.

I go to follow your instructions and write here again.

@k-plan
Copy link
Contributor

k-plan commented May 15, 2016

@arv187

Appart of video, continuing with a fresh working system where all work via putty (except wifi)....

Best idea! 💯

Sometimes in reboot no wifi or lan work, then I unplug PSU to reboot because I haven't usb keyboard or hdmi screen, may be that data is corrupted because this.

Worst case, bad idea for sd-card and file system live.
Please fully format sd-card (no Quick-Format) eg. with "SDFormatter"
In your case, I would start with a fresh install with default kernel (no rpi Firmware Update), (auto)update to DietPi v117 and no extra software. Install wifi firmware like describe above and get your network eth0 = static / wlan0 = dhcp on work. It should work for you.
Please don't attache a USB drive, before USB WiFi adapter work properly.
If it is no problem for you, don't switch locales. Only to be sure.

Yes both interfaces are in dhcp. I have doubt about if I can get eth0 and wifi working together or I need disable eth0 to wifi work, in that case if wifi not work I couldn't connect via putty.

Yes in v117, we have now the possibility to have two active network interface.

cangelog - Networking

@avs-code
Copy link
Author

avs-code commented May 15, 2016

Please do this via dietpi-config. Best practice, disable WiFi via menu first.
Then set ethernet to static (incl. DNS), save and restart network via menu.
Test internet connection via menu. online
Exit menu and logout ( ssh = exit ). If you now login (ssh) again, is a IP Address printed in login screen? Yes, ever its showed ethernet IP,
For first time wifi led still alive, before only start blink at boot or scan.

If so, do a reboot.
After fully boot-up, is a IP Address printed in login screen (e.g. ssh)?

Yes ip address (lan) its printed in login screen but In reboot led only blink at start, not still alive.

Go in again to config menu, re-fixing static address to eth0 not work, but when I disable and after enable wifi interface led blink still in the time but config menu show disconnected.
If I use copy current address to static values are wrong,

 - Mode    = DHCP                                             │
       │  - Ip      = 0.0.0.0                                          │
       │                                                               │
       │        Scan           Scan and Connect                        │
       │        Manual         Manually Set Wireless Details           │
       │        Change Mode    DHCP                                    │
       │        Copy           Copy Current address to Static          │
       │        Static Ip      192.168.0.100                           │
       │        Static Mask    255.255.255.0                           │
       │        Static Gateway 192.168.0.1                             │
       │        Static DNS     8.8.8.8 8.8.4.4                         │
       │        Disable        Disable WiFi adapter                    │
       │        Apply          Save Changes (Restart Networking)    

Fix manually values and set static. but not connect. Ever this error:
ifup: interface eth0 already configured
run-parts: /etc/network/if-pre-up.d/wireless-tools exited with return code 2
Failed to bring up wlan0.

DietPi-Services
 Mode: stop
 Please wait...
 Completed

 - Dropping connections..

 - Restarting networking services...
ifup: interface eth0 already configured
run-parts: /etc/network/if-pre-up.d/wireless-tools exited with return code 2
Failed to bring up wlan0.

 DietPi-Services
 Mode: start
 Please wait...
 Completed

 DietPi-Process Tool
 Applying settings, please wait...

Cron (3952)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0

OpenSSH Server (426)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0
OpenSSH Server (1311)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0

Samba Server (Daemon) (858)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0
Samba Server (Daemon) (867)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0

Samba Server (NetBios) (848)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0

 Completed

@avs-code
Copy link
Author

root@DietPi:~# sudo ifdown wlan0 && sudo ifup -v wlan0
ifdown: interface wlan0 not configured
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/wireless-tools
run-parts: /etc/network/if-pre-up.d/wireless-tools exited with return code 2
Failed to bring up wlan0.
root@DietPi:~#

@k-plan
Copy link
Contributor

k-plan commented May 15, 2016

@arv187

ifup: interface eth0 already configured

  • your ethernet is working, you can login via ssh, have a static ip address, which is print correct on login prompt?
    Right?
  • You start form the scratch with a fresh install? before writing image on sd-card, you have format it with SDFormatter?

BTW: you don't need sudo, you are root. You don't need manually ifup or ifdown if you use dietpi-config menu. If you do this or edit /etc/network/interfaces, dietpi-config can not work proper.
either all doing by hand (if you know, what you are doing) or let dietpi-config do it for you.

Which way you like to do?

@k-plan
Copy link
Contributor

k-plan commented May 15, 2016

Note for other readers here:

  • interface is configured via dietpi-config menu with DHCP and correct WiFi credentials and saved.
    160514-0006
  • exit menu and executing by hand for testing:
root@RPi-B-Plus:~# sudo ifdown wlan0 && sudo ifup -v wlan0
ifdown: interface wlan0 not configured
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/wireless-tools
Error for wireless request "Set Power Management" (8B2C) :
    SET failed on device wlan0 ; Operation not permitted.
Error for wireless request "Set Encode" (8B2A) :
    invalid argument "wifi-password".
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: waiting for "/run/wpa_supplicant.wlan0.pid":  0 (max. 5)
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 "wifi-ssid" -- OK
wpa_supplicant: wpa-psk ***** -- OK
wpa_supplicant: enabling network block 0 -- OK

dhclient -v -pf /run/dhclient.wlan0.pid -lf /var/lib/dhcp/dhclient.wlan0.leases wlan0   -e IF_METRIC=1
Internet Systems Consortium DHCP Client 4.3.1
Copyright 2004-2014 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlan0/00:c0:ca:xx:xx:xx
Sending on   LPF/wlan0/00:c0:ca:xx:xx:xx
Sending on   Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 12
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 13
DHCPREQUEST on wlan0 to 255.255.255.255 port 67
DHCPOFFER from 192.168.0.1
DHCPACK from 192.168.0.1
bound to 192.168.0.204 -- renewal in 2812 seconds.
run-parts --exit-on-error --verbose /etc/network/if-up.d
run-parts: executing /etc/network/if-up.d/000resolvconf
run-parts: executing /etc/network/if-up.d/ifmetric
run-parts: executing /etc/network/if-up.d/mountnfs
run-parts: executing /etc/network/if-up.d/upstart
run-parts: executing /etc/network/if-up.d/wpasupplicant

Most of the error messages caused by dietpi use only on file (/etc/network/interfaces) to configure network like "old debian style networking" (legacy)

debian manual

  • if you configure and do it by dietpi-config alone, I get ip addresses for eth0 = static(or dhcp) and wlan0 = dhcp and two working connection.
  • if ifdown wlan0 && ifup -v wlan0 according to circumstances not always do this.

if it work, it will look like this:

root@RPi-B-Plus:~# ifdown wlan0 && ifup -v wlan0
Killed old client process
Internet Systems Consortium DHCP Client 4.3.1
Copyright 2004-2014 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlan0/00:c0:xx:xx:xx
Sending on   LPF/wlan0/00:c0:xx:xx:xx
Sending on   Socket/fallback
DHCPRELEASE on wlan0 to 192.168.0.1 port 67
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/wireless-tools
Error for wireless request "Set Power Management" (8B2C) :
    SET failed on device wlan0 ; Operation not permitted.
Error for wireless request "Set Encode" (8B2A) :
    invalid argument "wifi-password".
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: waiting for "/run/wpa_supplicant.wlan0.pid":  0 (max. 5)
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 "wifi-ssid" -- OK
wpa_supplicant: wpa-psk ***** -- OK
wpa_supplicant: enabling network block 0 -- OK

dhclient -v -pf /run/dhclient.wlan0.pid -lf /var/lib/dhcp/dhclient.wlan0.leases wlan0   -e IF_METRIC=1
Internet Systems Consortium DHCP Client 4.3.1
Copyright 2004-2014 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlan0/00:c0:xx:xx:xx
Sending on   LPF/wlan0/00:c0:xx:xx:xx
Sending on   Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 11
DHCPREQUEST on wlan0 to 255.255.255.255 port 67
DHCPOFFER from 192.168.0.1
DHCPACK from 192.168.0.1
bound to 192.168.0.204 -- renewal in 3365 seconds.
run-parts --exit-on-error --verbose /etc/network/if-up.d
run-parts: executing /etc/network/if-up.d/000resolvconf
run-parts: executing /etc/network/if-up.d/ifmetric
run-parts: executing /etc/network/if-up.d/mountnfs
run-parts: executing /etc/network/if-up.d/upstart
run-parts: executing /etc/network/if-up.d/wpasupplicant

@avs-code
Copy link
Author

ifup: interface eth0 already configured

your ethernet is working, you can login via ssh, have a static ip address, which is print correct on login prompt?
Right? Yes.

You start form the scratch with a fresh install? before writing image on sd-card, you have format it with SDFormatter?
Yes, SDFormatter & win32 disk imager to write image. My first post was with kernel 4.1.19 & dietpi V117 with same error message code 2.
Im using a fresh install since post that include video (video was maked before of fresh installation) all results from that post was with fresh install, only have kernel updated at 4.4.10-v7+, dietpi V117, this modules:
FFmpeg
Java
Node.js
Openssh
samba

BTW: you don't need sudo, you are root. You don't need manually ifup or ifdown if you use dietpi-config menu. If you do this or edit /etc/network/interfaces, dietpi-config can not work proper.
either all doing by hand (if you know, what you are doing) or let dietpi-config do it for you.

Which way you like to do?

Im using dietpi-config, but Im tired then try others options although I dont know what Im doing. But I only did by hand what you saw

┌──────────┤ DietPi - Ethernet Network Options ├───────────┐
│ Current Details: │
│ - Mode = STATIC │
│ - Ip = 192.168.1.100 │
│ - Mask = 255.255.255.0 │
│ - Gateway = 192.168.1.1 │
│ - DNS = 192.168.1.1 │
│ │
│ Change Mode STATIC │
│ Copy Copy Current address to Static │
│ Static Ip 192.168.1.100 │
│ Static Mask 255.255.255.0 │
│ Static Gateway 192.168.1.1 │
│ Static DNS 192.168.1.1 │
│ Disable Disable Ethernet adapter │
│ Apply Save Changes (Restart Networking) │
│ │
│ │
│ │

Current Details: │
│ - SSID = xxxxx | 0 Mbit | Strength: 0% │
│ - KEY = xxxxxx │
│ xxxxx │
│ - Mode = STATIC │
│ - Ip = 0.0.0.0 │
│ │
│ Scan Scan and Connect │
│ Manual Manually Set Wireless Details │
│ Change Mode STATIC │
│ Copy Copy Current address to Static │
│ Static Ip 192.168.1.105 │
│ Static Mask 255.255.255.0 │
│ Static Gateway 192.168.1.1 │
│ Static DNS 192.168.1.1 │
│ Disable Disable WiFi adapter │
│ Apply Save Changes (Restart Networking) │
│ │
│ │

My wlan IP still on 0.0.0.0

@k-plan
Copy link
Contributor

k-plan commented May 15, 2016

@arv187

my problem is, you have now a different os software status (kernel 4.4.10-v7, java, node.js, samba, ssh) to my test system here.
but anyway ...

  • disable wifi
  • enable wifi
  • set wifi to dhcp
  • scan for your wifi access point
  • set wifi password

and then screen shot from menu please (you can delete this later)

@avs-code
Copy link
Author

I enable guest access wifi connection with wpa/wpa2 with a key with 3 letters+1 number+3 letters+1 number. After in dietpi-config set dhcp, push in scan & connect, select my guest access ssid, this output only happen with this guest access wifi:

Connecting to myssid_inv
 , please wait

 DietPi-Services
 Mode: stop
 Please wait...
 Completed

 - Dropping connections..

 - Restarting networking services...
ifup: interface eth0 already configured
Error for wireless request "Set Power Management" (8B2C) :
    SET failed on device wlan0 ; Operation not permitted.
Error for wireless request "Set Encode" (8B2A) :
    invalid argument "my passkey".
Internet Systems Consortium DHCP Client 4.3.1
Copyright 2004-2014 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlan0/xx:xx:xx:xx:xx:xx <-- my dongle mac
Sending on   LPF/wlan0/xx:xx:xx:xx:xx:xx
Sending on   Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 15
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 15
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 14
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 10
No DHCPOFFERS received.
No working leases in persistent database - sleeping.

 DietPi-Services
 Mode: start
 Please wait...
 Completed

 DietPi-Process Tool
 Applying settings, please wait...

Cron (3925)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0

DHCP Client (3834)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0

OpenSSH Server (434)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0
OpenSSH Server (1274)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0

Samba Server (Daemon) (823)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0
Samba Server (Daemon) (832)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0

Samba Server (NetBios) (813)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0

 Completed

Following your instructions in my normal 5g ssid (disabling wifi):

 DietPi-Services
 Mode: stop
 Please wait...
 Completed

 - Dropping connections..

 - Restarting networking services...
ifup: interface eth0 already configured

 DietPi-Services
 Mode: start
 Please wait...
 Completed

 DietPi-Process Tool
 Applying settings, please wait...

Cron (4937)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0

OpenSSH Server (434)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0
OpenSSH Server (1274)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0

Samba Server (Daemon) (823)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0
Samba Server (Daemon) (832)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0

Samba Server (NetBios) (813)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0

 Completed

Enabling, set to dhcp, scan, set pass:

Scanning SSIDS, please wait....
-------------------------------
xxxxxxxxxxx

Connecting to myssid , please wait

 DietPi-Services
 Mode: stop
 Please wait...
 Completed

 - Dropping connections..

 - Restarting networking services...
ifup: interface eth0 already configured
run-parts: /etc/network/if-pre-up.d/wireless-tools exited with return code 2
Failed to bring up wlan0.

 DietPi-Services
 Mode: start
 Please wait...
 Completed

 DietPi-Process Tool
 Applying settings, please wait...

Cron (4210)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0

OpenSSH Server (427)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0
OpenSSH Server (1342)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0

Samba Server (Daemon) (881)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0
Samba Server (Daemon) (890)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0

Samba Server (NetBios) (871)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0

 Completed

captura

With a 2,4ghz ssid wpa/wpa2 and numeric key of 8 digit:

Connecting to myssid
 , please wait

 DietPi-Services
 Mode: stop
 Please wait...
 Completed

 - Dropping connections..

 - Restarting networking services...
ifup: interface eth0 already configured
Error for wireless request "Set Power Management" (8B2C) :
    SET failed on device wlan0 ; Operation not permitted.
Internet Systems Consortium DHCP Client 4.3.1
Copyright 2004-2014 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlan0/xx:xx:xx:xx:xx:xx
Sending on   LPF/wlan0/xx:xx:xx:xx:xx:xx
Sending on   Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 15
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 14
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 14
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 4
No DHCPOFFERS received.
No working leases in persistent database - sleeping.

 DietPi-Services
 Mode: start
 Please wait...
 Completed

 DietPi-Process Tool
 Applying settings, please wait...

Cron (4882)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0

DHCP Client (4791)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0

OpenSSH Server (439)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0
OpenSSH Server (1273)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0

Samba Server (Daemon) (821)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0
Samba Server (Daemon) (830)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0

Samba Server (NetBios) (811)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0

 Completed

@k-plan
Copy link
Contributor

k-plan commented May 16, 2016

@arv187

Output:
your first output looks good, but your device can't get a ip address via dhcp, because it can't login in AP/WiFi-Router (wpa/wpa2) or DHCP server on AP/WiFi-Router don't answer or give your device any address. You have a look in AP/WiFi-Router log files and dmesg
( e.g. see below: RTL871X: start auth , RTL871X: auth success, start assoc )


WiFi general:
Have AP/WiFi-Router here configured only to use " WPA2 PSK " with only support encryption " aes ccm " and group encryption " aes ccm ".
Regulatory domain is set to support my country.
AP/WiFi-Router Channels: " channel-auto "
Supported Band: 2.4 GHz - b/g/n // 5 GHz - a/n/ac
Have 2.4 and 5 GHz support and guest WLAN.
Passphrase have:

  • minimum 10 digit
  • alphabetic character (only a-z, A-Z, NO umlaut )
  • digit (0-9)
  • ONLY symbol ( - / . _ )
  • NO special character

Linux Kernel 4.4.10+ #885
Now as well tested with 4.4.10 kernel here. After installing the new 8812au-4.4.10-885 driver and reboot, it works out of the box.

Changing connected WLAN always via dietpi-config and Scan and Connect
To be sure, you have to do this (in some rare cases), better twice!

Tested with:

  • 2.4 GHz (work)
  • 5 GHz (work)
  • Guest-WLAN 2.4 and 5 GHz (work)
  • DHCP (work)
  • static IP (work)

So I will suggest, you have a look on AP/WiFi-Router settings (see above) and log files.

Some output (working connections):

root@RPi-B-Plus:~# uname -a
Linux RPi-B-Plus 4.4.10+ #885 Fri May 13 15:30:07 BST 2016 armv6l GNU/Linux

root@RPi-B-Plus:~# wget https://dl.dropboxusercontent.com/u/80256631/8812au-4.4.10-885.tar.gz

root@RPi-B-Plus:~# tar xzf 8812au-4.4.10-885.tar.gz

root@RPi-B-Plus:~# ./install.sh

root@RPi-B-Plus:~# dmesg
 . . .
[   20.573231] RTL871X: module init start
[   20.573275] RTL871X: rtl8821au v4.3.14_13455.20150212_BTCOEX20150128-51
[   20.573292] RTL871X: build time: May 13 2016 16:54:22
[   20.573306] RTL871X: rtl8821au BT-Coex version = BTCOEX20150128-51
[   22.104695] cfg80211: World regulatory domain updated:
[   22.104741] cfg80211:  DFS Master region: unset
[   22.104758] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[   22.104783] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[   22.104806] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[   22.104825] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
[   22.104846] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (N/A)
[   22.104869] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
[   22.104889] cfg80211:   (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[   22.104906] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[   22.104925] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
[   22.650510] RTL871X: rtw_ndev_init(wlan0)
[   22.690073] usbcore: registered new interface driver rtl8821au
[   22.690113] RTL871X: module init ret=0
[   25.509321] RTL871X: set ssid [wifi-ssid] fw_state=0x00000008
[   25.780401] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   33.592470] RTL871X: nolinked power save enter
[   35.275751] RTL871X: nolinked power save leave
[   41.343305] RTL871X: start auth
[   41.345333] RTL871X: auth success, start assoc
[   47.161014] RTL871X: rtw_set_802_11_connect(wlan0)  fw_state=0x00000008
[   47.589983] RTL871X: start auth
[   47.591857] RTL871X: auth success, start assoc
[   47.599214] RTL871X: rtw_cfg80211_indicate_connect(wlan0) BSS not found !!
[   47.599288] RTL871X: assoc success
[   47.599758] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   47.605734] RTL871X: send eapol packet
[   47.629157] RTL871X: send eapol packet
[   47.639956] RTL871X: set pairwise key camid:4, addr:d6:ca:6d:xx:xx:xx, kid:0, type:AES
[   47.645074] RTL871X: set group key camid:5, addr:d6:ca:6d:xx:xx:xx, kid:1, type:AES

root@RPi-B-Plus:~# iwlist wlan0 channel
wlan0     32 channels in total; available frequencies :
          Channel 01 : 2.412 GHz
          Channel 02 : 2.417 GHz
          Channel 03 : 2.422 GHz
          Channel 04 : 2.427 GHz
          Channel 05 : 2.432 GHz
          Channel 06 : 2.437 GHz
          Channel 07 : 2.442 GHz
          Channel 08 : 2.447 GHz
          Channel 09 : 2.452 GHz
          Channel 10 : 2.457 GHz
          Channel 11 : 2.462 GHz
          Channel 12 : 2.467 GHz
          Channel 13 : 2.472 GHz
          Channel 36 : 5.18 GHz
          Channel 40 : 5.2 GHz
          Channel 44 : 5.22 GHz
          Channel 48 : 5.24 GHz
          Channel 52 : 5.26 GHz
          Channel 56 : 5.28 GHz
          Channel 60 : 5.3 GHz
          Channel 64 : 5.32 GHz
          Channel 100 : 5.5 GHz
          Channel 104 : 5.52 GHz
          Channel 108 : 5.54 GHz
          Channel 112 : 5.56 GHz
          Channel 116 : 5.58 GHz
          Channel 120 : 5.6 GHz
          Channel 124 : 5.62 GHz
          Channel 128 : 5.64 GHz
          Channel 132 : 5.66 GHz
          Channel 136 : 5.68 GHz
          Channel 140 : 5.7 GHz
          Current Frequency:2.412 GHz (Channel 1)

root@RPi-B-Plus:~# iwlist wlan0 channel
wlan0     32 channels in total; available frequencies :
          Channel 01 : 2.412 GHz
          Channel 02 : 2.417 GHz
          Channel 03 : 2.422 GHz
          Channel 04 : 2.427 GHz
          Channel 05 : 2.432 GHz
          Channel 06 : 2.437 GHz
          Channel 07 : 2.442 GHz
          Channel 08 : 2.447 GHz
          Channel 09 : 2.452 GHz
          Channel 10 : 2.457 GHz
          Channel 11 : 2.462 GHz
          Channel 12 : 2.467 GHz
          Channel 13 : 2.472 GHz
          Channel 36 : 5.18 GHz
          Channel 40 : 5.2 GHz
          Channel 44 : 5.22 GHz
          Channel 48 : 5.24 GHz
          Channel 52 : 5.26 GHz
          Channel 56 : 5.28 GHz
          Channel 60 : 5.3 GHz
          Channel 64 : 5.32 GHz
          Channel 100 : 5.5 GHz
          Channel 104 : 5.52 GHz
          Channel 108 : 5.54 GHz
          Channel 112 : 5.56 GHz
          Channel 116 : 5.58 GHz
          Channel 120 : 5.6 GHz
          Channel 124 : 5.62 GHz
          Channel 128 : 5.64 GHz
          Channel 132 : 5.66 GHz
          Channel 136 : 5.68 GHz
          Channel 140 : 5.7 GHz
          Current Frequency:5.22 GHz (Channel 44)

@avs-code
Copy link
Author

Thanks @k-plan I will check that.
But I dont understand why in openelec, raspbian, lubuntu or windows work fine.
Im using wpa/wpa2 - type of key: password (8 digits minimun) and a key similar to this:
3%J2t;uZ`@PpXYp,_b3m{||@bl=+iU z}=H[f So55vJ9H4Oj[d>Z0$iihYn]'E
WPA 504 bits 63 characters I think,

@k-plan
Copy link
Contributor

k-plan commented May 16, 2016

@arv187

But I dont understand why in openelec, raspbian, lubuntu or windows work fine.

yes all based on debian sources but ...

  • openelec => own optimised mini linux image only to run Kodi (and different kernel)

  • raspbian => run desktop environment with a network manager

  • lubuntu => run desktop environment with a network manager (different kernel - based on ubuntu)

  • windows => (not really, or?) different only graphical OS on different architecture (not ARM)

    . . . and look, your linked 8812au-4.4.10-885 driver had to by compiled for every rasbian version and especially for every kernel version !!!

3%J2t;uZ`@PpXYp,_b3m{||@ bL=+iU z}=H[f So55vJ9H4Oj[d>Z0$iihYn]'E

In this string are more problematical characters!

http://help.avm.de/fritzbox.php?oem=avm&hardware=173&language=de&set=300E001&topic=hilfe_wlan_wpa

http://www.heise.de/ct/hotline/Sonderzeichen-im-WLAN-Passwort-2056815.html

Besondere Vorsicht ist bei Sonderzeichen aus dem internationalen Sprachraum (z. B. ü, ö, ä,Ä, Ö, Ü, ß, `, ´, °, ^, oder auch §) geboten. Je nach Betriebssystem (Microsoft Windows, Mac OS X, Unix) werden diese völlig verschieden kodiert und sind dann nicht kompatibel zueinander.

... and fu.. for "WPA (TKIP)" - it's dead like WEP

@avs-code
Copy link
Author

avs-code commented May 16, 2016

There not option to select tkip or aes, so I think is aes only in my router.
My guest wlan show same error message and is set type: only wpa2, key: 123456789

- Dropping connections..

 - Restarting networking services...
ifup: interface eth0 already configured
Error for wireless request "Set Power Management" (8B2C) :
    SET failed on device wlan0 ; Operation not permitted.
Internet Systems Consortium DHCP Client 4.3.1
Copyright 2004-2014 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlan0/xx:xx:xx:xx:xx:xx
Sending on   LPF/wlan0/xx:xx:xx:xx:xx:xx
Sending on   Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 9
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 16
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 12
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 17
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 3
No DHCPOFFERS received.
No working leases in persistent database - sleeping.

But now I set dietpi-config menu wifi config to static and is connect.
I think that dhcp not is working in dietpi to my wifi.

@avs-code
Copy link
Author

root@DietPi:~# dmesg
[ 0.000000] Booting Linux on physical CPU 0xf00
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Linux version 4.4.10-v7+ (dc4@dc4-XPS13-9333) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611) ) #885 SMP Fri May 13 15:44:27 BST 2016
[ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] Machine model: Raspberry Pi 2 Model B Rev 1.1
[ 0.000000] cma: Reserved 8 MiB at 0x3d800000
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] On node 0 totalpages: 253952
[ 0.000000] free_area_init_node: node 0, pgdat 808c0d80, node_mem_map bcf3a000
[ 0.000000] Normal zone: 2232 pages used for memmap
[ 0.000000] Normal zone: 0 pages reserved
[ 0.000000] Normal zone: 253952 pages, LIFO batch:31
[ 0.000000] [bcm2709_smp_init_cpus] enter (9520->f3003010)
[ 0.000000] [bcm2709_smp_init_cpus] ncores=4
[ 0.000000] PERCPU: Embedded 13 pages/cpu @bcef7000 s22592 r8192 d22464 u53248
[ 0.000000] pcpu-alloc: s22592 r8192 d22464 u53248 alloc=13*4096
[ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 251720
[ 0.000000] Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=1280 bcm2708_fb.fbheight=720 bcm2709.boardrev=0xa01041 bcm2709.serial=0xbca767ab smsc95xx.macaddr=B8:27:EB:A7:67:AB bcm2708_fb.fbswap=1 bcm2709.uart_clock=3000000 bcm2709.disk_led_gpio=47 bcm2709.disk_led_active_low=0 vc_mem.mem_base=0x3ea00000 vc_mem.mem_size=0x3f000000 dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=noop fsck.repair=yes rootwait
[ 0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[ 0.000000] Memory: 987808K/1015808K available (6340K kernel code, 432K rwdata, 1712K rodata, 480K init, 764K bss, 19808K reserved, 8192K cma-reserved)
[ 0.000000] Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
vmalloc : 0xbe800000 - 0xff800000 (1040 MB)
lowmem : 0x80000000 - 0xbe000000 ( 992 MB)
modules : 0x7f000000 - 0x80000000 ( 16 MB)
.text : 0x80008000 - 0x807e5330 (8053 kB)
.init : 0x807e6000 - 0x8085e000 ( 480 kB)
.data : 0x8085e000 - 0x808ca088 ( 433 kB)
.bss : 0x808cd000 - 0x8098c1ac ( 765 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] Build-time adjustment of leaf fanout to 32.
[ 0.000000] NR_IRQS:16 nr_irqs:16 16
[ 0.000000] Architected cp15 timer(s) running at 19.20MHz (phys).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x46d987e47, max_idle_ns: 440795202767 ns
[ 0.000008] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps every 4398046511078ns
[ 0.000023] Switching to timer-based delay loop, resolution 52ns
[ 0.000267] Console: colour dummy device 80x30
[ 0.001047] console [tty1] enabled
[ 0.001085] Calibrating delay loop (skipped), value calculated using timer frequency.. 38.40 BogoMIPS (lpj=192000)
[ 0.001138] pid_max: default: 32768 minimum: 301
[ 0.001437] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.001474] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.002430] Disabling cpuset control group subsystem
[ 0.002500] Initializing cgroup subsys io
[ 0.002545] Initializing cgroup subsys memory
[ 0.002603] Initializing cgroup subsys devices
[ 0.002643] Initializing cgroup subsys freezer
[ 0.002680] Initializing cgroup subsys net_cls
[ 0.002751] CPU: Testing write buffer coherency: ok
[ 0.002836] ftrace: allocating 21193 entries in 63 pages
[ 0.039779] CPU0: update cpu_capacity 1024
[ 0.039840] CPU0: thread -1, cpu 0, socket 15, mpidr 80000f00
[ 0.039868] [bcm2709_smp_prepare_cpus] enter
[ 0.039993] Setting up static identity map for 0x8240 - 0x8274
[ 0.041808] [bcm2709_boot_secondary] cpu:1 started (0) 18
[ 0.042237] [bcm2709_secondary_init] enter cpu:1
[ 0.042286] CPU1: update cpu_capacity 1024
[ 0.042291] CPU1: thread -1, cpu 1, socket 15, mpidr 80000f01
[ 0.042706] [bcm2709_boot_secondary] cpu:2 started (0) 18
[ 0.043034] [bcm2709_secondary_init] enter cpu:2
[ 0.043056] CPU2: update cpu_capacity 1024
[ 0.043061] CPU2: thread -1, cpu 2, socket 15, mpidr 80000f02
[ 0.043438] [bcm2709_boot_secondary] cpu:3 started (0) 17
[ 0.043660] [bcm2709_secondary_init] enter cpu:3
[ 0.043680] CPU3: update cpu_capacity 1024
[ 0.043686] CPU3: thread -1, cpu 3, socket 15, mpidr 80000f03
[ 0.043744] Brought up 4 CPUs
[ 0.043819] SMP: Total of 4 processors activated (153.60 BogoMIPS).
[ 0.043842] CPU: All CPU(s) started in HYP mode.
[ 0.043861] CPU: Virtualization extensions available.
[ 0.044569] devtmpfs: initialized
[ 0.053085] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[ 0.053441] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.054155] pinctrl core: initialized pinctrl subsystem
[ 0.054740] NET: Registered protocol family 16
[ 0.059388] DMA: preallocated 4096 KiB pool for atomic coherent allocations
[ 0.064819] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[ 0.064864] hw-breakpoint: maximum watchpoint size is 8 bytes.
[ 0.065025] Serial: AMBA PL011 UART driver
[ 0.065287] 3f201000.uart: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2
[ 0.065781] bcm2835-mbox 3f00b880.mailbox: mailbox enabled
[ 0.120556] bcm2835-dma 3f007000.dma: DMA legacy API manager at f3007000, dmachans=0x1
[ 0.122031] SCSI subsystem initialized
[ 0.122209] usbcore: registered new interface driver usbfs
[ 0.122302] usbcore: registered new interface driver hub
[ 0.122435] usbcore: registered new device driver usb
[ 0.129387] raspberrypi-firmware soc:firmware: Attached to firmware from 2016-05-13 15:46
[ 0.156399] clocksource: Switched to clocksource arch_sys_counter
[ 0.193404] FS-Cache: Loaded
[ 0.193754] CacheFiles: Loaded
[ 0.204855] NET: Registered protocol family 2
[ 0.205806] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.205919] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[ 0.206064] TCP: Hash tables configured (established 8192 bind 8192)
[ 0.206184] UDP hash table entries: 512 (order: 2, 16384 bytes)
[ 0.206253] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[ 0.206604] NET: Registered protocol family 1
[ 0.206990] RPC: Registered named UNIX socket transport module.
[ 0.207021] RPC: Registered udp transport module.
[ 0.207043] RPC: Registered tcp transport module.
[ 0.207064] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.207957] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 5 counters available
[ 0.209224] futex hash table entries: 1024 (order: 4, 65536 bytes)
[ 0.220162] VFS: Disk quotas dquot_6.6.0
[ 0.220451] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[ 0.222406] FS-Cache: Netfs 'nfs' registered for caching
[ 0.223256] NFS: Registering the id_resolver key type
[ 0.223344] Key type id_resolver registered
[ 0.223368] Key type id_legacy registered
[ 0.225514] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[ 0.225685] io scheduler noop registered (default)
[ 0.225717] io scheduler deadline registered
[ 0.225782] io scheduler cfq registered
[ 0.227937] BCM2708FB: allocated DMA memory fdc00000
[ 0.227990] BCM2708FB: allocated DMA channel 0 @ f3007000
[ 0.240304] Console: switching to colour frame buffer device 160x45
[ 1.023582] bcm2835-rng 3f104000.rng: hwrng registered
[ 1.023813] vc-cma: Videocore CMA driver
[ 1.023877] vc-cma: vc_cma_base = 0x00000000
[ 1.023943] vc-cma: vc_cma_size = 0x00000000 (0 MiB)
[ 1.024015] vc-cma: vc_cma_initial = 0x00000000 (0 MiB)
[ 1.024323] vc-mem: phys_addr:0x00000000 mem_base=0x3ea00000 mem_size:0x3f000000(1008 MiB)
[ 1.038835] brd: module loaded
[ 1.046666] loop: module loaded
[ 1.047591] vchiq: vchiq_init_state: slot_zero = 0xbdc80000, is_master = 0
[ 1.049202] Loading iSCSI transport class v2.0-870.
[ 1.052031] usbcore: registered new interface driver smsc95xx
[ 1.054236] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[ 1.256800] Core Release: 2.80a
[ 1.258941] Setting default values for core params
[ 1.261085] Finished setting default values for core params
[ 1.463512] Using Buffer DMA mode
[ 1.465615] Periodic Transfer Interrupt Enhancement - disabled
[ 1.467749] Multiprocessor Interrupt Enhancement - disabled
[ 1.469860] OTG VER PARAM: 0, OTG VER FLAG: 0
[ 1.471977] Dedicated Tx FIFOs mode
[ 1.474403] WARN::dwc_otg_hcd_init:1047: FIQ DMA bounce buffers: virt = 0xbdc14000 dma = 0xfdc14000 len=9024
[ 1.476712] FIQ FSM acceleration enabled for :
Non-periodic Split Transactions
Periodic Split Transactions
High-Speed Isochronous Endpoints
Interrupt/Control Split Transaction hack enabled
[ 1.487579] dwc_otg: Microframe scheduler enabled
[ 1.487637] WARN::hcd_init_fiq:413: FIQ on core 1 at 0x80445a24
[ 1.489784] WARN::hcd_init_fiq:414: FIQ ASM at 0x80445d94 length 36
[ 1.491898] WARN::hcd_init_fiq:439: MPHI regs_base at 0xbe87e000
[ 1.494053] dwc_otg 3f980000.usb: DWC OTG Controller
[ 1.496184] dwc_otg 3f980000.usb: new USB bus registered, assigned bus number 1
[ 1.498391] dwc_otg 3f980000.usb: irq 62, io mem 0x00000000
[ 1.500543] Init: Port Power? op_state=1
[ 1.502610] Init: Power Port (0)
[ 1.504860] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 1.506999] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 1.509137] usb usb1: Product: DWC OTG Controller
[ 1.511258] usb usb1: Manufacturer: Linux 4.4.10-v7+ dwc_otg_hcd
[ 1.513416] usb usb1: SerialNumber: 3f980000.usb
[ 1.516295] hub 1-0:1.0: USB hub found
[ 1.518467] hub 1-0:1.0: 1 port detected
[ 1.521093] dwc_otg: FIQ enabled
[ 1.521104] dwc_otg: NAK holdoff enabled
[ 1.521111] dwc_otg: FIQ split-transaction FSM enabled
[ 1.521140] Module dwc_common_port init
[ 1.521417] usbcore: registered new interface driver usb-storage
[ 1.523821] mousedev: PS/2 mouse device common for all mice
[ 1.526631] bcm2835-cpufreq: min=600000 max=900000
[ 1.531245] sdhci: Secure Digital Host Controller Interface driver
[ 1.534502] sdhci: Copyright(c) Pierre Ossman
[ 1.538093] sdhost: log_buf @ bdc13000 (fdc13000)
[ 1.616580] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1)
[ 1.620067] sdhci-pltfm: SDHCI platform and OF driver helper
[ 1.623993] ledtrig-cpu: registered to indicate activity on CPUs
[ 1.627469] hidraw: raw HID events driver (C) Jiri Kosina
[ 1.630900] usbcore: registered new interface driver usbhid
[ 1.634083] usbhid: USB HID core driver
[ 1.637964] Initializing XFRM netlink socket
[ 1.641165] NET: Registered protocol family 17
[ 1.644465] Key type dns_resolver registered
[ 1.648156] Registering SWP/SWPB emulation handler
[ 1.652458] registered taskstats version 1
[ 1.655798] vc-sm: Videocore shared memory driver
[ 1.658950] [vc_sm_connected_init]: start
[ 1.662303] vc_vchi_sm_init: failed to open VCHI service (-1)
[ 1.662427] [vc_sm_connected_init]: failed to initialize shared memory service
[ 1.668353] [vc_sm_connected_init]: end - returning -1
[ 1.671830] of_cfs_init
[ 1.674944] of_cfs_init: OK
[ 1.679213] Waiting for root device /dev/mmcblk0p2...
[ 1.683662] mmc0: host does not support reading read-only switch, assuming write-enable
[ 1.688788] mmc0: new high speed SDHC card at address 59b4
[ 1.692782] mmcblk0: mmc0:59b4 NCard 14.9 GiB
[ 1.697276] mmcblk0: p1 p2
[ 1.716564] Indeed it is in host mode hprt0 = 00021501
[ 1.818488] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[ 1.821728] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
[ 1.848699] devtmpfs: mounted
[ 1.852640] Freeing unused kernel memory: 480K (807e6000 - 8085e000)
[ 1.896456] usb 1-1: new high-speed USB device number 2 using dwc_otg
[ 1.899860] Indeed it is in host mode hprt0 = 00001101
[ 2.096800] usb 1-1: New USB device found, idVendor=0424, idProduct=9514
[ 2.100152] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 2.104685] hub 1-1:1.0: USB hub found
[ 2.108266] hub 1-1:1.0: 5 ports detected
[ 2.386502] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
[ 2.393010] random: systemd urandom read with 61 bits of entropy available
[ 2.401793] systemd[1]: systemd 215 running in system mode. (+PAM +AUDIT +SELINUX +IMA +SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ -SECCOMP -APPARMOR)
[ 2.405865] systemd[1]: Detected architecture 'arm'.
[ 2.496838] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
[ 2.500436] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 2.507048] smsc95xx v1.0.4
[ 2.556650] NET: Registered protocol family 10
[ 2.562141] systemd[1]: Inserted module 'ipv6'
[ 2.568990] systemd[1]: Set hostname to .
[ 2.571364] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-3f980000.usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:a7:67:ab
[ 2.806482] usb 1-1.2: new high-speed USB device number 4 using dwc_otg
[ 2.912047] usb 1-1.2: New USB device found, idVendor=090c, idProduct=1000
[ 2.915895] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2.919753] usb 1-1.2: Product: Flash Drive FIT
[ 2.923534] usb 1-1.2: Manufacturer: Samsung
[ 2.927295] usb 1-1.2: SerialNumber: 0352415070013353
[ 2.932910] usb-storage 1-1.2:1.0: USB Mass Storage device detected
[ 2.937841] scsi host0: usb-storage 1-1.2:1.0
[ 3.036489] usb 1-1.4: new high-speed USB device number 5 using dwc_otg
[ 3.073919] systemd[1]: Cannot add dependency job for unit display-manager.service, ignoring: Unit display-manager.service failed to load: No such file or directory.
[ 3.085994] systemd[1]: Starting Forward Password Requests to Wall Directory Watch.
[ 3.090855] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[ 3.095096] systemd[1]: Starting Remote File Systems (Pre).
[ 3.104379] systemd[1]: Reached target Remote File Systems (Pre).
[ 3.108763] systemd[1]: Starting Dispatch Password Requests to Console Directory Watch.
[ 3.113185] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
[ 3.117482] systemd[1]: Starting Paths.
[ 3.126243] systemd[1]: Reached target Paths.
[ 3.130445] systemd[1]: Starting Encrypted Volumes.
[ 3.137494] usb 1-1.4: New USB device found, idVendor=7392, idProduct=a812
[ 3.137506] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 3.137515] usb 1-1.4: Product: Edimax AC600 USB
[ 3.137524] usb 1-1.4: Manufacturer: Realtek
[ 3.137533] usb 1-1.4: SerialNumber: 00e04c000001
[ 3.159105] systemd[1]: Reached target Encrypted Volumes.
[ 3.163043] systemd[1]: Starting Arbitrary Executable File Formats File System Automount Point.
[ 3.172131] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
[ 3.176223] systemd[1]: Starting Swap.
[ 3.184775] systemd[1]: Reached target Swap.
[ 3.188816] systemd[1]: Expecting device dev-mmcblk0p1.device...
[ 3.197320] systemd[1]: Starting Root Slice.
[ 3.205799] systemd[1]: Created slice Root Slice.
[ 3.209711] systemd[1]: Starting User and Session Slice.
[ 3.218173] systemd[1]: Created slice User and Session Slice.
[ 3.222008] systemd[1]: Starting /dev/initctl Compatibility Named Pipe.
[ 3.230630] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
[ 3.234597] systemd[1]: Starting Delayed Shutdown Socket.
[ 3.243173] systemd[1]: Listening on Delayed Shutdown Socket.
[ 3.247089] systemd[1]: Starting Journal Socket (/dev/log).
[ 3.255025] systemd[1]: Listening on Journal Socket (/dev/log).
[ 3.258790] systemd[1]: Starting udev Control Socket.
[ 3.266681] systemd[1]: Listening on udev Control Socket.
[ 3.270297] systemd[1]: Starting udev Kernel Socket.
[ 3.278016] systemd[1]: Listening on udev Kernel Socket.
[ 3.281575] systemd[1]: Starting Journal Socket.
[ 3.289360] systemd[1]: Listening on Journal Socket.
[ 3.292990] systemd[1]: Starting System Slice.
[ 3.300825] systemd[1]: Created slice System Slice.
[ 3.304401] systemd[1]: Starting File System Check on Root Device...
[ 3.347340] systemd[1]: Starting system-systemd\x2dfsck.slice.
[ 3.356717] systemd[1]: Created slice system-systemd\x2dfsck.slice.
[ 3.360506] systemd[1]: Starting system-getty.slice.
[ 3.369539] systemd[1]: Created slice system-getty.slice.
[ 3.373178] systemd[1]: Starting Restore / save the current clock...
[ 3.387058] systemd[1]: Starting Nameserver information manager...
[ 3.399095] systemd[1]: Starting udev Coldplug all Devices...
[ 3.422571] systemd[1]: Started Set Up Additional Binary Formats.
[ 3.459788] systemd[1]: Starting Load Kernel Modules...
[ 3.473634] systemd[1]: Mounting POSIX Message Queue File System...
[ 3.499092] systemd[1]: Mounting Debug File System...
[ 3.515214] systemd[1]: Mounted Huge Pages File System.
[ 3.520308] systemd[1]: Starting Create list of required static device nodes for the current kernel...
[ 3.534290] fuse init (API version 7.23)
[ 3.534964] systemd[1]: Starting LSB: Set keymap...
[ 3.552531] systemd[1]: Starting Journal Service...
[ 3.571694] systemd[1]: Started Journal Service.
[ 4.293249] scsi 0:0:0:0: Direct-Access Samsung Flash Drive FIT 1100 PQ: 0 ANSI: 6
[ 4.295351] sd 0:0:0:0: [sda] 125304832 512-byte logical blocks: (64.2 GB/59.8 GiB)
[ 4.296049] sd 0:0:0:0: [sda] Write Protect is off
[ 4.296077] sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00
[ 4.296763] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 4.300104] systemd-udevd[164]: starting version 215
[ 4.308059] sda: sda1
[ 4.312217] sd 0:0:0:0: [sda] Attached SCSI removable disk
[ 4.673109] gpiomem-bcm2835 3f200000.gpiomem: Initialised: Registers at 0x3f200000
[ 4.679223] bcm2835-wdt 3f100000.watchdog: Broadcom BCM2835 watchdog timer
[ 4.934077] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 5.001486] EXT4-fs (mmcblk0p2): re-mounted. Opts: discard
[ 5.214356] RTL871X: module init start
[ 5.214405] RTL871X: rtl8821au v4.3.14_13455.20150212_BTCOEX20150128-51
[ 5.214421] RTL871X: build time: May 13 2016 16:55:31
[ 5.214435] RTL871X: rtl8821au BT-Coex version = BTCOEX20150128-51
[ 5.295864] random: nonblocking pool is initialized
[ 5.344665] cfg80211: World regulatory domain updated:
[ 5.344680] cfg80211: DFS Master region: unset
[ 5.344681] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[ 5.344699] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[ 5.344708] cfg80211: (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[ 5.344716] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
[ 5.344727] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (N/A)
[ 5.344737] cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
[ 5.344746] cfg80211: (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[ 5.344754] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[ 5.344763] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
[ 5.446088] RTL871X: rtw_ndev_init(wlan0)
[ 5.449784] usbcore: registered new interface driver rtl8821au
[ 5.449808] RTL871X: module init ret=0
[ 5.795455] systemd-journald[124]: Received request to flush runtime journal from PID 1
[ 6.273844] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[ 6.274132] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 6.683061] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 6.827401] RTL871X: set ssid [ESM_EF2000_inv] fw_state=0x00000008
[ 7.509092] Adding 102396k swap on /var/swap. Priority:-1 extents:2 across:126972k SSFS
[ 7.862129] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 7.864415] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xC1E1
[ 9.145032] RTL871X: start auth
[ 9.147634] RTL871X: auth success, start assoc
[ 9.151534] RTL871X: rtw_cfg80211_indicate_connect(wlan0) BSS not found !!
[ 9.151593] RTL871X: assoc success
[ 9.151763] ------------[ cut here ]------------
[ 9.152007] WARNING: CPU: 3 PID: 80 at net/wireless/sme.c:714 __cfg80211_connect_result+0x2cc/0x3e4 cfg80211
[ 9.152022] Modules linked in: 8812au(O) cfg80211 sg rfkill bcm2835_wdt bcm2835_gpiomem uio_pdrv_genirq uio fuse ipv6
[ 9.152099] CPU: 3 PID: 80 Comm: kworker/u8:2 Tainted: G O 4.4.10-v7+ #885
[ 9.152111] Hardware name: BCM2709
[ 9.152221] Workqueue: cfg80211 cfg80211_event_work [cfg80211]
[ 9.152281] <80018724> from <80014058>
[ 9.152312] <80014058> from <803204c4>
[ 9.152342] <803204c4> from <80025300>
[ 9.152370] <80025300> from <800253ec>
[ 9.152490] <800253ec> from [<7f0e9f94>](__cfg80211_connect_result+0x2cc/0x3e4 [cfg80211])
[ 9.152684] [<7f0e9f94>](__cfg80211_connect_result [cfg80211]) from [<7f0c2580>](cfg80211_process_wdev_events+0x160/0x1a0 [cfg80211])
[ 9.152862] [<7f0c2580>](cfg80211_process_wdev_events [cfg80211]) from [<7f0c25fc>](cfg80211_process_rdev_events+0x3c/0x70 [cfg80211])
[ 9.153038] [<7f0c25fc>](cfg80211_process_rdev_events [cfg80211]) from [<7f0bd28c>](cfg80211_event_work+0x24/0x2c [cfg80211])
[ 9.153145] [<7f0bd28c>](cfg80211_event_work [cfg80211]) from <8003c634>
[ 9.153174] <8003c634> from <8003c98c>
[ 9.153200] <8003c98c> from <80042660>
[ 9.153226] <80042660> from <8000fbc8>
[ 9.153241] ---[ end trace 52060acec2931039 ]---
[ 9.153410] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 9.275771] RTL871X: rtw_set_802_11_connect(wlan0) fw_state=0x00000009
[ 9.280689] Unable to handle kernel paging request at virtual address bf46e01f
[ 9.283507] pgd = 80004000
[ 9.286247] [bf46e01f] *pgd=39e09811, *pte=00000000, *ppte=00000000
[ 9.289519] Internal error: Oops: 7 [#1] SMP ARM
[ 9.292485] Modules linked in: 8812au(O) cfg80211 sg rfkill bcm2835_wdt bcm2835_gpiomem uio_pdrv_genirq uio fuse ipv6
[ 9.295926] CPU: 2 PID: 408 Comm: RTW_CMD_THREAD Tainted: G W O 4.4.10-v7+ #885
[ 9.298880] Hardware name: BCM2709
[ 9.301796] task: bb92a840 ti: bba2a000 task.ti: bba2a000
[ 9.305732] PC is at join_cmd_hdl+0x168/0x370 [8812au]
[ 9.308991] LR is at 0x0
[ 9.312000] pc : [<7f17a004>] lr : [<00000000>] psr: 80000113
sp : bba2bed8 ip : 00000010 fp : bba2bf14
[ 9.318429] r10: 00000000 r9 : 7f25d130 r8 : bf46c40c
[ 9.321398] r7 : bf46a0fe r6 : bf46e01f r5 : 00003ea9 r4 : bf469000
[ 9.324339] r3 : 00003f21 r2 : 00000001 r1 : bf46a19c r0 : 00000001
[ 9.327327] Flags: Nzcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
[ 9.330362] Control: 10c5387d Table: 39f6c06a DAC: 00000055
[ 9.333701] Process RTW_CMD_THREAD (pid: 408, stack limit = 0xbba2a210)
[ 9.337229] Stack: (0xbba2bed8 to 0xbba2c000)
[ 9.340474] bec0: 805b7d0c 800d9594
[ 9.344091] bee0: bc20ef5c bc20ef40 bba2bf14 bc20ef40 bf469000 bf46a958 bf46a978 ffff8e6e
[ 9.347712] bf00: bf46a958 000048a4 bba2bf5c bba2bf18 7f156b5c 7f179ea8 bba2bf3c bba2a000
[ 9.351127] bf20: bb988400 bf46a968 bf46a9a4 b9fe2a00 00000000 00000000 bb988400 bf469000
[ 9.354584] bf40: 7f1568cc 00000000 00000000 00000000 bba2bfac bba2bf60 80042660 7f1568d8
[ 9.358147] bf60: 3c6c7000 00000000 bba2bf94 bf469000 00000000 00000000 bba2bf78 bba2bf78
[ 9.361685] bf80: 00000000 00000000 bba2bf88 bba2bf88 bb988400 80042574 00000000 00000000
[ 9.365286] bfa0: 00000000 bba2bfb0 8000fbc8 80042580 00000000 00000000 00000000 00000000
[ 9.368859] bfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 9.372482] bfe0: 00000000 00000000 00000000 00000000 00000013 00000000 090a0a6c 09090909
[ 9.377461] [<7f17a004>](join_cmd_hdl [8812au]) from [<7f156b5c>](rtw_cmd_thread+0x290/0x3ec [8812au])
[ 9.381710] [<7f156b5c>](rtw_cmd_thread [8812au]) from <80042660>
[ 9.385429] <80042660> from <8000fbc8>
[ 9.389175] Code: e0888005 e59f9208 e2853078 e0876003 (e7d73003)
[ 9.393082] ---[ end trace 52060acec293103a ]---
[ 23.901435] RTL871X: rtw_set_802_11_connect(wlan0) fw_state=0x00000008
[ 97.661316] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[ 97.730579] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[ 98.482352] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[ 98.549963] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[ 98.830277] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 98.891294] RTL871X: set ssid [ESM_EF2000_inv] fw_state=0x00000008
[ 100.009526] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xC1E1

@avs-code
Copy link
Author

avs-code commented May 16, 2016

captura
Note that don't give me info about speed or strench

@Fourdee
Copy link
Collaborator

Fourdee commented May 16, 2016

@arv187

Can you post results of the following commands please?:

iwconfig wlan0

note to self

WIFI_BITRATE=$(iwconfig wlan$WIFI_INDEX | grep -m1 'Bit Rate:' | awk '{ print $2 }' | sed 's/Rate://g')
WIFI_SIGNALSTRENGTH=$(iwconfig wlan$WIFI_INDEX | grep -m1 'Signal level=' | awk '{ print $4 }' | sed 's/level=//g' | cut -f1 -d "/")

@avs-code
Copy link
Author

avs-code commented May 16, 2016

captura

root@DietPi:~# iwconfig wlan0
wlan0     unassociated  Nickname:"<WIFI@REALTEK>"
          Mode:Managed  Frequency=2.412 GHz  Access Point: Not-Associated
          Sensitivity:0/0
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality:0  Signal level:0  Noise level:0
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

@k-plan
Copy link
Contributor

k-plan commented May 16, 2016

@Fourdee

root@RPi-B-Plus:~# iwconfig wlan0
wlan0     IEEE 802.11AC  ESSID:"wifi-ssid_5GHz"  Nickname:"<WIFI@REALTEK>"
          Mode:Managed  Frequency:5.22 GHz  Access Point: D6:CA:6D:xx:xx:xx
          Bit Rate:780 Mb/s   Sensitivity:0/0
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:****-****-****-****-****-****-****-****   Security mode:open
          Power Management:off
          Link Quality=95/100  Signal level=100/100  Noise level=0/100
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0
root@RPi-B-Plus:~# iwconfig wlan0
wlan0     IEEE 802.11bgn  ESSID:"wifi-ssid_2.4GHz"  Nickname:"<WIFI@REALTEK>"
          Mode:Managed  Frequency:2.412 GHz  Access Point: D6:CA:6D:xx:xx:xx
          Bit Rate:270 Mb/s   Sensitivity:0/0
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:****-****-****-****-****-****-****-****   Security mode:open
          Power Management:off
          Link Quality=100/100  Signal level=100/100  Noise level=0/100
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

(@Fourdee: I think, his device is not connected ...)

@Fourdee
Copy link
Collaborator

Fourdee commented May 16, 2016

@k-plan

(@Fourdee: I think, his device is not connected ...)

Yep, i parsed your results with the current code, working fine:

cat test | grep -m1 'Bit Rate:' | awk '{ print $2 }' | sed 's/Rate://g'
780

cat test | grep -m1 'Signal level=' | awk '{ print $4 }' | sed 's/level=//g' | cut -f1 -d "/"
100

@k-plan I've not been following this indepth, so I apologise if there is already a reason for static.
@arv187 Can I ask, have you tried using DHCP?

@avs-code
Copy link
Author

avs-code commented May 16, 2016

@Fourdee Yes, dont worry, i post you link to dhcp test.
https://github.com/Fourdee/DietPi/issues/337#issuecomment-219305372

Basically in dhcp mode I get this error with my guest wlan connection (easy numeric key):

starting networking services...
ifup: interface eth0 already configured
Error for wireless request "Set Power Management" (8B2C) :
    SET failed on device wlan0 ; Operation not permitted.
Internet Systems Consortium DHCP Client 4.3.1
Copyright 2004-2014 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlan0/xx:xx:xx:xx:xx:xx
Sending on   LPF/wlan0/xx:xx:xx:xx:xx:xx
Sending on   Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 9
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 16
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 12
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 17
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 3
No DHCPOFFERS received.
No working leases in persistent database - sleeping.

And this with my 2,4ghz - 5ghz and a key similar to this:
3%J2t;uZ`@PpXYp,_b3m{||@bl=+iU z}=H[f So55vJ9H4Oj[d>Z0$iihYn]'E WPA 504 bits 63 characters.

Connecting to myssid , please wait

 DietPi-Services
 Mode: stop
 Please wait...
 Completed

 - Dropping connections..

 - Restarting networking services...
ifup: interface eth0 already configured
run-parts: /etc/network/if-pre-up.d/wireless-tools exited with return code 2
Failed to bring up wlan0.

 DietPi-Services
 Mode: start
 Please wait...
 Completed

@avs-code
Copy link
Author

avs-code commented Jun 18, 2016

Edited: I forgot -v7- in file name, any way i still issue to connect. Device and networks are detected, but not connect.

dietpi v119 firmware updated.

lsmod
Module                  Size  Used by
sg                     18319  0
bcm2835_gpiomem         3040  0
bcm2835_wdt             3225  0
8812au               1673762  0
cfg80211              427855  1 8812au
uio_pdrv_genirq         3164  0
uio                     8000  1 uio_pdrv_genirq
rfkill                 16037  1 cfg80211
fuse                   83461  1
ipv6                  347530  22
root@DietPi:~# lsusb
Bus 001 Device 005: ID 7392:a812 Edimax Technology Co., Ltd
Bus 001 Device 004: ID 090c:1000 Silicon Motion, Inc. - Taiwan (formerly Feiya Technology Corp.) Flash Drive
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@DietPi:~#
root@DietPi:~# iwconfig wlan0
wlan0     unassociated  Nickname:"<WIFI@REALTEK>"
          Mode:Managed  Frequency=2.412 GHz  Access Point: Not-Associated
          Sensitivity:0/0
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality:0  Signal level:0  Noise level:0
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

DietPi-Config

       ┌────────────┤ DietPi - Network Options: Adapters ├─────────────┐
       │                                                               │
       │  Ethernet     : Available | Enabled | Connected               │
       │  Wifi         : Available | Enabled | Disconnected            │
       │  IPv6         : Enabled                                       │
       │  Internet     : Please run Internet Test                      │
       │  Proxy        : Disabled                                      │
       │                                                               │
       │           Ethernet Change Wired Network Settings              │
       │           WiFi     Change Wireless Network Settings           │
       │           IPv6     Toggle IPv6 Support                        │
       │           Test     Run the Internet Connection Test           │
       │           Proxy    Configure proxy settings                   │
       │                                                               │
       │                                                               │
       │                                                               │
       │                <Ok>                    <Back>                 │
       │                                                               │
       └───────────────────────────────────────────────────────────────┘
Connecting to ESM_EF2000_T3B , please wait

 DietPi-Services
 Mode: stop
 Please wait...
cron
Ok | cron
samba
Ok | samba


 - Dropping connections..

 - Restarting networking services...
ifup: interface eth0 already configured
run-parts: /etc/network/if-pre-up.d/wireless-tools exited with return code 2
Failed to bring up wlan0.

 DietPi-Services
 Mode: start
 Please wait...
cron
Ok | cron
samba
ailed | samba

 DietPi-Process_Tool
 Applying settings, please wait...
Cron (5840)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0
OpenSSH Server (435)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0
OpenSSH Server (5184)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0
Samba Server (Daemon) (894)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0
Samba Server (Daemon) (904)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0
Samba Server (NetBios) (884)
Ok | Nice      0
Ok | Affinity  0-3
Ok | Scheduler SCHED_OTHER 0

@avs-code
Copy link
Author

Ok, its working now configuring wifi with wicd:
https://blog.bartbania.com/raspberry_pi/easy-wireless-configuration-for-raspberry-pi/

I think that there something not work with key type "phrasse" or dhcp in dietpi network manager.

@Fourdee
Copy link
Collaborator

Fourdee commented Jun 19, 2016

@arv187

I think that there something not work with key type "phrasse"

Possibly.
Are you using a wifi key with non-letter/number characters? I'd be grateful if you could rearrange the order, then paste your key here (eg: mykey, i'd paste kmyye)

Also, what encryption type is your router set to? eg wpa-psk/wep etc.

@avs-code
Copy link
Author

avs-code commented Jun 19, 2016

I don't understand this "if you could rearrange the order"

Set DHCP mode on in dietpi-config

My key its similar to this: bAZkp&\D7XfqnrcQpJvLIgG]},c>P'XCEL$#!.CQRHaN??KywO2YIn!AXM:(o)J WPA/WPA2 504 bits 63 characters

My router options:
Encryption: *WPA/WPA2 - Only WPA2 - WEP - Disabled
Type: *key(min 8 characters) - Hex(64digits)
My selection with *

With a easy numeric key: 123456789 the error is different:

starting networking services...
ifup: interface eth0 already configured
Error for wireless request "Set Power Management" (8B2C) :
    SET failed on device wlan0 ; Operation not permitted.
Internet Systems Consortium DHCP Client 4.3.1
Copyright 2004-2014 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlan0/xx:xx:xx:xx:xx:xx
Sending on   LPF/wlan0/xx:xx:xx:xx:xx:xx
Sending on   Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 9
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 16
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 12
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 17
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 3
No DHCPOFFERS received.
No working leases in persistent database - sleeping.

@Fourdee
Copy link
Collaborator

Fourdee commented Jun 19, 2016

@arv187

bAZkp&\D7XfqnrcQpJvLIgG]},c>P'XCEL$#!.CQRHaN??KywO2YIn!AXM:(o)J

Try putting the key manually into /etc/network/interfaces, replace the following lines:

wireless-key "bAZkp&\D7XfqnrcQpJvLIgG]},c>P'XCEL$#!.CQRHaN??KywO2YIn!AXM:(o)J"
wpa-psk "bAZkp&\D7XfqnrcQpJvLIgG]},c>P'XCEL$#!.CQRHaN??KywO2YIn!AXM:(o)J"

Then reboot (ideally), or ifup wlan0. If that still fails, try without the quotes (")

@avs-code
Copy link
Author

avs-code commented Jun 19, 2016

With " say me invalid argument

Ok, I think that i found the issue.

With wicd was working even rebooting, but when I shutdown yesterday at night and power on today, wifi device is on, but not connect.

I go to my config router, in LAN/dhcp static when i have a static ip to my wifi dongle, never fail, only with diet-pi, I dont know why... ¿May be that take host name not only mac wifi dongle, and have a incompatibility with new hostname?

Well, after delete my wifi dongle from dhcp static list and reboot wifi connect. Now I set my wifi dongle to dhcp list and continue working. shutdown and power on and continue working.
Its very random issue... but seems related with dhcp and diet-pi.

*LAN Settings  

You can enable DHCP to dynamically allocate IP addresses to your client PCs, or configure filtering functions based on specific clients or protocols. In addition to that you can assign static addresses for certain clients. The DSL-Easy Box must have an IP address for the local network.

VLAN Binding is to define the port-based VLAN belonging of the physical ports. Each physical port can be assigned to any configured VLAN profile.

Static DHCP
PC List  

ID  Name    IP  MAC Address

*WIFI Security settings
Allowed Client Type:  *WPA/WPA2    WPA2 Only    WEP    Disabled  
Pre-shared key type:     *Passphrase (8~63 characters)    Hex (64 digits)

@Fourdee
Copy link
Collaborator

Fourdee commented Jun 20, 2016

Well, after delete my wifi dongle from dhcp static list and reboot wifi connect. Now I set my wifi dongle to dhcp list and continue working. shutdown and power on and continue working.
Its very random issue... but seems related with dhcp and diet-pi.

In dietpi-config and whilst connected in DHCP mode:

  • select "change mode" STATIC
  • then select "Copy current IP to static"
  • Select "apply".

This will copy your working DHCP IP addresses and use them for STATIC IP.
Would be interesting to see if this works.

@avs-code
Copy link
Author

avs-code commented Jun 20, 2016

When I talked about static dhcp list I was talking about a config page in my router.
Then, you want that I set dhcp mode to static and copy the current ip to static (in dietpi-config),
Do i have keep the static dhcp ip assigned to my wifi dongle in my router to test?

P.S: I did, and work, but I saw that ethernet was connected and in static too (I didn't have my ethernet cable plugin) then I set ethernet to dhcp mode, restart networks and show me next error :

- Dropping connections..

 - Restarting networking services...
Internet Systems Consortium DHCP Client 4.3.1
Copyright 2004-2014 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/b8:27:eb:a7:67:ab
Sending on   LPF/eth0/b8:27:eb:a7:67:ab
Sending on   Socket/fallback
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 15
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 19
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 15
No DHCPOFFERS received.
Trying recorded lease 192.168.1.100
RTNETLINK answers: File exists
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.

--- 192.168.1.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 1.803/1.803/1.803/0.000 ms
bound: renewal in 681049171 seconds.

I was reboot my pi was hung up.

In resume, wifi is working in static mode too.

@Fourdee
Copy link
Collaborator

Fourdee commented Jun 20, 2016

@arv187

No DHCPOFFERS received.
--- 192.168.1.1 ping statistics ---
1 packets transmitted, 1 received

Looks like router is failing to completed the DHCP request for IP. Check your router settings, most specifically conflicting address reservation for DHCP.

When I talked about static dhcp list I was talking about a config page in my router.

Yep, Its probably easier to set reserved IP's in your router and use DHCP on the devices. I do this for all my devices (i have about 30 entries lol). Either way, has the same effect as using a static IP on the device.

@avs-code
Copy link
Author

Error is normal, not ethernet cable there. The strange was see connected status and static hehe.

@Fourdee
Copy link
Collaborator

Fourdee commented Jul 23, 2016

Outdated ticket, marking as closed. Please reopen if required.

@Fourdee Fourdee closed this as completed Jul 23, 2016
@avs-code
Copy link
Author

avs-code commented Jul 24, 2016

Sorry to reopen this issue, today I have had again this issue,
DNS server was set in 0.0.0.0.0 by default and set to google 8.8.8.8 8.8.4.4 not worked.
But simply I set manually DNS server with mi router IP and work again, after unplug ethernet set wifi in dhcp, reboot and wifi working.
So, I think that is the walkthrough to me to solve this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants