-
Notifications
You must be signed in to change notification settings - Fork 3k
emac HAL API, WiFiInterface additions #2874
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
Conversation
Feature wifi rebase
General refactoring of the API and new methods added: * get_rssi() - measures radio signal strenght * get_state() - returns current state (not connected, connecting, connected, error) * scan() - scans for available networks sync and async versions * connect_async() - connect to a network without blocking
Extend and rework WiFi interface
* Add details to documentation * Add timeout for async functions * Add channel parameter to connect * Add wifi_ap_t to connection cb function
HAL: Add Emac interface
Conflicts: features/net/FEATURE_IPV4/lwip-interface/EthernetInterface.cpp features/net/FEATURE_IPV4/lwip-interface/lwip_stack.c features/net/FEATURE_IPV4/lwip-interface/lwip_stack.h features/net/network-socket/WiFiInterface.h
ethernet uses eth_arch_xxx_interrupts, emac_xxx_enable_interrupts
It now accepts additional arguments, that lwipipstack do not use, thus all 0 and false for dhcp.
WifiInterface - add set_credentials
We do not want to mix Ethernet and Wifi at the moment, thus WiFiInterface should implement own connect using emac.
Conflicts: features/net/FEATURE_IPV4/lwip-interface/lwip_stack.c hal/targets.json
Currently only for IPv4. lwip was updated to accept 2 arguments for getting the ip address (buffer and length).
…d for the u-blox ODIN-W2 driver. The actually needed size has not been measured.
I'm happier with that final diff - it's not messing with the fundmental initialisation flow at all as far as I can see, so should be fine for both IPv4 and IPv6. I think I would have put the "netif_add" into the connect rather than the init, but maybe you're right - if that split suits your driver, fine. Would be nice to see a tidied up patch set, especially now there's the rename - would be possible to check the actual net diff apart from the rename. |
Do you mean just this single commit? ae11b51 |
No, that's the diff since your previous draft. I want to see the actual final patches versus master. All GitHub can show me against master is your total branch, including the rename - can't easily isolate the other changes. |
…reas wifi: ublox fixes to lwip and wifi
This looks good, thanks for fixing the API bugs. The only remaining issue is with NSAPI_SECURITY_UNSUPPORTED. |
/morph test |
/morph test |
Returning a wifi access point without information regarding the security type is only valid if the security type is unknown (from the perspective of the network-socket API). For clarity in situations in which scan may return an unsupported, but known security type, type name has been changed to NSAPI_SECURITY_UNKNOWN.
60afa03
to
4f1eded
Compare
Result: ABORTEDYour command has finished executing! Here's what you wrote!
|
/morph test |
Tested locally with K64F, NUCLEO_F429ZI, and NUMAKER_PFM_NUC472 |
Result: SUCCESSYour command has finished executing! Here's what you wrote!
Outputmbed Build Number: 1052 All builds and test passed! |
Thank you all of you for review and helping with this patch 👍 |
Description
This PR contains:
Notes for reviewers:
@geky raised a question about those async methods, that if we should not be consistent and provide
attach
,set_blocking
instead ofconnect_async
for instance. I haven't yet reworked this as it will impact the esp8266 update and ublox driver changes, thus once we are all good with the rest, we can consider this, and I can redesign it (while there are still as pull request and we can edit those).The branch was shared for the development, therefore there are merge commits (updates from master to bring network changes like lwip2 and others), and some commits are not that clean (additions and removals later). I can clean it up as the last step. Please do not focus on git log at first.
I can also split ublox emac HAL implementation from this patch.
What's missing are tests, they will come separately, plus ublox implementation (+driver).
Status
IN DEVELOPMENT
Up for review now, still expecting some changes. Need to run some basic tests as well, ethernet should be retested that any changes in lwip_stack files do not affect its functionality.
Migrations
The wifi modules might need to extend their implementation, for instance, there's esp8266 pull request done by @bulislaw : https://github.com/ARMmbed/esp8266-driver/pull/11/files
Todos
please review @kjbracey-arm @c1728p9 @geky @bulislaw @sg- @andreaslarssonublox @lauri-piikivi
If anyone can help to test basic eth functionality, would be appreciated.