Skip to content
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

Set up Wi-Fi connections externally #2636

Open
JavierAder opened this issue Feb 10, 2025 · 1 comment
Open

Set up Wi-Fi connections externally #2636

JavierAder opened this issue Feb 10, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@JavierAder
Copy link

Description

Hello. From time to time I have to install Esp8266-based devices in other people's homes and I have to go personally to configure the Wi-Fi connection. I was thinking about whether some type of QR reader could be added to the web interface so that this can be done by people who do not know Espurna from their cell phone.
Actually, thinking about it a little more, it would be modifying Espurna to support an external application adding Wi-Fi connections, and using a cell phone app (possibly modifying it) to take a Wi-Fi connection from the cell phone and share it with Espurna.
Ok, maybe this is already supported by Espurna (via telnet?) and it would be better to focus more on the cell phone app.
Any suggestions?

Solution

No response

Alternatives

No response

Additional context

No response

@JavierAder JavierAder added the enhancement New feature or request label Feb 10, 2025
@mcspr
Copy link
Collaborator

mcspr commented Feb 13, 2025

I was thinking about whether some type of QR reader could be added to the web interface so that this can be done by people who do not know Espurna from their cell phone.

Do you mean QR code output for the AP running on-device or something else? Note that you already can embed specific WiFi ssid & passphrase for both AP and STA; see WIFI#_SSID, WIFI#_PASS, etc. flags

// (required) SSID must be set for network to be considered enabled.
// (optional) PASS with some value will require the network to use WPA (or better) authentication, otherwise it must be an OPEN network.
// (optional) IP, GW, MASK and DNS must all be defined for static configuration to be applied.
// (optional) BSSID and CHANNEL are only used when WIFI_SCAN_NETWORKS is disabled.

Meaning, you could embed something custom and pre-generate the QR, should you need some help connecting to the device itself

Actually, thinking about it a little more, it would be modifying Espurna to support an external application adding Wi-Fi connections, and using a cell phone app (possibly modifying it) to take a Wi-Fi connection from the cell phone and share it with Espurna.
Ok, maybe this is already supported by Espurna (via telnet?) and it would be better to focus more on the cell phone app.

Can you re-use existing HTTP and websocket connections? HTTP can upload settings as .json file at /config; websocket can manipulate more things, but in a more async manner. but, you'd have to look at webui .js & .cpp handlers for available methods

^ build flags WIFI1_SSID -> settings ssid0, build flags WIFI1_PASS -> settings pass0
see https://github.com/xoseperez/espurna/wiki/WiFi for more

(edit2: build flags index example)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants