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

samr30 xpro doesn't seem to use its radio ok #12761

Open
kmartinez opened this issue Nov 20, 2019 · 8 comments
Open

samr30 xpro doesn't seem to use its radio ok #12761

kmartinez opened this issue Nov 20, 2019 · 8 comments
Assignees
Labels
Area: drivers Area: Device drivers Area: network Area: Networking Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)

Comments

@kmartinez
Copy link

I can build gnrc_networking applications for samr30-xpro boards - but never see any packets.
The DEFAULT_CHANNEL is 5 for some reason (US) and I have now changed that to 0 (EU 868) - but there must be something else going on - as it is easy with the samr21-xpro.

@cladmi was involved recently - do you know the trick?
Thanks!

@biboc
Copy link
Member

biboc commented Nov 21, 2019

Samr30-xpro uses AT86RF212B transceiver. Depending on the antenna frequency you use, you should configure channel and page to be able to communicate

@kmartinez
Copy link
Author

Thanks! I didn't realise the "page" needed setting - for 868.3MHz it could be page=0
it is set in drivers/include/at86rf2xx.h to IEEE802154_DEFAULT_SUBGHZ_PAGE
defined in sys/include/net/ieee802154.h as value 2
as far as I can see as long as both nodes are the same they should communicate... I assume someone has tested these boards? they are more unusual than the 21R

@kmartinez
Copy link
Author

kmartinez commented Nov 21, 2019

some success! I set PAGE=0 and CHANNEL=0 and listened with a radio scanner
so some pings work with two copies of gnrc_networking on two nodes.
PAGE=2 (the default) also seems to work. Both are a bit intermittent... could be timings?
border router not happy though - the other node never joins

@kmartinez
Copy link
Author

I guess nobody is using these regularly? in the EU we should certainly be setting chan=0 for 868MHz range.. I am not sure how we can make that auto-select on build..

@jue89
Copy link
Contributor

jue89 commented Dec 10, 2019

I had problems with that board, as well. I realized reducing the internal SPI clock from 5MHz to 1MHz solved my problem. But I haven't investigated this problem further ... 5MHz shouldn't be too high according to the datasheet.

Could you try this little patch down below? Does this increase the stability? If so, we should have a deeper looks whats going on here ...

diff --git a/boards/samr30-xpro/include/board.h b/boards/samr30-xpro/include/board.h
index d6eb0fc9aabb01e906554ef90862fef007aff3ac..9067d5215e47a5203130e0ec44faa7485104db4e 100644
--- a/boards/samr30-xpro/include/board.h
+++ b/boards/samr30-xpro/include/board.h
@@ -36,7 +36,7 @@ extern "C" {
 #define AT86RF2XX_PARAM_INT         GPIO_PIN(PB, 0)
 #define AT86RF2XX_PARAM_SLEEP       GPIO_PIN(PA, 20)
 #define AT86RF2XX_PARAM_RESET       GPIO_PIN(PB, 15)
-#define AT86RF2XX_PARAM_SPI_CLK     SPI_CLK_5MHZ
+#define AT86RF2XX_PARAM_SPI_CLK     SPI_CLK_1MHZ
 /** @}*/
 
 /**

@jue89
Copy link
Contributor

jue89 commented Mar 5, 2020

I think #13537 should solve this.

@kmartinez
Copy link
Author

kmartinez commented Mar 5, 2020

so a question on page/chan defaults - we could put the switch in
boards/samr30-xpro/include/board.h
or
makefiles/default-radio-settings.inc.mk
as it seems 802.15.4 page numbers and channel nums are generic across boards? (this only applies to sub-GHz)

@jue89
Copy link
Contributor

jue89 commented Mar 6, 2020

I wouldn't change the DEFAULT_CHANNEL and DEFAULT_PAGE in the board.h file since the samr30-xpro board can also be used in the US. All used RF components support dual ISM band (EU and US).

But I would rather ensure that it becomes more obvious that one must check and decide which channel to use. (I accidentally used the board with the US frequency here in Germany for some days ;))

Maybe that's a good topic for the Kconfig task force ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: drivers Area: Device drivers Area: network Area: Networking Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

No branches or pull requests

7 participants