balena-os / wifi-connect

Easy WiFi setup for Linux devices from your mobile phone or laptop
Apache License 2.0
1.27k stars 353 forks source link

Possible to set other settings? #256

Open jockebq opened 5 years ago

jockebq commented 5 years ago

I love the way this application works! And I am wondering if it is possible to extend the usage of it. I want to be able to set the devices resolution and set a custom value in a .json file. Would it be possible to add more options to this, and the workflow would be: Connect to device -> Portal -> Select resolution -> Type in custom value -> Select Wifi-network -> Connect to network and transfer resolution settings and custom value to .json file.

Is this doable? Or is there any other application which can handle this?

majorz commented 5 years ago

Yes, this is possible. It will need you to run a second web application, copy the web UI of wifi-connect and use wifi-connect as a JSON API service. Here is an example of how to add a custom field into the UI: https://github.com/balena-io-playground/wifi-connect-api/

Please let me know if you have any questions regarding this, since the sub-project is not documented well.

jockebq commented 4 years ago

@majorz I got into this project again. And I wish it can solve my issues. What I need is to be able to set the device resolution via a custom field, and also 3 more custom fields, one for an account name and another for a login and lastly a password. These should be OK to write to a DB file on the device. Don't know about the device resolution.

The thing is that I am trying to create a headless linux device which connects to a TV, and to be able to setup this device you need to control it somehow. And remotes for linux is not as intuitive as on Android for example. That's why I hope you can do it with the Wifi-setup. The linux device does have an ethernet port too, and if this is connected I only want to setup everything but the wifi-connection.

Thank you in advance!