Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wfb-ng: Add wfb-ng package #24974

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

wfb-ng: Add wfb-ng package #24974

wants to merge 5 commits into from

Conversation

svpcom
Copy link

@svpcom svpcom commented Sep 15, 2024

Maintainer: me
Compile tested: (MIPS 74Kc, TP-Link CPE510, openwrt-23.05)
Run tested: (MIPS 74Kc, TP-Link CPE510, tests done)

Description:
WFB-ng is long-range packet radio link based on raw WiFi radio.

Adding it to openwrt base packages will help a lot of it users to use cheap wifi routers (supporting minitoring mode) instead of build custom hardware yourself.

net/wfb-ng/Makefile Outdated Show resolved Hide resolved
net/wfb-ng/Makefile Outdated Show resolved Hide resolved
@zpc0
Copy link
Contributor

zpc0 commented Sep 15, 2024

It seems PKG_MIRROR_HASH is missing.

@svpcom
Copy link
Author

svpcom commented Sep 15, 2024

It seems PKG_MIRROR_HASH is missing.

I use direct git commit id as source so PKG_MIRROR_HASH is not needed

@svpcom
Copy link
Author

svpcom commented Sep 15, 2024

@zpc0 I've fixed formal commit description, added Signed-by and PKG_MIRROR_HASH. Could you restart automatic workflow build?

Copy link
Member

@BKPepe BKPepe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While looking at the readme in the repository, II see that there are only two supported WiFi chips and both requires external patched driver. I am not use, if this makes any sense for us since it requires so much work and it does not work out of the box unless you are using patched drivers.

include $(TOPDIR)/rules.mk

PKG_NAME:=wfb-ng
PKG_VERSION:=24.9.1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This version is not released nor tagged.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a lot of requests from wfb-ng users that want to try wfb-ng on their wifi routers but for most of them compiling external packets is too hard that is why I've done this pull-request

Comment on lines 9 to 12
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/svpcom/wfb-ng.git
PKG_SOURCE_VERSION:=a41cd378e7e23dd094d6c50f26c4faa8e64e5954
PKG_MIRROR_HASH:=362b3d4262e78ae0885cc25cea34e553dc29e1941be47724ece796bd35220d88
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to clone Git sources? We can use tarball. :-)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO for review (or for compare changes between two different versions) direct link to git commit is more preferable than tarball

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comparing changes between two differents versions, thats why the tagged releases or tags are for. Still, I dont see reason, why BFU or the end user should care about your commit hashes, they want to have version and of course. Having double versioning in the Makefile, its odd even for developers. The version, which is not tagged, then it checkout sources and specific commit, no, no. Thats wrong.

Choose properly which one and I think you want to use tagged releases. :-)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BKPepe Ok. I've replaced it with PKG_SOURCE_VERSION:=wfb-ng-24.09-openwrt-preview now

net/wfb-ng/Makefile Outdated Show resolved Hide resolved
@svpcom
Copy link
Author

svpcom commented Sep 15, 2024

@BKPepe In ath9k SoC (for example TP-Link CPE510) injection works out of box with standard driver. Also most of the cards supports monitoring mode and wfb-ng can work in RX-only mode with them

While looking at the readme in the repository, II see that there are only two supported WiFi chips and both requires external patched driver. I am not use, if this makes any sense for us since it requires so much work and it does not work out of the box unless you are using patched drivers.

@svpcom svpcom requested review from BKPepe and zpc0 September 15, 2024 23:04
@snokvist
Copy link

snokvist commented Sep 16, 2024

Hello, me and @zhouruixi (well mostly zhou) have verified several routers for wfb_ng and we are using it succesfully on them to operate drone video feeds. Like svpcom says, injection is only needed for bidirectional links, and for many drone operators(including me) unidirectional is enough. We already have 10 tested and verified working routers: https://github.com/OpenIPC/wfb-ng-openwrt/wiki/0.-Tested-devices

It would be great for more routers to have injection, but for example having one cpe510 added to the mix is enough (i use two google wifi and one asus, soon one cpe510 to boost extra range). I have several kilometers range using this setup.

Having wfb_ng easily available instead of building manually could revolutionize how OpenIPC can be used in the future, powered by OpenWRT+wfb_ng.

Already runcam and EMAX is selling openipc hardware with users looking for a good transmission link layer setup.

Zhou is spreading this also in his Chinese community and there will be many more users if we can simplify installation!

@libc0607
Copy link

It will be great if OpenWrt has the wfb-ng package.

Almost all those IP Camera chips have old (~4.9) kernels and seems nobody gonna backport the new Wi-Fi drivers -- that's why only the RTL8812xU series adapters, with an out-of-kernel driver, were often heard in FPV scenarios.

It will be easier for pilots to test monitor & packet injection on different adaptors supported by the mainline kernel if OpenWrt has the wfb-ng package.

BTW, the ath9k injection works really well (on OpenWrt) :)

WFB-ng is long-range packet radio link based on raw WiFi radio.
Adding it to openwrt base packages will help a lot of it users
to use cheap wifi routers (supporting minitoring mode) instead
of build custom hardware yourself.

Signed-off-by: Vasily Evseenko <[email protected]>
net/wfb-ng/Makefile Show resolved Hide resolved
net/wfb-ng/Makefile Outdated Show resolved Hide resolved
net/wfb-ng/Makefile Outdated Show resolved Hide resolved
net/wfb-ng/Makefile Outdated Show resolved Hide resolved
Co-authored-by: Tianling Shen <[email protected]>
Signed-off-by: Vasily Evseenko <[email protected]>
net/wfb-ng/Makefile Outdated Show resolved Hide resolved
net/wfb-ng/Makefile Outdated Show resolved Hide resolved
net/wfb-ng/Makefile Outdated Show resolved Hide resolved
Comment on lines 9 to 15
SYSUPGRADE_CONF="/etc/sysupgrade.conf"
WFB_INIT="/usr/sbin/wfb-ng.sh"

if [ -f $SYSUPGRADE_CONF ] && [ -x $WFB_INIT ] && ! grep -q $WFB_INIT $SYSUPGRADE_CONF
then
echo $WFB_INIT >> $SYSUPGRADE_CONF
fi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure, what you would like to achieve with this one? You want to persist init file through sysupgrade? Do you know how the sysupgrade works?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/usr/sbin/wfb-ng.sh is a custom init script, generated by user. I want to persist it during sysupgrade

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely, this should not be here. Usually there is section conffiles, but in that case, the file is mentioned in the Makefile.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How to add /usr/sbin/wfb-ng.sh to /etc/sysupgrade.conf in the Makefile? I've tried to search this in other openwrt packages, but found only the way above in net/p910nd/files/p910nd.hotplug

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

define a conffiles recipe.

FYI:

define Package/alist/conffiles
/etc/alist/
/etc/config/alist
endef

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@1715173329 fixed. Thanks!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The question is if this is going to work, though. Needs to be tested for files, which are not included/presented in the Makefile.

Copy link
Author

@svpcom svpcom Sep 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BKPepe Alredy done. Package was built successfully

Copy link
Author

@svpcom svpcom Sep 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also i've checked it on real hardware (TP-Link CPE510v3).

net/wfb-ng/files/wfb-ng.init Outdated Show resolved Hide resolved
@cinoan
Copy link

cinoan commented Oct 16, 2024

I hope this can move forward, I've been using wfb-ng (and it's predecessors) for some years and the prospect of using it on OpenWrt for a distributed receive network is really exciting. I've just purchased a couple of cpe510s as test nodes but am now learning how tricky it is to build compared to installing a package.

Thank you to those working on this.

@svpcom
Copy link
Author

svpcom commented Oct 16, 2024

How to fix error during CI build? Locally it builds without problems.

include $(INCLUDE_DIR)/package.mk

MAKE_FLAGS += VERSION=$(PKG_VERSION)-$(PKG_RELEASE) COMMIT=openwrt all_bin
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_NAME)-$(PKG_VERSION)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing this is what results in /builder/build_dir/target-aarch64_generic_musl/wfb-ng-wfb-ng-24.09.23/ and then some tasks at the end of the build process failing? Have you tried PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stangri Yes. This is done due to github auto packaging issue. It automatically create archive for release with following structure:

$ tar tzvf wfb-ng-24.08.2.tar.gz  | head
drwxrwxr-x root/root         0 2024-10-01 16:49 wfb-ng-wfb-ng-24.08.2/
drwxrwxr-x root/root         0 2024-10-01 16:49 wfb-ng-wfb-ng-24.08.2/.github/
drwxrwxr-x root/root         0 2024-10-01 16:49 wfb-ng-wfb-ng-24.08.2/.github/ISSUE_TEMPLATE/
...

It concatenate project name + tag name (which is wfb-ng-24.08.2 in this case)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. I thought there was a way to override this from the Makefile as I've had to deal with a similarly weirdly named archive content before, but maybe I'm misremembering things.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, any updates on this package? The OpenIPC fpv project is getting increasing interest and many requests when the package will be ready for easy deployment. I have 4 different router models up and running myself with the latest makefile, but it's a ... shitparty ... to compile manually from sources :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants