• Skip to main content
  • Skip to primary sidebar
  • Skip to footer
  • Home
  • Meet the Robot Besties
  • About Us
Robot Besties Website Header

Robot Besties!

Experiments and Adventures with Robot Friends

This site uses affiliate links to support itself at no additional cost to you. We link to products we love from companies we support.
In the true spirit of “Robot Besties” we may have had the help of AI when creating our content here too!

You are here: Home / DIY Inspiration / Give your Raspberry Pi Based robot the ability to access multiple wifi networks!

Give your Raspberry Pi Based robot the ability to access multiple wifi networks!

March 10, 2024 by robotbesties

DALL-E Generated Image: Give your Raspberry Pi Based Robot access to multiple wireless networks

Your Robot Wants Multi-Network Connectivity!

Raspberry Pi is a great low cost single board computer for versatile and intelligent robots. As an added bonus, most of the Raspberry Pi product range can connect to the internet via WiFi, opening a plethora of possibilities for remote control, data collection, and more. But, what do you do when your robotic creations need to roam beyond the reach of a single WiFi network? Good news: you can set up your Raspberry Pi-based robot with the capability to access multiple wireless networks. Keep reading to learn how to keep your robot connected by adding multiple networks to its Network Configuration file! (In fact, you can do this with any single board computer that uses a wpa_supplicant.conf file!) Our Orange Pi 5 Plus that runs a small local LLM is set up to work at home or on a friend’s home wifi network! Please note that we had to add a USB wifi dongle to the Orange Pi 5 Plus, but otherwise the process was the same as the one below.

Small white plastic looking robot connecting to wifiWhy Add Multi-Network Connectivity to Your Robot?

Before diving into the “how,” let’s briefly discuss the “why.” Multi-network connectivity can significantly enhance the functionality and reliability of your Raspberry Pi robot. Whether it’s transitioning between home and school, participating in competitions, or exploring outdoor environments, the ability to switch seamlessly between different WiFi networks ensures your robot can always communicate, receive updates, and perform its tasks without interruption.

The Robot Besties Viam Rover (Raspberry Pi 4 Based) has access to the wifi network at home, via a phone’s hotspot, at the makerspace, and at our favorite local coffeehouse (where it impressed everyone with some fancy spins and turns a few weekends ago!)

So, if you want to take your robot with you to develop or demo, you can give it the wifi SSID and passwords if you know them ahead of time! This can definitely make your demos more delightful since you won’t have to fidget around with wifi access if your robot needs it.

Step 1: Access Your Raspberry Pi

The first step is to access your Raspberry Pi. You can do this directly using a monitor, keyboard, and mouse connected to the Pi, or remotely via SSH if it’s already connected to a network. For beginners, the direct method might be more straightforward, especially if you are not sure if SSH access is enabled on your Pi or not!

Strangely Derpy Robot Connecting To Wifi

Step 2: Edit the Network Configuration File

Once you have access to your Raspberry Pi’s terminal, the next step involves editing the network configuration file. This file tells your Raspberry Pi how to connect to different WiFi networks. You can find this file at `/etc/wpa_supplicant/wpa_supplicant.conf`.
To edit the file, use the command:

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

This opens the file in the nano text editor, a simple, user-friendly editor that’s perfect for quick edits like the one we’re doing today. Nano usually comes pre-installed on most Linux distros as well as on Mac! It’s super useful and convenient. You can learn more about this editor on the very retro looking GNU nano homepage – it’s not our fault if fall into a rabbit hole however!  BTW, the “sudo” part means you are running nano to edit the wpa_supplicant.conf file as a superuser. Once in nano, be sure to take a moment to examine the keystrokes across the bottom of the screen so that you know how to exit and save when we’re done editing the file.

Step 3: Add Multiple WiFi Networks

In the wpa_supplicant.conf file, you’ll see the configuration for your current WiFi network. To add a second network, you simply need to append additional network blocks to the file. Each block should look something like this:

network={
ssid="YourNetworkSSID"
psk="YourNetworkPassword"
}

Replace `”YourNetworkSSID”` and `”YourNetworkPassword”` with the SSID and password of the additional WiFi network you want to connect to. You can add as many networks as you need by repeating this block for each one!

Step 4: Save and Reboot

After adding the additional networks, press `CTRL+X` to exit nano, then `Y` to save your changes, and `Enter` to confirm. To apply the changes, reboot your Raspberry Pi with the command :

sudo reboot

If you’d rather not reboot your Pi for whatever reason, you can just reboot the networking by typing sudo systemctl restart networking Once your Raspberry Pi (or just the networking) restarts, it will automatically attempt to connect to the available WiFi networks in the order they are listed in the `wpa_supplicant.conf` file.

Small white robot in a dark purple room connecting to wifi via a red round antenna on its head

All the Networks All the Time!

By following these steps, you’ve just expanded the horizons for your robot, giving it the freedom to navigate and operate across multiple WiFi networks. This enhancement not only increases the versatility of your robotic projects but also ensures that your creations stay connected and functional, no matter where they are. Taking these simple steps can open up new possibilities for innovation and exploration in the fascinating world of robotics.

This post was inspired by an article about adding a second network to a digital photo frame! While this is a totally different application, the process is essentially the same.

Related

Filed Under: DIY Inspiration, Ideas, Open Source, Robotics, Technical Details Tagged With: networking, Raspberry Pi, wifi

Robot Kits and Goodies on Amazon!

XGO Raspberry Pi 4CM Robot Dog!

XGo Lite Micro:bit Robot Dog!
UNIHIKER IoT Python Single Board Computer with Touchscreen!
Elegoo Arduino Starter Kits! (we love these)
MakeBlock MBot MEGA!

Primary Sidebar

Search

More to See

DALL-E Generated Image: Steppers vs. Servos: How to choose the right motors for your robot

Steppers vs. Servos: Navigating the Motor Maze for Your Robotics Project

May 27, 2024 By robotbesties

DALL-E Generated Image: Low Power, Raspberry Pi based NAS for Your Robotics Data

Building a Low-Power, Raspberry Pi-Based NAS for Your Robotics Data

July 21, 2024 By robotbesties

Robot Roll Call!

  • XGO2 Lite
  • The Drawing Robot
  • Makeblock mBot Mega
  • Stanford Pupper
  • Mini Pupper (Mang Dang)
  • Viam Robotics Rover

Besties Accessories

  • KYY Portable Monitor
    Review coming soon for this highly recommended monitor - HDMI and USB-C connectors mean you can use it as a laptop 2nd monitor or for a primary Raspberry Pi monitor too!

Tags

3d Printed Agility Robotics ANYbotics ANYmal Arduino Automation autonomous robotics ChatGPT companion robots Digit Robot DIY robot Dreamebot drones electromagnet Futurism Kevin McAleer Laser Cutter Laser Engraver Maker maker electronics Maker Tools manufacturing MicroSD card NAS NAS Systems OpenAI opinions Orange Pi Python Raspberry Pi RobotBesties.com Robotics Startup robot projects robot vacuum ROS SBC Sensors SSD SSD PCIe NVMe Drive UniHiker Viam Viam Robotics Viam Robotics Rover YouTuber Zapier

Footer

More Besties…

Visit our smart garden friends – while they’re not robots, they will soon have some robot assistants. For now, ChatGPT is writing haiku poems about the beautiful edible plants growing in the indoor smart gardens.

Read Some Robot-Generated Poems!

Recent

  • Should you use a NAS for home automation and your robotics projects?
  • What’s the best laser cutter for maker projects?
  • Building a Low-Power, Raspberry Pi-Based NAS for Your Robotics Data
  • Crafting Your AI Sidekick: Building an AI Desktop Assistant with ChatGPT
  • Does a NAS need to be a dedicated machine or can it double as your regular computer?

Search

Tags

3d Printed Agility Robotics ANYbotics ANYmal Arduino Automation autonomous robotics ChatGPT companion robots Digit Robot DIY robot Dreamebot drones electromagnet Futurism Kevin McAleer Laser Cutter Laser Engraver Maker maker electronics Maker Tools manufacturing MicroSD card NAS NAS Systems OpenAI opinions Orange Pi Python Raspberry Pi RobotBesties.com Robotics Startup robot projects robot vacuum ROS SBC Sensors SSD SSD PCIe NVMe Drive UniHiker Viam Viam Robotics Viam Robotics Rover YouTuber Zapier

Copyright © 2025 · A Modus Praxis LLC Brand · Privacy Policy