I am also having trouble setting up a hotspot: read the same documentation, added the balena-hotspot in resin-boot/system-connections/balena-hotspot. Nothing happened - no hotspot to be seen.
After a bit of googling stumbled upon nmcli. Not sure any more what I actually did and in what order, but got the hotspot working.
Then I tried to recreate the situation from the start, but now I am in a situation where
file my-hotspot in /mnt/boot/system-connections/ is not being picked up after reboot
previously set up connection balena-hotspot is being resurrected after reboot?? but it is not active
system-connections/README.ignore talks about resin-net-config - is this out of date?
system-connections/resin-sample.ignore does not work, I guess because there is no interface included, so consider adding something that is closer to a working example
@tkurki Hi, can you please send me a dashboard link to the device you have an issue with so that I can take a look? I saw you granted access already in your message
Very sorry about missing your message, it looks like my colleague did not see your PM. We are discussing internally on how to improve on that front.
You may find information on how the different system-connections folders are treated in our OS right after the example code in this section. Any files defined in the system-connections folder in the boot partition are always copied on boot to the folder located in the state partition. Also all nmcli operations operate over the folder in the state partition and if you delete a connection profile with nmcli, it will only delete it on the state partition (and it will be copied over once you reboot the device).
I checked our hotspot example and it looks like the hotspot is not activated automatically because of the autoconnect=false setting. If you remove it (or set it to true), the hotspot will be activated automatically.
If you need to share Internet connection over the hotspot then you may add in your hotspot connection profile:
[ipv4]
method=shared
If you just need to enable DHCP (without Internet sharing), so that other devices may get an IP address when connected to the hotspot, you may run dnsmasq from a container with a config like:
Thanks for the reply, things make a lot more sense now.
I had missed the explanation of the system-connections copying logic because it is under Changing the Network at Runtime which I was not trying to do. To me it would make more sense in the introduction, right after The system-connections directory consists….
Also the hotspot example that is not really functional does not make sense to me. Like, why not add the information that you provided here to the Networking document?
And consider my earlier update suggestions in this thread.
I’m trying to configure a hotspot with the description in the docs and the information I found here in this thread.
The hotspot pops up as expected and I can log in with the wifi password I used in the config.
I’m running a container (in a multi container setup) with dnsmasq installed and the following config borrowed from above:
All of this seems to work, because I actually get an ip address after log in.
Unfortunately I get kicked out of the hotspot after a very short time, beeing prompted again for the password. Why could that be?
I have two more files in my wifi config that open up connections to local wifis with internet access if they are available.
The device is a raspberry pi 3 with an external wifi dongle plugged in (edimax).
The Dockerfile for my dnsmasq service looks like this:
Ok, I invested a little bit further and the problem might be that the hotspot is started on the edimax stick, instead of the built in chip.
How can I force wlan0 to always be the onboard broadcom chip and wlan1 the external usb?
Isn’t that what debian stretch solved with predictable network interface names? How is this done on balenaOS?
Hi
I agree that the allocation of network interface names should be predictable and not change between boots on balena.
To make sure this is the case your setup please provide me with the version of balenaOS you are using.
Regards
Thomas
I got the hotspot working now, although setting the static ip did not work.
I set it up from inside the host OS using nmcli directly.
I also bound my external wifi setup to the mac address of my edimax stick.
Unfortunately this is not a very good solution when I have to set up a lot of those devices and maybe even automate the process. Is there any way to tell beforehand what logical interface the external usb stick will be assigned?
The best scenario would be for me to copy just two files into the system-connections folder and have the device ready to go. But for that I would really need to be sure that the hotspot will start on the internal chip and the external wifi on the usb dongle.
Hi
there are ways to get around this, e.g. setting udev rules in config.json or in a container, that will assign network interface addresses to your devices. To assess which is the best solution for your problem we need to know what exactly you are running and what you are running it on.
What exactly did you use to set up the hotspot ? You are referring to methods further up in this thread so it is not quite clear how you are doing it currently.
If you grant support access to the device we can take a look at the device directly. Please notify us if you would like to do that. We will send you a PM which you can then answer with the device ID.
Hi
there are ways to get around this, e.g. setting udev rules in config.json or in a container, that will assign network interface addresses to your devices. To assess which is the best solution for your problem we need to know what exactly you are running and what you are running it on.
What exactly did you use to set up the hotspot ? You are referring to methods further up in this thread so it is not quite clear how you are doing it currently.
If you grant support access to the device we can take a look at the device directly. Please notify us if you would like to do that. We will send you a PM which you can then answer with the device ID.
Regards
Thomas
I made the Hotspot working and can now access the Internet that is connected to eth0 via wlan0. is there a way to prevent the access to the devices in the net of eth0? actually I can access the router and all the devices via wlan0. Would be great for security reasons. I have googled for hours for a solution with NetworkManager but without success .