ESP32 Wlan connect, but how to read IP Adress

Any bugs you encounter with Flowcode should be discussed here.
Post Reply
stefan.erni
Valued Contributor
Posts: 760
http://meble-kuchenne.info.pl
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 150 times
Been thanked: 171 times

ESP32 Wlan connect, but how to read IP Adress

Post by stefan.erni »

Hi Ben

To connect the ESP Wlan to my own wlan is working with connectToSSID , but how to read IP Adress with the command ReadIP?

it give just a Byte return.

it would also be possible to add a set command (WriteIP) in the future?

regards

Stefan

Alan_37
Posts: 137
Joined: Thu Dec 03, 2020 7:23 pm
Has thanked: 41 times
Been thanked: 19 times

Re: ESP32 Wlan connect, but how to read IP Adress

Post by Alan_37 »

Hi ,

I think you have to read a byte at a time incrementing the index value but don't really know
how you would know where to put the point you will end up something like this 19216801 for 192.168.0.1

LeighM
Valued Contributor
Posts: 401
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 73 times
Been thanked: 218 times

Re: ESP32 Wlan connect, but how to read IP Adress

Post by LeighM »

Yes, you can use ReadIP to populate a byte array.
Then use string conversion to get into human-readable notation ...
ip_addr.png
ip_addr.png (22.17 KiB) Viewed 2567 times

stefan.erni
Valued Contributor
Posts: 760
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 150 times
Been thanked: 171 times

Re: ESP32 Wlan connect, but how to read IP Adress

Post by stefan.erni »

Hi Alan, Hi Leigh

Perfect! Thank you both. It's working this way.

regards

Stefan

Post Reply