-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Ethernet IP Config #14385
Ethernet IP Config #14385
Conversation
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.
Great PR. Just a remark about possible use of a prefix for all Eth commands
tasmota/xdrv_82_esp32_ethernet.ino
Outdated
#define D_CMND_ETHIPADDRESS "Eth" D_CMND_IPADDRESS | ||
#define D_CMND_ETHGATEWAY "Eth" D_JSON_GATEWAY | ||
#define D_CMND_ETHNETMASK "Eth" D_JSON_SUBNETMASK | ||
#define D_CMND_ETHDNS "Eth" D_JSON_DNSSERVER | ||
|
||
const char kEthernetCommands[] PROGMEM = "|" // No prefix |
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.
You can actually use "Eth" as prefix before the first "|"
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'll do in a minute
Is there also an way got extract a sub command to avoid the array below?
uint16_t spare11 : 1; | ||
uint16_t spare12 : 1; | ||
uint16_t eth_connected : 1; | ||
uint16_t eth_disconnected : 1; | ||
uint16_t spare13 : 1; |
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.
There is an issue with shutters here. I don't like the shutter solution and I will see if this can be solved first to merge your PR.
In short, ifdef USE_SHUTTERS changes the amount of bits tested based on the assumptions the last two bits are for shutter status. This changes with your implemntation.
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 bits are not persistent so I suggest the following:
- Insert your entries just above the
http_init
bit. - Increment both
MAX_RULES_FLAG
by two. - Update
RulesEvery50ms()
by insert your rule text above theHTTP
entries. So they become 8 and 9. HTTP becomes 10 and the optional shutter ones become 11 and 12.
uint8_t free_ea6[32]; // EA6 | ||
#endif |
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 your point but this results in issues in the future where these bits are used for all processor types. I suggest to move it to the 32-bit register area at the bottom just above F9C and reserve it fixed for all processor types. No ifdefs needed.
Latest update as of 20220115-15:15 I will make the changes to this PR and implement it like you did solving some issues on the way. Pls hold on and do not make any changes to this PR anymore. |
Phase 1 Ethernet IP address config (#14385) - Currently unable to change DNS servers
Phase 2 of 2 Ethernet IP address config based on PR (#14385)
Add commands for ESP32 ethernet configuration ``EthIpAddress``, ``EthGateway``, ``EthSubnetmask``, ``EthDnsServer1`` and ``EthDnsServer2`` (#14385)
This has been implemented today. |
Thanks Theo |
i can t get EthDNSServer1 and /or EthDNSServer2 set. IP, Gateway and Subnetmask can be set, and then correctly shown in the "Main Menu"->"Information" Tab, but not the DNS ServerIP, they always stay at 0.0.0.0 there. Any hint ? Thanks, Walter |
I'm not sure the PR covered the web GUi
|
Description:
Following multiple discussions this PR introduces full support for Ethernet IP configuration independently of Wifi
EthIpAddress
EthGateway
EthSubnetmask
(aligned to D_JSON_SUBNETMASK)EthDNSServer[1|2]
on Eth#Connected do
on Eth#Disconnected do
Checklist: