Thanks for sharing. I will be checking it out for sure. I’m curious how that led blinking works, would like to be able to do something similar.
If your experience is anything like mine then wifi is a fine needle to thread. More often works how you least expect and not well documented. What I aimed for in the end was pulling together the experience of others, namely from the Balena WiFi-Connect GitHub issues and the solution people had found for different things and put them all together. At times it hurts a little having to implement these messy solutions to problems, for example at one point it reaches out to IW and runs a command on the shell to achieve a network refresh. But the networkmanager equivalent just wasn’t reliable enough and people kept ending up with empty wifi ssid lists.
The api idea seemed to make sense to me. Having the wifi built in to balena supervisor is the most logical workflow for users, but because it is temperamental working with wifi I personally would never be looking at doing something like that. Moreover when inevitable updates are required it would mean a whole os update. Not ideal. A container api seemed to be the next best thing.
And I went for Python to try and encourage more community input and because of some excellent work and testing already done by another Balena user on a Python version to allow building on that already pre-tested model (GitHub - OpenAgricultureFoundation/python-wifi-connect: Easy WiFi setup for Linux devices from your mobile phone or laptop). Here’s hoping it works.