Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

line 508, in setFrequency #2

Open
narezzi opened this issue Jun 27, 2016 · 24 comments
Open

line 508, in setFrequency #2

narezzi opened this issue Jun 27, 2016 · 24 comments

Comments

@narezzi
Copy link

narezzi commented Jun 27, 2016

Dear Stef,

I m very please with your code, I m trying to run so I could use for my study of the RSSI.

Mrssi is what I m after but I m having this issue

Please let me know if you could help.

Thanks

Traceback (most recent call last):
File "./wprox.py", line 66, in run
Wireless(self.interface).setFrequency(self.freq)
File "/usr/local/lib/python2.7/dist-packages/pythonwifi/iwlibs.py", line 508, in setFrequency
iwreq)
File "/usr/local/lib/python2.7/dist-packages/pythonwifi/iwlibs.py", line 1038, in iw_set_ext
return self.iw_get_ext(ifname, operation, data)
File "/usr/local/lib/python2.7/dist-packages/pythonwifi/iwlibs.py", line 1033, in iw_get_ext
result = self._fcntl(request, ifreq)
File "/usr/local/lib/python2.7/dist-packages/pythonwifi/iwlibs.py", line 1020, in _fcntl
return fcntl.ioctl(self.sockfd.fileno(), request, args)
IOError: [Errno 22] Invalid argument

@stef
Copy link
Owner

stef commented Jun 27, 2016

i think the problem is that one of the frequencies is not supported: https://github.com/stef/wireless-radar/blob/master/wirelessradar/mrssi.py#L17 is the chan map, i think it is also replicated in the other py files. play with it and iwconfig to figure out which frequencies are supported by your wifi card. if that helps, would be nice to know which freqs were causing trouble, might be useful for others.

@narezzi
Copy link
Author

narezzi commented Jun 27, 2016

wlan6mon IEEE 802.11bgn Mode:Monitor Frequency:2.427 GHz Tx-Power=20 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Power Management:off

@stef
Copy link
Owner

stef commented Jun 27, 2016

can you try if it works if you only have the entry for 2.427GHz in the mapping?

@stef
Copy link
Owner

stef commented Jun 27, 2016

do you use wlan0 or mon0 for this? i think you have to put the interface to monitor mode.

@narezzi
Copy link
Author

narezzi commented Jun 27, 2016

can you try if it works if you only have the entry for 2.427GHz in the mapping?
Do you want me to add in to the code?

do you use wlan0 or mon0 for this? i think you have to put the interface to monitor mode.

yes I m using wlan6mon that is my monitor interface armon-ng is working fine

I have re-download the version from the Python site and seems I did run the

./wprox.py wlan6mon

WARNING: No route found for IPv6 destination :: (no default route?)
typ AP SSID* MAC vendor channels cnt max min avg sp rssi flg attempts

And stops

@stef
Copy link
Owner

stef commented Jun 27, 2016

can you replace the dict in line https://github.com/stef/wireless-radar/blob/master/wirelessradar/wprox.py#L17 til line 29 with the following dict and try again?
chanmap = {"2427": 4}

@narezzi
Copy link
Author

narezzi commented Jun 28, 2016

Hello Stef,

I've tried this and also I didn't work....

Thanks once again for helping me on this

@stef
Copy link
Owner

stef commented Jun 28, 2016

can you post the output please?

@narezzi
Copy link
Author

narezzi commented Jun 28, 2016

untitled

@stef
Copy link
Owner

stef commented Jun 28, 2016

that is very strange. what happens, when you press ctrl-c? can you post that output? seems to hang somewhere it seems.

@narezzi
Copy link
Author

narezzi commented Jun 28, 2016

Stef,

I just press enter to run and then drop a line nothing happen.

I haven't control c at all.

What version of Linux have you used in order to make it work.

@stef
Copy link
Owner

stef commented Jun 28, 2016

i doubt this has anything to do with a linux version, i suspect it is a difference in the wireless device. what kind of wireless device do you have? anyway, still interested in where it hangs, pls paste the output of the following steps:

  1. ./wprox.py wlan6mon
  2. press control-c to interrupt the program started in 1.
  3. copy/paste the output here.

@narezzi
Copy link
Author

narezzi commented Jun 28, 2016

Alsa Network

wlan6mon IEEE 802.11bgn Mode:Monitor Frequency:2.427 GHz Tx-Power=20 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Power Management:off

Teamviewer?

Thanks

@narezzi
Copy link
Author

narezzi commented Jun 28, 2016

Would you say that possible could be the IPV6?

Answer = NO

Just disabled

@stef
Copy link
Owner

stef commented Jun 29, 2016

sorry i have no teamviewer. however it would be interesting to know what your wireless card is and what the output is when you interrupt wprox.py.

@narezzi
Copy link
Author

narezzi commented Jul 6, 2016

Stef,

I not sure how could I troubleshooting this as when I run the command I don't received no communication or error the command just drop one line

./wprox.py mon0

Any help ?

@stef
Copy link
Owner

stef commented Jul 6, 2016

pls execute: #2 (comment)

@narezzi
Copy link
Author

narezzi commented Jul 6, 2016

^CTraceback (most recent call last):
File "./wprox.py", line 10, in
from scapy.all import sniff, Dot11
File "/usr/local/lib/python2.7/dist-packages/scapy/all.py", line 38, in
from main import *
File "/usr/local/lib/python2.7/dist-packages/scapy/main.py", line 8, in

@stef
Copy link
Owner

stef commented Jul 6, 2016

huh. did you press immediately ctrl-c? this looks very strange, this is the very 1st line. can you wait a bit after starting then press ctrlc and if something else is displayed? if so, can you post it here, if not, can you say, that it's the same output after waiting a couple seconds?

@narezzi
Copy link
Author

narezzi commented Jul 6, 2016

ile "./wprox.py", line 10, in
from scapy.all import sniff, Dot11
File "/usr/local/lib/python2.7/dist-packages/scapy/all.py", line 16, in
from arch import *
File "/usr/local/lib/python2.7/dist-packages/scapy/arch/init.py", line 72, in
from linux import *
File "/usr/local/lib/python2.7/dist-packages/scapy/arch/linux.py", line 73, in
if _f.close() >> 8 == 0x7f:
KeyboardInterrupt

@narezzi
Copy link
Author

narezzi commented Jul 6, 2016

Stef,

The reason is that the command drops just after I m pressing.

Your stuff really interest me, but I can't make it work.

@narezzi
Copy link
Author

narezzi commented Jul 6, 2016

You may can help in my project,

Could we agree even in a price ...

I need to be able to generate the RSSI from a wlan also the Threseholds Max and Min of that Link
2)
I need to work in the Bit extract keys from this channel

@stef
Copy link
Owner

stef commented Oct 30, 2016

it seems i found the problem, python-wifi somehow bitrotted away, and setfrequency instead of frequencies suddenly accepts channel ids, probably the interface below changed, or pythonwifi changed from 0.5 to 0.6? anyway this 2b2b775 should fixe the bug.

@stef stef closed this as completed Oct 30, 2016
@stef stef reopened this Oct 30, 2016
@stef
Copy link
Owner

stef commented Oct 30, 2016

can you confirm that this fixes it please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants