Wifi connection failed

I assembled a sensor for a friend. This is already configured and online regulary, I just have to bring the box to his home and configure it with the new Wifi.
But it doesn’t connect to wifi (name and password are set with copy/paste so there are no errors to digit).
The only different things were:

  • The wifi name is very long and includes spaces (never tried before)
  • the network set up with DHCP 192.168.3.x (shouldn’t be a problem)

Do you have any idea?

The DHCP range shouldn’t be the problem.
The WiFi SSID is limited to 35 chars in the firmware. The standard defines a max length of 32.
Is the wifi working on 2.4 GHz? The Esp8266 won’t work with 5GHz wifi networks.