name of esp32 in nmap command

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
picpic020961
Posts: 15
Joined: Thu Feb 18, 2021 4:24 pm

name of esp32 in nmap command

Post by picpic020961 » Thu Aug 25, 2022 10:15 am

Bonjour ,
in my local network , many esp32.
for find IP , use nmap but the name of device is some time empty (not in this sample)
from where is this name in esp32 ?
not os.uname ...
Thanks for help

Code: Select all

nmap -sP 192.168.43.0/24
Starting Nmap 7.70 ( https://nmap.org ) at 2022-08-25 12:00 CEST
Nmap scan report for 192.168.43.1
Host is up (0.012s latency).
Nmap scan report for raspberrypi-2 (192.168.43.172)
Host is up (0.0030s latency).
Nmap scan report for espressif  (192.168.43.177)
Host is up (0.064s latency).
Nmap done: 256 IP addresses (3 hosts up) scanned in 2.78 seconds

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: name of esp32 in nmap command

Post by jimmo » Thu Aug 25, 2022 12:08 pm

picpic020961 wrote:
Thu Aug 25, 2022 10:15 am
from where is this name in esp32 ?
This can be configured by calling config() on your station interface and setting "hostname".
See https://docs.micropython.org/en/latest/ ... LAN.config

picpic020961
Posts: 15
Joined: Thu Feb 18, 2021 4:24 pm

Re: name of esp32 in nmap command

Post by picpic020961 » Fri Aug 26, 2022 11:04 am

Thanks Jimmo
tested : changed and display again = OK
but after reboot is the old value displayed

how to debug ?

Code: Select all

MicroPython v1.19.1-269-g94a19f106 on 2022-08-15; ESP32 module with ESP32

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: name of esp32 in nmap command

Post by jimmo » Fri Aug 26, 2022 2:07 pm

picpic020961 wrote:
Fri Aug 26, 2022 11:04 am
but after reboot is the old value displayed
You need to configure the WiFi at the start of your program so it happens on every boot (including setting any config options).

picpic020961
Posts: 15
Joined: Thu Feb 18, 2021 4:24 pm

Re: name of esp32 in nmap command

Post by picpic020961 » Fri Aug 26, 2022 2:54 pm

OK works fine !
Thanks

Post Reply