Replace individual files via USB + ESPtool or comparable?
Moderators: grovkillen, Stuntteam, TD-er
Replace individual files via USB + ESPtool or comparable?
Not specifically an ESPEasy questions, more general: Is it possible to send a text file containing SSID and WPA2/3 password via USB to an ESP32 (which previously has been flashed with the necessary binaries), so that on the next boot cycle it connects to that WLAN? We’d like to avoid the Wireless Access Point code implementation.
Re: Replace individual files via USB + ESPtool or comparable?
Are you talking about an ESP running ESPEasy or 'plain' Arduino code?
To start with, the ESP is not in your network yet, so no way to access it, unless you connect to the AP provided by ESPEasy, and send the commands to configure WiFi. For 'plain' Arduino you will have to implement that yourself, probably by using some library/project that supports that.
To start with, the ESP is not in your network yet, so no way to access it, unless you connect to the AP provided by ESPEasy, and send the commands to configure WiFi. For 'plain' Arduino you will have to implement that yourself, probably by using some library/project that supports that.
/Ton (PayPal.me)
Re: Replace individual files via USB + ESPtool or comparable?
Plain Arduino. Fully aware, that one can’t send anything via WiFi to the ESP, if it’s not connected to the WLAN . That’s why I mentioned USB.
Re: Replace individual files via USB + ESPtool or comparable?
You can do it with ESPEasy. Just send these text commands via USB serial port:
WifiSSID #namehere#<CR>
WifiKey #keyhere#<CR>
save<CR>
reboot<CR>
You can do it in your custom Arduino code too. But you have to create functions that read the serial port and act on what you send it. To send the info either use PuTTY or create a companion PC app that sends the file (or prompts the user to enter the credentials).
It's only code, how hard could it be?
- Thomas
WifiSSID #namehere#<CR>
WifiKey #keyhere#<CR>
save<CR>
reboot<CR>
You can do it in your custom Arduino code too. But you have to create functions that read the serial port and act on what you send it. To send the info either use PuTTY or create a companion PC app that sends the file (or prompts the user to enter the credentials).
It's only code, how hard could it be?
- Thomas
Last edited by ThomasB on 18 Nov 2021, 22:13, edited 1 time in total.
Re: Replace individual files via USB + ESPtool or comparable?
I do plan to implement the Improv API to ESPEasy, so that it will be possible to use the latest added feature of the web flasher to allow to configure the node right after connecting it to USB.
This is either right after flashing, or a node that's simply not configured to connect to WiFi.
I plan to have that added for the next nightly build.
Implementing Improv isn't that hard as it is a fairly simple protocol.
There is also a variant for ESP32 using the bluetooth radio for initial deployment, which allows to create an app for it.
This is either right after flashing, or a node that's simply not configured to connect to WiFi.
I plan to have that added for the next nightly build.
Implementing Improv isn't that hard as it is a fairly simple protocol.
There is also a variant for ESP32 using the bluetooth radio for initial deployment, which allows to create an app for it.
Who is online
Users browsing this forum: No registered users and 3 guests