WiFi configuration | SSH is not working

Hi All,

I am trying to configure WiFi connection on my STM32MP157 based Avneger96 board. I have follows below steps to configure:

ifconfig eth0 down

ifconfig usb0 down

Start WiFi: ifconfig wlan0 up

iw dev wlan0 scan | grep ssid -i This lists my WiFi with proper SSID.

Since WiFi network uses WPA authentication I copy wpa_supplicant.conf file and pass the SSID and passphrase

 cp /etc/wpa_supplicant.conf .

wpa_passphrase [SSID] [passphrase] >> ./wpa_supplicant.conf

SSID and passphrase is inserted without quotes and brackets and SSID doesn’t contain any spaces.

Now connecting to WiFi network:

wpa_supplicant -B -Dnl80211 -iwlan0 -cwpa_supplicant.conf

iw dev wlan0 link : Its shows it's connected to WiFi. And ping google.com is successful.

Doing ifconfig shows the assigned IP Address on wlan0.

Now the problem is I am not able to access device using SSH. When I do ssh root@[IP Address], I get message that connection timed out.

ssh: connect to host [IP Address] port 22: Connection timed out

I am not able to resolve this. Can someone please let me know how to resolve this?

Your help will be much appreciated.

P.S: I am booting the board with custom Linux image built from Yocto Project. My host machine is Ubuntu 20.04. I have enabled required drivers in kernel config. And I have also included “packagegroup-base-wifi” in my image recipe and “wifi” in DISTRO_FEATURES_append. I have tried with different networks but still same error. And I have checked that sshd and ssh service are running.