Passing two credentials at initial boot over serial, not a Website

rin67630
Posts: 141
Joined: Sun Mar 11, 2018 5:13 pm

Re: Passing two credentials at initial boot over serial, not a Website

Postby rin67630 » Sun Jul 07, 2024 2:08 pm

Inq720 wrote:
Sat Jun 29, 2024 5:48 pm
...I've never created an install package for Linux, but if it's like Windows, the installer GUI can prompt the user for the things you want like SSID and passphrase and the GUI would just run the BinaryChange executable (after you compile and put in into the install package) to be used during setup.
Hi Inq720,
my PythonPatcher now does exactly that.
It ist now online on GitHub:

https://github.com/rin67630/ESP_Binary_patcher
It works perfectly.

Thank you very much for the inspiration!

And it is just the beginning.
I will probably be able to include the uploader as well, making it even easier. (but it requires probably some system dependancies)

Currently I am looking after adding some additionally automatic parameter patches like
time zone,
latitude,
longitude
automatically grabbed from the uploading system, to make it even easier for user.
Python has some great libraries to do that.

I expect also to catch the repeated usage of the patcher, when the patched file already exists, where the user must not enter the information again, just push enter if the previous data should be kept.

P.S. since it is a Python script, it runs on every system, Windows, macOS, Linux.

User avatar
Inq720
Posts: 37
Joined: Fri Dec 22, 2023 1:36 pm
Location: North Carolina, USA
Contact:

Re: Passing two credentials at initial boot over serial, not a Website

Postby Inq720 » Sun Jul 07, 2024 2:29 pm

Cool! I'll take a look. Keep this or another thread updated as you add functionality. Sounds very interesting.

rin67630
Posts: 141
Joined: Sun Mar 11, 2018 5:13 pm

Re: Passing two credentials at initial boot over serial, not a Website

Postby rin67630 » Tue Jul 09, 2024 5:24 am

Inq720 wrote:
Sun Jul 07, 2024 2:29 pm
Cool! I'll take a look. Keep this or another thread updated as you add functionality. Sounds very interesting.
The tread is on viewtopic.php?f=19&t=40743

The PythonPatcher now has the ability to flash upon Serial directly after patching.
Now it can also update over the air (OTA).

And there is another version: PytonPatcherTE.py (Thinger.io Edition) which will also adjust Dashboard templates with your credentials, so yo can immediately get gorgeous dashboards without configuration effort.

hobby_guy
Posts: 20
Joined: Sat Jan 29, 2022 3:29 pm

Re: Passing two credentials at initial boot over serial, not a Website

Postby hobby_guy » Wed Sep 04, 2024 12:36 pm

If you've considered making a web config portal, with its own wifi hotspot where the user can connect from a computer or mobile, then I'd suggest using LittleFS or similar to host the web pages (HTML) as "files" on the device, which you then can simply upload (the /data directory) through a plugin in Arduino IDE. This way you can make the setup process similar to the "choose a wifi" wizard you might be using with tzapu's WiFiManager (if you're doing that -- sorry, I read this only very quickly).

In my project, I check if the device is missing either wifi config, and/or my specific setup values (which should all be stored in EEPROM and mirrored in a small file, which is read on boot). If anything is missing, a hotspot is set up and a webserver to serve the HTML files on specific endpoints referenced by the index.html It's even possible to combine this with tzapu's WiFiManager in such a way that you can incorporate the "pick a wifi" step (table) in, say, index.html, and then have a "Next" button to take the user on to your project specific setup page(s).

I touched in on this topic in this post:
http://forum.esp32.com/viewtopic.php?f= ... b5#p121755

Who is online

Users browsing this forum: No registered users and 5 guests