Wifi . octopi on pi3

I use the lastest image and all seem to work fine, I can access the pi via the web page, have a webcam working, and can print, only if I connect the ethernet cable, however the wifi seem to partly working. The Wifi words well with my PCs and phone.

I followed the howto on 'Getting your WiFi Connection Working 1'

I edited the three lines in octopi-wpa-supplicant.txt

WPA/WPA2 secured

network={
ssid="HUAWEI-B539-D9D0"
psk="12345" ## my password
}
and
country=ZA # South Africa

I double checked the spelling is correct and verified it on the pi with mcedit and did not found any strange characters.

if I run iwlist wlan0 scan , all the available Wifi's are detected an the above ssid is in the list, but if I removed the ethernet no comms at all. With the ethernet cable I can ping google, install 'mc' etc.

I did however made some changes to /etc/dhcpd.conf ti use a static IP address, un-commenting the following three lines

interface eth0
static ipaddress 192.168.2.31
static routers 192.168.2.10

I tried to connect with
iwconfig wlan0 essid "HUAWEI-B539-D9D0" ,

iwconfig wlan0 display extra info including "HUAWEI-B539-D9D0" , however wlan0 does not have an IP address., no IP no comms.

What am I missing ?, or how can I get logs to help me why it does not connect?

Thanks

Closing since one topic on this should be enough.