1

I've followed the excellent instructions at Setting up a Raspberry Pi as an access point - the easy way and have succeeded in setting up my Raspi 3b as a router (Ethernet on the uplink on subnet 192.168.6.0/24, WiFi AP on the internal side with subnet 192.168.8.0/24). Everything is perfect, with an SSID of foo2. However, if I edit the /etc/wpa_supplicant/wpa_supplicant-wlan0.conf file to change the SSID to foo and reboot, nothing can connect. The symptom from the client devices (Android "NETWORK_SELECTION_DISABLED_ASSOCIATION_REJECTION", chromebook "Out of Range", Ubuntu laptop "") is that of an incorrect password. So the foo SSID is visible, and a connection attempt is made, but it fails.

My reason for changing the SSID from foo2 to foo is because I have an existing Ethernet/WiFi router that I'm looking for the Raspi to replace. So once I got the Raspi working, I changed the SSID to that of the old device, which I have turned off.

On the client devices I've tried forgetting the original foo network and reentering the password, but still no joy. All SSIDS (original foo, new foo) have the same password.

        My Router
        /       \        192.168.6.0/24
Old device       Raspi           foo and foo2 both work
  foo             foo2   192.168.8.0/24

______________________________________
        My Router
        /       \        192.168.6.0/24
                 Raspi          foo does not work
                 foo     192.168.8.0/24

I'm seeing WPA: wpa_sm_step() called recursively in the Raspi syslog. I also think I saw that the log file in my failing dhcp-client contains references to the wrong mac address. So maybe there is an ARP cache issue somewhere in the dhcp implementation.

Ingo
  • 40,606
  • 15
  • 76
  • 189
pinoyyid
  • 61
  • 6

1 Answers1

0

As you say the error message is that of an incorrect password, I was told by another user that he had problems with the length of the password. Could this also be an issue for you? A password with 8 characters definitely works. Maybe your old device accepted shorter passwords. I have also heard about difficulties with quoting the ssid and/or password string so you could try to change these settings. Maybe the ssid must be at least 4 character (don't believe it really)?

For further troubleshooting I would run both access points, the scenario that works. Then associate all stations to foo2 and then switch off foo. If this works then just rename foo2 to foo.

The chromebook reports "Out of Range" so it may be an issue because the RasPi has a lower range.

DHCP could also be an issue. Following the instructions to Setting up an access point and with eth0, with routing then you have enabled the DHCP server build in systemd-networkd with the configuration in /etc/systemd/network/08-wlan0.network. This is meant to be lean and simple and just doing the most needed functions out of the box. Look in man systemd.network at [DHCPSERVER] SECTION OPTIONS what options you can set. With PoolOffset=, PoolSize= you can define the address range that is available to DHCP clients. But you cannot define the DHCP server to be authoritative for the broadcast domain. That's to much for this simple DHCP server. Maybe it is it by default? If you want this option you should use isc-dhcp-server.

I have setup an access point from scratch with this settings:

rpi ~$ sudo cat /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
country=DE
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
    ssid="foo"
    mode=2
    key_mgmt=WPA-PSK
    psk="secretpasw"
    frequency=2412
}

This worked with a debian laptop and an android mobile phone. It may also be an option for you. Switch off the old device, setup the RasPi and associate your stations to it.

Another point could be random numbers. For encrypting keys for secured connections wpa_supplicant needs random numbers. Generating this is very slow on a Raspberry Pi. If it does not have enough entropy to generate encrypting keys wpa_supplicant will reject the authentication. You can look with cat /proc/sys/kernel/random/entropy_avail how many entropy is available. It should be >1000 to work quick enough. Fortunately the RasPi has a True Random Number Generator (TRNG) in hardware. You can use it if you install the service supporting this with:

rpi ~$ sudo apt install rng-tools
Ingo
  • 40,606
  • 15
  • 76
  • 189
  • Thanks ingo. The password is 10 chars and works fine with the `foo2` SSID. The difference between a working and non-working scenario is literally one character. I've also tried `fo2` to see if a short SSID was the issue, but that works OK. – pinoyyid Jan 25 '19 at 13:38
  • @pinoyyid I updated my answer. – Ingo Jan 25 '19 at 14:05
  • Your troubleshooting step is exactly what I'm doing - it fails after the rename step. The "out of range" is misleading - Chromebooks use that as a catch-all error. I've just read https://raspberrypi.stackexchange.com/questions/78817/wifi-access-point-works-but-not-when-roaming-between-networks-of-the-same-ssid - Could it be a DHCP issue? and in your instructions how would I configure the DHCP options, eg to set authorative mode or define an address range that is available to DHCP clients? – pinoyyid Jan 25 '19 at 14:52
  • @pinoyyid I have just tested it with DHCP server disabled on the access point. My debian laptop still associated to the AP but has no ip address. My android mobile phone doesn't connect without getting an ip address. So DHCP could be an issue. You wrote you setup the RasPi a router so you must have two subnets, isn't it? Then you must have DHCP server enabled on the RasPi. Or do you use a bridge? Then the DHCP server on the router is used. Is there one? About settings of the DHCP server on systemd-networkd I will update my answer a bit later in conjunction with your information. – Ingo Jan 26 '19 at 00:18
  • I have used the router option from your instructions, with the inner Wifi on 192.168.8 and the outer Ethernet on 192.168.6 . My setup was 1/ install stretch, 2/ follow your instructions, so I've done nothing to touch DHCP. It just seems to work by magic :-) – pinoyyid Jan 26 '19 at 10:04
  • @pinoyyid I have updated my answer. I will try to reproduce your error with a second RasPi as old device. – Ingo Jan 26 '19 at 23:06
  • in case it's significant, I'm seeing `WPA: wpa_sm_step() called recursively` in the Raspi syslog. I also think I saw that the log file in my failing dhcp-client contains references to the wrong mac address. So maybe there is an ARP cache issue somewhere in the dhcp implementation. Please don't go to too much trouble just for me. I've decided not to waste any more time trying to fix it when I can buy a 20euro device from Amazon to do the job I need. – pinoyyid Jan 27 '19 at 01:24
  • @pinoyyid It's an interesting detail. It gives me an idea that it could be an issue with random numbers. I have updated the answer. You should try this. It is just a simple installation call. Btw. I do not take this effort only for you. I'm glad about every feedback to improve my instructions. – Ingo Jan 27 '19 at 13:31