-
Notifications
You must be signed in to change notification settings - Fork 2k
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
makefiles: default-channel.inc.mk -> Supporting Sam R30 Xpro working on frequency=868MHz when sending UDP packet #13813
Conversation
New feature: EU ISM 868Mhz frequency Band is supported for Sam R30 Xpro. Easily, make BOARD=samr30-xpro ISM=868 willchange the default channel and page number into 0. Test has been down by sending UPD between two samr30-xpro and it works.
New feature: EU ISM 868Mhz frequency Band is supported for Sam R30 Xpro. Easily, make BOARD=samr30-xpro ISM=868 willchange the default channel and page number into 0. Test has been down by sending UPD between two samr30-xpro and it works.
Easily, ISM vairable can pass like: make BOARD=samr30-xpro ISM=EU flash term it willchange the default channel and page number into 0. This has been tested by sending UPD packets between two samr30-xpro. Check page: 387 of IEEE 802.15.4-2015 for more details about Channel/Page numbering. If you don't need to work on 868MHz, just make the board flash and nothing will change. The setting will still as same as 915MHz if no ISM value set: make BOARD=samr30-xpro flash term
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.
One inline remark. Maybe it makes more sense to refer to the ITU region? If I remember correctly, e.g. people in Africa are using the same channel maps as the EU (as both are region 1). It would be strange for them to select EU.
Also: Most users of RIOT are ITU region 1. So why not just making this the default?
ifneq (,$(filter cc110x,$(USEMODULE))) # radio is cc110x sub-GHz | ||
CFLAGS += -DCC110X_DEFAULT_CHANNEL=$(DEFAULT_CHANNEL) | ||
endif |
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.
This is not a 802.15.4 transceiver and might be better handled separate from the others. More specifically: The channels for the cc110x
driver are virtual RIOT specific numbers. What they map to is determined by the channel map. The default channel map is EU only.
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.
Maybe my point is not clear. It is not possible to change the region by setting a different channel for that transceiver. Instead, one would have to fiddle with the parameters in cc110x_params.h
to choose an appropriate channel map. In addition: While the chip is capable of supporting every base frequency between 300 MHz and 1GHz (with only the ISM bands in that range are tested by the vendor), the antenna circuit is specific to one ISM band. I don't know anyone with a CC110x connected to an antenna circuit suitable for 900 MHz. So no channel map for that was every tested or merged to RIOT. So someone in ITU region 2 would have to provide her/his own channel map as well; or better get that merged upstream.
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.
this PR is only meant to affect the AT86RF212B not the cc110x driver...
You may have a point about making it ITU region 1 rather than EU... we hand't thought of that.
Default is probably stuck on USA 915 ? as its been like this for a while? however if so few people use the samr30 then lets swap it now?
Cheers!
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.
we've worked out a sensible change - Thanks!
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.
Is the 868MHz SRD band actually used in the whole ITU region 1?
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.
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.
Thanks for your suggestion! I made some changes , I hope it might be more sensible.
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.
we decided to propose FBAND for frequency band instead to avoid confusion
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.
You really should move the cc110x
stuff out of this. E.g. when sticking to the FBAND
approach it should be like this:
ifeq (868,$(FBAND))
...
else
...
endif
ifneq (,$(DEFAULT_CHANNEL))
ifneq (,$(filter cc110x,$(USEMODULE))) # radio is cc110x sub-GHz
CFLAGS += -DCC110X_DEFAULT_CHANNEL=$(DEFAULT_CHANNEL)
endif
endif
As said: The ISM region cannot be chosen for the CC110x transceivers, it depends on the hardware (which antenna circuit is used). Thus, it is a hardware detail that should be better configured via cc110x_params.h
.
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.
perhaps a PR for someone who can test a CC110x to make sure it tests ok?
@jue89 :
I like the suggestion to make a build-time warning if an FBAND is not set - I have no idea how many people would be impacted by a change in the default for this radio.. so this seems like a good pragmatic change
Thank you for your PR, @Jiawei-Lu! To be clear: I'm just a contributor like you and not in the maintainer team of RIOT ;) First of all, I wan't to know your motivation behind this PR. Is it the trap for young players to use the US frequencies in Europe accidentally? In that case we should rather tackle this problem than setting another default and push programmers of the US into this trap. Maybe some descriptive warning during compilation if no channel is set explicitly? This wouldn't change the behavior of RIOT but will force everybody to consider selecting the right channel. |
Thank your for your suggestion @jue89 ! I hope this PR can help more people to select right frequency band easier. As a young player, the first question came into my mind is the frequency legitimacy. Choosing correct frequency band should the primary issue. I’d like to use 868MHz frequency band as I’m basically deploying my nodes in the U.K., thus I do need a change channel/ page number. With the increasing interest in IEEE 802.15.4 Standard, I noticed that Channel and Page number should be changed. Also there is a very detailed discussion in #12761 . Disscussion in this issue let me know how to make Smar30 working on 868MHz. However, changing the default setting is a little bit complicated. I spent long time to find this makefile that can help change the channle/page number quickly. I hope the channel/page selection can be easier for someone who want changed it so I made this PR. Yes I think you are right I should think about that to avoid traps for user from different area. I will definitely try to improve that. |
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.
now with removed whitespace so hopefully the autotests like it better
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions. |
Contribution description
New feature: Enable easier Channel/Page selection on the samr30-xpro.
Allows setting of the ISM 868MHz frequency band (e.g. for EU).
Use the FBAND variable like:
make BOARD=samr30-xpro FBAND=EU flash term
will change the default channel and page number into 0. This has been tested by sending UDP packets between two samr30-xpro. Check page: 387 of IEEE 802.15.4-2015 for more details about Channel/Page numbering.
Testing procedure
1.Checked UDP with:
tests/gnrc_udp by passing the FBAND variable as shown below:
make BOARD=samr30-xpro ISM=EU flash term
This has been tested by sending UPD packets between two samr30-xpro", see result shown below:
2.Also using radio checker to observe the working frequence, in my test, all packet is sending in the central frequence of 868.3MHz
Issues/PRs references
Thanks to the work of #13537, this time we don't need to change SPI_CLK into 1MHz to make it work.