2

I'm doing a robotics project in which I have multiple raspberry pi powered robots. When they meet eachother one of them can decide to set up a wifi hotspot and the other ones should connect to it.

When a robot sets up a hotspot, the SSID will contain the number of the robot: robot_1, robot_2, etc.

Every robot should scan for wifi networks every 10 seconds (nmcli dev wifi) and when it detects a network called robot_x it should connect to it. To make it easier for now, all the networks will have the same password.

I know how to connect to a network by defining it in the wpa_supplicant.conf, but I don't want to define all the networks in all the robots. I could of course programatically edit the wpa_supplicant.conf when I detect a network, but I've got a feeling there's a better way to do this.

Does anybody know how I can make this work more dynamic so that when I know which network is available (for example robot_78) I can then connect to it using some kind of command?

All tips are welcome!

  • It's really interesting! Example: By default, all the robots have an enabled hotspot robot_x and also always are trying to connect to hotspot robot_x. If robot_1 get close to robot_2, the robot_1 realized that a robot_x is reachable in the wifi list and try to connect to robot_2. So, robot_1 deduced that connected to a hotspot and try yo disable their hotspot. Now: robot_1=> hotspot disabled, connected to robot_2. robot_2=> hotspot enabled, stop finding robot_x. || It's gonna be the mechanisem, agreed? – M. Rostami Jan 17 at 12:32
  • You have an idea in your head and asked for a detail to realize the idea. But maybe there is a better idea to connect the robots? May I ask why do you want to use dynamically access points? What's your idea? I have an idea how to manage the access points but it's a bit complex and I also have an idea that may be simpler but I don't know if its possible for you. Please address me with @Ingo. – Ingo Jan 19 at 22:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.