-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Expose lwIP netif interface to Lua #1752
Comments
There are 2 layers of netif interfaces in lwip
cmp Adam Dunkel's Initial lwIP Paper , Chapter 7 , Chapter 12.2
I think that we don't have "processes" or "threads" on the nodemcu, so we could use the "short way" and interfacing the TCP/IP direct, as available in Accordingly, I'd suppose to call the function This approach also follows the rationale of keeping a fine granuled module footprint. |
hm.. looks like from API i cannot even get a hold on the list of interfaces. I think I'll proceed without the api, keeping the name at |
to have a second interface for test purposes, I enabled
As a result, the output of my early test code shows at least two lines:
Is it OK to have it that way in a pull request to DEV? |
Any kind of improvements should first go to |
things are getting shape...
|
I did'nt ask for allowance of a new feature, but whether it is allowed to switch some disabled configs on for test purposes. |
Hi, are you operating in Station mode? If you set StationAP mode, how many
interfaces are listed?
…On Jan 23, 2017 8:51 PM, "wolfgangr" ***@***.***> wrote:
@devsaurus <https://github.com/devsaurus>
Any kind of improvements should first go to dev, so we have a time to test
them roughly,
I did'nt ask for allowance of a new feature, but whether it is allowed to
switch some disabled configs on for test purposes.
The main reason for turning on the LOOP interface was to have a list with
more than one item to process.
I think I have learned from the last days/hours that I should reverse such
test settings for a PR ;-
Never mind :-)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1752 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AQC6Bj_oQSgw9yI2yQEEhoTvM5_hHUrkks5rVTz-gaJpZM4LqKab>
.
|
@devsaurus @marcelstoer ,
It may seem odd to you to solve a problem by adding new ones, but from my point of view, this matches my current capabilities and learning needs. The code for The only open question at the moment is the one regarding your dislike of For the following steps, I'd prefer to implement a configurable output, e.g. handing strings back to lua, handing back pointers or structures, and presumably callbacks. But I'd like to shift that to a later PR. As I see from @devyte 's comment, there is a need for the simple informative one-way command-line peek into the netif list. Is it possible to have two concurrent PR open from the same github account, but different branches? Is this plan OK with you? |
Looks like the question when to print where by what utility is a major issue not yet settled. |
Yes, that works well and we encourage contributors to drive individual features forward in individual branches.
In a review comment I pointed you to https://github.com/nodemcu/nodemcu-firmware/wiki/%5BDRAFT%5D-How-to-write-a-C-module#debug-and-error-messages but I understand that the notes there are terse. Also, the code is not consistent yet across existing modules as we haven't had that template for long. |
Yes, and this ends with
Which is precisely the code you lads are tearing apart in PR #1757 . |
@devyte and anybody else courious: I think I'll rewrite this to sprintf instead of printf, so we can return the result string to lua as well. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
8<------------------------ FEATURE REQUEST ------------------------------------
Missing feature
Advanced/customized examination and modification of network configuration, using nodeMCU's lwIP network interface, from Lua land
Justification
See the lwIP documentation about the functionalities of the netif module
http://lwip.wikia.com/wiki/Network_interfaces_management
I need it as a prerequisite for developping an ethernet driver ( see issue #1725).
I suppose it will also be required for configuring customized network configuration from lua land, once drivers for other PHY than the embeded WIFI are available.
It should also enhance the manipulation of routing and other advanced network setups with the onboard WIFI from Lua land, as far as provided form lwIP.
Workarounds
Do it in C:
8<------------------------ END FEATURE REQUEST --------------------------------
Following the discussions of issue #1555 (exposing "ping"), I'd suggest to keep it in a file
app/modules/net_if.c
and call the lua functionsnet_if.whatever()
.Everybody happy with that proposal?
The text was updated successfully, but these errors were encountered: