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
LoRa: Add package lora-gateway-hal #6808
Conversation
e85145c
to
1d36763
Compare
1d36763
to
ae3c681
Compare
Tarball filename is still the same? |
ae3c681
to
6f597a0
Compare
what's blocking this? |
Copyright and filename at least |
..also This for instance seems useful? @aparcar |
6f597a0
to
982642f
Compare
|
I will try to @ those people.
I am not sure whether a shared library is useful. My next plan is adding the CMake support for it.
|
@xueliu The problems I'm observing while compiling this are:
As cloned from your branch today. /cc @aparcar |
As mentioned earlier above, it feels like this package does not belong under |
I went ahead and created a PR against @xueliu's While I'm here, @xueliu, I noticed that you are working on linux kernel-level LoRa modules for the gateways? What's the status of those? Will they somehow substitute the userland counterparts we are trying to package and get included here? |
Actually, one of the included patches in the package might need some revision as well, @xueliu?:
EDIT: Indeed, removing |
One more for consideration:
Does this dependency have to be there at all (explicitly)? It seems like it's part of any openwrt base system these days?: |
Indeed, removing
Added that change to the aforementioned PR against @xueliu's branch. |
982642f
to
db0bc09
Compare
It is my fault. I forget to commit my change before force pushing my repo. The 983390d is up to date. Could you please have a try ? |
I will check it. Thanks for PR.
I think it is in the beginning phase. There is still a lot of work to do. |
AFAIK, not every hardward can support SPI clock speed as high as 8MHz, therefore I reserve a place for a another SPI speed. Could you have a check of the option behind the libloragw in the menuconfig ? |
db0bc09
to
983390d
Compare
Yes. In 983390d |
Sorry I don't think so. I use this package name because of the consistency with https://github.com/Lora-net/lora_gateway which includes a core library libloragw and other helper programs. |
From a UX perspective, in my opinion, it makes no sense to call it Just imagine a new openwrt user trying to make his/her lora gateway card work. The first thing (s)he tries is Going for |
983390d
to
cf98661
Compare
Change the package name to |
In cf98661 several changes are made:
|
cf98661
to
ca3d77f
Compare
In ca3d77f
|
Looks good to me 👍 ... but we still have to decide which |
net/lora-gateway-hal/Makefile
Outdated
CATEGORY:=Network | ||
SUBMENU:=LoRaWAN | ||
TITLE:=Test programs for libloragw to check functionality | ||
DEPENDS:=@libloragw |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace @
with +
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @diizzyy
Replacing @
with +
will resulte in error in package/install
phase, becauese package/libloragw/install
is not defined.
package/libloragw/install
is not defined because libloragw
is a static library. It is not necessary to be installed in device.
Sorry that. I don't know how to handle this.
I will soon push a new commit with CMake support which may solve the problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm actually facing similar problems with #8264 since even when I define lora-picogw-hal
as a dependency of lora-picogw-packet-forwarder
, the former gets removed during the CI build:
find /home/build/build_dir/build_dir/target-mips_24kc_musl/picoGW_hal-0.2.2/ipkg-mips_24kc/lora-picogw-hal -name 'CVS' -o -name '.svn' -o -name '.#*' -o -name '*~'| xargs -r rm -rf
Which leads to lora-picogw-packet-forwarder
not being able to link/compile properly:
make[4]: Entering directory '/home/build/build_dir/build_dir/target-mips_24kc_musl/picoGW_packet_forwarder-0.1.0/lora_pkt_fwd'
Makefile:17: ../../picoGW_hal-0.2.2/libloragw/library.cfg: No such file or directory
make[4]: *** No rule to make target '../../picoGW_hal-0.2.2/libloragw/library.cfg'. Stop.
make[4]: Leaving directory '/home/build/build_dir/build_dir/target-mips_24kc_musl/picoGW_packet_forwarder-0.1.0/lora_pkt_fwd'
Makefile:11: recipe for target 'all' failed
make[3]: *** [all] Error 2
Maybe that CMake patch would make a lot of sense to apply against the picoGW* repos too, @xueliu? Alternatively, @diizzyy, is there a way to tell the pkg manager to compile the dep and leave it around for others to use but not include it on the final target system?
Thanks in advance to both!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm actually facing similar problems with #8264 since even when I define
lora-picogw-hal
as a dependency oflora-picogw-packet-forwarder
, the former gets removed during the CI build:find /home/build/build_dir/build_dir/target-mips_24kc_musl/picoGW_hal-0.2.2/ipkg-mips_24kc/lora-picogw-hal -name 'CVS' -o -name '.svn' -o -name '.#*' -o -name '*~'| xargs -r rm -rf
Which leads to
lora-picogw-packet-forwarder
not being able to link/compile properly:make[4]: Entering directory '/home/build/build_dir/build_dir/target-mips_24kc_musl/picoGW_packet_forwarder-0.1.0/lora_pkt_fwd' Makefile:17: ../../picoGW_hal-0.2.2/libloragw/library.cfg: No such file or directory make[4]: *** No rule to make target '../../picoGW_hal-0.2.2/libloragw/library.cfg'. Stop. make[4]: Leaving directory '/home/build/build_dir/build_dir/target-mips_24kc_musl/picoGW_packet_forwarder-0.1.0/lora_pkt_fwd' Makefile:11: recipe for target 'all' failed make[3]: *** [all] Error 2
I think this compile error has nothing to do with dependence.
Maybe that CMake patch would make a lot of sense to apply against the picoGW* repos too, @xueliu? Alternatively, @diizzyy, is there a way to tell the pkg manager to compile the dep and leave it around for others to use but not include it on the final target system?
I can add CMake for picoGW to let is compiled. But I have no Pico hardware to test.
Thanks in advance to both!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xueliu Don't worry, I'll take care of the hardware testing side ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xueliu The compile error is due to ../../picoGW_hal-0.2.2/
disappearing under lora-picogw-packet-forwarder
's feet. How's that not related to dependence? lora-picogw-hal
gets compiled first because it's a DEPENDS
, but as soon as it gets built, it gets removed (xargs -r rm -rf
) and then lora-picogw-forwarder
cannot find it while it's compiling :/
net/lora-gateway-hal/Makefile
Outdated
CATEGORY:=Network | ||
SUBMENU:=LoRaWAN | ||
TITLE:=Utility programs for libloragw | ||
DEPENDS:=@libloragw |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace @
with +
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious, what's the actual difference between @
and +
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@brainstorm
Please have a look at https://openwrt.org/docs/guide-developer/packages Section Dependency Types
@xueliu |
OK. |
I think there is a simple solution that makeing two packages mutually exclusive. So that at the same time there will be only one package that can be compiled. I think it is rational because current devices can support either sx1301 or sx1308. |
That's exactly right, didn't think about making them mutually exclusive but makes a lot of sense, thanks @xueliu! |
8ac4577
to
e790baa
Compare
In e790baa several changes are made:
|
net/lora-gateway-hal/Makefile
Outdated
SECTION:=libs | ||
CATEGORY:=Libraries | ||
TITLE:=Driver/HAL library for Semtech SX1301 | ||
URL:=http://www.semtech.com/wireless-rf/lora.html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
URL needs updating. Maybe https://www.semtech.com/products/wireless-rf/lora-transceivers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix
Add a package for the Semtech lora-gateway-hal. This package includes three sub packages which are libloragw, lora-gateway-tests and lora-gateway-utils. Signed-off-by: Xue Liu <liuxuenetmail@gmail.com>
In e2ce890 |
Description:
This PR adds new packages for:
https://github.com/Lora-net/lora_gateway
Signed-off-by: Xue Liu liuxuenetmail@gmail.com
Maintainer: Xue Liu liuxuenetmail@gmail.com
Compile tested: RPi 2B LEDE snapshots 19.08.2018
Run tested: RPi 2B LEDE snapshots 19.08.2018