apache / apache/nuttx

[BUG] esp32-devkitc:wifi seems not working correctly

Open
#17,736 29 comments 0 reactions 0 assignees View on GitHub
Arch: all Arch: xtensa Area: Networking OS: Linux Type: Bug
Dominant language
C
Stars
4k
Forks
1.7k
Avg merge
1d 17h
Merged PRs (30d)
237

Description

### Description / Steps to reproduce the issue

Steps to reproduce:

```
$ ./configure.sh esp32-devkitc:wifi
$ make menuconfig
Application Configuration
Network Utilities --->
-*- Network initialization --->
WAPI Configuration --->
(MyRouter) SSID
(MyPasswd) Passprhase

$ make -j flash ESPTOOL_PORT=/dev/ttyUSB0
```

Open the serial console and note that it connected:

```
nsh> ifconfig
wlan0 Link encap:Ethernet HWaddr 08:3a:8d:95:af:3c at RUNNING mtu 1500
inet addr:192.168.1.10 DRaddr:192.168.1.1 Mask:255.255.255.0
```

However it cannot ping external host:

```
nsh> ping 8.8.8.8
PING 8.8.8.8 56 bytes of data
ERROR: sendto failed at seqno 0: 101
ERROR: sendto failed at seqno 1: 101
ERROR: sendto failed at seqno 2: 101
ERROR: sendto failed at seqno 3: 101
ERROR: sendto failed at seqno 4: 101
ERROR: sendto failed at seqno 5: 101
ERROR: sendto failed at seqno 6: 101
ERROR: sendto failed at seqno 7: 101
ERROR: sendto failed at seqno 8: 101
ERROR: sendto failed at seqno 9: 101
10 packets transmitted, 0 received, 100% packet loss, time 10100 ms
```

Also if you try renew command it will fail:

```
nsh> renew wlan0
ERROR: netlib_obtain_ipv4addr() failed
nsh>
```

Workaround:

Clear the SSID and Passphrase on menuconfig, when the nsh start you can connect manually and setup the network this way:

```
$ wapi psk wlan0 MyPasswd 3
$ wapi essid wlan0 MyRouter 1
$ ifconfig wlan0 192.168.1.51 dns 8.8.8.8
```

Now ping 8.8.8.8 or ping google.com will work.

### On which OS does this issue occur?

[OS: Linux]

### What is the version of your OS?

Ubuntu 24.04

### NuttX Version

mainline

### Issue Architecture

[Arch: all], [Arch: xtensa]

### Issue Area

[Area: Networking]

### Host information

_No response_

### Verification

- [x] I have verified before submitting the report.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.