-
Notifications
You must be signed in to change notification settings - Fork 3k
Component: Add qca400x wifi #11466
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
Component: Add qca400x wifi #11466
Conversation
@mmahadevan108, thank you for your changes. |
Please review travis failure |
I believe this is a target update (adding already supported functionality). |
This is nitpicking but would you please update the PR's description in a way that tests results are marked as code to make those a bit more readable. |
#ifndef QCA_WIFIINTERFACE_H | ||
#define QCA_WIFIINTERFACE_H | ||
|
||
#include "mbed.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.
mbed.h
should be used only by applications and not inside Mbed OS itself.
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.
Updated and removed this include
#include "platform/mbed_debug.h" | ||
#include "platform/mbed_wait_api.h" | ||
#include <stdio.h> | ||
#define TRACE_GROUP "QCAI" // ESP8266 Interface |
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.
The comment should be fixed.
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.
Thank you for spotting this.
if (level == NSAPI_SOCKET && socket->proto == NSAPI_TCP) { | ||
switch (optname) { | ||
case NSAPI_KEEPALIVE: { | ||
if (socket->connected) { // ESP8266 limitation, keepalive needs to be given before connecting |
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.
The comment should be fixed.
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.
Thank you for spotting this.
I wonder if the path should not be shortened to: EDIT: if this is meant to be a component, then I need to modify this comment, just suggesting that we drop the |
|
||
using namespace mbed; | ||
|
||
QCA_WiFiInterface::QCA_WiFiInterface(): |
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 this a generic interface for all QCA devices? Are there any other QCA devices? Can QCA serve any other purpose than Wifi? Please, consider those questions and if possible change the class name to something as accurate as possible like QCA400XInterface
.
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.
Thank you. Sure, I will make this change
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 adding the 400X
part. Do we need the Wifi
part for any reason? I also wonder about the underscore. I read the Coding style guidelines and all it says is that every word should start with a capital letter. Underscores are not explicitly forbidden, but I don't think this particular underscore can be justified in here?
I am personally a fan of QCA400XInterface
- the Wifi
part just seems redundant (unless there is a module with the same name, that is not a Wifi module?)
@0xc0170 , @VeijoPesonen, any toughts on this?
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 do have OdinWiFiInterface
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.
@VeijoPesonen , Odin
does not clearly indicate a wifi chip, but a board family, so I imagine it might have more drivers and related Odin*Interface
classes. QCA400x is a WiFi-only chip, so it will probably have no other Interface
than a wifi one :).
I think Wifi
is redundant, but if noone else sees this is as a problem, I don't want to hold back the review. Let's just clarify the mbed_lib.json name, that I mentioned in the other comment.
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 will change to drop the Wifi from the name
return ret; | ||
} | ||
|
||
nsapi_error_t QCA_WiFiInterface::set_blocking(bool blocking) |
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.
If the non-blocking mode ways the same way it does for ESP, then I suggest just returning UNSUPPORTED. @VeijoPesonen , what do you think?
Please see this PR for how we are trying to get ESP really non-blocking
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.
If the non-blocking mode ways the same way it does for ESP, then I suggest just returning UNSUPPORTED.
Yes, I do agree.
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, I will make the change
{ | ||
"name": "qca400x", | ||
"macros": [ | ||
"A_LITTLE_ENDIAN" |
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.
Do we need that A_
at the beginning? Is this just an indefinite article? If so - I suggest it gets dropped :)
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 something the wifi_qca driver looks for, I am using the driver as it.
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 see, perhaps it's "A" for "Aetheros"...
targets/targets.json
Outdated
@@ -2123,7 +2123,7 @@ | |||
"NXP_LPADC", | |||
"MBED_TICKLESS" | |||
], | |||
"components_add": ["FLASHIAP"], | |||
"components_add": ["FLASHIAP", "QCA400X_WIFI"], |
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 this the reason behind the folder naming convention COMPONENT_QCA400X_WIFI
that I mentioned in my other comment? We want this to be an addable component? If so, the please just consider dropping the _WIFI
, unless it is not obvious that QCA400X can only act as a WIFI module :-)
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 can drop the WIFI, the naming convention follows what is done for CELLULAR component
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 am confused... you dropped the COMPONENT_
part and left the _WIFI
in... Does this still work fine?
Is there any reason to keep the _WIFI
suffix? @0xc0170 can you give your recommendations on the naming or do you know who can?
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.
COMPONENT is not needed as it will be added during build as it is part of the components_add section. I left the WIFI in the folder name as this is the convention followed by cellular.
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.
It should be fine as it is now
I followed the naming convention for cellular |
4b81d8f
to
7727fde
Compare
Below are the test results, I have updated the PR to address all feedback and the CI failure. |
@ARMmbed/team-embeddedplanet |
@mmahadevan108 Please review astyle failures |
I will fix the files that I added. But there is a lot of failures in the Atheros driver files (everything in the folder wifi_qca) which were not created by me. Is there a way to make an exception for these? |
@0xc0170 Is it possible to make an exception for the driver files not added by me or should I fix all style issues? |
Yes, add these to astyleignore files. We should not change 3rd party files. |
Is there an example I can use. |
@mmahadevan108 Sorry for the delay, yes. Check .astyleignore file in the root of this repo. |
7727fde
to
f292c3d
Compare
Thank you, I have updated this PR |
f292c3d
to
ba98613
Compare
@mmahadevan108 There are still multiple failures in the changed files, please review astyle job |
I have rebased this PR. I am able to pass all the TCP tests under netsocket. However I am seeing the below failure when running the TLS test [1580929570.99][CONN][RXD] >>> Running case #8: 'TLSSOCKET_HANDSHAKE_INVALID'... Any suggestions how I can fix this? |
Hi @mmahadevan108 . First thing to try - I would suggest increasing stack and heap sizes, TLS consumes quite some memory (The certificate alone weighs over 1600B). |
This PR cannot be merged due to conflicts. Please rebase to resolve them. |
08d36fa
to
336c02d
Compare
I am seeing failure with the below test: [1582065953.56][CONN][RXD] >>> Running case #14: 'UDPSOCKET_ECHOTEST_NONBLOCK_CONNECT_SEND_RECV'... Calling UDPSOCKET_ECHOTEST_NONBLOCK_impl() function with a true argument passes but fails with a false argument. Any suggestions? |
The connect function at the below line Is not calling the connect inside my driver. It calls the one inside InternetDatagramSocket.cpp. Any idea why? |
@ARMmbed/mbed-os-ipcore Could you help? |
Because this is using This |
Thank you. I found an issue in my drivers recvfrom implementation. I was able to move further |
Signed-off-by: Mahesh Mahadevan <[email protected]>
Signed-off-by: Mahesh Mahadevan <[email protected]>
Signed-off-by: Mahesh Mahadevan <[email protected]>
Malloc failures were seen when running WiFi tests Signed-off-by: Mahesh Mahadevan <[email protected]>
336c02d
to
b2c7a64
Compare
CI restarted |
Test run: FAILEDSummary: 3 of 4 test jobs failed Failed test jobs:
|
The netsocket-dns tests are failing. However the test was able to resolve using DNS server (8.8.8.8) when running TCP, UDP tests. Is there something else I am missing in my implementation that these tests are exercising, |
I'm trying to test the latest commits on this PR. Specifically I'm trying to run this test:
Getting a TCPSocket API error. Is this because of the API deprecation changes on the master branch for Mbed OS 6? Perhaps this is an issue with our integration tests not being updated to latest APIs. @0xc0170 - we hope this PR could be merged and released with the next 5.15.x. How do you recommend testing it? Am I doing something wrong? |
The DNS tests are failing with the error NSAPI_ERROR_TIMEOUT |
@mmahadevan108 Have you found a root cause for these failures? I'll restart CI now to get the latest results (build will still fail?) |
needs to be ignored in the status filed. |
Test run: FAILEDSummary: 2 of 3 test jobs failed Failed test jobs:
|
|
@mmahadevan108 Lets close this one and reopen once it's updated |
Description
Add support for QCA400X Wifi module. This is used on the LPC55S69 Xpresso board. Wifi test results below:
Pull request type
Reviewers
Release Notes