I am trying to use an ESP8266 (ESP-01) to add Wifi capabilities to a nRF9160 project board. I am using nRF Connect SDK V2.9.0 and the V2.9.0 Toolchain.
To set it up I followed the basic directions here:
https://docs.zephyrproject.org/latest/boards/shields/esp_8266/doc/index.html
I wanted to test it using the standard wifi shell sample. I took the
In the CMakeList.txt file I added the following line:
set(SHIELD esp_8266)
&uart1 { status = "okay"; current-speed = <115200>; pinctrl-0 = <&uart1_default>; pinctrl-1 = <&uart1_sleep>; pinctrl-names = "default", "default"; esp8266 { compatible = "espressif,esp-at"; label = "esp8266"; status = "okay"; }; };
CONFIG_DNS_RESOLVER=yCONFIG_NET_TCP=yCONFIG_WIFI_LOG_LEVEL_ERR=yCONFIG_NET_L2_WIFI_SHELL=yCONFIG_DNS_SERVER_IP_ADDRESSES=yCONFIG_DNS_SERVER1="8.8.8.8"
wifi scanScan requested
Num | SSID (len) | Chan (Band) | RSSI | Security | BSSID | MFP
1 | Tattler 7 | 1 (2.4GHz) | -77 | WPA2-PSK | | Disable
2 | 0 | 1 (2.4GHz) | -76 | WPA2-PSK | | Disable
3 | eigenair 8 | 9 (2.4GHz) | -69 | WPA2-PSK | | Disable
4 | I-Guest 9 | 6 (2.4GHz) | -72 | OPEN | | Disable
5 | I_Partners 12 | 6 (2.4GHz) | -71 | WPA2-PSK | | Disable
6 | R_Visitor 12 | 6 (2.4GHz) | -80 | OPEN | | Disable
7 | txrx2.4 7 | 9 (2.4GHz) | -59 | WPA2-PSK | | Disable
Scan request done
uart:~$
wifi connect -s "WL-001" -p 123456 -k 1Connection requested
Connected---- Sent utf8 encoded message: "wifi status\r\n" ----
wifi status
Status: successful
==================
State: COMPLETED
Interface Mode: STATION
Link Mode: UNKNOWN
SSID: txrx2.4
BSSID: D8:47:32:74:F3:E6
Band: 2.4GHz
Channel: 9
Security: UNKNOWN
MFP: UNKNOWN
RSSI: -60
Beacon Interval: 0
DTIM: 0
TWT: Not supported
Current PHY TX rate (Mbps) : 0
net iface
Interface wlan0 (0x20000560) (IP Offload) [1]
=====================================
Link addr : 50:02:91:51:74:8F
MTU : 2048
Flags : AUTO_START,IPv4
Device : esp8266 (0x27324)
Status : oper=UP, admin=UP, carrier=ON
IPv4 unicast addresses (max 1):
10.10.51.28/255.255.254.0 DHCP preferred infinite
IPv4 multicast addresses (max 2):
224.0.0.1
IPv4 gateway : 10.10.50.1
DHCPv4 lease time : 0
DHCPv4 renew time : 0
DHCPv4 server : 0.0.0.0
DHCPv4 requested : 0.0.0.0
DHCPv4 state : disabled
DHCPv4 attempts : 0net dns
DNS servers:
8.8.8.8:53
Pending queries:
--- Sent utf8 encoded message: "net ping 10.10.50.205\r\n" ----
net ping 10.10.50.205
PING 10.10.50.205
Failed to send ping,uart:~$---- Sent utf8 encoded message: "net dns google.com\r\n" ----
net dns google.com
Cannot resolve 'google.com' (-22)