Python Forum
Network Scanning Libraries
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Network Scanning Libraries
#1
My project is an experiment which will determine the best channel for the currently connected WIFI. Could you suggest any good libraries that will help me do that?
Reply
#2
I don't have an answer, but this page should help:
https://pypi.python.org/pypi?%3Aaction=s...mit=search
Reply
#3
You are not saying anything about what OS you are using.
And I don't understand "currently connected WIFI". If you are connected to a wifi network the connection is on a certain channel already. If you want to determine on which channel to set your wifi network, you have to scan for others networks and see which channels they are using and go away from them. To avoid the interference.
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#4
(Nov-04-2017, 12:37 PM)wavic Wrote: You are not saying anything about what OS you are using.
And I don't understand "currently connected WIFI". If you are connected to a wifi network the connection is on a certain channel already. If you want to determine on which channel to set your wifi network, you have to scan for others networks and see which channels they are using and go away from these them. To avoid the interference.

I am planning on working on Windows. If a library is great but OS specific(Linux lets say), I am fine with working on that OS too.
I know that the "currently" connected wifi is already on a certain channel, but this channel might not be the best one(that's what I am trying to find out). I want to be able to scan nearby networks, but I guess I can determine the best channel just by monitoring my own network if no library can give me such functionality.
Reply
#5
Well, subprocess with netsh should do what you want. See this: http://www.toptip.ca/2011/03/find-out-wh...-your.html
So, subprocess...

import subprocess

command = "netsh wlan show networks mode=bssid".split()
output = subprocess.check_output(command).decode('ascii') # or you can pass the command hardcoded: ['netsh', 'wlan0', 'show', 'networks', 'mode=bssid']
for line in output.split('\n'):
    if 'SSID' in line:
        print(line, end="")
    elif 'Channel' in line:
        print(line, '\n')
For example... Since I do not use Windows at all, I can't try it.
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  SyntaxError: EOF while scanning triple-quoted string literal Caroline 5 8,530 Feb-07-2018, 07:47 AM
Last Post: micseydel

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020