Skip to content

Missing 5Ghz mappings #8

@qhaas

Description

@qhaas

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions