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

Missing 5Ghz mappings #8

Open
qhaas opened this issue Oct 21, 2020 · 0 comments
Open

Missing 5Ghz mappings #8

qhaas opened this issue Oct 21, 2020 · 0 comments

Comments

@qhaas
Copy link

qhaas commented Oct 21, 2020

First off, thank you for taking over this project and updating it! Many other wifi related Python packages are abandoned...

I created the attached file to loop over available frequencies and attempt to map their channel using this util function, but some mappings do not exist, e.g.:

$ cat test_channels.py
import pyric.pyw as pyw
import pyric.utils.channels as pyu

wlan0 = pyw.getcard('wlp3s0')
pinfo = pyw.phyinfo(wlan0)

for band in pinfo['bands']:
    for freq in pinfo['bands'][band]['rfs']:
        channel = pyu.rf2ch(freq)
        print('band {} freq {} channel {}'.format(band, freq, channel))
...
$ python3 test_channels.py
...
band 5GHz freq 5340 channel None
band 5GHz freq 5360 channel None
band 5GHz freq 5380 channel None
band 5GHz freq 5400 channel None
band 5GHz freq 5420 channel None
band 5GHz freq 5440 channel None
band 5GHz freq 5460 channel None
band 5GHz freq 5480 channel None
...
band 5GHz freq 5845 channel None
band 5GHz freq 5865 channel None
band 5GHz freq 5885 channel None
band 5GHz freq 5905 channel None

I'm almost inclined to think it is worth just creating a for loop to populate the feq/channel mappings for all possible 5ghz channels

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

1 participant