-
Notifications
You must be signed in to change notification settings - Fork 37
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
Parse Wifi SSIDs and convert to Capture and add back NavVis test data #68
Conversation
All unit tests were failing because the test data wasn't there. I have no context why the test data has been removed. I added it back in from https://github.com/microsoft/scantools/tree/main/test_data |
Sounds like we should split this to 2 different PRs then? |
Notice this is another repo. |
As alternative, we could do something similar to the NavVisSample: Would that work for you? |
This reverts commit 3b984d4.
Yes, the data is from another repo but the question is: |
Done: #69 |
Hm.. I would rather create a submodule with test data |
do you mean the scantools in this repo? Or in the non-public one? |
@@ -213,10 +213,12 @@ def run(input_path: Path, capture: Capture, tiles_format: str, session_id: Optio | |||
freq_khz = measurement.center_channel_freq_khz | |||
rssi_dbm = measurement.signal_strength_dbm | |||
time_offset_us = int(measurement.time_offset_ms) / 1_000 | |||
ssid = measurement.ssid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
locals like these do not bring much value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know.. was rather following the pattern
@@ -49,15 +52,17 @@ def parse_iwconfig(data): | |||
'mac_address': r'Address:\s((?:[a-fA-F0-9]{2}[:|\-]?){6})', | |||
'signal_level': r'Signal level=(-?\d{1,2}) dBm', | |||
'frequency': r'Frequency:(\d{1,2}.\d{1,6}\s([ G|M|k]Hz))', | |||
'time_offset': r'Extra: Last beacon: (\d{1,6})ms' | |||
'time_offset': r'Extra: Last beacon: (\d{1,6})ms', | |||
'ssid': r'ESSID:"(.{1,64})"' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ESSID
- sorry, not an expert - this contains same value as SSID below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes. so ESSID and SSID are practically the same.
@@ -76,12 +81,14 @@ def parse_iwconfig(data): | |||
assert -127 <= float(wifi_sample['signal_level']) <= 127 | |||
assert wifi_sample['frequency'] is not None | |||
assert wifi_sample['time_offset'] is not None | |||
assert wifi_sample['ssid'] is not None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did we verify we can do this? we've recently found that some WiFi samples on some other platforms do not contain ssid so flagging here whether we're certain this is always available
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For NavVis I have not seen any wifi sample without it. And I would argue we should also be strict here. Thanks for checking.
f2ae3cb
to
0015cd8
Compare
This PR does 2 things
1 Parse and convert the Wifi SSIDs from NavVis into Capture
2 Add NavVis test data