-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
DHCP OPTIONS NOT WORKING - Esp-Idf 5.4 maybe others (IDFGH-14603) #15360
Comments
@filzek |
results are: Failed to set Vendor Class Identifier: ESP_ERR_ESP_NETIF_INVALID_PARAMS |
@filzek |
CONFIG_LWIP_DHCP_DISABLE_CLIENT_ID is not setCONFIG_LWIP_DHCP_DISABLE_VENDOR_CLASS_ID is not setCONFIG_LWIP_DHCP_RESTORE_LAST_IP is not set
|
Hi @filzek The reason you're seeing this error:
is that you're calling to configure DHCP options you'd have to stop the client, set selected options and start it again. esp_netif_dhcpc_stop(netif);
esp_netif_dhcpc_option(netif, ESP_NETIF_OP_SET, ESP_NETIF_VENDOR_CLASS_IDENTIFIER, (void*)vendor_class_id, strlen(vendor_class_id));
esp_netif_dhcpc_start(netif); |
same problem! #ifndef CONFIG_LWIP_DHCP_DISABLE_VENDOR_CLASS_ID #endif RESULT: So still not working |
Created a minimal project using VCI and VSI options. Tested on @filzek Could you please give it a try: https://github.com/david-cermak/esp-network-examples/tree/main/dhcp-vendor-spec |
@david-cermak in a real application scenario it doesnt work. simple return the same problem, we have refatored our code to be called in the event handler to do the same as you are doing in your application: we have called it void set_dhcp_options(). if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_CONNECTED){ but no luck, same error. the netif and wifi initialization is the same as example connect. its only trigger the error: |
At which point do you register that event handler? Please make sure that you call Could you please share the initialization steps of your project? the snippet above doesn't include event handlers. |
Answers checklist.
General issue report
Trying to setup a.dhcpc options vendor information or any other and the return is invalid always.
If it connects to the wifi its return dhcp already started
It seems a bug.
So, how to correct set it?
The text was updated successfully, but these errors were encountered: