Compare commits
24 Commits
maint-3.9
...
maint-3.10
| Author | SHA1 | Date | |
|---|---|---|---|
| 9dcb838a75 | |||
| ad0598e4a8 | |||
| a4822168b7 | |||
| f56251d471 | |||
| b327e06ac5 | |||
| 7e9c132dfb | |||
| ac55ae7ca1 | |||
| 32552e1f79 | |||
| 202f63bfa6 | |||
| bb646ed472 | |||
| 5c6cb3ff19 | |||
| ce7097384b | |||
| 27c8fdfe4a | |||
| c431137c71 | |||
| abed50bf7f | |||
| 965e2d474f | |||
| 1b88193094 | |||
| 83c02a1b66 | |||
| 3898a21350 | |||
| 08cdcf7a4e | |||
| 29ca2bde94 | |||
| fe725a1c6d | |||
| 56d8c5c19f | |||
| b3dc15a567 |
@@ -0,0 +1,110 @@
|
|||||||
|
# gr-ieee802_11 conda recipe
|
||||||
|
|
||||||
|
This recipe is for creating a package that can be installed into a [conda](https://docs.conda.io/en/latest/) environment. See the [Conda GNU Radio Guide](https://wiki.gnuradio.org/index.php/CondaInstall) for more information on using GNU Radio with conda.
|
||||||
|
|
||||||
|
Packages for GNU Radio and some out-of-tree (OOT) modules are available through the [`conda-forge` channel](https://conda-forge.org/). If this OOT module is already available (search "gnuradio" on [anaconda.org](https://anaconda.org)), it is preferable to use that existing package rather than this recipe.
|
||||||
|
|
||||||
|
#### Users
|
||||||
|
|
||||||
|
- [Building the package](#building-the-package)
|
||||||
|
|
||||||
|
#### Developers
|
||||||
|
|
||||||
|
- [Modifying the recipe](#modifying-the-recipe)
|
||||||
|
- [Continuous integration](#continuous-integration)
|
||||||
|
|
||||||
|
|
||||||
|
## Building the package
|
||||||
|
|
||||||
|
(See the [Conda GNU Radio Guide](https://wiki.gnuradio.org/index.php/CondaInstall) if you are unfamiliar with how to use conda.)
|
||||||
|
|
||||||
|
1. Make sure that have `conda-build` and `conda-forge-pinning` installed and updated in your base environment:
|
||||||
|
|
||||||
|
conda activate base
|
||||||
|
conda install -n base conda-build conda-forge-pinning
|
||||||
|
conda upgrade -n base conda-build conda-forge-pinning
|
||||||
|
|
||||||
|
**Windows users only**: you will also need to have Microsoft's Visual C++ build tools installed. Usually you can do this by installing the [Community edition of Visual Studio](https://visualstudio.microsoft.com/free-developer-offers/) and then selecting a MSVC C++ x64/x86 build tools component under the list of "Individual Components". As of this writing, you will specifically need MSVC v141, i.e. the "MSVC v141 - VS2017 C++ x64/x86 build tools (v14.16)" component. If the build fails to find the version of MSVC it is looking for, try installing other (newer) versions.
|
||||||
|
|
||||||
|
2. Download the source code for this OOT module (which includes this recipe). Typically, this is done by using `git` and cloning the module's repository:
|
||||||
|
|
||||||
|
git clone <repository_url>
|
||||||
|
cd <repository_name>
|
||||||
|
|
||||||
|
3. Run `conda-build` on the recipe to create the package:
|
||||||
|
|
||||||
|
(Linux and macOS)
|
||||||
|
|
||||||
|
conda build .conda/recipe/ -m ${CONDA_PREFIX}/conda_build_config.yaml
|
||||||
|
|
||||||
|
(Windows)
|
||||||
|
|
||||||
|
conda build .conda\recipe\ -m %CONDA_PREFIX%\conda_build_config.yaml
|
||||||
|
|
||||||
|
If you plan on using this package within an existing environment which uses a specific version of Python, specify the version of Python using the `--python` flag. You must use a version string that matches one of the strings listed under `python` in the `${CONDA_PREFIX}/conda_build_config.yaml` file, e.g:
|
||||||
|
|
||||||
|
(Linux and macOS)
|
||||||
|
|
||||||
|
conda build .conda/recipe/ -m ${CONDA_PREFIX}/conda_build_config.yaml --python="3.9.* *_cpython"
|
||||||
|
|
||||||
|
(Windows)
|
||||||
|
|
||||||
|
conda build .conda\recipe\ -m %CONDA_PREFIX%\conda_build_config.yaml --python="3.9.* *_cpython"
|
||||||
|
|
||||||
|
If you encounter errors, consult with the OOT module maintainer or the maintainers of the [gnuradio feedstock](https://github.com/conda-forge/gnuradio-feedstock). It is possible that the recipe will need to be updated.
|
||||||
|
|
||||||
|
4. Install the package into an existing environment
|
||||||
|
|
||||||
|
conda install --use-local -n <environment_name> gnuradio-EXAMPLE
|
||||||
|
|
||||||
|
or create a new environment that includes the package:
|
||||||
|
|
||||||
|
conda create -n test_env gnuradio-EXAMPLE
|
||||||
|
|
||||||
|
|
||||||
|
## Modifying the recipe
|
||||||
|
|
||||||
|
This recipe is derived from a template, and so it is best to check it and make any necessary modifications. Likely changes include:
|
||||||
|
|
||||||
|
- Populating metadata near the bottom of the `recipe/meta.yaml` file
|
||||||
|
- Adding "host" (build-time) and "run" (run-time) dependencies specific to your module in `recipe/meta.yaml`
|
||||||
|
- Adding special configuration flags or steps are necessary to carry out the build to the build scripts (`recipe/build.sh` for Linux/macOS and `recipe/bld.bat` for Windows)
|
||||||
|
|
||||||
|
Specifying the versions of GNU Radio that your OOT is compatible with is one of the most important modifications. Following the instructions below, the module will be built against the conda-forge "pinned" version of GNU Radio, which is usually the latest version.
|
||||||
|
|
||||||
|
- To override the pinned version of GNU Radio (e.g. for a branch that builds against an older version), specify the `gnuradio_core` key as instructed in `recipe/conda_build_config.yaml`.
|
||||||
|
- If the module is compatible with multiple major versions of GNU Radio, and you want to build against multiple of them, you can also add extra versions to `recipe/conda_build_config.yaml` to expand the default build matrix.
|
||||||
|
|
||||||
|
See the [conda-build documentation](https://docs.conda.io/projects/conda-build/en/latest/index.html) for details on how to write a conda recipe.
|
||||||
|
|
||||||
|
|
||||||
|
## Continuous integration
|
||||||
|
|
||||||
|
Only a few steps are needed to use this recipe to build and test this OOT module using CI services. It can also be used to upload packages to [anaconda.org](https://anaconda.org) for others to download and use.
|
||||||
|
|
||||||
|
1. Make sure that have `conda-smithy` installed in your base conda environment:
|
||||||
|
|
||||||
|
conda activate base
|
||||||
|
conda install -n base conda-smithy
|
||||||
|
conda upgrade -n base conda-smithy
|
||||||
|
|
||||||
|
2. Make any changes to the recipe and `conda-forge.yml` that are necessary. For example, if you plan on uploading packages to your own [anaconda.org](https://anaconda.org) channel, specify the channel name and label as the `channel_targets` key in `recipe/conda_build_config.yaml`. Commit the changes to your repository:
|
||||||
|
|
||||||
|
git commit -a
|
||||||
|
|
||||||
|
3. "Re-render" the CI scripts by running conda-smithy from the root of your repository:
|
||||||
|
|
||||||
|
conda-smithy rerender --feedstock_config .conda/conda-forge.yml -c auto
|
||||||
|
|
||||||
|
This will create a commit that adds or updates the CI scripts that have been configured with `conda-forge.yml`. If you want to minimize extraneous files, you can remove some of the newly-created files that are not necessary outside of a typical conda-forge feedstock:
|
||||||
|
|
||||||
|
git rm -f .github/workflows/automerge.yml .github/workflows/webservices.yml .circleci/config.yml
|
||||||
|
git commit --amend -s
|
||||||
|
|
||||||
|
When the CI is executed (on a pull request or commit), it will run one job per configuration file in `.ci_support` to build packages for various platforms, Python versions, and optionally `gnuradio` versions (by adding to `gnuradio_extra_pin` in `recipe/conda_build_config.yaml`).
|
||||||
|
|
||||||
|
**You should repeat this step whenever the recipe is updated or when changes to the conda-forge infrastructure require all CI scripts to be updated.**
|
||||||
|
|
||||||
|
Since the newly created files will be rewritten whenever conda-smithy is run, you should not edit any of the automatically-generated files in e.g. `.ci_support`, `.scripts`, or `.github/workflows/conda-build.yml`.
|
||||||
|
|
||||||
|
4. (optional) If you want to enable uploads of the packages to [anaconda.org](https://anaconda.org) whenever the CI is run from a commit on the branch specified in `conda-forge.yml`, you need to set an Anaconda Cloud API token to the `BINSTAR_TOKEN` environment variable. To generate a token, follow the instructions [here](https://docs.anaconda.com/anacondaorg/user-guide/tasks/work-with-accounts/#creating-access-tokens). To populate the `BINSTAR_TOKEN` environment variable for CI jobs, add the token as a secret by following, for example, the [Github docs](https://docs.github.com/en/actions/reference/encrypted-secrets).
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
# See https://conda-forge.org/docs/maintainer/conda_forge_yml.html for
|
||||||
|
# documentation on possible keys and values.
|
||||||
|
|
||||||
|
# uncomment to enable cross-compiled osx-arm64 builds
|
||||||
|
build_platform:
|
||||||
|
linux_aarch64: linux_64
|
||||||
|
linux_ppc64le: linux_64
|
||||||
|
osx_arm64: osx_64
|
||||||
|
clone_depth: 0
|
||||||
|
conda_build:
|
||||||
|
pkg_format: '2'
|
||||||
|
github_actions:
|
||||||
|
store_build_artifacts: true
|
||||||
|
os_version:
|
||||||
|
linux_64: cos7
|
||||||
|
provider:
|
||||||
|
linux: github_actions
|
||||||
|
osx: github_actions
|
||||||
|
win: github_actions
|
||||||
|
# uncomment to enable additional linux platforms
|
||||||
|
#linux_aarch64: github_actions
|
||||||
|
#linux_ppc64le: github_actions
|
||||||
|
recipe_dir: .conda/recipe
|
||||||
|
# skip unnecessary files since this is not a full-fledged conda-forge feedstock
|
||||||
|
skip_render:
|
||||||
|
- README.md
|
||||||
|
- LICENSE.txt
|
||||||
|
- .gitattributes
|
||||||
|
- .gitignore
|
||||||
|
- build-locally.py
|
||||||
|
- LICENSE
|
||||||
|
test: native_and_emulated
|
||||||
|
# enable uploads to Anaconda Cloud from specified branches only
|
||||||
|
upload_on_branch: main
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
setlocal EnableDelayedExpansion
|
||||||
|
@echo on
|
||||||
|
|
||||||
|
:: Make a build folder and change to it
|
||||||
|
cmake -E make_directory buildconda
|
||||||
|
cd buildconda
|
||||||
|
|
||||||
|
:: configure
|
||||||
|
cmake -G "Ninja" ^
|
||||||
|
-DCMAKE_BUILD_TYPE:STRING=Release ^
|
||||||
|
-DCMAKE_INSTALL_PREFIX:PATH="%LIBRARY_PREFIX%" ^
|
||||||
|
-DCMAKE_PREFIX_PATH:PATH="%LIBRARY_PREFIX%" ^
|
||||||
|
-DGR_PYTHON_DIR:PATH="%SP_DIR%" ^
|
||||||
|
-DENABLE_DOXYGEN=OFF ^
|
||||||
|
-DENABLE_TESTING=ON ^
|
||||||
|
..
|
||||||
|
if errorlevel 1 exit 1
|
||||||
|
|
||||||
|
:: build
|
||||||
|
cmake --build . --config Release -- -j%CPU_COUNT%
|
||||||
|
if errorlevel 1 exit 1
|
||||||
|
|
||||||
|
:: install
|
||||||
|
cmake --build . --config Release --target install
|
||||||
|
if errorlevel 1 exit 1
|
||||||
|
|
||||||
|
:: test
|
||||||
|
ctest --build-config Release --output-on-failure --timeout 120 -j%CPU_COUNT%
|
||||||
|
if errorlevel 1 exit 1
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
cmake -E make_directory buildconda
|
||||||
|
cd buildconda
|
||||||
|
|
||||||
|
cmake_config_args=(
|
||||||
|
-DCMAKE_BUILD_TYPE=Release
|
||||||
|
-DCMAKE_INSTALL_PREFIX=$PREFIX
|
||||||
|
-DLIB_SUFFIX=""
|
||||||
|
-DENABLE_DOXYGEN=OFF
|
||||||
|
-DENABLE_TESTING=ON
|
||||||
|
)
|
||||||
|
|
||||||
|
cmake ${CMAKE_ARGS} -G "Ninja" .. "${cmake_config_args[@]}"
|
||||||
|
cmake --build . --config Release -- -j${CPU_COUNT}
|
||||||
|
cmake --build . --config Release --target install
|
||||||
|
|
||||||
|
if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" != "1" || "${CROSSCOMPILING_EMULATOR}" != "" ]]; then
|
||||||
|
ctest --build-config Release --output-on-failure --timeout 120 -j${CPU_COUNT}
|
||||||
|
fi
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
channel_sources:
|
||||||
|
- conda-forge,ryanvolz
|
||||||
|
# this is the channel and label where packages will be uploaded to if enabled
|
||||||
|
# (see ../README.md)
|
||||||
|
channel_targets:
|
||||||
|
- gnuradio main
|
||||||
|
# override the conda-forge pin for gnuradio-core by uncommenting
|
||||||
|
# and specifying a different version here
|
||||||
|
#gnuradio_core:
|
||||||
|
#- "3.10.1"
|
||||||
|
gnuradio_extra_pin:
|
||||||
|
# always leave one entry with the empty string
|
||||||
|
- ""
|
||||||
|
# add version strings here like to get builds for versions other than
|
||||||
|
# the conda-forge-wide default or version specified above for gnuradio_core
|
||||||
|
#- "3.9.5"
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
{% set oot_name = "ieee802_11" %}
|
||||||
|
{% set name = "gnuradio-" + oot_name %}
|
||||||
|
# Set package version from cleaned up git tags if possible,
|
||||||
|
# otherwise fall back to date-based version.
|
||||||
|
{% set tag_version = environ.get("GIT_DESCRIBE_TAG", "")|string|replace("-","_")|replace("v","")|replace("git","") %}
|
||||||
|
{% set post_commit = environ.get("GIT_DESCRIBE_NUMBER", 0)|string %}
|
||||||
|
{% set hash = environ.get("GIT_DESCRIBE_HASH", "local")|string %}
|
||||||
|
{% set fallback_version = "0.0.0.{0}.dev+g{1}".format(datetime.datetime.now().strftime("%Y%m%d"), environ.get("GIT_FULL_HASH", "local")[:9]) %}
|
||||||
|
{% set version = (tag_version if post_commit == "0" else "{0}.post{1}+{2}".format(tag_version, post_commit, hash)) if tag_version else fallback_version %}
|
||||||
|
|
||||||
|
package:
|
||||||
|
name: {{ name|lower }}
|
||||||
|
version: {{ version }}
|
||||||
|
|
||||||
|
source:
|
||||||
|
# use local path or git repository depending on if the build is local or done on CI
|
||||||
|
path: "../.." # [not os.environ.get("CI")]
|
||||||
|
git_url: {{ environ.get('FEEDSTOCK_ROOT', "../..") }} # [os.environ.get("CI")]
|
||||||
|
|
||||||
|
build:
|
||||||
|
number: 0
|
||||||
|
|
||||||
|
requirements:
|
||||||
|
build:
|
||||||
|
- {{ compiler("c") }}
|
||||||
|
- {{ compiler("cxx") }}
|
||||||
|
- cmake
|
||||||
|
- git
|
||||||
|
- ninja
|
||||||
|
- pkg-config
|
||||||
|
# cross-compilation requirements
|
||||||
|
- python # [build_platform != target_platform]
|
||||||
|
- cross-python_{{ target_platform }} # [build_platform != target_platform]
|
||||||
|
- numpy # [build_platform != target_platform]
|
||||||
|
- pybind11 # [build_platform != target_platform]
|
||||||
|
|
||||||
|
host:
|
||||||
|
- boost-cpp
|
||||||
|
- fmt
|
||||||
|
- gmp # [linux]
|
||||||
|
# the following two entries are for generating builds against specific GR versions
|
||||||
|
- gnuradio-core # [not gnuradio_extra_pin]
|
||||||
|
- gnuradio-core {{ gnuradio_extra_pin }}.* # [gnuradio_extra_pin]
|
||||||
|
- pip # [win]
|
||||||
|
- pybind11
|
||||||
|
- python
|
||||||
|
- numpy
|
||||||
|
- spdlog
|
||||||
|
- volk
|
||||||
|
|
||||||
|
run:
|
||||||
|
- gnuradio-foo
|
||||||
|
- numpy
|
||||||
|
- pyopengl
|
||||||
|
- python
|
||||||
|
|
||||||
|
test:
|
||||||
|
commands:
|
||||||
|
# verify that (some) headers get installed
|
||||||
|
- test -f $PREFIX/include/{{ oot_name }}/api.h # [not win]
|
||||||
|
- if not exist %PREFIX%\\Library\\include\\{{ oot_name }}\\api.h exit 1 # [win]
|
||||||
|
|
||||||
|
# verify that libraries get installed
|
||||||
|
- test -f $PREFIX/lib/lib{{ name }}${SHLIB_EXT} # [not win]
|
||||||
|
- if not exist %PREFIX%\\Library\\bin\\{{ name }}.dll exit 1 # [win]
|
||||||
|
- if not exist %PREFIX%\\Library\\lib\\{{ name }}.lib exit 1 # [win]
|
||||||
|
|
||||||
|
# verify that (some) GRC blocks get installed
|
||||||
|
{% set blocks = ["chunks_to_symbols", "decode_mac", "ether_encap", "extract_csi", "frame_equalizer", "mac", "mapper", "parse_mac", "sync_long", "sync_short"] %}
|
||||||
|
{% for block in blocks %}
|
||||||
|
- test -f $PREFIX/share/gnuradio/grc/blocks/{{ oot_name }}_{{ block }}.block.yml # [not win]
|
||||||
|
- if not exist %PREFIX%\\Library\\share\\gnuradio\\grc\\blocks\\{{ oot_name }}_{{ block }}.block.yml exit 1 # [win]
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
imports:
|
||||||
|
# verify that the python module imports
|
||||||
|
- {{ oot_name }}
|
||||||
|
|
||||||
|
about:
|
||||||
|
home: https://github.com/bastibl/gr-ieee802-11
|
||||||
|
license: GPL-3.0-or-later
|
||||||
|
license_file: LICENSE
|
||||||
|
summary: IEEE 802.11 a/g/p Transceiver for GNU Radio
|
||||||
|
description: >
|
||||||
|
This an IEEE 802.11 a/g/p transceiver for GNU Radio that is fitted for
|
||||||
|
operation with Ettus N210s and B210s. Interoperability was tested with many
|
||||||
|
off-the-shelf WiFi cards and IEEE 802.11p prototypes. The code can also be
|
||||||
|
used in simulations.
|
||||||
|
|
||||||
|
Example gnuradio-companion flowgraphs are installed with the package and
|
||||||
|
can be found in:
|
||||||
|
- (Linux/macOS) `$CONDA_PREFIX/share/gr-ieee802_11/examples`
|
||||||
|
- (Windows) `%CONDA_PREFIX%\share\gr-ieee802_11\examples`
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
# In GNU Radio 3.9+, pybind11 compares hash values of headers and source
|
||||||
|
# files against knowns values. Conversion of values to CRLF on checkout
|
||||||
|
# break those checks so keep LF values when files are subject to said checks
|
||||||
|
#
|
||||||
|
*.h text eol=lf
|
||||||
|
*.c text eol=lf
|
||||||
|
*.cc text eol=lf
|
||||||
@@ -144,6 +144,7 @@ add_subdirectory(include/ieee802_11)
|
|||||||
add_subdirectory(lib)
|
add_subdirectory(lib)
|
||||||
add_subdirectory(apps)
|
add_subdirectory(apps)
|
||||||
add_subdirectory(docs)
|
add_subdirectory(docs)
|
||||||
|
add_subdirectory(examples)
|
||||||
# NOTE: manually update below to use GRC to generate C++ flowgraphs w/o python
|
# NOTE: manually update below to use GRC to generate C++ flowgraphs w/o python
|
||||||
if(ENABLE_PYTHON)
|
if(ENABLE_PYTHON)
|
||||||
message(STATUS "PYTHON and GRC components are enabled")
|
message(STATUS "PYTHON and GRC components are enabled")
|
||||||
@@ -160,3 +161,7 @@ endif(ENABLE_PYTHON)
|
|||||||
install(FILES cmake/Modules/ieee802_11Config.cmake
|
install(FILES cmake/Modules/ieee802_11Config.cmake
|
||||||
DESTINATION ${CMAKE_MODULES_DIR}/ieee802_11
|
DESTINATION ${CMAKE_MODULES_DIR}/ieee802_11
|
||||||
)
|
)
|
||||||
|
|
||||||
|
install(FILES MANIFEST.yml
|
||||||
|
RENAME MANIFEST-${VERSION_MAJOR}.${VERSION_API}.${VERSION_ABI}${VERSION_PATCH}.yml
|
||||||
|
DESTINATION share/gnuradio/manifests/ieee802_11)
|
||||||
|
|||||||
@@ -0,0 +1,674 @@
|
|||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The GNU General Public License is a free, copyleft license for
|
||||||
|
software and other kinds of works.
|
||||||
|
|
||||||
|
The licenses for most software and other practical works are designed
|
||||||
|
to take away your freedom to share and change the works. By contrast,
|
||||||
|
the GNU General Public License is intended to guarantee your freedom to
|
||||||
|
share and change all versions of a program--to make sure it remains free
|
||||||
|
software for all its users. We, the Free Software Foundation, use the
|
||||||
|
GNU General Public License for most of our software; it applies also to
|
||||||
|
any other work released this way by its authors. You can apply it to
|
||||||
|
your programs, too.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
them if you wish), that you receive source code or can get it if you
|
||||||
|
want it, that you can change the software or use pieces of it in new
|
||||||
|
free programs, and that you know you can do these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to prevent others from denying you
|
||||||
|
these rights or asking you to surrender the rights. Therefore, you have
|
||||||
|
certain responsibilities if you distribute copies of the software, or if
|
||||||
|
you modify it: responsibilities to respect the freedom of others.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether
|
||||||
|
gratis or for a fee, you must pass on to the recipients the same
|
||||||
|
freedoms that you received. You must make sure that they, too, receive
|
||||||
|
or can get the source code. And you must show them these terms so they
|
||||||
|
know their rights.
|
||||||
|
|
||||||
|
Developers that use the GNU GPL protect your rights with two steps:
|
||||||
|
(1) assert copyright on the software, and (2) offer you this License
|
||||||
|
giving you legal permission to copy, distribute and/or modify it.
|
||||||
|
|
||||||
|
For the developers' and authors' protection, the GPL clearly explains
|
||||||
|
that there is no warranty for this free software. For both users' and
|
||||||
|
authors' sake, the GPL requires that modified versions be marked as
|
||||||
|
changed, so that their problems will not be attributed erroneously to
|
||||||
|
authors of previous versions.
|
||||||
|
|
||||||
|
Some devices are designed to deny users access to install or run
|
||||||
|
modified versions of the software inside them, although the manufacturer
|
||||||
|
can do so. This is fundamentally incompatible with the aim of
|
||||||
|
protecting users' freedom to change the software. The systematic
|
||||||
|
pattern of such abuse occurs in the area of products for individuals to
|
||||||
|
use, which is precisely where it is most unacceptable. Therefore, we
|
||||||
|
have designed this version of the GPL to prohibit the practice for those
|
||||||
|
products. If such problems arise substantially in other domains, we
|
||||||
|
stand ready to extend this provision to those domains in future versions
|
||||||
|
of the GPL, as needed to protect the freedom of users.
|
||||||
|
|
||||||
|
Finally, every program is threatened constantly by software patents.
|
||||||
|
States should not allow patents to restrict development and use of
|
||||||
|
software on general-purpose computers, but in those that do, we wish to
|
||||||
|
avoid the special danger that patents applied to a free program could
|
||||||
|
make it effectively proprietary. To prevent this, the GPL assures that
|
||||||
|
patents cannot be used to render the program non-free.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
0. Definitions.
|
||||||
|
|
||||||
|
"This License" refers to version 3 of the GNU General Public License.
|
||||||
|
|
||||||
|
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||||
|
works, such as semiconductor masks.
|
||||||
|
|
||||||
|
"The Program" refers to any copyrightable work licensed under this
|
||||||
|
License. Each licensee is addressed as "you". "Licensees" and
|
||||||
|
"recipients" may be individuals or organizations.
|
||||||
|
|
||||||
|
To "modify" a work means to copy from or adapt all or part of the work
|
||||||
|
in a fashion requiring copyright permission, other than the making of an
|
||||||
|
exact copy. The resulting work is called a "modified version" of the
|
||||||
|
earlier work or a work "based on" the earlier work.
|
||||||
|
|
||||||
|
A "covered work" means either the unmodified Program or a work based
|
||||||
|
on the Program.
|
||||||
|
|
||||||
|
To "propagate" a work means to do anything with it that, without
|
||||||
|
permission, would make you directly or secondarily liable for
|
||||||
|
infringement under applicable copyright law, except executing it on a
|
||||||
|
computer or modifying a private copy. Propagation includes copying,
|
||||||
|
distribution (with or without modification), making available to the
|
||||||
|
public, and in some countries other activities as well.
|
||||||
|
|
||||||
|
To "convey" a work means any kind of propagation that enables other
|
||||||
|
parties to make or receive copies. Mere interaction with a user through
|
||||||
|
a computer network, with no transfer of a copy, is not conveying.
|
||||||
|
|
||||||
|
An interactive user interface displays "Appropriate Legal Notices"
|
||||||
|
to the extent that it includes a convenient and prominently visible
|
||||||
|
feature that (1) displays an appropriate copyright notice, and (2)
|
||||||
|
tells the user that there is no warranty for the work (except to the
|
||||||
|
extent that warranties are provided), that licensees may convey the
|
||||||
|
work under this License, and how to view a copy of this License. If
|
||||||
|
the interface presents a list of user commands or options, such as a
|
||||||
|
menu, a prominent item in the list meets this criterion.
|
||||||
|
|
||||||
|
1. Source Code.
|
||||||
|
|
||||||
|
The "source code" for a work means the preferred form of the work
|
||||||
|
for making modifications to it. "Object code" means any non-source
|
||||||
|
form of a work.
|
||||||
|
|
||||||
|
A "Standard Interface" means an interface that either is an official
|
||||||
|
standard defined by a recognized standards body, or, in the case of
|
||||||
|
interfaces specified for a particular programming language, one that
|
||||||
|
is widely used among developers working in that language.
|
||||||
|
|
||||||
|
The "System Libraries" of an executable work include anything, other
|
||||||
|
than the work as a whole, that (a) is included in the normal form of
|
||||||
|
packaging a Major Component, but which is not part of that Major
|
||||||
|
Component, and (b) serves only to enable use of the work with that
|
||||||
|
Major Component, or to implement a Standard Interface for which an
|
||||||
|
implementation is available to the public in source code form. A
|
||||||
|
"Major Component", in this context, means a major essential component
|
||||||
|
(kernel, window system, and so on) of the specific operating system
|
||||||
|
(if any) on which the executable work runs, or a compiler used to
|
||||||
|
produce the work, or an object code interpreter used to run it.
|
||||||
|
|
||||||
|
The "Corresponding Source" for a work in object code form means all
|
||||||
|
the source code needed to generate, install, and (for an executable
|
||||||
|
work) run the object code and to modify the work, including scripts to
|
||||||
|
control those activities. However, it does not include the work's
|
||||||
|
System Libraries, or general-purpose tools or generally available free
|
||||||
|
programs which are used unmodified in performing those activities but
|
||||||
|
which are not part of the work. For example, Corresponding Source
|
||||||
|
includes interface definition files associated with source files for
|
||||||
|
the work, and the source code for shared libraries and dynamically
|
||||||
|
linked subprograms that the work is specifically designed to require,
|
||||||
|
such as by intimate data communication or control flow between those
|
||||||
|
subprograms and other parts of the work.
|
||||||
|
|
||||||
|
The Corresponding Source need not include anything that users
|
||||||
|
can regenerate automatically from other parts of the Corresponding
|
||||||
|
Source.
|
||||||
|
|
||||||
|
The Corresponding Source for a work in source code form is that
|
||||||
|
same work.
|
||||||
|
|
||||||
|
2. Basic Permissions.
|
||||||
|
|
||||||
|
All rights granted under this License are granted for the term of
|
||||||
|
copyright on the Program, and are irrevocable provided the stated
|
||||||
|
conditions are met. This License explicitly affirms your unlimited
|
||||||
|
permission to run the unmodified Program. The output from running a
|
||||||
|
covered work is covered by this License only if the output, given its
|
||||||
|
content, constitutes a covered work. This License acknowledges your
|
||||||
|
rights of fair use or other equivalent, as provided by copyright law.
|
||||||
|
|
||||||
|
You may make, run and propagate covered works that you do not
|
||||||
|
convey, without conditions so long as your license otherwise remains
|
||||||
|
in force. You may convey covered works to others for the sole purpose
|
||||||
|
of having them make modifications exclusively for you, or provide you
|
||||||
|
with facilities for running those works, provided that you comply with
|
||||||
|
the terms of this License in conveying all material for which you do
|
||||||
|
not control copyright. Those thus making or running the covered works
|
||||||
|
for you must do so exclusively on your behalf, under your direction
|
||||||
|
and control, on terms that prohibit them from making any copies of
|
||||||
|
your copyrighted material outside their relationship with you.
|
||||||
|
|
||||||
|
Conveying under any other circumstances is permitted solely under
|
||||||
|
the conditions stated below. Sublicensing is not allowed; section 10
|
||||||
|
makes it unnecessary.
|
||||||
|
|
||||||
|
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||||
|
|
||||||
|
No covered work shall be deemed part of an effective technological
|
||||||
|
measure under any applicable law fulfilling obligations under article
|
||||||
|
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||||
|
similar laws prohibiting or restricting circumvention of such
|
||||||
|
measures.
|
||||||
|
|
||||||
|
When you convey a covered work, you waive any legal power to forbid
|
||||||
|
circumvention of technological measures to the extent such circumvention
|
||||||
|
is effected by exercising rights under this License with respect to
|
||||||
|
the covered work, and you disclaim any intention to limit operation or
|
||||||
|
modification of the work as a means of enforcing, against the work's
|
||||||
|
users, your or third parties' legal rights to forbid circumvention of
|
||||||
|
technological measures.
|
||||||
|
|
||||||
|
4. Conveying Verbatim Copies.
|
||||||
|
|
||||||
|
You may convey verbatim copies of the Program's source code as you
|
||||||
|
receive it, in any medium, provided that you conspicuously and
|
||||||
|
appropriately publish on each copy an appropriate copyright notice;
|
||||||
|
keep intact all notices stating that this License and any
|
||||||
|
non-permissive terms added in accord with section 7 apply to the code;
|
||||||
|
keep intact all notices of the absence of any warranty; and give all
|
||||||
|
recipients a copy of this License along with the Program.
|
||||||
|
|
||||||
|
You may charge any price or no price for each copy that you convey,
|
||||||
|
and you may offer support or warranty protection for a fee.
|
||||||
|
|
||||||
|
5. Conveying Modified Source Versions.
|
||||||
|
|
||||||
|
You may convey a work based on the Program, or the modifications to
|
||||||
|
produce it from the Program, in the form of source code under the
|
||||||
|
terms of section 4, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) The work must carry prominent notices stating that you modified
|
||||||
|
it, and giving a relevant date.
|
||||||
|
|
||||||
|
b) The work must carry prominent notices stating that it is
|
||||||
|
released under this License and any conditions added under section
|
||||||
|
7. This requirement modifies the requirement in section 4 to
|
||||||
|
"keep intact all notices".
|
||||||
|
|
||||||
|
c) You must license the entire work, as a whole, under this
|
||||||
|
License to anyone who comes into possession of a copy. This
|
||||||
|
License will therefore apply, along with any applicable section 7
|
||||||
|
additional terms, to the whole of the work, and all its parts,
|
||||||
|
regardless of how they are packaged. This License gives no
|
||||||
|
permission to license the work in any other way, but it does not
|
||||||
|
invalidate such permission if you have separately received it.
|
||||||
|
|
||||||
|
d) If the work has interactive user interfaces, each must display
|
||||||
|
Appropriate Legal Notices; however, if the Program has interactive
|
||||||
|
interfaces that do not display Appropriate Legal Notices, your
|
||||||
|
work need not make them do so.
|
||||||
|
|
||||||
|
A compilation of a covered work with other separate and independent
|
||||||
|
works, which are not by their nature extensions of the covered work,
|
||||||
|
and which are not combined with it such as to form a larger program,
|
||||||
|
in or on a volume of a storage or distribution medium, is called an
|
||||||
|
"aggregate" if the compilation and its resulting copyright are not
|
||||||
|
used to limit the access or legal rights of the compilation's users
|
||||||
|
beyond what the individual works permit. Inclusion of a covered work
|
||||||
|
in an aggregate does not cause this License to apply to the other
|
||||||
|
parts of the aggregate.
|
||||||
|
|
||||||
|
6. Conveying Non-Source Forms.
|
||||||
|
|
||||||
|
You may convey a covered work in object code form under the terms
|
||||||
|
of sections 4 and 5, provided that you also convey the
|
||||||
|
machine-readable Corresponding Source under the terms of this License,
|
||||||
|
in one of these ways:
|
||||||
|
|
||||||
|
a) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by the
|
||||||
|
Corresponding Source fixed on a durable physical medium
|
||||||
|
customarily used for software interchange.
|
||||||
|
|
||||||
|
b) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by a
|
||||||
|
written offer, valid for at least three years and valid for as
|
||||||
|
long as you offer spare parts or customer support for that product
|
||||||
|
model, to give anyone who possesses the object code either (1) a
|
||||||
|
copy of the Corresponding Source for all the software in the
|
||||||
|
product that is covered by this License, on a durable physical
|
||||||
|
medium customarily used for software interchange, for a price no
|
||||||
|
more than your reasonable cost of physically performing this
|
||||||
|
conveying of source, or (2) access to copy the
|
||||||
|
Corresponding Source from a network server at no charge.
|
||||||
|
|
||||||
|
c) Convey individual copies of the object code with a copy of the
|
||||||
|
written offer to provide the Corresponding Source. This
|
||||||
|
alternative is allowed only occasionally and noncommercially, and
|
||||||
|
only if you received the object code with such an offer, in accord
|
||||||
|
with subsection 6b.
|
||||||
|
|
||||||
|
d) Convey the object code by offering access from a designated
|
||||||
|
place (gratis or for a charge), and offer equivalent access to the
|
||||||
|
Corresponding Source in the same way through the same place at no
|
||||||
|
further charge. You need not require recipients to copy the
|
||||||
|
Corresponding Source along with the object code. If the place to
|
||||||
|
copy the object code is a network server, the Corresponding Source
|
||||||
|
may be on a different server (operated by you or a third party)
|
||||||
|
that supports equivalent copying facilities, provided you maintain
|
||||||
|
clear directions next to the object code saying where to find the
|
||||||
|
Corresponding Source. Regardless of what server hosts the
|
||||||
|
Corresponding Source, you remain obligated to ensure that it is
|
||||||
|
available for as long as needed to satisfy these requirements.
|
||||||
|
|
||||||
|
e) Convey the object code using peer-to-peer transmission, provided
|
||||||
|
you inform other peers where the object code and Corresponding
|
||||||
|
Source of the work are being offered to the general public at no
|
||||||
|
charge under subsection 6d.
|
||||||
|
|
||||||
|
A separable portion of the object code, whose source code is excluded
|
||||||
|
from the Corresponding Source as a System Library, need not be
|
||||||
|
included in conveying the object code work.
|
||||||
|
|
||||||
|
A "User Product" is either (1) a "consumer product", which means any
|
||||||
|
tangible personal property which is normally used for personal, family,
|
||||||
|
or household purposes, or (2) anything designed or sold for incorporation
|
||||||
|
into a dwelling. In determining whether a product is a consumer product,
|
||||||
|
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||||
|
product received by a particular user, "normally used" refers to a
|
||||||
|
typical or common use of that class of product, regardless of the status
|
||||||
|
of the particular user or of the way in which the particular user
|
||||||
|
actually uses, or expects or is expected to use, the product. A product
|
||||||
|
is a consumer product regardless of whether the product has substantial
|
||||||
|
commercial, industrial or non-consumer uses, unless such uses represent
|
||||||
|
the only significant mode of use of the product.
|
||||||
|
|
||||||
|
"Installation Information" for a User Product means any methods,
|
||||||
|
procedures, authorization keys, or other information required to install
|
||||||
|
and execute modified versions of a covered work in that User Product from
|
||||||
|
a modified version of its Corresponding Source. The information must
|
||||||
|
suffice to ensure that the continued functioning of the modified object
|
||||||
|
code is in no case prevented or interfered with solely because
|
||||||
|
modification has been made.
|
||||||
|
|
||||||
|
If you convey an object code work under this section in, or with, or
|
||||||
|
specifically for use in, a User Product, and the conveying occurs as
|
||||||
|
part of a transaction in which the right of possession and use of the
|
||||||
|
User Product is transferred to the recipient in perpetuity or for a
|
||||||
|
fixed term (regardless of how the transaction is characterized), the
|
||||||
|
Corresponding Source conveyed under this section must be accompanied
|
||||||
|
by the Installation Information. But this requirement does not apply
|
||||||
|
if neither you nor any third party retains the ability to install
|
||||||
|
modified object code on the User Product (for example, the work has
|
||||||
|
been installed in ROM).
|
||||||
|
|
||||||
|
The requirement to provide Installation Information does not include a
|
||||||
|
requirement to continue to provide support service, warranty, or updates
|
||||||
|
for a work that has been modified or installed by the recipient, or for
|
||||||
|
the User Product in which it has been modified or installed. Access to a
|
||||||
|
network may be denied when the modification itself materially and
|
||||||
|
adversely affects the operation of the network or violates the rules and
|
||||||
|
protocols for communication across the network.
|
||||||
|
|
||||||
|
Corresponding Source conveyed, and Installation Information provided,
|
||||||
|
in accord with this section must be in a format that is publicly
|
||||||
|
documented (and with an implementation available to the public in
|
||||||
|
source code form), and must require no special password or key for
|
||||||
|
unpacking, reading or copying.
|
||||||
|
|
||||||
|
7. Additional Terms.
|
||||||
|
|
||||||
|
"Additional permissions" are terms that supplement the terms of this
|
||||||
|
License by making exceptions from one or more of its conditions.
|
||||||
|
Additional permissions that are applicable to the entire Program shall
|
||||||
|
be treated as though they were included in this License, to the extent
|
||||||
|
that they are valid under applicable law. If additional permissions
|
||||||
|
apply only to part of the Program, that part may be used separately
|
||||||
|
under those permissions, but the entire Program remains governed by
|
||||||
|
this License without regard to the additional permissions.
|
||||||
|
|
||||||
|
When you convey a copy of a covered work, you may at your option
|
||||||
|
remove any additional permissions from that copy, or from any part of
|
||||||
|
it. (Additional permissions may be written to require their own
|
||||||
|
removal in certain cases when you modify the work.) You may place
|
||||||
|
additional permissions on material, added by you to a covered work,
|
||||||
|
for which you have or can give appropriate copyright permission.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, for material you
|
||||||
|
add to a covered work, you may (if authorized by the copyright holders of
|
||||||
|
that material) supplement the terms of this License with terms:
|
||||||
|
|
||||||
|
a) Disclaiming warranty or limiting liability differently from the
|
||||||
|
terms of sections 15 and 16 of this License; or
|
||||||
|
|
||||||
|
b) Requiring preservation of specified reasonable legal notices or
|
||||||
|
author attributions in that material or in the Appropriate Legal
|
||||||
|
Notices displayed by works containing it; or
|
||||||
|
|
||||||
|
c) Prohibiting misrepresentation of the origin of that material, or
|
||||||
|
requiring that modified versions of such material be marked in
|
||||||
|
reasonable ways as different from the original version; or
|
||||||
|
|
||||||
|
d) Limiting the use for publicity purposes of names of licensors or
|
||||||
|
authors of the material; or
|
||||||
|
|
||||||
|
e) Declining to grant rights under trademark law for use of some
|
||||||
|
trade names, trademarks, or service marks; or
|
||||||
|
|
||||||
|
f) Requiring indemnification of licensors and authors of that
|
||||||
|
material by anyone who conveys the material (or modified versions of
|
||||||
|
it) with contractual assumptions of liability to the recipient, for
|
||||||
|
any liability that these contractual assumptions directly impose on
|
||||||
|
those licensors and authors.
|
||||||
|
|
||||||
|
All other non-permissive additional terms are considered "further
|
||||||
|
restrictions" within the meaning of section 10. If the Program as you
|
||||||
|
received it, or any part of it, contains a notice stating that it is
|
||||||
|
governed by this License along with a term that is a further
|
||||||
|
restriction, you may remove that term. If a license document contains
|
||||||
|
a further restriction but permits relicensing or conveying under this
|
||||||
|
License, you may add to a covered work material governed by the terms
|
||||||
|
of that license document, provided that the further restriction does
|
||||||
|
not survive such relicensing or conveying.
|
||||||
|
|
||||||
|
If you add terms to a covered work in accord with this section, you
|
||||||
|
must place, in the relevant source files, a statement of the
|
||||||
|
additional terms that apply to those files, or a notice indicating
|
||||||
|
where to find the applicable terms.
|
||||||
|
|
||||||
|
Additional terms, permissive or non-permissive, may be stated in the
|
||||||
|
form of a separately written license, or stated as exceptions;
|
||||||
|
the above requirements apply either way.
|
||||||
|
|
||||||
|
8. Termination.
|
||||||
|
|
||||||
|
You may not propagate or modify a covered work except as expressly
|
||||||
|
provided under this License. Any attempt otherwise to propagate or
|
||||||
|
modify it is void, and will automatically terminate your rights under
|
||||||
|
this License (including any patent licenses granted under the third
|
||||||
|
paragraph of section 11).
|
||||||
|
|
||||||
|
However, if you cease all violation of this License, then your
|
||||||
|
license from a particular copyright holder is reinstated (a)
|
||||||
|
provisionally, unless and until the copyright holder explicitly and
|
||||||
|
finally terminates your license, and (b) permanently, if the copyright
|
||||||
|
holder fails to notify you of the violation by some reasonable means
|
||||||
|
prior to 60 days after the cessation.
|
||||||
|
|
||||||
|
Moreover, your license from a particular copyright holder is
|
||||||
|
reinstated permanently if the copyright holder notifies you of the
|
||||||
|
violation by some reasonable means, this is the first time you have
|
||||||
|
received notice of violation of this License (for any work) from that
|
||||||
|
copyright holder, and you cure the violation prior to 30 days after
|
||||||
|
your receipt of the notice.
|
||||||
|
|
||||||
|
Termination of your rights under this section does not terminate the
|
||||||
|
licenses of parties who have received copies or rights from you under
|
||||||
|
this License. If your rights have been terminated and not permanently
|
||||||
|
reinstated, you do not qualify to receive new licenses for the same
|
||||||
|
material under section 10.
|
||||||
|
|
||||||
|
9. Acceptance Not Required for Having Copies.
|
||||||
|
|
||||||
|
You are not required to accept this License in order to receive or
|
||||||
|
run a copy of the Program. Ancillary propagation of a covered work
|
||||||
|
occurring solely as a consequence of using peer-to-peer transmission
|
||||||
|
to receive a copy likewise does not require acceptance. However,
|
||||||
|
nothing other than this License grants you permission to propagate or
|
||||||
|
modify any covered work. These actions infringe copyright if you do
|
||||||
|
not accept this License. Therefore, by modifying or propagating a
|
||||||
|
covered work, you indicate your acceptance of this License to do so.
|
||||||
|
|
||||||
|
10. Automatic Licensing of Downstream Recipients.
|
||||||
|
|
||||||
|
Each time you convey a covered work, the recipient automatically
|
||||||
|
receives a license from the original licensors, to run, modify and
|
||||||
|
propagate that work, subject to this License. You are not responsible
|
||||||
|
for enforcing compliance by third parties with this License.
|
||||||
|
|
||||||
|
An "entity transaction" is a transaction transferring control of an
|
||||||
|
organization, or substantially all assets of one, or subdividing an
|
||||||
|
organization, or merging organizations. If propagation of a covered
|
||||||
|
work results from an entity transaction, each party to that
|
||||||
|
transaction who receives a copy of the work also receives whatever
|
||||||
|
licenses to the work the party's predecessor in interest had or could
|
||||||
|
give under the previous paragraph, plus a right to possession of the
|
||||||
|
Corresponding Source of the work from the predecessor in interest, if
|
||||||
|
the predecessor has it or can get it with reasonable efforts.
|
||||||
|
|
||||||
|
You may not impose any further restrictions on the exercise of the
|
||||||
|
rights granted or affirmed under this License. For example, you may
|
||||||
|
not impose a license fee, royalty, or other charge for exercise of
|
||||||
|
rights granted under this License, and you may not initiate litigation
|
||||||
|
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||||
|
any patent claim is infringed by making, using, selling, offering for
|
||||||
|
sale, or importing the Program or any portion of it.
|
||||||
|
|
||||||
|
11. Patents.
|
||||||
|
|
||||||
|
A "contributor" is a copyright holder who authorizes use under this
|
||||||
|
License of the Program or a work on which the Program is based. The
|
||||||
|
work thus licensed is called the contributor's "contributor version".
|
||||||
|
|
||||||
|
A contributor's "essential patent claims" are all patent claims
|
||||||
|
owned or controlled by the contributor, whether already acquired or
|
||||||
|
hereafter acquired, that would be infringed by some manner, permitted
|
||||||
|
by this License, of making, using, or selling its contributor version,
|
||||||
|
but do not include claims that would be infringed only as a
|
||||||
|
consequence of further modification of the contributor version. For
|
||||||
|
purposes of this definition, "control" includes the right to grant
|
||||||
|
patent sublicenses in a manner consistent with the requirements of
|
||||||
|
this License.
|
||||||
|
|
||||||
|
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||||
|
patent license under the contributor's essential patent claims, to
|
||||||
|
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||||
|
propagate the contents of its contributor version.
|
||||||
|
|
||||||
|
In the following three paragraphs, a "patent license" is any express
|
||||||
|
agreement or commitment, however denominated, not to enforce a patent
|
||||||
|
(such as an express permission to practice a patent or covenant not to
|
||||||
|
sue for patent infringement). To "grant" such a patent license to a
|
||||||
|
party means to make such an agreement or commitment not to enforce a
|
||||||
|
patent against the party.
|
||||||
|
|
||||||
|
If you convey a covered work, knowingly relying on a patent license,
|
||||||
|
and the Corresponding Source of the work is not available for anyone
|
||||||
|
to copy, free of charge and under the terms of this License, through a
|
||||||
|
publicly available network server or other readily accessible means,
|
||||||
|
then you must either (1) cause the Corresponding Source to be so
|
||||||
|
available, or (2) arrange to deprive yourself of the benefit of the
|
||||||
|
patent license for this particular work, or (3) arrange, in a manner
|
||||||
|
consistent with the requirements of this License, to extend the patent
|
||||||
|
license to downstream recipients. "Knowingly relying" means you have
|
||||||
|
actual knowledge that, but for the patent license, your conveying the
|
||||||
|
covered work in a country, or your recipient's use of the covered work
|
||||||
|
in a country, would infringe one or more identifiable patents in that
|
||||||
|
country that you have reason to believe are valid.
|
||||||
|
|
||||||
|
If, pursuant to or in connection with a single transaction or
|
||||||
|
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||||
|
covered work, and grant a patent license to some of the parties
|
||||||
|
receiving the covered work authorizing them to use, propagate, modify
|
||||||
|
or convey a specific copy of the covered work, then the patent license
|
||||||
|
you grant is automatically extended to all recipients of the covered
|
||||||
|
work and works based on it.
|
||||||
|
|
||||||
|
A patent license is "discriminatory" if it does not include within
|
||||||
|
the scope of its coverage, prohibits the exercise of, or is
|
||||||
|
conditioned on the non-exercise of one or more of the rights that are
|
||||||
|
specifically granted under this License. You may not convey a covered
|
||||||
|
work if you are a party to an arrangement with a third party that is
|
||||||
|
in the business of distributing software, under which you make payment
|
||||||
|
to the third party based on the extent of your activity of conveying
|
||||||
|
the work, and under which the third party grants, to any of the
|
||||||
|
parties who would receive the covered work from you, a discriminatory
|
||||||
|
patent license (a) in connection with copies of the covered work
|
||||||
|
conveyed by you (or copies made from those copies), or (b) primarily
|
||||||
|
for and in connection with specific products or compilations that
|
||||||
|
contain the covered work, unless you entered into that arrangement,
|
||||||
|
or that patent license was granted, prior to 28 March 2007.
|
||||||
|
|
||||||
|
Nothing in this License shall be construed as excluding or limiting
|
||||||
|
any implied license or other defenses to infringement that may
|
||||||
|
otherwise be available to you under applicable patent law.
|
||||||
|
|
||||||
|
12. No Surrender of Others' Freedom.
|
||||||
|
|
||||||
|
If conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot convey a
|
||||||
|
covered work so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you may
|
||||||
|
not convey it at all. For example, if you agree to terms that obligate you
|
||||||
|
to collect a royalty for further conveying from those to whom you convey
|
||||||
|
the Program, the only way you could satisfy both those terms and this
|
||||||
|
License would be to refrain entirely from conveying the Program.
|
||||||
|
|
||||||
|
13. Use with the GNU Affero General Public License.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, you have
|
||||||
|
permission to link or combine any covered work with a work licensed
|
||||||
|
under version 3 of the GNU Affero General Public License into a single
|
||||||
|
combined work, and to convey the resulting work. The terms of this
|
||||||
|
License will continue to apply to the part which is the covered work,
|
||||||
|
but the special requirements of the GNU Affero General Public License,
|
||||||
|
section 13, concerning interaction through a network will apply to the
|
||||||
|
combination as such.
|
||||||
|
|
||||||
|
14. Revised Versions of this License.
|
||||||
|
|
||||||
|
The Free Software Foundation may publish revised and/or new versions of
|
||||||
|
the GNU General Public License from time to time. Such new versions will
|
||||||
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the
|
||||||
|
Program specifies that a certain numbered version of the GNU General
|
||||||
|
Public License "or any later version" applies to it, you have the
|
||||||
|
option of following the terms and conditions either of that numbered
|
||||||
|
version or of any later version published by the Free Software
|
||||||
|
Foundation. If the Program does not specify a version number of the
|
||||||
|
GNU General Public License, you may choose any version ever published
|
||||||
|
by the Free Software Foundation.
|
||||||
|
|
||||||
|
If the Program specifies that a proxy can decide which future
|
||||||
|
versions of the GNU General Public License can be used, that proxy's
|
||||||
|
public statement of acceptance of a version permanently authorizes you
|
||||||
|
to choose that version for the Program.
|
||||||
|
|
||||||
|
Later license versions may give you additional or different
|
||||||
|
permissions. However, no additional obligations are imposed on any
|
||||||
|
author or copyright holder as a result of your choosing to follow a
|
||||||
|
later version.
|
||||||
|
|
||||||
|
15. Disclaimer of Warranty.
|
||||||
|
|
||||||
|
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||||
|
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||||
|
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||||
|
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||||
|
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||||
|
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
16. Limitation of Liability.
|
||||||
|
|
||||||
|
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||||
|
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||||
|
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||||
|
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||||
|
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||||
|
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||||
|
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||||
|
SUCH DAMAGES.
|
||||||
|
|
||||||
|
17. Interpretation of Sections 15 and 16.
|
||||||
|
|
||||||
|
If the disclaimer of warranty and limitation of liability provided
|
||||||
|
above cannot be given local legal effect according to their terms,
|
||||||
|
reviewing courts shall apply local law that most closely approximates
|
||||||
|
an absolute waiver of all civil liability in connection with the
|
||||||
|
Program, unless a warranty or assumption of liability accompanies a
|
||||||
|
copy of the Program in return for a fee.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
state the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
{one line to give the program's name and a brief idea of what it does.}
|
||||||
|
Copyright (C) {year} {name of author}
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program does terminal interaction, make it output a short
|
||||||
|
notice like this when it starts in an interactive mode:
|
||||||
|
|
||||||
|
{project} Copyright (C) {year} {fullname}
|
||||||
|
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
|
This is free software, and you are welcome to redistribute it
|
||||||
|
under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
|
parts of the General Public License. Of course, your program's commands
|
||||||
|
might be different; for a GUI interface, you would use an "about box".
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or school,
|
||||||
|
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||||
|
For more information on this, and how to apply and follow the GNU GPL, see
|
||||||
|
<http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
The GNU General Public License does not permit incorporating your program
|
||||||
|
into proprietary programs. If your program is a subroutine library, you
|
||||||
|
may consider it more useful to permit linking proprietary applications with
|
||||||
|
the library. If this is what you want to do, use the GNU Lesser General
|
||||||
|
Public License instead of this License. But first, please read
|
||||||
|
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
title: The IEEE801_11 OOT Module
|
||||||
|
version: 1.0
|
||||||
|
brief: IEEE 802.11 a/g/p Transceiver
|
||||||
|
tags: # Tags are arbitrary, but look at CGRAN what other authors are using
|
||||||
|
- IEEE 802.11
|
||||||
|
- WiFi
|
||||||
|
- OFDM
|
||||||
|
author:
|
||||||
|
- Bastian Bloessl <bloessl@ccs-labs.org>
|
||||||
|
copyright_owner:
|
||||||
|
- Bastian Bloessl
|
||||||
|
license: GPL-3.0-or-later
|
||||||
|
gr_supported_version:
|
||||||
|
- 3.7
|
||||||
|
- 3.8
|
||||||
|
- 3.9
|
||||||
|
- 3.10
|
||||||
|
repo: https://github.com/bastibl/gr-ieee802-11.git
|
||||||
|
website: http://www.ccs-labs.org/projects/wime/
|
||||||
|
icon: http://www.ccs-labs.org/projects/wime/wime.png
|
||||||
|
description: |-
|
||||||
|
This an IEEE 802.11 a/g/p transceiver for GNU Radio. Over the air, I tested it with the Ettus USRP N210 with XCVR2450 and CBX daughterboards. For interoperability tests I use mainly an Atheros (ath5k) WiFi card. The code can also be used for packet error rate simulations.
|
||||||
|
file_format: 1
|
||||||
@@ -46,7 +46,7 @@ needed. For example the Wireshark connector. You can find these blocks at
|
|||||||
[https://github.com/bastibl/gr-foo](https://github.com/bastibl/gr-foo). They are
|
[https://github.com/bastibl/gr-foo](https://github.com/bastibl/gr-foo). They are
|
||||||
installed with the typical command sequence:
|
installed with the typical command sequence:
|
||||||
|
|
||||||
git clone https://github.com/bastibl/gr-foo.git
|
git clone https://github.com/bastibl/gr-foo
|
||||||
cd gr-foo
|
cd gr-foo
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
@@ -60,7 +60,7 @@ installed with the typical command sequence:
|
|||||||
|
|
||||||
To actually install the blocks do
|
To actually install the blocks do
|
||||||
|
|
||||||
git clone git://github.com/bastibl/gr-ieee802-11.git
|
git clone https://github.com/bastibl/gr-ieee802-11
|
||||||
cd gr-ieee802-11
|
cd gr-ieee802-11
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
@@ -216,3 +216,5 @@ of the TUN/TAP interface is handled by the scripts in the ```apps``` folder.
|
|||||||
|
|
||||||
For further information please checkout our project page
|
For further information please checkout our project page
|
||||||
[https://www.wime-project.net](https://www.wime-project.net)
|
[https://www.wime-project.net](https://www.wime-project.net)
|
||||||
|
|
||||||
|
For information and an implementation surrounding IEEE 802.11ah, please refer to [gr-ieee802-11ah](https://github.com/irongiant33/gr-ieee802-11ah).
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
# Copyright 2023 Ryan Volz
|
||||||
|
#
|
||||||
|
# This file is part of gr-ieee802_11
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
|
||||||
|
install(
|
||||||
|
FILES wifi_loopback.grc
|
||||||
|
wifi_phy_hier.grc
|
||||||
|
wifi_rx.grc
|
||||||
|
wifi_transceiver.grc
|
||||||
|
wifi_tx.grc
|
||||||
|
DESTINATION share/gnuradio/examples/ieee802_11)
|
||||||
+28
-26
@@ -23,6 +23,7 @@ options:
|
|||||||
sizing_mode: fixed
|
sizing_mode: fixed
|
||||||
thread_safe_setters: ''
|
thread_safe_setters: ''
|
||||||
title: ''
|
title: ''
|
||||||
|
window_size: (1000,1000)
|
||||||
states:
|
states:
|
||||||
bus_sink: false
|
bus_sink: false
|
||||||
bus_source: false
|
bus_source: false
|
||||||
@@ -36,7 +37,7 @@ blocks:
|
|||||||
id: variable_qtgui_chooser
|
id: variable_qtgui_chooser
|
||||||
parameters:
|
parameters:
|
||||||
comment: ''
|
comment: ''
|
||||||
gui_hint: 0,0,1,1
|
gui_hint: ''
|
||||||
label: ''
|
label: ''
|
||||||
label0: ''
|
label0: ''
|
||||||
label1: ''
|
label1: ''
|
||||||
@@ -45,13 +46,13 @@ blocks:
|
|||||||
label4: ''
|
label4: ''
|
||||||
labels: '["LS", "LMS", "Linear Comb", "STA"]'
|
labels: '["LS", "LMS", "Linear Comb", "STA"]'
|
||||||
num_opts: '0'
|
num_opts: '0'
|
||||||
option0: ''
|
option0: '0'
|
||||||
option1: ''
|
option1: '1'
|
||||||
option2: ''
|
option2: '2'
|
||||||
option3: ''
|
option3: '3'
|
||||||
option4: '4'
|
option4: '4'
|
||||||
options: '[0, 1, 2, 3]'
|
options: '[0, 1, 2, 3]'
|
||||||
orient: Qt.QHBoxLayout
|
orient: Qt.QVBoxLayout
|
||||||
type: int
|
type: int
|
||||||
value: '0'
|
value: '0'
|
||||||
widget: radio_buttons
|
widget: radio_buttons
|
||||||
@@ -59,7 +60,7 @@ blocks:
|
|||||||
bus_sink: false
|
bus_sink: false
|
||||||
bus_source: false
|
bus_source: false
|
||||||
bus_structure: null
|
bus_structure: null
|
||||||
coordinate: [192, 8]
|
coordinate: [200, 12.0]
|
||||||
rotation: 0
|
rotation: 0
|
||||||
state: enabled
|
state: enabled
|
||||||
- name: encoding
|
- name: encoding
|
||||||
@@ -271,23 +272,6 @@ blocks:
|
|||||||
coordinate: [728, 620.0]
|
coordinate: [728, 620.0]
|
||||||
rotation: 0
|
rotation: 0
|
||||||
state: true
|
state: true
|
||||||
- name: blocks_pdu_to_tagged_stream_0_0
|
|
||||||
id: blocks_pdu_to_tagged_stream
|
|
||||||
parameters:
|
|
||||||
affinity: ''
|
|
||||||
alias: ''
|
|
||||||
comment: ''
|
|
||||||
maxoutbuf: '0'
|
|
||||||
minoutbuf: '0'
|
|
||||||
tag: packet_len
|
|
||||||
type: complex
|
|
||||||
states:
|
|
||||||
bus_sink: false
|
|
||||||
bus_source: false
|
|
||||||
bus_structure: null
|
|
||||||
coordinate: [376, 348.0]
|
|
||||||
rotation: 180
|
|
||||||
state: enabled
|
|
||||||
- name: blocks_tag_debug_0
|
- name: blocks_tag_debug_0
|
||||||
id: blocks_tag_debug
|
id: blocks_tag_debug
|
||||||
parameters:
|
parameters:
|
||||||
@@ -433,6 +417,23 @@ blocks:
|
|||||||
coordinate: [328, 596.0]
|
coordinate: [328, 596.0]
|
||||||
rotation: 180
|
rotation: 180
|
||||||
state: enabled
|
state: enabled
|
||||||
|
- name: pdu_pdu_to_tagged_stream_0
|
||||||
|
id: pdu_pdu_to_tagged_stream
|
||||||
|
parameters:
|
||||||
|
affinity: ''
|
||||||
|
alias: ''
|
||||||
|
comment: ''
|
||||||
|
maxoutbuf: '0'
|
||||||
|
minoutbuf: '0'
|
||||||
|
tag: packet_len
|
||||||
|
type: complex
|
||||||
|
states:
|
||||||
|
bus_sink: false
|
||||||
|
bus_source: false
|
||||||
|
bus_structure: null
|
||||||
|
coordinate: [384, 348.0]
|
||||||
|
rotation: 180
|
||||||
|
state: true
|
||||||
- name: pfb_arb_resampler_xxx_0
|
- name: pfb_arb_resampler_xxx_0
|
||||||
id: pfb_arb_resampler_xxx
|
id: pfb_arb_resampler_xxx
|
||||||
parameters:
|
parameters:
|
||||||
@@ -668,7 +669,6 @@ connections:
|
|||||||
- [blocks_complex_to_mag_0, '0', blocks_vector_to_stream_0, '0']
|
- [blocks_complex_to_mag_0, '0', blocks_vector_to_stream_0, '0']
|
||||||
- [blocks_message_strobe_0, strobe, ieee802_11_mac_0, app in]
|
- [blocks_message_strobe_0, strobe, ieee802_11_mac_0, app in]
|
||||||
- [blocks_multiply_const_xx_0, '0', channels_channel_model_0, '0']
|
- [blocks_multiply_const_xx_0, '0', channels_channel_model_0, '0']
|
||||||
- [blocks_pdu_to_tagged_stream_0_0, '0', qtgui_const_sink_x_0, '0']
|
|
||||||
- [blocks_vector_to_stream_0, '0', qtgui_time_sink_x_0, '0']
|
- [blocks_vector_to_stream_0, '0', qtgui_time_sink_x_0, '0']
|
||||||
- [channels_channel_model_0, '0', pfb_arb_resampler_xxx_0, '0']
|
- [channels_channel_model_0, '0', pfb_arb_resampler_xxx_0, '0']
|
||||||
- [foo_packet_pad2_0, '0', blocks_multiply_const_xx_0, '0']
|
- [foo_packet_pad2_0, '0', blocks_multiply_const_xx_0, '0']
|
||||||
@@ -677,11 +677,13 @@ connections:
|
|||||||
- [ieee802_11_extract_csi_0, '0', blocks_tag_debug_0, '0']
|
- [ieee802_11_extract_csi_0, '0', blocks_tag_debug_0, '0']
|
||||||
- [ieee802_11_mac_0, phy out, wifi_phy_hier_0, mac_in]
|
- [ieee802_11_mac_0, phy out, wifi_phy_hier_0, mac_in]
|
||||||
- [ieee802_11_parse_mac_0, out, ieee802_11_extract_csi_0, pdu in]
|
- [ieee802_11_parse_mac_0, out, ieee802_11_extract_csi_0, pdu in]
|
||||||
|
- [pdu_pdu_to_tagged_stream_0, '0', qtgui_const_sink_x_0, '0']
|
||||||
- [pfb_arb_resampler_xxx_0, '0', wifi_phy_hier_0, '0']
|
- [pfb_arb_resampler_xxx_0, '0', wifi_phy_hier_0, '0']
|
||||||
- [wifi_phy_hier_0, '0', foo_packet_pad2_0, '0']
|
- [wifi_phy_hier_0, '0', foo_packet_pad2_0, '0']
|
||||||
- [wifi_phy_hier_0, carrier, blocks_pdu_to_tagged_stream_0_0, pdus]
|
- [wifi_phy_hier_0, carrier, pdu_pdu_to_tagged_stream_0, pdus]
|
||||||
- [wifi_phy_hier_0, mac_out, foo_wireshark_connector_0, in]
|
- [wifi_phy_hier_0, mac_out, foo_wireshark_connector_0, in]
|
||||||
- [wifi_phy_hier_0, mac_out, ieee802_11_parse_mac_0, in]
|
- [wifi_phy_hier_0, mac_out, ieee802_11_parse_mac_0, in]
|
||||||
|
|
||||||
metadata:
|
metadata:
|
||||||
file_format: 1
|
file_format: 1
|
||||||
|
grc_version: v3.10.2.0-68-g62a7e451
|
||||||
|
|||||||
+47
-43
@@ -23,6 +23,7 @@ options:
|
|||||||
sizing_mode: fixed
|
sizing_mode: fixed
|
||||||
thread_safe_setters: ''
|
thread_safe_setters: ''
|
||||||
title: ''
|
title: ''
|
||||||
|
window_size: (1000,1000)
|
||||||
states:
|
states:
|
||||||
bus_sink: false
|
bus_sink: false
|
||||||
bus_source: false
|
bus_source: false
|
||||||
@@ -241,7 +242,7 @@ blocks:
|
|||||||
bus_sink: false
|
bus_sink: false
|
||||||
bus_source: false
|
bus_source: false
|
||||||
bus_structure: null
|
bus_structure: null
|
||||||
coordinate: [1016, 312]
|
coordinate: [896, 400.0]
|
||||||
rotation: 0
|
rotation: 0
|
||||||
state: enabled
|
state: enabled
|
||||||
- name: blocks_complex_to_mag_squared_0
|
- name: blocks_complex_to_mag_squared_0
|
||||||
@@ -272,7 +273,7 @@ blocks:
|
|||||||
bus_sink: false
|
bus_sink: false
|
||||||
bus_source: false
|
bus_source: false
|
||||||
bus_structure: null
|
bus_structure: null
|
||||||
coordinate: [440, 328.0]
|
coordinate: [392, 456.0]
|
||||||
rotation: 0
|
rotation: 0
|
||||||
state: enabled
|
state: enabled
|
||||||
- name: blocks_delay_0
|
- name: blocks_delay_0
|
||||||
@@ -285,13 +286,14 @@ blocks:
|
|||||||
maxoutbuf: '0'
|
maxoutbuf: '0'
|
||||||
minoutbuf: '0'
|
minoutbuf: '0'
|
||||||
num_ports: '1'
|
num_ports: '1'
|
||||||
|
showports: 'False'
|
||||||
type: complex
|
type: complex
|
||||||
vlen: '1'
|
vlen: '1'
|
||||||
states:
|
states:
|
||||||
bus_sink: false
|
bus_sink: false
|
||||||
bus_source: false
|
bus_source: false
|
||||||
bus_structure: null
|
bus_structure: null
|
||||||
coordinate: [536, 540.0]
|
coordinate: [544, 768.0]
|
||||||
rotation: 0
|
rotation: 0
|
||||||
state: enabled
|
state: enabled
|
||||||
- name: blocks_delay_0_0
|
- name: blocks_delay_0_0
|
||||||
@@ -304,14 +306,15 @@ blocks:
|
|||||||
maxoutbuf: '0'
|
maxoutbuf: '0'
|
||||||
minoutbuf: '0'
|
minoutbuf: '0'
|
||||||
num_ports: '1'
|
num_ports: '1'
|
||||||
|
showports: 'False'
|
||||||
type: complex
|
type: complex
|
||||||
vlen: '1'
|
vlen: '1'
|
||||||
states:
|
states:
|
||||||
bus_sink: false
|
bus_sink: false
|
||||||
bus_source: false
|
bus_source: false
|
||||||
bus_structure: null
|
bus_structure: null
|
||||||
coordinate: [280, 312.0]
|
coordinate: [304.0, 344]
|
||||||
rotation: 0
|
rotation: 270
|
||||||
state: enabled
|
state: enabled
|
||||||
- name: blocks_divide_xx_0
|
- name: blocks_divide_xx_0
|
||||||
id: blocks_divide_xx
|
id: blocks_divide_xx
|
||||||
@@ -328,7 +331,7 @@ blocks:
|
|||||||
bus_sink: false
|
bus_sink: false
|
||||||
bus_source: false
|
bus_source: false
|
||||||
bus_structure: null
|
bus_structure: null
|
||||||
coordinate: [1168, 400]
|
coordinate: [1112.0, 384]
|
||||||
rotation: 270
|
rotation: 270
|
||||||
state: enabled
|
state: enabled
|
||||||
- name: blocks_file_sink_0
|
- name: blocks_file_sink_0
|
||||||
@@ -346,7 +349,7 @@ blocks:
|
|||||||
bus_sink: false
|
bus_sink: false
|
||||||
bus_source: false
|
bus_source: false
|
||||||
bus_structure: null
|
bus_structure: null
|
||||||
coordinate: [768, 908]
|
coordinate: [1264, 920.0]
|
||||||
rotation: 180
|
rotation: 180
|
||||||
state: disabled
|
state: disabled
|
||||||
- name: blocks_moving_average_xx_0
|
- name: blocks_moving_average_xx_0
|
||||||
@@ -366,7 +369,7 @@ blocks:
|
|||||||
bus_sink: false
|
bus_sink: false
|
||||||
bus_source: false
|
bus_source: false
|
||||||
bus_structure: null
|
bus_structure: null
|
||||||
coordinate: [944, 180.0]
|
coordinate: [928, 176.0]
|
||||||
rotation: 0
|
rotation: 0
|
||||||
state: enabled
|
state: enabled
|
||||||
- name: blocks_moving_average_xx_1
|
- name: blocks_moving_average_xx_1
|
||||||
@@ -386,8 +389,8 @@ blocks:
|
|||||||
bus_sink: false
|
bus_sink: false
|
||||||
bus_source: false
|
bus_source: false
|
||||||
bus_structure: null
|
bus_structure: null
|
||||||
coordinate: [808, 284.0]
|
coordinate: [688.0, 336]
|
||||||
rotation: 0
|
rotation: 270
|
||||||
state: enabled
|
state: enabled
|
||||||
- name: blocks_multiply_xx_0
|
- name: blocks_multiply_xx_0
|
||||||
id: blocks_multiply_xx
|
id: blocks_multiply_xx
|
||||||
@@ -404,26 +407,9 @@ blocks:
|
|||||||
bus_sink: false
|
bus_sink: false
|
||||||
bus_source: false
|
bus_source: false
|
||||||
bus_structure: null
|
bus_structure: null
|
||||||
coordinate: [664, 296]
|
coordinate: [616, 248.0]
|
||||||
rotation: 0
|
rotation: 0
|
||||||
state: enabled
|
state: enabled
|
||||||
- name: blocks_pdu_to_tagged_stream_1
|
|
||||||
id: blocks_pdu_to_tagged_stream
|
|
||||||
parameters:
|
|
||||||
affinity: ''
|
|
||||||
alias: ''
|
|
||||||
comment: ''
|
|
||||||
maxoutbuf: '0'
|
|
||||||
minoutbuf: '0'
|
|
||||||
tag: packet_len
|
|
||||||
type: complex
|
|
||||||
states:
|
|
||||||
bus_sink: false
|
|
||||||
bus_source: false
|
|
||||||
bus_structure: null
|
|
||||||
coordinate: [584, 836]
|
|
||||||
rotation: 180
|
|
||||||
state: enabled
|
|
||||||
- name: blocks_stream_to_vector_0
|
- name: blocks_stream_to_vector_0
|
||||||
id: blocks_stream_to_vector
|
id: blocks_stream_to_vector
|
||||||
parameters:
|
parameters:
|
||||||
@@ -439,7 +425,7 @@ blocks:
|
|||||||
bus_sink: false
|
bus_sink: false
|
||||||
bus_source: false
|
bus_source: false
|
||||||
bus_structure: null
|
bus_structure: null
|
||||||
coordinate: [944, 528.0]
|
coordinate: [1040, 760.0]
|
||||||
rotation: 0
|
rotation: 0
|
||||||
state: enabled
|
state: enabled
|
||||||
- name: fft_vxx_0
|
- name: fft_vxx_0
|
||||||
@@ -460,7 +446,7 @@ blocks:
|
|||||||
bus_sink: false
|
bus_sink: false
|
||||||
bus_source: false
|
bus_source: false
|
||||||
bus_structure: null
|
bus_structure: null
|
||||||
coordinate: [168, 672]
|
coordinate: [1248, 640.0]
|
||||||
rotation: 0
|
rotation: 0
|
||||||
state: enabled
|
state: enabled
|
||||||
- name: foo_wireshark_connector_0
|
- name: foo_wireshark_connector_0
|
||||||
@@ -477,7 +463,7 @@ blocks:
|
|||||||
bus_sink: false
|
bus_sink: false
|
||||||
bus_source: false
|
bus_source: false
|
||||||
bus_structure: null
|
bus_structure: null
|
||||||
coordinate: [952, 916]
|
coordinate: [1504, 928.0]
|
||||||
rotation: 180
|
rotation: 180
|
||||||
state: disabled
|
state: disabled
|
||||||
- name: ieee802_11_decode_mac_0
|
- name: ieee802_11_decode_mac_0
|
||||||
@@ -494,7 +480,7 @@ blocks:
|
|||||||
bus_sink: false
|
bus_sink: false
|
||||||
bus_source: false
|
bus_source: false
|
||||||
bus_structure: null
|
bus_structure: null
|
||||||
coordinate: [864, 676]
|
coordinate: [1728, 648.0]
|
||||||
rotation: 0
|
rotation: 0
|
||||||
state: enabled
|
state: enabled
|
||||||
- name: ieee802_11_frame_equalizer_0
|
- name: ieee802_11_frame_equalizer_0
|
||||||
@@ -514,7 +500,7 @@ blocks:
|
|||||||
bus_sink: false
|
bus_sink: false
|
||||||
bus_source: false
|
bus_source: false
|
||||||
bus_structure: null
|
bus_structure: null
|
||||||
coordinate: [432, 672]
|
coordinate: [1480, 640.0]
|
||||||
rotation: 0
|
rotation: 0
|
||||||
state: enabled
|
state: enabled
|
||||||
- name: ieee802_11_parse_mac_0
|
- name: ieee802_11_parse_mac_0
|
||||||
@@ -531,7 +517,7 @@ blocks:
|
|||||||
bus_sink: false
|
bus_sink: false
|
||||||
bus_source: false
|
bus_source: false
|
||||||
bus_structure: null
|
bus_structure: null
|
||||||
coordinate: [872, 796.0]
|
coordinate: [1744, 928.0]
|
||||||
rotation: 180
|
rotation: 180
|
||||||
state: enabled
|
state: enabled
|
||||||
- name: ieee802_11_sync_long_0
|
- name: ieee802_11_sync_long_0
|
||||||
@@ -549,7 +535,7 @@ blocks:
|
|||||||
bus_sink: false
|
bus_sink: false
|
||||||
bus_source: false
|
bus_source: false
|
||||||
bus_structure: null
|
bus_structure: null
|
||||||
coordinate: [744, 508.0]
|
coordinate: [800, 736.0]
|
||||||
rotation: 0
|
rotation: 0
|
||||||
state: enabled
|
state: enabled
|
||||||
- name: ieee802_11_sync_short_0
|
- name: ieee802_11_sync_short_0
|
||||||
@@ -568,9 +554,26 @@ blocks:
|
|||||||
bus_sink: false
|
bus_sink: false
|
||||||
bus_source: false
|
bus_source: false
|
||||||
bus_structure: null
|
bus_structure: null
|
||||||
coordinate: [304, 488.0]
|
coordinate: [440.0, 600]
|
||||||
rotation: 0
|
rotation: 270
|
||||||
state: enabled
|
state: enabled
|
||||||
|
- name: pdu_pdu_to_tagged_stream_0
|
||||||
|
id: pdu_pdu_to_tagged_stream
|
||||||
|
parameters:
|
||||||
|
affinity: ''
|
||||||
|
alias: ''
|
||||||
|
comment: ''
|
||||||
|
maxoutbuf: '0'
|
||||||
|
minoutbuf: '0'
|
||||||
|
tag: packet_len
|
||||||
|
type: complex
|
||||||
|
states:
|
||||||
|
bus_sink: false
|
||||||
|
bus_source: false
|
||||||
|
bus_structure: null
|
||||||
|
coordinate: [1472, 832.0]
|
||||||
|
rotation: 180
|
||||||
|
state: true
|
||||||
- name: qtgui_const_sink_x_0
|
- name: qtgui_const_sink_x_0
|
||||||
id: qtgui_const_sink_x
|
id: qtgui_const_sink_x
|
||||||
parameters:
|
parameters:
|
||||||
@@ -660,7 +663,7 @@ blocks:
|
|||||||
bus_sink: false
|
bus_sink: false
|
||||||
bus_source: false
|
bus_source: false
|
||||||
bus_structure: null
|
bus_structure: null
|
||||||
coordinate: [344, 828]
|
coordinate: [1224, 824.0]
|
||||||
rotation: 180
|
rotation: 180
|
||||||
state: enabled
|
state: enabled
|
||||||
- name: qtgui_time_sink_x_0
|
- name: qtgui_time_sink_x_0
|
||||||
@@ -757,8 +760,8 @@ blocks:
|
|||||||
bus_sink: false
|
bus_sink: false
|
||||||
bus_source: false
|
bus_source: false
|
||||||
bus_structure: null
|
bus_structure: null
|
||||||
coordinate: [1164, 520]
|
coordinate: [1048, 544.0]
|
||||||
rotation: 270
|
rotation: 180
|
||||||
state: enabled
|
state: enabled
|
||||||
- name: uhd_usrp_source_0
|
- name: uhd_usrp_source_0
|
||||||
id: uhd_usrp_source
|
id: uhd_usrp_source
|
||||||
@@ -1193,7 +1196,7 @@ blocks:
|
|||||||
bus_sink: false
|
bus_sink: false
|
||||||
bus_source: false
|
bus_source: false
|
||||||
bus_structure: null
|
bus_structure: null
|
||||||
coordinate: [32, 216]
|
coordinate: [64, 216.0]
|
||||||
rotation: 0
|
rotation: 0
|
||||||
state: enabled
|
state: enabled
|
||||||
|
|
||||||
@@ -1210,20 +1213,21 @@ connections:
|
|||||||
- [blocks_moving_average_xx_1, '0', blocks_complex_to_mag_0, '0']
|
- [blocks_moving_average_xx_1, '0', blocks_complex_to_mag_0, '0']
|
||||||
- [blocks_moving_average_xx_1, '0', ieee802_11_sync_short_0, '1']
|
- [blocks_moving_average_xx_1, '0', ieee802_11_sync_short_0, '1']
|
||||||
- [blocks_multiply_xx_0, '0', blocks_moving_average_xx_1, '0']
|
- [blocks_multiply_xx_0, '0', blocks_moving_average_xx_1, '0']
|
||||||
- [blocks_pdu_to_tagged_stream_1, '0', qtgui_const_sink_x_0, '0']
|
|
||||||
- [blocks_stream_to_vector_0, '0', fft_vxx_0, '0']
|
- [blocks_stream_to_vector_0, '0', fft_vxx_0, '0']
|
||||||
- [fft_vxx_0, '0', ieee802_11_frame_equalizer_0, '0']
|
- [fft_vxx_0, '0', ieee802_11_frame_equalizer_0, '0']
|
||||||
- [foo_wireshark_connector_0, '0', blocks_file_sink_0, '0']
|
- [foo_wireshark_connector_0, '0', blocks_file_sink_0, '0']
|
||||||
- [ieee802_11_decode_mac_0, out, foo_wireshark_connector_0, in]
|
- [ieee802_11_decode_mac_0, out, foo_wireshark_connector_0, in]
|
||||||
- [ieee802_11_decode_mac_0, out, ieee802_11_parse_mac_0, in]
|
- [ieee802_11_decode_mac_0, out, ieee802_11_parse_mac_0, in]
|
||||||
- [ieee802_11_frame_equalizer_0, '0', ieee802_11_decode_mac_0, '0']
|
- [ieee802_11_frame_equalizer_0, '0', ieee802_11_decode_mac_0, '0']
|
||||||
- [ieee802_11_frame_equalizer_0, symbols, blocks_pdu_to_tagged_stream_1, pdus]
|
- [ieee802_11_frame_equalizer_0, symbols, pdu_pdu_to_tagged_stream_0, pdus]
|
||||||
- [ieee802_11_sync_long_0, '0', blocks_stream_to_vector_0, '0']
|
- [ieee802_11_sync_long_0, '0', blocks_stream_to_vector_0, '0']
|
||||||
- [ieee802_11_sync_short_0, '0', blocks_delay_0, '0']
|
- [ieee802_11_sync_short_0, '0', blocks_delay_0, '0']
|
||||||
- [ieee802_11_sync_short_0, '0', ieee802_11_sync_long_0, '0']
|
- [ieee802_11_sync_short_0, '0', ieee802_11_sync_long_0, '0']
|
||||||
|
- [pdu_pdu_to_tagged_stream_0, '0', qtgui_const_sink_x_0, '0']
|
||||||
- [uhd_usrp_source_0, '0', blocks_complex_to_mag_squared_0, '0']
|
- [uhd_usrp_source_0, '0', blocks_complex_to_mag_squared_0, '0']
|
||||||
- [uhd_usrp_source_0, '0', blocks_delay_0_0, '0']
|
- [uhd_usrp_source_0, '0', blocks_delay_0_0, '0']
|
||||||
- [uhd_usrp_source_0, '0', blocks_multiply_xx_0, '0']
|
- [uhd_usrp_source_0, '0', blocks_multiply_xx_0, '0']
|
||||||
|
|
||||||
metadata:
|
metadata:
|
||||||
file_format: 1
|
file_format: 1
|
||||||
|
grc_version: 3.10.12.0
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ options:
|
|||||||
sizing_mode: fixed
|
sizing_mode: fixed
|
||||||
thread_safe_setters: ''
|
thread_safe_setters: ''
|
||||||
title: ''
|
title: ''
|
||||||
|
window_size: (1000,1000)
|
||||||
states:
|
states:
|
||||||
bus_sink: false
|
bus_sink: false
|
||||||
bus_source: false
|
bus_source: false
|
||||||
@@ -292,41 +293,6 @@ blocks:
|
|||||||
coordinate: [476.0, 568]
|
coordinate: [476.0, 568]
|
||||||
rotation: 270
|
rotation: 270
|
||||||
state: enabled
|
state: enabled
|
||||||
- name: blocks_pdu_to_tagged_stream_0_0
|
|
||||||
id: blocks_pdu_to_tagged_stream
|
|
||||||
parameters:
|
|
||||||
affinity: ''
|
|
||||||
alias: ''
|
|
||||||
comment: ''
|
|
||||||
maxoutbuf: '0'
|
|
||||||
minoutbuf: '0'
|
|
||||||
tag: packet_len
|
|
||||||
type: complex
|
|
||||||
states:
|
|
||||||
bus_sink: false
|
|
||||||
bus_source: false
|
|
||||||
bus_structure: null
|
|
||||||
coordinate: [124.0, 560]
|
|
||||||
rotation: 270
|
|
||||||
state: enabled
|
|
||||||
- name: blocks_tuntap_pdu_0
|
|
||||||
id: blocks_tuntap_pdu
|
|
||||||
parameters:
|
|
||||||
affinity: ''
|
|
||||||
alias: ''
|
|
||||||
comment: ''
|
|
||||||
ifn: tap0
|
|
||||||
istunflag: 'False'
|
|
||||||
maxoutbuf: '0'
|
|
||||||
minoutbuf: '0'
|
|
||||||
mtu: '440'
|
|
||||||
states:
|
|
||||||
bus_sink: false
|
|
||||||
bus_source: false
|
|
||||||
bus_structure: null
|
|
||||||
coordinate: [616, 157]
|
|
||||||
rotation: 180
|
|
||||||
state: disabled
|
|
||||||
- name: foo_packet_pad2_0
|
- name: foo_packet_pad2_0
|
||||||
id: foo_packet_pad2
|
id: foo_packet_pad2
|
||||||
parameters:
|
parameters:
|
||||||
@@ -415,6 +381,41 @@ blocks:
|
|||||||
coordinate: [264, 340.0]
|
coordinate: [264, 340.0]
|
||||||
rotation: 180
|
rotation: 180
|
||||||
state: enabled
|
state: enabled
|
||||||
|
- name: network_tuntap_pdu_0
|
||||||
|
id: network_tuntap_pdu
|
||||||
|
parameters:
|
||||||
|
affinity: ''
|
||||||
|
alias: ''
|
||||||
|
comment: ''
|
||||||
|
ifn: tap0
|
||||||
|
istunflag: 'False'
|
||||||
|
maxoutbuf: '0'
|
||||||
|
minoutbuf: '0'
|
||||||
|
mtu: '440'
|
||||||
|
states:
|
||||||
|
bus_sink: false
|
||||||
|
bus_source: false
|
||||||
|
bus_structure: null
|
||||||
|
coordinate: [616, 164.0]
|
||||||
|
rotation: 180
|
||||||
|
state: disabled
|
||||||
|
- name: pdu_pdu_to_tagged_stream_0
|
||||||
|
id: pdu_pdu_to_tagged_stream
|
||||||
|
parameters:
|
||||||
|
affinity: ''
|
||||||
|
alias: ''
|
||||||
|
comment: ''
|
||||||
|
maxoutbuf: '0'
|
||||||
|
minoutbuf: '0'
|
||||||
|
tag: packet_len
|
||||||
|
type: complex
|
||||||
|
states:
|
||||||
|
bus_sink: false
|
||||||
|
bus_source: false
|
||||||
|
bus_structure: null
|
||||||
|
coordinate: [124.0, 552]
|
||||||
|
rotation: 270
|
||||||
|
state: true
|
||||||
- name: qtgui_const_sink_x_0
|
- name: qtgui_const_sink_x_0
|
||||||
id: qtgui_const_sink_x
|
id: qtgui_const_sink_x
|
||||||
parameters:
|
parameters:
|
||||||
@@ -1243,16 +1244,16 @@ blocks:
|
|||||||
|
|
||||||
connections:
|
connections:
|
||||||
- [blocks_multiply_const_vxx_0, '0', foo_packet_pad2_0, '0']
|
- [blocks_multiply_const_vxx_0, '0', foo_packet_pad2_0, '0']
|
||||||
- [blocks_pdu_to_tagged_stream_0_0, '0', qtgui_const_sink_x_0, '0']
|
|
||||||
- [blocks_tuntap_pdu_0, pdus, ieee802_11_ether_encap_0, from tap]
|
|
||||||
- [foo_packet_pad2_0, '0', uhd_usrp_sink_0, '0']
|
- [foo_packet_pad2_0, '0', uhd_usrp_sink_0, '0']
|
||||||
- [foo_wireshark_connector_0, '0', blocks_file_sink_0, '0']
|
- [foo_wireshark_connector_0, '0', blocks_file_sink_0, '0']
|
||||||
- [ieee802_11_ether_encap_0, to tap, blocks_tuntap_pdu_0, pdus]
|
- [ieee802_11_ether_encap_0, to tap, network_tuntap_pdu_0, pdus]
|
||||||
- [ieee802_11_ether_encap_0, to wifi, ieee802_11_mac_0, app in]
|
- [ieee802_11_ether_encap_0, to wifi, ieee802_11_mac_0, app in]
|
||||||
- [ieee802_11_mac_0, phy out, wifi_phy_hier_0, mac_in]
|
- [ieee802_11_mac_0, phy out, wifi_phy_hier_0, mac_in]
|
||||||
|
- [network_tuntap_pdu_0, pdus, ieee802_11_ether_encap_0, from tap]
|
||||||
|
- [pdu_pdu_to_tagged_stream_0, '0', qtgui_const_sink_x_0, '0']
|
||||||
- [uhd_usrp_source_0, '0', wifi_phy_hier_0, '0']
|
- [uhd_usrp_source_0, '0', wifi_phy_hier_0, '0']
|
||||||
- [wifi_phy_hier_0, '0', blocks_multiply_const_vxx_0, '0']
|
- [wifi_phy_hier_0, '0', blocks_multiply_const_vxx_0, '0']
|
||||||
- [wifi_phy_hier_0, carrier, blocks_pdu_to_tagged_stream_0_0, pdus]
|
- [wifi_phy_hier_0, carrier, pdu_pdu_to_tagged_stream_0, pdus]
|
||||||
- [wifi_phy_hier_0, mac_out, foo_wireshark_connector_0, in]
|
- [wifi_phy_hier_0, mac_out, foo_wireshark_connector_0, in]
|
||||||
- [wifi_phy_hier_0, mac_out, ieee802_11_ether_encap_0, from wifi]
|
- [wifi_phy_hier_0, mac_out, ieee802_11_ether_encap_0, from wifi]
|
||||||
- [wifi_phy_hier_0, mac_out, ieee802_11_mac_0, phy in]
|
- [wifi_phy_hier_0, mac_out, ieee802_11_mac_0, phy in]
|
||||||
@@ -1260,3 +1261,4 @@ connections:
|
|||||||
|
|
||||||
metadata:
|
metadata:
|
||||||
file_format: 1
|
file_format: 1
|
||||||
|
grc_version: v3.10.2.0-68-g62a7e451
|
||||||
|
|||||||
+23
-21
@@ -23,6 +23,7 @@ options:
|
|||||||
sizing_mode: fixed
|
sizing_mode: fixed
|
||||||
thread_safe_setters: ''
|
thread_safe_setters: ''
|
||||||
title: ''
|
title: ''
|
||||||
|
window_size: (1000,1000)
|
||||||
states:
|
states:
|
||||||
bus_sink: false
|
bus_sink: false
|
||||||
bus_source: false
|
bus_source: false
|
||||||
@@ -294,26 +295,6 @@ blocks:
|
|||||||
coordinate: [240, 396.0]
|
coordinate: [240, 396.0]
|
||||||
rotation: 180
|
rotation: 180
|
||||||
state: enabled
|
state: enabled
|
||||||
- name: blocks_socket_pdu_0
|
|
||||||
id: blocks_socket_pdu
|
|
||||||
parameters:
|
|
||||||
affinity: ''
|
|
||||||
alias: ''
|
|
||||||
comment: ''
|
|
||||||
host: ''
|
|
||||||
maxoutbuf: '0'
|
|
||||||
minoutbuf: '0'
|
|
||||||
mtu: '10000'
|
|
||||||
port: '52001'
|
|
||||||
tcp_no_delay: 'False'
|
|
||||||
type: TCP_SERVER
|
|
||||||
states:
|
|
||||||
bus_sink: false
|
|
||||||
bus_source: false
|
|
||||||
bus_structure: null
|
|
||||||
coordinate: [232, 260.0]
|
|
||||||
rotation: 0
|
|
||||||
state: enabled
|
|
||||||
- name: blocks_vector_source_x_0
|
- name: blocks_vector_source_x_0
|
||||||
id: blocks_vector_source_x
|
id: blocks_vector_source_x
|
||||||
parameters:
|
parameters:
|
||||||
@@ -372,6 +353,26 @@ blocks:
|
|||||||
coordinate: [440, 284]
|
coordinate: [440, 284]
|
||||||
rotation: 0
|
rotation: 0
|
||||||
state: enabled
|
state: enabled
|
||||||
|
- name: network_socket_pdu_0
|
||||||
|
id: network_socket_pdu
|
||||||
|
parameters:
|
||||||
|
affinity: ''
|
||||||
|
alias: ''
|
||||||
|
comment: ''
|
||||||
|
host: ''
|
||||||
|
maxoutbuf: '0'
|
||||||
|
minoutbuf: '0'
|
||||||
|
mtu: '10000'
|
||||||
|
port: '52001'
|
||||||
|
tcp_no_delay: 'False'
|
||||||
|
type: TCP_SERVER
|
||||||
|
states:
|
||||||
|
bus_sink: false
|
||||||
|
bus_source: false
|
||||||
|
bus_structure: null
|
||||||
|
coordinate: [216, 260.0]
|
||||||
|
rotation: 0
|
||||||
|
state: true
|
||||||
- name: osmosdr_sink_0
|
- name: osmosdr_sink_0
|
||||||
id: osmosdr_sink
|
id: osmosdr_sink
|
||||||
parameters:
|
parameters:
|
||||||
@@ -934,12 +935,13 @@ blocks:
|
|||||||
connections:
|
connections:
|
||||||
- [blocks_message_strobe_0_0, strobe, ieee802_11_mac_0, app in]
|
- [blocks_message_strobe_0_0, strobe, ieee802_11_mac_0, app in]
|
||||||
- [blocks_multiply_const_vxx_0, '0', foo_packet_pad2_0, '0']
|
- [blocks_multiply_const_vxx_0, '0', foo_packet_pad2_0, '0']
|
||||||
- [blocks_socket_pdu_0, pdus, ieee802_11_mac_0, app in]
|
|
||||||
- [blocks_vector_source_x_0, '0', wifi_phy_hier_0, '0']
|
- [blocks_vector_source_x_0, '0', wifi_phy_hier_0, '0']
|
||||||
- [foo_packet_pad2_0, '0', osmosdr_sink_0, '0']
|
- [foo_packet_pad2_0, '0', osmosdr_sink_0, '0']
|
||||||
- [foo_packet_pad2_0, '0', uhd_usrp_sink_0, '0']
|
- [foo_packet_pad2_0, '0', uhd_usrp_sink_0, '0']
|
||||||
- [ieee802_11_mac_0, phy out, wifi_phy_hier_0, mac_in]
|
- [ieee802_11_mac_0, phy out, wifi_phy_hier_0, mac_in]
|
||||||
|
- [network_socket_pdu_0, pdus, ieee802_11_mac_0, app in]
|
||||||
- [wifi_phy_hier_0, '0', blocks_multiply_const_vxx_0, '0']
|
- [wifi_phy_hier_0, '0', blocks_multiply_const_vxx_0, '0']
|
||||||
|
|
||||||
metadata:
|
metadata:
|
||||||
file_format: 1
|
file_format: 1
|
||||||
|
grc_version: v3.10.2.0-68-g62a7e451
|
||||||
|
|||||||
+2
-1
@@ -16,5 +16,6 @@ install(FILES
|
|||||||
ieee802_11_mapper.block.yml
|
ieee802_11_mapper.block.yml
|
||||||
ieee802_11_parse_mac.block.yml
|
ieee802_11_parse_mac.block.yml
|
||||||
ieee802_11_sync_long.block.yml
|
ieee802_11_sync_long.block.yml
|
||||||
ieee802_11_sync_short.block.yml DESTINATION share/gnuradio/grc/blocks
|
ieee802_11_sync_short.block.yml
|
||||||
|
ieee802_11_append_crc32.block.yml DESTINATION share/gnuradio/grc/blocks
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
id: ieee802_11_append_crc32
|
||||||
|
label: Append CRC32
|
||||||
|
category: '[IEEE802.11]'
|
||||||
|
|
||||||
|
parameters:
|
||||||
|
- id: append
|
||||||
|
label: Append
|
||||||
|
dtype: bool
|
||||||
|
default: 'True'
|
||||||
|
options: ['True', 'False']
|
||||||
|
option_labels: [Enable, Disable]
|
||||||
|
|
||||||
|
inputs:
|
||||||
|
- domain: message
|
||||||
|
id: in
|
||||||
|
|
||||||
|
outputs:
|
||||||
|
- domain: message
|
||||||
|
id: out
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
templates:
|
||||||
|
imports: import ieee802_11
|
||||||
|
make: ieee802_11.append_crc32(${append})
|
||||||
|
|
||||||
|
file_format: 1
|
||||||
@@ -23,5 +23,5 @@ install(FILES
|
|||||||
signal_field.h
|
signal_field.h
|
||||||
sync_long.h
|
sync_long.h
|
||||||
sync_short.h
|
sync_short.h
|
||||||
DESTINATION include/ieee802_11
|
append_crc32.h DESTINATION include/ieee802_11
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2025 Nicolas Guillaume <nicol@sguillau.me>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#ifndef INCLUDED_IEEE802_11_APPEND_CRC32_H
|
||||||
|
#define INCLUDED_IEEE802_11_APPEND_CRC32_H
|
||||||
|
|
||||||
|
#include <gnuradio/block.h>
|
||||||
|
#include <ieee802_11/api.h>
|
||||||
|
|
||||||
|
namespace gr {
|
||||||
|
namespace ieee802_11 {
|
||||||
|
|
||||||
|
class IEEE802_11_API append_crc32 : virtual public block
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
typedef std::shared_ptr<append_crc32> sptr;
|
||||||
|
static sptr make(bool append = true);
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -17,6 +17,7 @@
|
|||||||
#ifndef INCLUDED_IEEE802_11_MAPPER_H
|
#ifndef INCLUDED_IEEE802_11_MAPPER_H
|
||||||
#define INCLUDED_IEEE802_11_MAPPER_H
|
#define INCLUDED_IEEE802_11_MAPPER_H
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
#include <gnuradio/block.h>
|
#include <gnuradio/block.h>
|
||||||
#include <ieee802_11/api.h>
|
#include <ieee802_11/api.h>
|
||||||
|
|
||||||
@@ -34,6 +35,11 @@ enum Encoding {
|
|||||||
QAM64_3_4 = 7,
|
QAM64_3_4 = 7,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Required for fmt 10
|
||||||
|
inline uint8_t format_as(Encoding e) {
|
||||||
|
return static_cast<uint8_t>(e);
|
||||||
|
}
|
||||||
|
|
||||||
class IEEE802_11_API mapper : virtual public block
|
class IEEE802_11_API mapper : virtual public block
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|||||||
+2
-1
@@ -33,13 +33,14 @@ list(APPEND ieee802_11_sources
|
|||||||
extract_csi_impl.cc
|
extract_csi_impl.cc
|
||||||
frame_equalizer_impl.cc
|
frame_equalizer_impl.cc
|
||||||
mac.cc
|
mac.cc
|
||||||
mapper.cc
|
mapper_impl.cc
|
||||||
parse_mac.cc
|
parse_mac.cc
|
||||||
signal_field_impl.cc
|
signal_field_impl.cc
|
||||||
sync_long.cc
|
sync_long.cc
|
||||||
sync_short.cc
|
sync_short.cc
|
||||||
utils.cc
|
utils.cc
|
||||||
viterbi_decoder/base.cc
|
viterbi_decoder/base.cc
|
||||||
|
append_crc32_impl.cc
|
||||||
)
|
)
|
||||||
|
|
||||||
# use SSE2 optimized viterbi implementation if SSE2 is enabled
|
# use SSE2 optimized viterbi implementation if SSE2 is enabled
|
||||||
|
|||||||
@@ -0,0 +1,88 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2025 Nicolas Guillaume <nicol@sguillau.me>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include "append_crc32_impl.h"
|
||||||
|
|
||||||
|
#include <gnuradio/block_detail.h>
|
||||||
|
#include <gnuradio/io_signature.h>
|
||||||
|
|
||||||
|
#include <boost/bind/bind.hpp>
|
||||||
|
#include <boost/crc.hpp>
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
#include <cstring>
|
||||||
|
#include <limits>
|
||||||
|
#include <stdexcept>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
using namespace gr::ieee802_11;
|
||||||
|
|
||||||
|
append_crc32::sptr append_crc32::make(bool append)
|
||||||
|
{
|
||||||
|
return gnuradio::get_initial_sptr(new append_crc32_impl(append));
|
||||||
|
}
|
||||||
|
|
||||||
|
append_crc32_impl::append_crc32_impl(bool append)
|
||||||
|
: block("append_crc32",
|
||||||
|
gr::io_signature::make(0, 0, 0),
|
||||||
|
gr::io_signature::make(0, 0, 0)),
|
||||||
|
d_append(append)
|
||||||
|
{
|
||||||
|
message_port_register_in(pmt::mp("in"));
|
||||||
|
set_msg_handler(pmt::mp("in"), boost::bind(&append_crc32_impl::handle, this, boost::placeholders::_1));
|
||||||
|
message_port_register_out(pmt::mp("out"));
|
||||||
|
}
|
||||||
|
|
||||||
|
void append_crc32_impl::handle(pmt::pmt_t msg)
|
||||||
|
{
|
||||||
|
if(pmt::is_eof_object(msg))
|
||||||
|
{
|
||||||
|
detail().get()->set_done(true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!pmt::is_pair(msg))
|
||||||
|
throw std::invalid_argument("append_crc32 expects PDU pair");
|
||||||
|
|
||||||
|
pmt::pmt_t meta = pmt::car(msg);
|
||||||
|
pmt::pmt_t blob = pmt::cdr(msg);
|
||||||
|
|
||||||
|
if(!pmt::is_blob(blob))
|
||||||
|
throw std::invalid_argument("append_crc32 expects blob payload");
|
||||||
|
|
||||||
|
if(!d_append)
|
||||||
|
{
|
||||||
|
message_port_pub(pmt::mp("out"), pmt::cons(meta, blob));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
size_t len = pmt::blob_length(blob);
|
||||||
|
const uint8_t* data = reinterpret_cast<const uint8_t*>(pmt::blob_data(blob));
|
||||||
|
|
||||||
|
boost::crc_32_type result;
|
||||||
|
result.process_bytes(data, len);
|
||||||
|
uint32_t crc = result.checksum();
|
||||||
|
|
||||||
|
if(len > std::numeric_limits<size_t>::max() - sizeof(uint32_t))
|
||||||
|
throw std::length_error("append_crc32 payload too large");
|
||||||
|
|
||||||
|
std::vector<uint8_t> out(len + sizeof(uint32_t));
|
||||||
|
std::memcpy(out.data(), data, len);
|
||||||
|
std::memcpy(out.data() + len, &crc, sizeof(uint32_t));
|
||||||
|
|
||||||
|
pmt::pmt_t out_blob = pmt::make_blob(out.data(), out.size());
|
||||||
|
message_port_pub(pmt::mp("out"), pmt::cons(meta, out_blob));
|
||||||
|
}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2025 Nicolas Guillaume <nicol@sguillau.me>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#ifndef INCLUDED_IEEE802_11_APPEND_CRC32_IMPL_H
|
||||||
|
#define INCLUDED_IEEE802_11_APPEND_CRC32_IMPL_H
|
||||||
|
|
||||||
|
#include <ieee802_11/append_crc32.h>
|
||||||
|
#include <pmt/pmt.h>
|
||||||
|
|
||||||
|
namespace gr {
|
||||||
|
namespace ieee802_11 {
|
||||||
|
|
||||||
|
class append_crc32_impl : public append_crc32
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
append_crc32_impl(bool append);
|
||||||
|
|
||||||
|
private:
|
||||||
|
void handle(pmt::pmt_t msg);
|
||||||
|
|
||||||
|
bool d_append;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
+6
-5
@@ -21,7 +21,6 @@
|
|||||||
|
|
||||||
#include <gnuradio/io_signature.h>
|
#include <gnuradio/io_signature.h>
|
||||||
#include <boost/crc.hpp>
|
#include <boost/crc.hpp>
|
||||||
#include <boost/format.hpp>
|
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
|
|
||||||
using namespace gr::ieee802_11;
|
using namespace gr::ieee802_11;
|
||||||
@@ -147,8 +146,10 @@ public:
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
mylog(boost::format("encoding: %1% - length: %2% - symbols: %3%") %
|
mylog("encoding: {} - length: {} - symbols: {}",
|
||||||
d_ofdm.encoding % d_frame.psdu_size % d_frame.n_sym);
|
d_ofdm.encoding,
|
||||||
|
d_frame.psdu_size,
|
||||||
|
d_frame.n_sym);
|
||||||
|
|
||||||
// create PDU
|
// create PDU
|
||||||
pmt::pmt_t blob = pmt::make_blob(out_bytes + 2, d_frame.psdu_size - 4);
|
pmt::pmt_t blob = pmt::make_blob(out_bytes + 2, d_frame.psdu_size - 4);
|
||||||
@@ -162,8 +163,8 @@ public:
|
|||||||
{
|
{
|
||||||
|
|
||||||
int n_cbps = d_ofdm.n_cbps;
|
int n_cbps = d_ofdm.n_cbps;
|
||||||
int first[n_cbps];
|
int first[MAX_BITS_PER_SYM];
|
||||||
int second[n_cbps];
|
int second[MAX_BITS_PER_SYM];
|
||||||
int s = std::max(d_ofdm.n_bpsc / 2, 1);
|
int s = std::max(d_ofdm.n_bpsc / 2, 1);
|
||||||
|
|
||||||
for (int j = 0; j < n_cbps; j++) {
|
for (int j = 0; j < n_cbps; j++) {
|
||||||
|
|||||||
+43
-31
@@ -19,7 +19,9 @@
|
|||||||
|
|
||||||
#include <gnuradio/block_detail.h>
|
#include <gnuradio/block_detail.h>
|
||||||
#include <gnuradio/io_signature.h>
|
#include <gnuradio/io_signature.h>
|
||||||
|
#include <cstring>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
using namespace gr::ieee802_11;
|
using namespace gr::ieee802_11;
|
||||||
|
|
||||||
@@ -49,7 +51,12 @@ void ether_encap_impl::from_wifi(pmt::pmt_t msg)
|
|||||||
|
|
||||||
msg = pmt::cdr(msg);
|
msg = pmt::cdr(msg);
|
||||||
|
|
||||||
int data_len = pmt::blob_length(msg);
|
const size_t data_len = pmt::blob_length(msg);
|
||||||
|
if (data_len < sizeof(mac_header)) {
|
||||||
|
dout << "Ether Encap: frame too short to parse" << std::endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const mac_header* mhdr = reinterpret_cast<const mac_header*>(pmt::blob_data(msg));
|
const mac_header* mhdr = reinterpret_cast<const mac_header*>(pmt::blob_data(msg));
|
||||||
|
|
||||||
if (d_last_seq == mhdr->seq_nr) {
|
if (d_last_seq == mhdr->seq_nr) {
|
||||||
@@ -59,48 +66,53 @@ void ether_encap_impl::from_wifi(pmt::pmt_t msg)
|
|||||||
|
|
||||||
d_last_seq = mhdr->seq_nr;
|
d_last_seq = mhdr->seq_nr;
|
||||||
|
|
||||||
|
|
||||||
if (data_len < 33) {
|
|
||||||
dout << "Ether Encap: frame too short to parse (<33)" << std::endl;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// this is more than needed
|
|
||||||
char* buf = static_cast<char*>(std::malloc(data_len + sizeof(ethernet_header)));
|
|
||||||
ethernet_header* ehdr = reinterpret_cast<ethernet_header*>(buf);
|
|
||||||
|
|
||||||
if (((mhdr->frame_control >> 2) & 3) != 2) {
|
if (((mhdr->frame_control >> 2) & 3) != 2) {
|
||||||
dout << "this is not a data frame -- ignoring" << std::endl;
|
dout << "this is not a data frame -- ignoring" << std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::memcpy(ehdr->dest, mhdr->addr1, 6);
|
size_t payload_offset;
|
||||||
std::memcpy(ehdr->src, mhdr->addr2, 6);
|
|
||||||
ehdr->type = 0x0008;
|
|
||||||
|
|
||||||
char* frame = (char*)pmt::blob_data(msg);
|
|
||||||
|
|
||||||
// DATA
|
// DATA
|
||||||
if ((((mhdr->frame_control) >> 2) & 63) == 2) {
|
if ((((mhdr->frame_control) >> 2) & 63) == 2) {
|
||||||
memcpy(buf + sizeof(ethernet_header), frame + 32, data_len - 32);
|
payload_offset = 32;
|
||||||
pmt::pmt_t payload = pmt::make_blob(buf, data_len - 32 + 14);
|
|
||||||
message_port_pub(pmt::mp("to tap"), pmt::cons(pmt::PMT_NIL, payload));
|
|
||||||
|
|
||||||
// QoS Data
|
// QoS Data
|
||||||
} else if ((((mhdr->frame_control) >> 2) & 63) == 34) {
|
} else if ((((mhdr->frame_control) >> 2) & 63) == 34) {
|
||||||
|
payload_offset = 34;
|
||||||
memcpy(buf + sizeof(ethernet_header), frame + 34, data_len - 34);
|
} else {
|
||||||
pmt::pmt_t payload = pmt::make_blob(buf, data_len - 34 + 14);
|
return;
|
||||||
message_port_pub(pmt::mp("to tap"), pmt::cons(pmt::PMT_NIL, payload));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
free(buf);
|
if (data_len < payload_offset) {
|
||||||
|
dout << "Ether Encap: data frame too short to decapsulate" << std::endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const char* frame = static_cast<const char*>(pmt::blob_data(msg));
|
||||||
|
const size_t copy_len = data_len - payload_offset;
|
||||||
|
std::vector<char> buf(sizeof(ethernet_header) + copy_len);
|
||||||
|
ethernet_header* ehdr = reinterpret_cast<ethernet_header*>(buf.data());
|
||||||
|
|
||||||
|
std::memcpy(ehdr->dest, mhdr->addr1, 6);
|
||||||
|
std::memcpy(ehdr->src, mhdr->addr2, 6);
|
||||||
|
ehdr->type = 0x0008;
|
||||||
|
std::memcpy(buf.data() + sizeof(ethernet_header), frame + payload_offset, copy_len);
|
||||||
|
|
||||||
|
pmt::pmt_t payload = pmt::make_blob(buf.data(), buf.size());
|
||||||
|
message_port_pub(pmt::mp("to tap"), pmt::cons(pmt::PMT_NIL, payload));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ether_encap_impl::from_tap(pmt::pmt_t msg)
|
void ether_encap_impl::from_tap(pmt::pmt_t msg)
|
||||||
{
|
{
|
||||||
size_t len = pmt::blob_length(pmt::cdr(msg));
|
pmt::pmt_t blob = pmt::cdr(msg);
|
||||||
const char* data = static_cast<const char*>(pmt::blob_data(pmt::cdr(msg)));
|
size_t len = pmt::blob_length(blob);
|
||||||
|
const char* data = static_cast<const char*>(pmt::blob_data(blob));
|
||||||
|
|
||||||
|
if (len < sizeof(ethernet_header)) {
|
||||||
|
dout << "Ether Encap: Ethernet frame too short to parse" << std::endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const ethernet_header* ehdr = reinterpret_cast<const ethernet_header*>(data);
|
const ethernet_header* ehdr = reinterpret_cast<const ethernet_header*>(data);
|
||||||
|
|
||||||
@@ -108,7 +120,8 @@ void ether_encap_impl::from_tap(pmt::pmt_t msg)
|
|||||||
case 0x0008: {
|
case 0x0008: {
|
||||||
std::cout << "ether type: IP" << std::endl;
|
std::cout << "ether type: IP" << std::endl;
|
||||||
|
|
||||||
char* buf = static_cast<char*>(malloc(len + 8 - sizeof(ethernet_header)));
|
const size_t payload_len = len - sizeof(ethernet_header);
|
||||||
|
std::vector<char> buf(8 + payload_len);
|
||||||
buf[0] = 0xaa;
|
buf[0] = 0xaa;
|
||||||
buf[1] = 0xaa;
|
buf[1] = 0xaa;
|
||||||
buf[2] = 0x03;
|
buf[2] = 0x03;
|
||||||
@@ -117,10 +130,9 @@ void ether_encap_impl::from_tap(pmt::pmt_t msg)
|
|||||||
buf[5] = 0x00;
|
buf[5] = 0x00;
|
||||||
buf[6] = 0x08;
|
buf[6] = 0x08;
|
||||||
buf[7] = 0x00;
|
buf[7] = 0x00;
|
||||||
std::memcpy(
|
std::memcpy(buf.data() + 8, data + sizeof(ethernet_header), payload_len);
|
||||||
buf + 8, data + sizeof(ethernet_header), len - sizeof(ethernet_header));
|
pmt::pmt_t out_blob = pmt::make_blob(buf.data(), buf.size());
|
||||||
pmt::pmt_t blob = pmt::make_blob(buf, len + 8 - sizeof(ethernet_header));
|
message_port_pub(pmt::mp("to wifi"), pmt::cons(pmt::PMT_NIL, out_blob));
|
||||||
message_port_pub(pmt::mp("to wifi"), pmt::cons(pmt::PMT_NIL, blob));
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 0x0608:
|
case 0x0608:
|
||||||
|
|||||||
@@ -22,11 +22,13 @@
|
|||||||
namespace gr {
|
namespace gr {
|
||||||
namespace ieee802_11 {
|
namespace ieee802_11 {
|
||||||
|
|
||||||
|
#pragma pack(push, 1)
|
||||||
struct ethernet_header {
|
struct ethernet_header {
|
||||||
uint8_t dest[6];
|
uint8_t dest[6];
|
||||||
uint8_t src[6];
|
uint8_t src[6];
|
||||||
uint16_t type;
|
uint16_t type;
|
||||||
} __attribute__((packed));
|
};
|
||||||
|
#pragma pack(pop)
|
||||||
|
|
||||||
class ether_encap_impl : public ether_encap
|
class ether_encap_impl : public ether_encap
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -23,7 +23,6 @@
|
|||||||
#include "frame_equalizer_impl.h"
|
#include "frame_equalizer_impl.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
#include <gnuradio/io_signature.h>
|
#include <gnuradio/io_signature.h>
|
||||||
#include <boost/format.hpp>
|
|
||||||
|
|
||||||
namespace gr {
|
namespace gr {
|
||||||
namespace ieee802_11 {
|
namespace ieee802_11 {
|
||||||
@@ -360,8 +359,10 @@ bool frame_equalizer_impl::parse_signal(uint8_t* decoded_bits)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
mylog(boost::format("encoding: %1% - length: %2% - symbols: %3%") % d_frame_encoding %
|
mylog("encoding: {} - length: {} - symbols: {}",
|
||||||
d_frame_bytes % d_frame_symbols);
|
d_frame_encoding,
|
||||||
|
d_frame_bytes,
|
||||||
|
d_frame_symbols);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,8 @@
|
|||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
#include <architecture/byte_order.h>
|
#include <architecture/byte_order.h>
|
||||||
#define htole16(x) OSSwapHostToLittleInt16(x)
|
#define htole16(x) OSSwapHostToLittleInt16(x)
|
||||||
|
#elif defined(_WIN32)
|
||||||
|
#define htole16(x) (x)
|
||||||
#else
|
#else
|
||||||
#include <endian.h>
|
#include <endian.h>
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+7
-4
@@ -21,7 +21,6 @@
|
|||||||
#include <gnuradio/io_signature.h>
|
#include <gnuradio/io_signature.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <boost/format.hpp>
|
|
||||||
|
|
||||||
using namespace gr::ieee802_11;
|
using namespace gr::ieee802_11;
|
||||||
|
|
||||||
@@ -64,7 +63,7 @@ public:
|
|||||||
int frame_len = pmt::blob_length(d_msg);
|
int frame_len = pmt::blob_length(d_msg);
|
||||||
mac_header* h = (mac_header*)pmt::blob_data(d_msg);
|
mac_header* h = (mac_header*)pmt::blob_data(d_msg);
|
||||||
|
|
||||||
mylog(boost::format("length: %1%") % frame_len);
|
mylog("length: {}",frame_len);
|
||||||
|
|
||||||
dout << std::endl << "new mac frame (length " << frame_len << ")" << std::endl;
|
dout << std::endl << "new mac frame (length " << frame_len << ")" << std::endl;
|
||||||
dout << "=========================================" << std::endl;
|
dout << "=========================================" << std::endl;
|
||||||
@@ -110,10 +109,14 @@ public:
|
|||||||
|
|
||||||
// DATA
|
// DATA
|
||||||
if ((((h->frame_control) >> 2) & 63) == 2) {
|
if ((((h->frame_control) >> 2) & 63) == 2) {
|
||||||
print_ascii(frame + 24, frame_len - 24);
|
if (frame_len >= 24) {
|
||||||
|
print_ascii(frame + 24, frame_len - 24);
|
||||||
|
}
|
||||||
// QoS Data
|
// QoS Data
|
||||||
} else if ((((h->frame_control) >> 2) & 63) == 34) {
|
} else if ((((h->frame_control) >> 2) & 63) == 34) {
|
||||||
print_ascii(frame + 26, frame_len - 26);
|
if (frame_len >= 26) {
|
||||||
|
print_ascii(frame + 26, frame_len - 26);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
message_port_pub(pmt::mp("out"), pmt::cons(d_meta, d_msg));
|
message_port_pub(pmt::mp("out"), pmt::cons(d_meta, d_msg));
|
||||||
|
|||||||
+1
-2
@@ -23,7 +23,6 @@
|
|||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <tuple>
|
#include <tuple>
|
||||||
#include <boost/format.hpp>
|
|
||||||
|
|
||||||
using namespace gr::ieee802_11;
|
using namespace gr::ieee802_11;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
@@ -113,7 +112,7 @@ public:
|
|||||||
|
|
||||||
if (d_offset == SYNC_LENGTH) {
|
if (d_offset == SYNC_LENGTH) {
|
||||||
search_frame_start();
|
search_frame_start();
|
||||||
mylog(boost::format("LONG: frame start at %1%") % d_frame_start);
|
mylog("LONG: frame start at {}",d_frame_start);
|
||||||
d_offset = 0;
|
d_offset = 0;
|
||||||
d_count = 0;
|
d_count = 0;
|
||||||
d_state = COPY;
|
d_state = COPY;
|
||||||
|
|||||||
+1
-2
@@ -19,7 +19,6 @@
|
|||||||
#include <ieee802_11/sync_short.h>
|
#include <ieee802_11/sync_short.h>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <boost/format.hpp>
|
|
||||||
|
|
||||||
using namespace gr::ieee802_11;
|
using namespace gr::ieee802_11;
|
||||||
|
|
||||||
@@ -139,7 +138,7 @@ public:
|
|||||||
|
|
||||||
void insert_tag(uint64_t item, double freq_offset, uint64_t input_item)
|
void insert_tag(uint64_t item, double freq_offset, uint64_t input_item)
|
||||||
{
|
{
|
||||||
mylog(boost::format("frame start at in: %2% out: %1%") % item % input_item);
|
mylog("frame start at in: {} out: {}", item, input_item);
|
||||||
|
|
||||||
const pmt::pmt_t key = pmt::string_to_symbol("wifi_start");
|
const pmt::pmt_t key = pmt::string_to_symbol("wifi_start");
|
||||||
const pmt::pmt_t value = pmt::from_double(freq_offset);
|
const pmt::pmt_t value = pmt::from_double(freq_offset);
|
||||||
|
|||||||
+4
-4
@@ -89,7 +89,7 @@ ofdm_param::ofdm_param(Encoding e)
|
|||||||
n_dbps = 216;
|
n_dbps = 216;
|
||||||
rate_field = 0x03; // 0b00000011
|
rate_field = 0x03; // 0b00000011
|
||||||
break;
|
break;
|
||||||
defaut:
|
default:
|
||||||
assert(false);
|
assert(false);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -211,7 +211,7 @@ void puncturing(const char* in, char* out, frame_param& frame, ofdm_param& ofdm)
|
|||||||
out++;
|
out++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
defaut:
|
default:
|
||||||
assert(false);
|
assert(false);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -224,8 +224,8 @@ void interleave(
|
|||||||
{
|
{
|
||||||
|
|
||||||
int n_cbps = ofdm.n_cbps;
|
int n_cbps = ofdm.n_cbps;
|
||||||
int first[n_cbps];
|
int first[MAX_BITS_PER_SYM];
|
||||||
int second[n_cbps];
|
int second[MAX_BITS_PER_SYM];
|
||||||
int s = std::max(ofdm.n_bpsc / 2, 1);
|
int s = std::max(ofdm.n_bpsc / 2, 1);
|
||||||
|
|
||||||
for (int j = 0; j < n_cbps; j++) {
|
for (int j = 0; j < n_cbps; j++) {
|
||||||
|
|||||||
+7
-4
@@ -28,16 +28,18 @@ using gr::ieee802_11::Encoding;
|
|||||||
#define MAX_PAYLOAD_SIZE 1500
|
#define MAX_PAYLOAD_SIZE 1500
|
||||||
#define MAX_PSDU_SIZE (MAX_PAYLOAD_SIZE + 28) // MAC, CRC
|
#define MAX_PSDU_SIZE (MAX_PAYLOAD_SIZE + 28) // MAC, CRC
|
||||||
#define MAX_SYM (((16 + 8 * MAX_PSDU_SIZE + 6) / 24) + 1)
|
#define MAX_SYM (((16 + 8 * MAX_PSDU_SIZE + 6) / 24) + 1)
|
||||||
#define MAX_ENCODED_BITS ((16 + 8 * MAX_PSDU_SIZE + 6) * 2 + 288)
|
#define MAX_BITS_PER_SYM 288
|
||||||
|
#define MAX_ENCODED_BITS ((16 + 8 * MAX_PSDU_SIZE + 6) * 2 + MAX_BITS_PER_SYM)
|
||||||
|
|
||||||
#define dout d_debug&& std::cout
|
#define dout d_debug&& std::cout
|
||||||
#define mylog(msg) \
|
#define mylog(...) \
|
||||||
do { \
|
do { \
|
||||||
if (d_log) { \
|
if (d_log) { \
|
||||||
GR_LOG_INFO(d_logger, msg); \
|
d_logger->info(__VA_ARGS__); \
|
||||||
} \
|
} \
|
||||||
} while (0);
|
} while (0);
|
||||||
|
|
||||||
|
#pragma pack(push, 1)
|
||||||
struct mac_header {
|
struct mac_header {
|
||||||
// protocol version, type, subtype, to_ds, from_ds, ...
|
// protocol version, type, subtype, to_ds, from_ds, ...
|
||||||
uint16_t frame_control;
|
uint16_t frame_control;
|
||||||
@@ -46,7 +48,8 @@ struct mac_header {
|
|||||||
uint8_t addr2[6];
|
uint8_t addr2[6];
|
||||||
uint8_t addr3[6];
|
uint8_t addr3[6];
|
||||||
uint16_t seq_nr;
|
uint16_t seq_nr;
|
||||||
} __attribute__((packed));
|
};
|
||||||
|
#pragma pack(pop)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* WIFI parameters
|
* WIFI parameters
|
||||||
|
|||||||
@@ -41,9 +41,9 @@ protected:
|
|||||||
// Position in circular buffer where the current decoded byte is stored
|
// Position in circular buffer where the current decoded byte is stored
|
||||||
int d_store_pos;
|
int d_store_pos;
|
||||||
// Metrics for each state
|
// Metrics for each state
|
||||||
unsigned char d_mmresult[64] __attribute__((aligned(16)));
|
alignas(16) unsigned char d_mmresult[64];
|
||||||
// Paths for each state
|
// Paths for each state
|
||||||
unsigned char d_ppresult[TRACEBACK_MAX][64] __attribute__((aligned(16)));
|
alignas(16) unsigned char d_ppresult[TRACEBACK_MAX][64];
|
||||||
|
|
||||||
int d_ntraceback;
|
int d_ntraceback;
|
||||||
int d_k;
|
int d_k;
|
||||||
|
|||||||
@@ -414,7 +414,7 @@ void viterbi_decoder::viterbi_chunks_init_generic()
|
|||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
|
|
||||||
for (i = 0; i < 4; i++) {
|
for (i = 0; i < 64; i++) {
|
||||||
d_metric0_generic[i] = 0;
|
d_metric0_generic[i] = 0;
|
||||||
d_path0_generic[i] = 0;
|
d_path0_generic[i] = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,10 +37,10 @@ private:
|
|||||||
unsigned char c[32];
|
unsigned char c[32];
|
||||||
} d_branchtab27_generic[2];
|
} d_branchtab27_generic[2];
|
||||||
|
|
||||||
unsigned char d_metric0_generic[64] __attribute__((aligned(16)));
|
alignas(16) unsigned char d_metric0_generic[64];
|
||||||
unsigned char d_metric1_generic[64] __attribute__((aligned(16)));
|
alignas(16) unsigned char d_metric1_generic[64];
|
||||||
unsigned char d_path0_generic[64] __attribute__((aligned(16)));
|
alignas(16) unsigned char d_path0_generic[64];
|
||||||
unsigned char d_path1_generic[64] __attribute__((aligned(16)));
|
alignas(16) unsigned char d_path1_generic[64];
|
||||||
|
|
||||||
void reset();
|
void reset();
|
||||||
|
|
||||||
|
|||||||
@@ -39,10 +39,10 @@ private:
|
|||||||
__m128i v[2];
|
__m128i v[2];
|
||||||
} d_branchtab27_sse2[2];
|
} d_branchtab27_sse2[2];
|
||||||
|
|
||||||
__m128i d_metric0[4] __attribute__((aligned(16)));
|
alignas(16) __m128i d_metric0[4];
|
||||||
__m128i d_metric1[4] __attribute__((aligned(16)));
|
alignas(16) __m128i d_metric1[4];
|
||||||
__m128i d_path0[4] __attribute__((aligned(16)));
|
alignas(16) __m128i d_path0[4];
|
||||||
__m128i d_path1[4] __attribute__((aligned(16)));
|
alignas(16) __m128i d_path1[4];
|
||||||
|
|
||||||
virtual void reset();
|
virtual void reset();
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ list(APPEND ieee802_11_python_files
|
|||||||
signal_field_python.cc
|
signal_field_python.cc
|
||||||
sync_long_python.cc
|
sync_long_python.cc
|
||||||
sync_short_python.cc
|
sync_short_python.cc
|
||||||
python_bindings.cc)
|
append_crc32_python.cc python_bindings.cc)
|
||||||
|
|
||||||
GR_PYBIND_MAKE_OOT(ieee802_11
|
GR_PYBIND_MAKE_OOT(ieee802_11
|
||||||
../..
|
../..
|
||||||
|
|||||||
@@ -0,0 +1,45 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2026 Free Software Foundation, Inc.
|
||||||
|
*
|
||||||
|
* This file is part of GNU Radio
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/***********************************************************************************/
|
||||||
|
/* This file is automatically generated using bindtool and can be manually edited */
|
||||||
|
/* The following lines can be configured to regenerate this file during cmake */
|
||||||
|
/* If manual edits are made, the following tags should be modified accordingly. */
|
||||||
|
/* BINDTOOL_GEN_AUTOMATIC(1) */
|
||||||
|
/* BINDTOOL_USE_PYGCCXML(0) */
|
||||||
|
/* BINDTOOL_HEADER_FILE(append_crc32.h) */
|
||||||
|
/* BINDTOOL_HEADER_FILE_HASH(cf84ad555605be942f0589bb5b9b5737) */
|
||||||
|
/***********************************************************************************/
|
||||||
|
|
||||||
|
#include <pybind11/complex.h>
|
||||||
|
#include <pybind11/pybind11.h>
|
||||||
|
#include <pybind11/stl.h>
|
||||||
|
|
||||||
|
namespace py = pybind11;
|
||||||
|
|
||||||
|
#include <ieee802_11/append_crc32.h>
|
||||||
|
// pydoc.h is automatically generated in the build directory
|
||||||
|
#include <append_crc32_pydoc.h>
|
||||||
|
|
||||||
|
void bind_append_crc32(py::module& m)
|
||||||
|
{
|
||||||
|
|
||||||
|
using append_crc32 = ::gr::ieee802_11::append_crc32;
|
||||||
|
|
||||||
|
|
||||||
|
py::class_<append_crc32, gr::block, gr::basic_block, std::shared_ptr<append_crc32>>(
|
||||||
|
m, "append_crc32", D(append_crc32))
|
||||||
|
|
||||||
|
.def(py::init(&append_crc32::make),
|
||||||
|
py::arg("append") = true,
|
||||||
|
D(append_crc32, make))
|
||||||
|
|
||||||
|
|
||||||
|
;
|
||||||
|
}
|
||||||
@@ -37,7 +37,7 @@ args = parser.parse_args()
|
|||||||
|
|
||||||
prefix = args.prefix
|
prefix = args.prefix
|
||||||
output_dir = args.output_dir
|
output_dir = args.output_dir
|
||||||
defines = tuple(','.join(args.defines).split(','))
|
defines = tuple([d for d in ','.join(args.defines).split(',') if d])
|
||||||
includes = ','.join(args.include)
|
includes = ','.join(args.include)
|
||||||
name = args.module
|
name = args.module
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2026 Free Software Foundation, Inc.
|
||||||
|
*
|
||||||
|
* This file is part of GNU Radio
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#include "pydoc_macros.h"
|
||||||
|
#define D(...) DOC(gr, ieee802_11, __VA_ARGS__)
|
||||||
|
/*
|
||||||
|
This file contains placeholders for docstrings for the Python bindings.
|
||||||
|
Do not edit! These were automatically extracted during the binding process
|
||||||
|
and will be overwritten during the build process
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
static const char* __doc_gr_ieee802_11_append_crc32 = R"doc()doc";
|
||||||
|
|
||||||
|
|
||||||
|
static const char* __doc_gr_ieee802_11_append_crc32_append_crc32_0 = R"doc()doc";
|
||||||
|
|
||||||
|
|
||||||
|
static const char* __doc_gr_ieee802_11_append_crc32_make = R"doc()doc";
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
/* BINDTOOL_GEN_AUTOMATIC(0) */
|
/* BINDTOOL_GEN_AUTOMATIC(0) */
|
||||||
/* BINDTOOL_USE_PYGCCXML(0) */
|
/* BINDTOOL_USE_PYGCCXML(0) */
|
||||||
/* BINDTOOL_HEADER_FILE(mapper.h) */
|
/* BINDTOOL_HEADER_FILE(mapper.h) */
|
||||||
/* BINDTOOL_HEADER_FILE_HASH(58c66a6e35e1e775b96dcb8f7b38b293) */
|
/* BINDTOOL_HEADER_FILE_HASH(71fee88c2602a7b34f8996a1ff163569) */
|
||||||
/***********************************************************************************/
|
/***********************************************************************************/
|
||||||
|
|
||||||
#include <pybind11/complex.h>
|
#include <pybind11/complex.h>
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ void bind_parse_mac(py::module& m);
|
|||||||
void bind_signal_field(py::module& m);
|
void bind_signal_field(py::module& m);
|
||||||
void bind_sync_long(py::module& m);
|
void bind_sync_long(py::module& m);
|
||||||
void bind_sync_short(py::module& m);
|
void bind_sync_short(py::module& m);
|
||||||
|
void bind_append_crc32(py::module& m);
|
||||||
// ) END BINDING_FUNCTION_PROTOTYPES
|
// ) END BINDING_FUNCTION_PROTOTYPES
|
||||||
|
|
||||||
|
|
||||||
@@ -74,5 +75,6 @@ PYBIND11_MODULE(ieee802_11_python, m)
|
|||||||
bind_signal_field(m);
|
bind_signal_field(m);
|
||||||
bind_sync_long(m);
|
bind_sync_long(m);
|
||||||
bind_sync_short(m);
|
bind_sync_short(m);
|
||||||
|
bind_append_crc32(m);
|
||||||
// ) END BINDING_FUNCTION_CALLS
|
// ) END BINDING_FUNCTION_CALLS
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user