I have run on my raspberry a program which scan network for hostnames. It should recognize ESP8266 but raspberry can't get hostname from it. I tried also a few other network scanners but the result is always the same. It looks like ESP has hidden his hostname. Anyone knows how to enable it?
-
Is your ESP8266 actually connected to the same network as the Raspberry Pi? How is it connecting, can you post the code you're running on it? What program/command are you running from the Raspberry Pi to search for hostnames? – charlesreid1 Sep 27 '17 at 08:52
-
Yes, raspberry and esp are connected to the same network. On raspberry I use nmap to search for hostnames. Here is the code: https://github.com/adampisula/merlin_esp8266/blob/master/merlin_relay/merlin_relay.ino – J. Kulik Sep 27 '17 at 09:17
1 Answers
Your ESP8266 is, in fact, in station mode, to address @andre_teprom's query. A few suggestions, in order of expected helpfulness:
The Aircrack-ng suite (specifically, the airodump-ng tool) is a more appropriate tool for detecting whether the ESP8266 is broadcasting any wifi packets, as it can detect clients and APs (regardless of whether the client is connected to an AP or not, or whether an SSID is hidden or not). I would highly recommend the use of this excellent tool. (It is a bit more involved to get working than nmap, as it requires putting a wifi card into monitor mode, but it will definitely answer the question of whether your ESP8266 is broadcasting anything.)
I've had problems in the past with nmap finding ports to be open if they are in the range of >10,000, unless I explicitly specify the port number. So, try specifying the port explicitly by adding the
-p55555
flag to whatever nmap scan you're doing (or, if your debugging procedure permits it, use a standard port like port 80, by changing line 12).It looks like you are writing the IP address out to serial - what happens when you do a ping scan (
-sn
flag in nmap, which skips port scans) of that host to see if it is up and responding at all to basic pings? This may tell you if the host is totally disconnected. (Ping scans are the least generic of scans, and are just a "hello, are you there?" kind of scan.)
To reiterate, I don't think nmap is diagnosing the problem at the right level - but if you can't get aircrack working, you can try #2 and #3.

- 4,360
- 4
- 30
- 52