Skip to main content
asadullah4571
Associate III
July 22, 2024
Solved

wifi enabling problem

  • July 22, 2024
  • 3 replies
  • 3359 views

hi 
i successfully connecting wifi on STM32mp157f-DK2 board through IPhone but the when i pass the command 

"# ping google.com " then it show temporary failure  in name resolution ,  and also dhcp command not found why this is happen. please reach me out As soon as possible

 

Best answer by PatrickF

Hi, just tested on STM32MP157x-DK2 with the https://wiki.st.com/stm32mpu/wiki/How_to_setup_a_WLAN_connection#Automatic_WiFi_configuration_at_start_up

(only section 3 to be followed).

No issue to ping google.com (using Android phone as hotspot)

Tested after sync + reboot and also after a complete power down. No issue, connection is still automatic and working.

root@stm32mp1:~# ifconfig wlan0
wlan0 Link encap:Ethernet HWaddr 00:9D:6B:87:40:FB
 inet addr:192.168.43.202 Bcast:192.168.43.255 Mask:255.255.255.0
 inet6 addr: fe80::29d:6bff:fe87:40fb/64 Scope:Link
 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
 RX packets:35 errors:0 dropped:0 overruns:0 frame:0
 TX packets:76 errors:0 dropped:0 overruns:0 carrier:0
 collisions:0 txqueuelen:1000
 RX bytes:4837 (4.7 KiB) TX bytes:10701 (10.4 KiB)


root@stm32mp1:~# cat /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
ctrl_interface=/var/run/wpa_supplicant
eapol_version=1
ap_scan=1
fast_reauth=1

network={
 psk=b73eb99d9bb4e249def63d24177ca0d51ae9baa96306e0aeed87c063cf44b4e8
}


root@stm32mp1:~# iw wlan0 link
Connected to 4e:6a:f7:b4:f5:e4 (on wlan0)
 SSID: xxxxxxx
 freq: 2437
 RX: 6726 bytes (35 packets)
 TX: 12767 bytes (73 packets)
 signal: -30 dBm
 rx bitrate: 1.0 MBit/s
 tx bitrate: 24.0 MBit/s

 bss flags: short-preamble short-slot-time
 dtim period: 2
 beacon int: 100


root@stm32mp1:~# ping google.com
PING google.com (216.58.213.78) 56(84) bytes of data.
64 bytes from lhr25s01-in-f78.1e100.net (216.58.213.78): icmp_seq=1 ttl=113 time=59.6 ms

 

Did you have anything to share like above to see some error messages  ?

Is timedatectl show synchronized data/time ?

On my side, the "temporary failure  in name resolution" appear when I shutdown the wifi hotspot on the phone (so, you are likely not really connected to your iPhone hotspot).

 

Maybe start again the setup from a fresh Starter Package of Ecosystem v5.1.0

 

Regards

3 replies

PatrickF
Technical Moderator
July 22, 2024

Hi @asadullah4571 

this might be due to some security on the phone or the board date/time not aligned (as there is no RTC battery on the board).

Regards.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.NEW ! Sidekick STM32 AI agent, see here
asadullah4571
Associate III
July 24, 2024

yes you are right, there is no RTC connection, 
but my IPhone hostpot is connected but i need to find the ip address but there is no ip found(IPV4), only i can see the IPV6, and why dhclient command not found. i have to do  manually add the ip address and default gatway.

and the second question why it is not connected automatic once i add the SSID and Password. only iphone is connected i tryied with Android but not connected  

Andrew Neil
Super User
July 22, 2024

@asadullah4571 wrote:

connecting wifi ... through IPhone


You mean using the iPhone as a "hotspot"?

Does this work with any other devices?

ie, as @PatrickF suggested, how do you know it's not just an issue with the iPhone?

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
asadullah4571
Associate III
July 24, 2024

yes i am using iphone as a hotspot
No i tried many time with different different Android phone and also router but not connected i am facing this issue still now 

PatrickF
Technical Moderator
July 24, 2024

Hi,

did you use this wiki page ?
https://wiki.st.com/stm32mpu/index.php?title=How_to_setup_a_WLAN_connection&sfr=stm32mpu

 

Did you removed any Ethernet cable on the board (might conflict).

Regards.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.NEW ! Sidekick STM32 AI agent, see here
PatrickF
PatrickFBest answer
Technical Moderator
July 24, 2024

Hi, just tested on STM32MP157x-DK2 with the https://wiki.st.com/stm32mpu/wiki/How_to_setup_a_WLAN_connection#Automatic_WiFi_configuration_at_start_up

(only section 3 to be followed).

No issue to ping google.com (using Android phone as hotspot)

Tested after sync + reboot and also after a complete power down. No issue, connection is still automatic and working.

root@stm32mp1:~# ifconfig wlan0
wlan0 Link encap:Ethernet HWaddr 00:9D:6B:87:40:FB
 inet addr:192.168.43.202 Bcast:192.168.43.255 Mask:255.255.255.0
 inet6 addr: fe80::29d:6bff:fe87:40fb/64 Scope:Link
 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
 RX packets:35 errors:0 dropped:0 overruns:0 frame:0
 TX packets:76 errors:0 dropped:0 overruns:0 carrier:0
 collisions:0 txqueuelen:1000
 RX bytes:4837 (4.7 KiB) TX bytes:10701 (10.4 KiB)


root@stm32mp1:~# cat /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
ctrl_interface=/var/run/wpa_supplicant
eapol_version=1
ap_scan=1
fast_reauth=1

network={
 psk=b73eb99d9bb4e249def63d24177ca0d51ae9baa96306e0aeed87c063cf44b4e8
}


root@stm32mp1:~# iw wlan0 link
Connected to 4e:6a:f7:b4:f5:e4 (on wlan0)
 SSID: xxxxxxx
 freq: 2437
 RX: 6726 bytes (35 packets)
 TX: 12767 bytes (73 packets)
 signal: -30 dBm
 rx bitrate: 1.0 MBit/s
 tx bitrate: 24.0 MBit/s

 bss flags: short-preamble short-slot-time
 dtim period: 2
 beacon int: 100


root@stm32mp1:~# ping google.com
PING google.com (216.58.213.78) 56(84) bytes of data.
64 bytes from lhr25s01-in-f78.1e100.net (216.58.213.78): icmp_seq=1 ttl=113 time=59.6 ms

 

Did you have anything to share like above to see some error messages  ?

Is timedatectl show synchronized data/time ?

On my side, the "temporary failure  in name resolution" appear when I shutdown the wifi hotspot on the phone (so, you are likely not really connected to your iPhone hotspot).

 

Maybe start again the setup from a fresh Starter Package of Ecosystem v5.1.0

 

Regards

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.NEW ! Sidekick STM32 AI agent, see here
asadullah4571
Associate III
July 25, 2024
root@stm32mp1:~# iw dev wlan0 scan |grep SSID
SSID: Betrust
SSID: 
SSID: Airtel_mani_0680
SSID: MohiT_PIPPAL
* Multiple BSSID
* SSID List
SSID: 4ThFloor
SSID: iPhone
root@stm32mp1:~# iw dev wlan0 scan |grep SSID
SSID: EDS-INDIA\x20
SSID: Betrust
SSID: 
SSID: Airtel_mani_0680
SSID: iPhone
root@stm32mp1:~# [  498.021705] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
root@stm32mp1:~# ifconfig wlan0
wlan0     Link encap:Ethernet  HWaddr 48:EB:62:BD:88:76  
          inet addr:192.168.73.80  Bcast:192.168.73.255  Mask:255.255.255.0
          inet6 addr: fe80::4aeb:62ff:febd:8876/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:94 errors:0 dropped:0 overruns:0 frame:0
          TX packets:131 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:10538 (10.2 KiB)  TX bytes:14806 (14.4 KiB)
 
root@stm32mp1:~# ping google.com
ping: google.com: Temporary failure in name resolution
root@stm32mp1:~# iw wlan0 link
Connected to 06:a3:1e:5a:96:de (on wlan0)
SSID: Shubham
freq: 2432
RX: 37506 bytes (271 packets)
TX: 31089 bytes (308 packets)
signal: -32 dBm
rx bitrate: 1.0 MBit/s
tx bitrate: 24.0 MBit/s
 
bss flags: short-slot-time
dtim period: 2
beacon int: 100
root@stm32mp1:~# ping google.com
ping: google.com: Temporary failure in name resolution
root@stm32mp1:~# ping google.com
ping: google.com: Temporary failure in name resolution
root@stm32mp1:~# iw wlan0 link
Not connected.
root@stm32mp1:~# iw wlan0 link
Not connected.
root@stm32mp1:~# iw wlan0 link
Not connected.
root@stm32mp1:~# ifconfig wlan0 down
root@stm32mp1:~# ifconfig wlan0 down
root@stm32mp1:~# ifconfig wlan0 up
root@stm32mp1:~# [  761.074208] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
 
root@stm32mp1:~# iw wlan0 link
Connected to 06:a3:1e:5a:96:de (on wlan0)
SSID: Shubham
freq: 2432
RX: 9541 bytes (28 packets)
TX: 10767 bytes (70 packets)
signal: -29 dBm
rx bitrate: 26.0 MBit/s
tx bitrate: 65.0 MBit/s
 
bss flags: short-slot-time
dtim period: 2
beacon int: 100
root@stm32mp1:~# ping google.com
PING google.com(del03s16-in-x0e.1e100.net (2404:6800:4002:80b::200e)) 56 data bytes
64 bytes from del03s16-in-x0e.1e100.net (2404:6800:4002:80b::200e): icmp_seq=1 ttl=57 time=28.3 ms
64 bytes from del03s16-in-x0e.1e100.net (2404:6800:4002:80b::200e): icmp_seq=1 ttl=57 time=31.5 ms (DUP!)
64 bytes from del03s16-in-x0e.1e100.net (2404:6800:4002:80b::200e): icmp_seq=2 ttl=57 time=54.5 ms
64 bytes from del03s16-in-x0e.1e100.net (2404:6800:4002:80b::200e): icmp_seq=3 ttl=57 time=105 ms
64 bytes from del03s16-in-x0e.1e100.net (2404:6800:4002:80b::200e): icmp_seq=4 ttl=57 time=64.5 ms
64 bytes from del03s16-in-x0e.1e100.net (2404:6800:4002:80b::200e): icmp_seq=5 ttl=57 time=125 ms
64 bytes from del03s16-in-x0e.1e100.net (2404:6800:4002:80b::200e): icmp_seq=6 ttl=57 time=140 ms
64 bytes from del03s16-in-x0e.1e100.net (2404:6800:4002:80b::200e): icmp_seq=7 ttl=57 time=50.4 ms
64 bytes from del03s16-in-x0e.1e100.net (2404:6800:4002:80b::200e): icmp_seq=8 ttl=57 time=49.1 ms
64 bytes from del03s16-in-x0e.1e100.net (2404:6800:4002:80b::200e): icmp_seq=9 ttl=57 time=45.8 ms
64 bytes from del03s16-in-x0e.1e100.net (2404:6800:4002:80b::200e): icmp_seq=10 ttl=57 time=44.7 ms
64 bytes from del03s16-in-x0e.1e100.net (2404:6800:4002:80b::200e): icmp_seq=11 ttl=57 time=83.7 ms
64 bytes from del03s16-in-x0e.1e100.net (2404:6800:4002:80b::200e): icmp_seq=11 ttl=57 time=96.6 ms (DUP!)
64 bytes from del03s16-in-x0e.1e100.net (2404:6800:4002:80b::200e): icmp_seq=12 ttl=57 time=57.0 ms
64 bytes from del03s16-in-x0e.1e100.net (2404:6800:4002:80b::200e): icmp_seq=13 ttl=57 time=52.6 ms
64 bytes from del03s16-in-x0e.1e100.net (2404:6800:4002:80b::200e): icmp_seq=14 ttl=57 time=121 ms
64 bytes from del03s16-in-x0e.1e100.net (2404:6800:4002:80b::200e): icmp_seq=15 ttl=57 time=37.0 ms
64 bytes from del03s16-in-x0e.1e100.net (2404:6800:4002:80b::200e): icmp_seq=16 ttl=57 time=46.8 ms
64 bytes from del03s16-in-x0e.1e100.net (2404:6800:4002:80b::200e): icmp_seq=17 ttl=57 time=119 ms
64 bytes from del03s16-in-x0e.1e100.net (2404:6800:4002:80b::200e): icmp_seq=18 ttl=57 time=58.0 ms
64 bytes from del03s16-in-x0e.1e100.net (2404:6800:4002:80b::200e): icmp_seq=19 ttl=57 time=55.3 ms
64 bytes from del03s16-in-x0e.1e100.net (2404:6800:4002:80b::200e): icmp_seq=20 ttl=57 time=55.7 ms
64 bytes from del03s16-in-x0e.1e100.net (2404:6800:4002:80b::200e): icmp_seq=20 ttl=57 time=179 ms (DUP!)
64 bytes from del03s16-in-x0e.1e100.net (2404:6800:4002:80b::200e): icmp_seq=20 ttl=57 time=179 ms (DUP!)
64 bytes from del03s16-in-x0e.1e100.net (2404:6800:4002:80b::200e): icmp_seq=21 ttl=57 time=51.6 ms
64 bytes from del03s16-in-x0e.1e100.net (2404:6800:4002:80b::200e): icmp_seq=22 ttl=57 time=78.7 ms
^C
--- google.com ping statistics ---
22 packets transmitted, 22 received, +4 duplicates, 0% packet loss, time 21029ms
rtt min/avg/max/mdev = 28.253/77.305/178.969/42.066 ms
root@stm32mp1:~# 

it working fine thanks .