mirror of
https://github.com/SpacehuhnTech/esp8266_deauther.git
synced 2026-04-26 08:15:51 +03:00
[GH-ISSUE #5] Scan wont pick up APs #5
Labels
No labels
best of
bug
development
discussion
documentation
duplicate
feature request
help wanted
help wanted
improvement
pinned
pull-request
question
stale
translation
v3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/esp8266_deauther#5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @nutterdk on GitHub (Feb 6, 2017).
Original GitHub issue: https://github.com/SpacehuhnTech/esp8266_deauther/issues/5
Im using this board:
NodeMCU with an ESP-12E
It uploaded and works fine. except when scanning for networks it just keeps scanning and doesnt find anything. Even when its right next to the router
@spacehuhn commented on GitHub (Feb 6, 2017):
Have you tried to upload one of the examples and are they working? There is one example (for the ESP8266) for scanning APs which prints them out in the serial monitor.
Please try that out and tell me if this works.
@nutterdk commented on GitHub (Feb 6, 2017):
Could you link me to the example?
@nutterdk commented on GitHub (Feb 6, 2017):
And by the way its the same card that Seytonic used in his video
@spacehuhn commented on GitHub (Feb 6, 2017):
If you followed the steps correctly you should have the SDK installed in Arduino and with that the examples.
So under tools select an ESP8266 and then go to
File->Examples->ESP8266WiFi->WiFiScan.@nutterdk commented on GitHub (Feb 6, 2017):
Sorry I'm new to arduino. I've uploaded the wifiscan to the nodemcu, now what? How do i test this example
@nutterdk commented on GitHub (Feb 6, 2017):
I managed to work that out, so after uploading the wifiscanner example it just spits out all this random text "¢ÿÀ)óÿVÿå1üþDà2ÿÿô��ùú¢ÈBÿÿøå%þü*ðÿÿù"
@spacehuhn commented on GitHub (Feb 6, 2017):
Go to
Tooland openSerial Monitormake sure the baud rate (bottom right in the corner) is set to 115200 and then when running the example you should see the scan results in the monitor.@nutterdk commented on GitHub (Feb 6, 2017):
Ah yeah, it works! It gives a list of the access points near me.
@spacehuhn commented on GitHub (Feb 6, 2017):
learned something :D
Now when you upload the deauther code does it work? You can let the serial monitor open and see what it does, maybe you find a clue why it's not working.
@nutterdk commented on GitHub (Feb 6, 2017):
Should i reset my board first before uploading the deauther?
@spacehuhn commented on GitHub (Feb 6, 2017):
No just upload.
@nutterdk commented on GitHub (Feb 6, 2017):
It won't let me.
The Error message and also the port in tools is now greyed out.
Arduino: 1.8.1 (Windows 10), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, Serial, 115200, 4M (3M SPIFFS)"
java.io.IOException: jssc.SerialPortException: Port name - COM4; Method name - setEventsMask(); Exception type - Can't set mask.
at processing.app.Serial.dispose(Serial.java:144)
at processing.app.SerialMonitor.close(SerialMonitor.java:108)
at processing.app.AbstractMonitor.suspend(AbstractMonitor.java:96)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2182)
at java.lang.Thread.run(Thread.java:745)
Caused by: jssc.SerialPortException: Port name - COM4; Method name - setEventsMask(); Exception type - Can't set mask.
at jssc.SerialPort.setEventsMask(SerialPort.java:279)
at jssc.SerialPort.removeEventListener(SerialPort.java:1064)
at jssc.SerialPort.closePort(SerialPort.java:1090)
at processing.app.Serial.dispose(Serial.java:141)
... 4 more
Board at COM4 is not available
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
@spacehuhn commented on GitHub (Feb 6, 2017):
Click upload again. If this doesn't work close the serial monitor and open it again after the upload is finished.
@nutterdk commented on GitHub (Feb 6, 2017):
Ive clicked upload again, got the same message. So i closed it and uploaded again which i got these error messages
error: Failed to open COM4
error: espcomm_open failed
error: espcomm_open failed
But now when trying to open Serial monitor it tells me "Board at COM4 is not available
@nutterdk commented on GitHub (Feb 6, 2017):
Dude my bad, I completely forgot I had unplugged the board :D its uploading now with no errors
@nutterdk commented on GitHub (Feb 6, 2017):
Alright so the deauther is uploaded but when scanning, still no networks are showing :/
@spacehuhn commented on GitHub (Feb 6, 2017):
Ok this is strange! Because both, the example and my code, use to same functions to scan for APs.
Hm.. do you see any activity in the serial monitor while scanning with the deauther?
@nutterdk commented on GitHub (Feb 6, 2017):
This is all i get the monitor
starting...
SSID: pwned
Password: deauther
@spacehuhn commented on GitHub (Feb 6, 2017):
Ok well then I have no idea... :(
I never had this problem, I can't reproduce it and it really doesn't make sense! If the example code is working, the deauther code should be too - it's the same!
If you get it running somehow, let me know please!
@andrewheselton commented on GitHub (Feb 6, 2017):
Hi Spacehuhn
Great video by the the way. I'm getting the same as nutterdk :( open the example one and serial display 16 access point around where I live but when recompile and upload the deauther shows nothing, very strange.
@nutterdk commented on GitHub (Feb 6, 2017):
I'm thinking that I am just going to reset my board by holding down the reset button and reupload/test it and if that doesnt work then I have no idea either
@nutterdk commented on GitHub (Feb 6, 2017):
Yeah still nothing
@andrewheselton commented on GitHub (Feb 6, 2017):
I'm using one of these, they should be ok right ?
@andrewheselton commented on GitHub (Feb 6, 2017):
in the readme it says to go here packages > esp8266 > hardware > esp8266 > 2.0.0 > tools > sdk > include
I have version 2.3 in the esp8266 directory.
@nutterdk commented on GitHub (Feb 6, 2017):
You need version 2.0
@nutterdk commented on GitHub (Feb 6, 2017):
Yours probably isnt working because you have the wrong sdk version
@andrewheselton commented on GitHub (Feb 6, 2017):
Hi nutterdk, do you have a link for 2.0.0 ?
@nutterdk commented on GitHub (Feb 6, 2017):
Just delete the one you have now and go follow the tutorial again, it shows you how to do it. It says to select 2.0.0 from the drop down menu after searching for esp8266
@andrewheselton commented on GitHub (Feb 6, 2017):
ah yes of course, thanksz i'll try that now.
@nutterdk commented on GitHub (Feb 6, 2017):
Tell us if you get it working please :D
@andrewheselton commented on GitHub (Feb 6, 2017):
will do having trouble making it show now.
@andrewheselton commented on GitHub (Feb 6, 2017):
I can't see the library in the library manager :(
@spacehuhn commented on GitHub (Feb 7, 2017):
Just to make it clear, it works now right?
It was a browser problem with IE (?): https://github.com/spacehuhn/esp8266_deauther/issues/6
@andrewheselton commented on GitHub (Feb 7, 2017):
Hi StefanThat's correct it was a browser problem probably something to do with the html format. Many thanks for writing and spending the time with this. ThanksAndy.
@masonticehurst commented on GitHub (Feb 16, 2017):
Strangely enough I seem to be facing the same issue.
I've got the 2.0 SDK installed, and all the network scans from the example seem to work fine.
I've tried Google Chrome and Safari browser on my iPhone and so far neither of them find any networks are are stuck at "scanning..."
EDIT: I can confirm this issue seems to only happen on my iPhone (maybe mobile phones in general???)
Any idea what might be causing that? Maybe something to do with flash support?
@Staple-nutz commented on GitHub (Feb 16, 2017):
I can confirm that I am having the same issue.
After the first compile and upload my Android phone, Windows laptop with Chrome & Windows tablet with IE have all connected to my ESP-12F with Deauther and have all scanned for AP's sucessfully. That was last night.
Today when I have plugged the ESP-12F back into power, I no longer get any APs when scanning. I had not changed anything on the ESP-12F. no re-upload, the same power supply, everything is the same as it was yesterday. Hence I really don't understand what is happening. I have since tried re-uploading the sketch, but am seeing the same result.
I will be trying another ESP board to see if I can get it working on that. Other then this I have no further ideas.
@masonticehurst commented on GitHub (Feb 16, 2017):
Have you tried other browsers for your tablet device? If I had to guess it's something with how the POST information is sent when the buttons are pressed.. Really no idea though.
@Staple-nutz commented on GitHub (Feb 16, 2017):
Absolutely
On the Android I have tried the standard browser that comes with the phone as well as Chrome.
On the Laptop I have tried Chrome & MS Edge.
On the Tablet I have tried Chrome & IE 11.
All of which worked yesterday, none do today.
Since my last post I have recompiled and uploaded to another ESP-12F board and I'm still having the same problem on all devices and browsers.
This is making me think that perhaps some temporary files being stored on the devices are creating an issue after the first use. I'm coming to this conclusion through the process of eliminating...
The ESP HW as an issue, as I've used 2 boards.
The issue started on an ESP that had only ever been flashed one time which at first worked but later didn't.
All attempts to recompile and upload have been the original un-touched sketch.
Three client devices have been used with various browser software. All of which worked the first time and have later not worked.
@andrbmgi commented on GitHub (Feb 18, 2017):
There is a tiny bug in "APScan::getResults()" in APScan.cpp. If you got more than maxResults APs an extra comma gets added to the json which throws off the parser.
Fixed line 73:
if ((i!=results-1) && (i!=maxResults-1)) json += ",";The timeout is also too short and will fire every time for me, with the fix above a manual reload will do.
@spacehuhn commented on GitHub (Feb 19, 2017):
Can you confirm that it works now with the updated files (for all your browsers and devices)?
@masonticehurst commented on GitHub (Feb 19, 2017):
I've redownloaded and re-uploaded the new code to the ESP-12E but I still can't seem to get past the "scanning" in both Google Chrome and Safari in my phone browser :/
@spacehuhn commented on GitHub (Feb 20, 2017):
I just updated a few things and increased the result list to 80, maybe this will help.
@Staple-nutz commented on GitHub (Feb 20, 2017):
After making this change I'm now getting scan results again. I thought nothing in my environment had changed hence some serious head scratching. But it is entirely possible a few more AP's could have been picked up when running at a different time or the ESP orientated differently. Which triggered this bug.
@labraloutre commented on GitHub (Feb 20, 2017):
Hi
I'm having quite the same problem :
~3 seconds after running scan, I get a timeout error message (the one contained in functions.js)
I've got this behaviour on every device I own (Android phone / Linux Laptop / Win10 Laptop) and with various browsers FF / Chrome / Edge / Chromium.
I've tried to power the ESP from computer and various USB adapters (including 2Amps).
The Wifi Scanner example works well.
I managed to catch the following trace from the serial interface with CuteCom.
Hope this helps and thanks !
@spacehuhn commented on GitHub (Feb 21, 2017):
Thanks @labraloutre for the detailed information. Seems like the ESP crashes after scanning for some reason. I will add more debug infos to the serial monitor with the next update! until then could the others please check if they get the same error?
@labraloutre commented on GitHub (Feb 21, 2017):
Hi
I've some informations to add.
I just tried again without changing anything except I'm at work, well it had worked for some time quite well.
I'm wondering whether it Could be something related to the networks surrounding an area, perhaps a SSID name with special characters or accents or too long ?...
@jobr97 commented on GitHub (Feb 21, 2017):
I had the same issue and the same error at my workplace. However at the trainstation 30 mins later it worked again...
@spacehuhn commented on GitHub (Feb 21, 2017):
I think either there is an error in the code which lets the ESP8266 crash or there is something wrong with the returned JSON string.
hm... :/
@jobr97 commented on GitHub (Feb 21, 2017):
probably something about the JSON, since it worked at a different place... I can try to scan the APs with the
ESP8266WiFi WiFi Scan. Maybe there are some chars in it that make it crash.EDIT: I added the JSON-String to the debug-console, so I can send you the full string by tomorrow.
EDIT 2: It doesn't even give back a JSON-String.
EDIT 3: Actually it doesn't even get to the
APScan::getResults()function.@CyBriDx commented on GitHub (Feb 25, 2017):
what is the solution for scanning in mobile devices?
@jobr97 commented on GitHub (Feb 26, 2017):
@DushyantPUNK it has nothing to do if you scan it via mobile or pc. There is a bug in the code that probably is caused by an attribute (ssid, mac, etc) of a nearby network.
@spacehuhn commented on GitHub (Feb 26, 2017):
I get the same error when an AP has a quotes (") in its SSID because then the generated JSON string is invalid. I'll fix that in the next update!
But I'm sure we are all talking about different errors, just with the same results.
getResults()function, so does it crash before that?You guys need to debug more! I can't help you without knowing whats wrong. I can't reproduce that error and I've tested it a lot now.
@jobr97 commented on GitHub (Feb 26, 2017):
@spacehuhn I tried to add more debug information to your code but because I don't have a lot of knowledge in C I don't really understand the whole program. If you could add more debug options I could give you more information.
@tobozo commented on GitHub (Feb 26, 2017):
This is exactly how I found myself trying to implement a serial substitute to the webserver thing #37
@spacehuhn commented on GitHub (Feb 26, 2017):
@whyisthisusernamealreadytaken have you tried out the testing branch? https://github.com/spacehuhn/esp8266_deauther/tree/testing I added a lot of debug infos. You just need to set
debug = truein the esp8266_deauther.ino file. Maybe this helps a bit.And thank you for your help so far! I hope we can find the error soon :)
@labraloutre commented on GitHub (Feb 26, 2017):
Hi @spacehuhn
I just tried with the testing branch, and the symtoms are the same (timeout and no data on the client web page)
Strangely, I see a correct log in the serial monitor
Here's a link to my log after a fresh reboot
http://pastebin.com/hpfSQNEE
Thanks for your help
@spacehuhn commented on GitHub (Feb 26, 2017):
Thanks!
Can you repeat that and paste the log again? I just updated a few things and after the scan it should now print out the json string to the serial monitor.
@labraloutre commented on GitHub (Feb 26, 2017):
Here it is
This time, esp crashed.
http://pastebin.com/Xi7t2hrF
Hope this helps
@tobozo commented on GitHub (Feb 26, 2017):
I can reproduce the problem too on the testing branch.
I've added Serial.print statements to the json loop in APScan::getResults() and it seems to crash randomly, sometimes in the middle of serial.print()ing a valid word, does it mean it's a not a problem with the getters?
Speculation: maybe dealing with HTTP requests while the in scan mode is what makes it crash ?
@spacehuhn commented on GitHub (Feb 26, 2017):
Exception (28)meansLoadProhibitedCause:https://github.com/esp8266/Arduino/blob/master/doc/exception_causes.md
I got the same error before when I made a mistake and the generated string was to big and let it crash when printing or sending it.
@labraloutre I see in your log that you have a lot of WiFi networks nearby, maybe you can try to reduce the list size. Go to APScan.h and set
maxResults = 10(3rd line).@labraloutre commented on GitHub (Feb 26, 2017):
@spacehuhn I guess you found the problem !
I've tried with 10 and worked well, seems ok too with 20, and problems arise if I use 30 as maxResults.
So far so good.
BTW I used the same value for MaxResults in ClientScan.h
@spacehuhn commented on GitHub (Feb 26, 2017):
Great! Finally some progress on this.
I updated the testing branch and made the json string much smaller and reduced the max results to 40.
@Ro-M commented on GitHub (Feb 26, 2017):
The json serializer creates a faulty json whenever an ssid contains a double quote ("). This leads to 0 scan results. Note that the creation of the json itself does not fail (-> no obvious crash).
Escaping the double quotes from ssid names should fix the problem. Maybe this is the reason why some of you cannot see any results.
@spacehuhn commented on GitHub (Feb 27, 2017):
Thanks. I already fixed that.
@jobr97 commented on GitHub (Feb 27, 2017):
https://goo.gl/os8Wme
Error Log with yesterday's version on the testing branch
@spacehuhn commented on GitHub (Feb 27, 2017):
Yeah looks like that's really the problem, too much SSIDs and the JSON string gets to big.
I updated the testing branch right now. Please test and report if works now :)
@roundpizza commented on GitHub (Mar 2, 2017):
Hey spacehuhn,
Loving this tool! Having some trouble getting it to work on mobile. Just tried the testing branch with my iPhone 6S (Safari + Chrome + Firefox), and I'm having the same problem as everyone else. Works perfectly fine on my Mid-2012 MacBook Pro, but connecting with my iPhone causes the AP scan to be stuck on "scanning..". I suspect this still has to do with the interface and not the backend - as the settings page shows up blank on the iPhone as opposed to the MacBook where it has information filled in upon opening. Attached screenshots from my iPhone.
UPDATE: Looks like the iPhone doesn't trigger the AP scan, debugged with the serial monitor and I get the following with an iPhone:
starting...
starting WiFi AP
SSID: pwned
Password: deauther
generating Macs...done
As opposed to what I get with the MacBook:
starting...
starting WiFi AP
SSID: pwned
Password: deauther
generating Macs...done
getting AP scan result JSON done
starting AP scan...
MAC - Ch - RSSI - Encrypt. - SSID
:9a::9c:66:** - 6 - -89 - WPA2 - *********
:32::54:c8:** - 6 - -71 - WPA2 - ********
:8d::61:93:** - 11 - -82 - WPA2 - *********
scan done
@tobozo commented on GitHub (Mar 4, 2017):
I've found a way to get a full APScan list (i.e. setting maxAPScanResults to 120 in a busy area) without having the ESP to crash, but this requires som tuning.
The crash can be avoided by sending the collected information separately for every acces point found in the scan.
If APScan.json returns the ID's of the scan results (instead of just "true"), the client can use theses ID's to start polling APScanResults.json?ID=xx for each access point and the ESP will never encounter the string overflow problem.
@spacehuhn commented on GitHub (Mar 4, 2017):
ya that's true I thought about the same. Can you make a PR if you have it working?
@tobozo commented on GitHub (Mar 4, 2017):
I can start by making a PR to add the
String APScan::getResults(int i)and modifysendAPResults()to implement theserver.hasArg("apid")case@tobozo commented on GitHub (Mar 4, 2017):
#74
@craynerd commented on GitHub (Mar 5, 2017):
Hi, I am having the same issue. What is weird, is that if I upload the Arduino sketch I can use my iPhone 7 to hit 192.168.4.1 and it scans fine. However, if I then do something, stop it and try again, I just get stuck in scanning and it won
t work again! Ive tried different browsers and I`ve tried rebooting - still is dead after the first initial working run!@spacehuhn commented on GitHub (Mar 11, 2017):
Does someone still have this porblem with the current version?
@ghost commented on GitHub (Mar 11, 2017):
Nope thanks for fixing :)
@gegtor commented on GitHub (Mar 12, 2017):
Hi!
I have flashed my nodemcu with deauther 1.1 via nodemcu-firmware-flasher
It works fine on my computer (OS X 10.11.6 / Safari 10.0.3)
But on my mobile devices i can't scan, save settings etc
Only top buttons that point to .html file work APs, Clients, Attack, etc
@N0vaPixel commented on GitHub (Mar 12, 2017):
Hi @gegtor !
Sounds like a javascript issue.
Can you specify which phone and browser are you using ?
@gegtor commented on GitHub (Mar 12, 2017):
Mobile devices are both running IOS and Safari
Device#1 - IOS 5
Device#2 - IOS 8
I have tried chrome on device#2 and that had no effect :/
@N0vaPixel commented on GitHub (Mar 13, 2017):
Try the testing branch, i've made some changes on javascript files.
Can you have any kind of web debugger on ios ?
@gegtor commented on GitHub (Mar 13, 2017):
Sure

Here you are:
@N0vaPixel commented on GitHub (Mar 13, 2017):
Can you view the full source of this page ? It seems to be truncated because your esp is running out of memory.
@gegtor commented on GitHub (Mar 13, 2017):
Well i can't open source on ipad because Safari doesn't have that function on IOS
But i can view source fine on my mac


@N0vaPixel commented on GitHub (Mar 13, 2017):
This is not the current functions.js file, this one is incompatible with ios < 10.
You are using a wrong version of esp8266_deauther or your browser is loading a cached version of functions.js
Try to clear your cache
@gegtor commented on GitHub (Mar 13, 2017):
Clearing cash had no effect
I will try test branch later today
@N0vaPixel commented on GitHub (Mar 13, 2017):
The javascript code in your screenshot is a part of an old version of the esp8266_deauther. This bug is fixed since few days.
@gegtor commented on GitHub (Mar 13, 2017):
Can i have a link to the latest source code that i can compile in Arduino IDE?
@poslogic commented on GitHub (Mar 13, 2017):
Testing Branch
https://github.com/spacehuhn/esp8266_deauther/tree/testing
@gegtor commented on GitHub (Mar 13, 2017):
It works!!!
Test branch code works really well on all my mobile devices :) Good Job fixing that
@spacehuhn commented on GitHub (Mar 13, 2017):
great! :)
@spacehuhn commented on GitHub (Mar 13, 2017):
oh I didn't want to close it. Anyway I think it's really fixed now for everyone, isn't it?
@gegtor commented on GitHub (Mar 13, 2017):
90% yes
@tobozo commented on GitHub (Mar 13, 2017):
APScan still needs to return the full AP list (currently limited to 30). Also today my own wifi box doesn't even appear in the list even though it's got the biggest RSSI, I can see it on my mobile, tablet, PC, but it has become invisible to the ESP8266.
If it's okay I'll open a new issue asking for a "Full APScan Async List", the getScanResult(id) only needs a webServer callback and JavaScript can take care of the rest.
@spacehuhn commented on GitHub (Mar 13, 2017):
yeah I know, hadn't time to do that yet. You can open up an issue 👍