-
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
drivers: add ATWINC15x0 WiFi netdev driver #13754
Conversation
Is it a take-over from #7433 ? Otherwise thanks for providing this. I'm be able to test this PR on arduino-mkr1000. |
No, I didn't know that. Even though I searched for all combinations
Sounds good. |
You can blame the stale bot ;) |
@aabadie Thanks for pointing out this board. I found such a board, which I bought 3 years ago, unused in a box. I will try the driver with this board to refine the default parameters of the driver a little bit. |
But at that time there was also no reaction from the author for over a year. So closing the PR was correct. |
I know, it was a joke :) |
@aabadie My first test with mkr1000 did not work, I have to check whether I used the right GPIOs. |
@aabadie Good news. Worked for me for mkr1000 with following configuration. I had to use
I don't know why the output of `ifconfig' is not correctly indented. On ESP32 the indentations are correct. Anyway, the driver works with mkr1000 and we could enable WiFi in board definition once the driver has been finished and is merged. |
Well done @gschorcht!
I think this problem comes from the stdio over USB layer. For some reasons, the |
better add that to the board's |
It seem that it donsn't like spaces directly after the newline. The following function is responsible for the line break and the indentation: RIOT/sys/shell/commands/sc_gnrc_netif.c Lines 364 to 371 in e738508
|
That was my intention, of course. I just wanted to try out the settings on the command line first. I also suppose the ATWINC15x0 |
And I will do the same for the Adafruit feather M0 WiFi once I have tested. @benpicco BTW, now it's time to introduce |
That's clear. But I have found another trick by adding the include path to
With this trick the driver's package include path is the first one and the compilation of the driver package works. I know, it is tricky and breaks the usual handling of include paths, but it helps. What do you think? |
Since this is only done for the package itself it shouldn't have too much impact. So I think that's ok. |
@aabadie I had to change the dependencies and the include order of the driver header files a bit to make LLVM happy. The reason was a forward type declaration that requires C11. I'm a bit surprised that the compilation worked with |
I don't think that's the case for AVR. |
@aabadie Compilation succeed now. May I squash? |
Yes please ! |
cceb6dc
to
009daf7
Compare
pkg/driver_atwinc15x0/Makefile
Outdated
"$(MAKE)" MODULE=driver_atwinc15x0 -C $(PKG_BUILDDIR)/src/driver/source -f $(RIOTBASE)/Makefile.base | ||
"$(MAKE)" MODULE=driver_atwinc15x0_common -C $(PKG_BUILDDIR)/src/common/source -f $(RIOTBASE)/Makefile.base | ||
"$(MAKE)" MODULE=driver_atwinc15x0_spi_flash -C $(PKG_BUILDDIR)/src/spi_flash/source -f $(RIOTBASE)/Makefile.base |
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.
#14289 was merged so this Makefile must be adapted once again:
"$(MAKE)" MODULE=driver_atwinc15x0 -C $(PKG_BUILDDIR)/src/driver/source -f $(RIOTBASE)/Makefile.base | |
"$(MAKE)" MODULE=driver_atwinc15x0_common -C $(PKG_BUILDDIR)/src/common/source -f $(RIOTBASE)/Makefile.base | |
"$(MAKE)" MODULE=driver_atwinc15x0_spi_flash -C $(PKG_BUILDDIR)/src/spi_flash/source -f $(RIOTBASE)/Makefile.base | |
"$(MAKE)" -C $(PKG_SOURCE_DIR)/src/driver/source -f $(RIOTBASE)/Makefile.base MODULE=driver_atwinc15x0 | |
"$(MAKE)" -C $(PKG_SOURCE_DIR)/src/common/source -f $(RIOTBASE)/Makefile.base MODULE=driver_atwinc15x0_common | |
"$(MAKE)" -C $(PKG_SOURCE_DIR)/src/spi_flash/source -f $(RIOTBASE)/Makefile.base MODULE=driver_atwinc15x0_spi_flash |
(I also propose to move the MODULE=xxx
at the end of the line, it's purely a cosmetic change regarding the build output)
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.
OK
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.
May I squash these changes directly to avoid an extra loop in the long, long CI compilation queue?
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.
May I squash these changes directly to avoid an extra loop in the long, long CI compilation queue?
Sure, let's save some CI time.
009daf7
to
cc2277a
Compare
fixup! pkg: add ATWINC15x0 vendor driver as package fixup! pkg: add ATWINC15x0 vendor driver as package
cc2277a
to
4b38d37
Compare
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.
Tested again on arduino-mkr1000 and it still works.
Code changes are now good enough to be merged.
ACK
Thanks for the awesome work @gschorcht !
@aabadie Thanks for you patience, the reviewing, testing and merging. Now that we have more than one WiFi network dev, we should pick up the ball again to expose the WiFi configuration via Kconfig, as started in #13135 (@leandrolanzieri). |
Contribution description
This PR adds a
netdev
driver for the Microchip ATWINC15x0 WiFi module.Background
The ATWINC15x0 WiFi module is used on several boards and extension boarsd, for example:
Furthermore, the ATWINC15x0 WiFi module is the only module supported by the standard Arduino WiFi101 library. Therefore, there are a number of Arduino shields with the ATWINC15x0 WiFi module, e.g. Adafruit WINC1500 WiFi Shield for Arduino.
Using this
netdev
driver together with an ATWINC15x0 WiFi module enables the connection via WiFi in RIOT. Thus, ATWINC15x0 WiFi module can be used asnetdev
for GNRC as well as lwIPnetif
s.Current Status
The driver works out of the box for the following boards that have the ATWINC15x0 on-board:
It was also tested with an Adafruit WINC1500 WiFi Shield for Arduino for ESP32 and STM32 Nucleo-F411RE.
Arduino AVR boards unfortunately have too less RAM.
The driver supports following WiFi security modes:
WPA2 enterprise mode with IEEE 802.1X/EAP authentication is not supported for the following reasons:
Future Work
At the moment, only station mode is implemented. It might be interesting to support AP mode so that it could be used in a border router.
Testing procedure
It should work with
examples/gnrc_networking
Issues/PRs references