Hello everyone,
We had been using the balena.io wifi-connect (written in Rust), but I needed to make some changes to it and had issues getting rust to cross compile for ARMv6 and 7.
So I wrote a very similar application in Python as an open source project. My entire stack is in python, so it was a logical choice for us. The only feature difference between the two projects is python-wifi-connect allows the user to supply a hidden SSID.
@rbaynes welcome to the forums, this is great! Do you have a Dockerfile for the project to run it on balenaCloud? I’d be interested to know if you have a start script example too. For example when I added wifi-connect to the balenaDash project, I just needed to add a Dockerfile and start script (example here); if you had something similar it would make it really easy for users to add this to their project and take advantage of the extra features. If you don’t already have one, I’ll add it to my todo list to make one and PR it when I get some time.
add the python-wifi-connect as a git submodule of our balena cloud project (also in Python).
add this to our Dockerfile.template
# Copy the submodule code to the container:
ADD python-wifi-connect /opt/python-wifi-connect
EXPOSE 80
add this to the ENTRYPOINT script run by the Dockerfile.template
export DBUS_SYSTEM_BUS_ADDRESS=unix:path=/host/run/dbus/system_bus_socket
echo "Setting up wifi connection. Connect to the PFC_EDU-${RESIN_DEVICE_NAME_AT_INIT} access point"
cd /opt/python-wifi-connect
./scripts/run.sh
I’m sorry our balena cloud project is still private so I can’t send you a link, it will be public when we release the next version of our device later this summer.
Thanks! I also just talked to @majorz (the author of our wifi-connect project) who said he’d take a look and review your project too
Looking forward to seeing your project when it comes out in the summer - we’re always looking for guest posts on our blog as well if you feel like writing about the project when it is time to release.
The next version will be base on the RPi CM on an updated board we are building. And of course app delivery will be via the balena cloud (thanks for the great product).
I’ve been seeing your project and testing it, it seems excellent.
I have even taken some parts of code to include in mine, unfortunately after several days I could not achieve my goal. and I would like to ask you for some help.
What I need to do is put the device connected to the Wi-Fi as a client, at the same time that it is in AP, but once the connection is configured and activated, the AP connection dies.
Do you have knowledge of how to have both connections active? I would greatly appreciate some example. I have also read the NetworkManager documentation a lot but it has not helped me.
Our team hasn’t tested it yet, being a community project, but will give it a try when tomorrow have access to a TX2 device. Are you asking @yyogeshwar because you hit any issues, or just curious?
Will post more tomorrow after a try.