Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/IlievIliya92/esp32_zephyr

ESP32 Wroom Zephyr Project
https://github.com/IlievIliya92/esp32_zephyr

esp32 esp32-wroom wifi zephyr zephyr-rtos

Last synced: 16 days ago
JSON representation

ESP32 Wroom Zephyr Project

Awesome Lists containing this project

README

        

# ESP32 Zephyr

## Build

```console
$ west build -b esp32_devkitc_wroom -- -DSSID="WIFI_SSID" -DPSK="WIFI_PASS"
```

where `WIFI_SSID` is the SSID of the Wifi network that you wish to connect to
and `WIFI_PASS` the authentication for it.

## Flash

```console
$ west flash
```

## Monitor

```console
$ west espressif monitor
```

The results should look similar to the output shown below:

```console
*** Booting Zephyr OS build zephyr-v3.5.0-660-ge7340282a795 ***
[00:00:02.244,000] wifi: Connecting to: WIFI_SSID
[00:00:02.246,000] wifi: Waiting for authorization...
[00:00:08.984,000] esp32_wifi: esp32_wifi_send: pkt sent 0x3fff82c4 len 291
[00:00:11.090,000] esp32_wifi: esp32_wifi_send: pkt sent 0x3fff82c4 len 298
[00:00:11.119,000] net_dhcpv4: Received: xxx.xxx.xxx.xxx
[00:00:15.939,000] wifi: Connected
[00:00:15.940,000] wifi: Wifi network state:
[00:00:15.940,000] wifi: SSID: WIFI_SSID
[00:00:15.940,000] wifi: Band: 2.4GHz
[00:00:15.940,000] wifi: Channel: xx
[00:00:15.940,000] wifi: Security: WPA2-PSK
[00:00:15.940,000] wifi: RSSI: xx
[00:00:15.940,000] server: Creating new server object
[00:00:11.904,000] server: Waiting for TCP connections on port 4242...
```

## Test

### Service discovery

```console
$ avahi-resolve -4 -n esp32.local
esp32.local xxx.xxx.xxx.xxx
```

```console
$ avahi-browse -t -r _esp32._tcp
+ wlp4s0 IPv4 esp32 _esp32._tcp local
= wlp4s0 IPv4 esp32 _esp32._tcp local
hostname = [esp32.local]
address = [xxx.xxx.xxx.xxx]
port = [4242]
txt = []
```

### Send/Receive test message

```console
$ cd test
$ python3 esp32_client.py --dest_addr tcp:xxx.xxx.xxx.xxx:4242
```