{
    "componentChunkName": "component---src-components-page-template-jsx",
    "path": "/guides/hardware/flashing",
    "result": {"data":{"mdx":{"id":"42596a2c-8143-5dbc-a333-f55cb65abfeb","body":"var _excluded = [\"components\"];\n\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* @jsxRuntime classic */\n\n/* @jsx mdx */\nvar _frontmatter = {\n  \"section\": \"Guides\",\n  \"chapter\": \"Hardware\",\n  \"title\": \"Flashing a Robot\",\n  \"description\": \"How to install a new operating system on a robot\",\n  \"slug\": \"/guides/hardware/flashing\",\n  \"authors\": [\"Alex Biddulph (@Bidski)\", \"Cameron Murtagh (@CMurtagh-LGTM)\", \"Kip Hamiltons (@KipHamiltons)\", \"Mithun Sivanesan (@ZeoNyph)\"]\n};\n\nvar makeShortcode = function makeShortcode(name) {\n  return function MDXDefaultShortcode(props) {\n    console.warn(\"Component \" + name + \" was not imported, exported, or provided by MDXProvider as global scope\");\n    return mdx(\"div\", props);\n  };\n};\n\nvar Alert = makeShortcode(\"Alert\");\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n      props = _objectWithoutProperties(_ref, _excluded);\n\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"h2\", {\n    \"id\": \"flashing-a-robot\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h2\",\n    \"href\": \"#flashing-a-robot\",\n    \"aria-label\": \"flashing a robot permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Flashing a Robot\"), mdx(\"p\", null, \"To install Arch Linux (our OS of choice) on to a robot perform the following instructions. Make sure you know the robot number for this NUC before beginning.\"), mdx(\"ol\", null, mdx(\"li\", {\n    parentName: \"ol\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, \"Find the arch linux archive date in the \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/NUbots/NUbots/blob/main/docker/etc/pacman.d/mirrorlist\"\n  }, \"mirrorlist for our dockerfile\"), \", go to that date in the \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://archive.archlinux.org/iso/\"\n  }, \"Arch Linux Archive ISO page\"), \", download \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"archlinux-x86_64.iso\"), \" and burn it onto a \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://wiki.archlinux.org/index.php/USB_flash_installation_media#In_GNU/Linux\"\n  }, \"USB thumb drive\"), \" using the following instructions\"), mdx(\"ul\", {\n    parentName: \"li\"\n  }, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Find the USB drive in your system. This will vary from one system to another and choosing the wrong drive will cause irreversible data loss.\", mdx(\"ul\", {\n    parentName: \"li\"\n  }, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Use \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"sudo fdisk -l\"), \", or the \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"Disks\"), \" GUI program to find your USB drive. It will probably be \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"/dev/sdX\"), \", where \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"X\"), \" is a letter of the alphabet.\"))), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Burn the Arch Linux ISO you just downloaded to the USB drive (in this example we are using \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"/dev/sdb\"), \")\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"pre\", {\n    parentName: \"li\"\n  }, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-bash\"\n  }, \"sudo dd bs=4M if=~/Downloads/archlinux-2024.11.01-x86_64.iso of=/dev/sdb status=progress oflag=sync\\n\"))))), mdx(\"li\", {\n    parentName: \"ol\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, \"If you are using a brand new NUC, Boot into the BIOS on the NUC\"), mdx(\"ul\", {\n    parentName: \"li\"\n  }, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Turn the NUC on and hold down the F2 button\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Intel Visual BIOS should appear\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Navigate to \\\"Advanced\\\" menu\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Navigate to \\\"Power\\\" then set \\\"After Power Failure\\\" to \\\"Power On\\\"\\n\", mdx(\"img\", {\n    parentName: \"li\",\n    \"src\": \"/opt/build/repo/src/book/03-guides/03-hardware/images/flashing/bios_power.jpg\",\n    \"alt\": \"BIOS Power Menu\",\n    \"title\": \"BIOS Power Menu\"\n  })), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Navigate to \\\"Boot\\\" and then \\\"Boot Configuration\\\"\", mdx(\"ul\", {\n    parentName: \"li\"\n  }, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Ensure \\\"Boot USB Devices First\\\" is enabled in \\\"UEFI Boot\\\"\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Ensure \\\"USB\\\" is enabled in \\\"Boot Devices\\\"\\n\", mdx(\"img\", {\n    parentName: \"li\",\n    \"src\": \"/opt/build/repo/src/book/03-guides/03-hardware/images/flashing/bios_boot_configuration.jpg\",\n    \"alt\": \"BIOS Boot Configuration Menu\",\n    \"title\": \"BIOS Boot Configuration Menu\"\n  })))), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Navigate to \\\"Secure Boot\\\" and disable \\\"Secure Boot\\\"\\n\", mdx(\"img\", {\n    parentName: \"li\",\n    \"src\": \"/opt/build/repo/src/book/03-guides/03-hardware/images/flashing/bios_secure_boot.jpg\",\n    \"alt\": \"BIOS Secure Boot Menu\",\n    \"title\": \"BIOS Secure Boot Menu\"\n  })), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Press F10 to save settings and exit and ensure you USB drive is plugged in\"))), mdx(\"li\", {\n    parentName: \"ol\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, \"If you are not using a brand new NUC, ensure your USB drive is plugged in and turn the NUC on\")), mdx(\"li\", {\n    parentName: \"ol\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, \"Once the system has booted into the LiveUSB environment on the robot, ensure the robot has an active network connection\"), mdx(\"ul\", {\n    parentName: \"li\"\n  }, mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"img\", {\n    parentName: \"li\",\n    \"src\": \"/opt/build/repo/src/book/03-guides/03-hardware/images/flashing/liveusb.jpg\",\n    \"alt\": \"LiveUSB Environment\",\n    \"title\": \"LiveUSB Environment\"\n  })), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, \"Run \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"ip addr\"), \" and look for a \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"inet\"), \" line that has a valid IP address on it. If you can't see one you don't have a network connection. Alternatively, run \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"ping -c 3 google.com\"), \" and look for a response time.\"), mdx(\"img\", {\n    parentName: \"li\",\n    \"src\": \"/opt/build/repo/src/book/03-guides/03-hardware/images/flashing/internet.jpg\",\n    \"alt\": \"Internet connection\",\n    \"title\": \"Internet connection\"\n  }), mdx(\"img\", {\n    parentName: \"li\",\n    \"src\": \"/opt/build/repo/src/book/03-guides/03-hardware/images/flashing/no_internet.jpg\",\n    \"alt\": \"No internet connection\",\n    \"title\": \"No internet connection\"\n  })), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, \"If you have no connection and need to set up the WiFi interface, \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"#manually-setting-up-a-wifi-connection-on-the-robot\"\n  }, \"see below\"), \".\")))), mdx(\"li\", {\n    parentName: \"ol\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, \"Download the installation script \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://git.io/JeWaF\"\n  }, \"https://git.io/JeWaF\"), \" and make sure the script is executable\"), mdx(\"ul\", {\n    parentName: \"li\"\n  }, mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"pre\", {\n    parentName: \"li\"\n  }, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-bash\"\n  }, \"curl -L https://git.io/JeWaF -o ./arch_install.sh\\nchmod +x ./arch_install.sh\\n\"))), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"The installation script is located in the NUbots repository at \", mdx(\"a\", {\n    parentName: \"li\",\n    \"href\": \"https://github.com/NUbots/NUbots/blob/main/doc/ArchInstall/arch_install.sh\"\n  }, \"doc/ArchInstall/arch_install.sh\")))), mdx(\"li\", {\n    parentName: \"ol\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, \"Execute the script and follow the instructions\"), mdx(\"ul\", {\n    parentName: \"li\"\n  }, mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"pre\", {\n    parentName: \"li\"\n  }, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-bash\"\n  }, \"./arch_install.sh\\n\")))), mdx(\"pre\", {\n    parentName: \"li\"\n  }, mdx(\"code\", {\n    parentName: \"pre\"\n  }, \"<Alert type=\\\"warning\\\">\\n\\nDue to the Arch Linux ISO's age, packages may fail to install as part of this install script due to an outdated keyring (you may see this as an invalidated or corrupted signature).\\n\\nTo remedy this, update the Arch keyring by running `pacman -Sy archlinux-keyring` before running the install script.\\n\\n </Alert>\\n\\n\"))), mdx(\"li\", {\n    parentName: \"ol\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, \"The installation script will end by downloading a secondary script and providing you with a command that you must run\"), mdx(\"pre\", {\n    parentName: \"li\"\n  }, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-bash\"\n  }, \"ROBOT_NUMBER=<N> arch-chroot /mnt ./arch-chroot_install.sh\\n\")), mdx(\"p\", {\n    parentName: \"li\"\n  }, \"Substitute \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"<N>\"), \" with the number of the robot that you are building. This will influence the IP address of the robot as well as the robots' hostname.\"), mdx(Alert, {\n    type: \"warning\",\n    mdxType: \"Alert\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, \"The secondary script assumes that the network interfaces are named \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"eth0\"), \" for ethernet and \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"wlp58s0\"), \" for WiFi. If you \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"know\"), \" this is not the case then execute the script as follows\"), mdx(\"pre\", {\n    parentName: \"li\"\n  }, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-bash\"\n  }, \"ROBOT_NUMBER=<N> \\\\\\nETHERNET_INTERFACE=IF_NAME \\\\\\nWIFI_INTERFACE=IF_NAME \\\\\\narch-chroot /mnt ./arch-chroot_install.sh\\n\")))), mdx(\"li\", {\n    parentName: \"ol\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, \"Once that script has finished, run the following command.\"), mdx(\"pre\", {\n    parentName: \"li\"\n  }, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-bash\"\n  }, \"/mnt/arch-post_install.sh\\n\")), mdx(\"p\", {\n    parentName: \"li\"\n  }, \"This command will end by rebooting the robot. When this happens be sure to remove the USB installation drive from robot so that you may boot into the new system.\"), mdx(\"p\", {\n    parentName: \"li\"\n  }, \"The other two scripts can be found at \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/NUbots/NUbots/blob/main/doc/ArchInstall/arch-chroot_install.sh\"\n  }, \"doc/ArchInstall/arch-chroot_install.sh\"), \" and \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/NUbots/NUbots/blob/main/doc/ArchInstall/arch-post_install.sh\"\n  }, \"doc/ArchInstall/arch-post_install.sh\"))), mdx(\"li\", {\n    parentName: \"ol\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, \"Finally, we need to run the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"SystemConfigurator\"), \".\"), mdx(\"ul\", {\n    parentName: \"li\"\n  }, mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, \"Make sure you have built the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"system_configuration\"), \" role and run\"), mdx(\"pre\", {\n    parentName: \"li\"\n  }, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-bash\"\n  }, \"./b install -t n<N>\\n\")), mdx(\"p\", {\n    parentName: \"li\"\n  }, \"Where \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"<N>\"), \" is again replaced with the robot number.\"), mdx(Alert, {\n    type: \"warning\",\n    mdxType: \"Alert\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, \"Remember to include the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"-t\"), \" argument, as it installs the toolchain alongside the built binaries and configuration files (especially important here as these aren't installed as part of the install scripts).\"))), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, \"Now ssh into the robot and run\"), mdx(\"pre\", {\n    parentName: \"li\"\n  }, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-bash\"\n  }, \"./system_configuration\\n\")))))), mdx(\"h2\", {\n    \"id\": \"testing-the-new-robot\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h2\",\n    \"href\": \"#testing-the-new-robot\",\n    \"aria-label\": \"testing the new robot permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Testing the new robot\"), mdx(\"p\", null, \"Once installation is complete and you have booted into your shiny new OS, you should perform a couple of simple tests to ensure everything is operational.\"), mdx(\"p\", null, \"First, login to system\"), mdx(\"img\", {\n    \"src\": \"/opt/build/repo/src/book/03-guides/03-hardware/images/flashing/login.jpg\",\n    \"alt\": \"Login\",\n    \"title\": \"Login\"\n  }), mdx(\"p\", null, \"Now check for a network connection, the same as we did before. If \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"ip addr\"), \" indicates that there is no connection then it is likely that the secondary installation script made the wrong guess about the name of the network interfaces. Inspect the output from \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"ip link\"), \" and make note of the ethernet and wifi interface names.\"), mdx(Alert, {\n    type: \"warning\",\n    mdxType: \"Alert\"\n  }, mdx(\"p\", null, \"It is possible that \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"ip addr\"), \" will show a valid IP address for \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"bond0\"), \", but \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"ping -c 3 google.com\"), \" and \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"ping -c 3 8.8.8.8\"), \" will indicate that there is no network connection.\")), mdx(\"p\", null, \"If there is no connection, then the following files need to be modified (using either \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"sudo nano\"), \" or \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"sudo vim\"), \")\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"/etc/systemd/network/20-ethernet.network\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"/etc/systemd/network/30-wifi.network\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"/etc/systemd/network/99-ethernet.network\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"/etc/systemd/network/99-wifi.network\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"/etc/wpa_supplicant/wpa_supplicant-wlp0s20f3.conf\"))), mdx(\"p\", null, \"These 5 files need to be edited. Specifically, the value of \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"Name\"), \" should correspond with the interface name of the device being targeted. On the Nuc 12 this is \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"enp86s0\"), \" for ethernet and \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"wlp0s20f3\"), \" for wifi.\"), mdx(\"p\", null, \"Next, correct the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"wpa_supplicant\"), \" service by running\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-bash\"\n  }, \"sudo systemctl disable wpa_supplicant@wlan0\\nsudo systemctl enable wpa_supplicant@new_interface\\n\")), mdx(\"p\", null, \"Be sure to replace \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"new_interface\"), \" with the name of the WiFi interface.\"), mdx(\"p\", null, \"Once these files have been fixed, reboot by typing \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"sudo systemctl reboot\"), \" and then login again. Hopefully, \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"ip addr\"), \" indicates that there is an active network connection (on \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"bond0\"), \") and \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"ping -c 3 google.com\"), \" also indicates an active connection.\"), mdx(\"h2\", {\n    \"id\": \"manually-setting-up-a-wifi-connection-on-the-robot\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h2\",\n    \"href\": \"#manually-setting-up-a-wifi-connection-on-the-robot\",\n    \"aria-label\": \"manually setting up a wifi connection on the robot permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Manually setting up a WiFi connection on the robot\"), mdx(\"p\", null, \"To set up the WiFi interface you first need to know the name of the interface. To find this, run\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-bash\"\n  }, \"ip link\\n\")), mdx(\"img\", {\n    \"src\": \"/opt/build/repo/src/book/03-guides/03-hardware/images/flashing/known_interfaces.jpg\",\n    \"alt\": \"Known network interfaces\",\n    \"title\": \"Known network interfaces\"\n  }), mdx(\"p\", null, \"and look for an interface starting with \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"wl\"), \". On our robots it is usually \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"wlan0\"), \".\"), mdx(\"p\", null, \"The rest of these instructions assume a network using WPA2 (like the network used in the NUbots lab).\"), mdx(\"ol\", null, mdx(\"li\", {\n    parentName: \"ol\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, \"Make sure the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"wpa_supplicant\"), \" configuration directory exists\"), mdx(\"ul\", {\n    parentName: \"li\"\n  }, mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"pre\", {\n    parentName: \"li\"\n  }, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-bash\"\n  }, \"mkdir -p /etc/wpa_supplicant\\n\"))))), mdx(\"li\", {\n    parentName: \"ol\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, \"Setup the network configuration\"), mdx(\"ul\", {\n    parentName: \"li\"\n  }, mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"pre\", {\n    parentName: \"li\"\n  }, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-bash\"\n  }, \"wpa_passphrase <Network SSID> <Network Passphrase> > /etc/wpa_supplicant/wpa_supplicant-<WiFi Interface>.conf\\n\"))), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Be sure to replace \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"<Network SSID>\"), \" with the SSID of the wireless network to connect to (either \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"epsilon-x\"), \" or \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"epsilon-z\"), \" in the lab), \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"<Network Passphrase>\"), \" with the password for the network (ask someone for the lab password if you don't know it), and \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"<WiFi Interface>\"), \" with the name of the interface found earlier.\"))), mdx(\"li\", {\n    parentName: \"ol\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, \"Now start all of the necessary services\"), mdx(\"ul\", {\n    parentName: \"li\"\n  }, mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"pre\", {\n    parentName: \"li\"\n  }, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-bash\"\n  }, \"systemctl start dhcpcd.service\\nsystemctl start wpa_supplicant.service\\nsystemctl start wpa_supplicant@<Wifi Interface>.service\\n\"))), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Be sure to replace \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"<WiFi Interface>\"), \" with the name of the interface found earlier.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Wait a handful of seconds and run \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"ip addr\"), \" to check that the WiFi interface has an IP address\")))));\n}\n;\nMDXContent.isMDXComponent = true;","tableOfContents":{"items":[{"url":"#flashing-a-robot","title":"Flashing a Robot"},{"url":"#testing-the-new-robot","title":"Testing the new robot"},{"url":"#manually-setting-up-a-wifi-connection-on-the-robot","title":"Manually setting up a WiFi connection on the robot"}]},"frontmatter":{"section":"Guides","chapter":"Hardware","title":"Flashing a Robot","description":"How to install a new operating system on a robot","keywords":null,"slug":"/guides/hardware/flashing","hidden":null},"childNUbookContributions":{"authors":[{"name":"Alex Biddulph","username":"Bidski"},{"name":"Cameron Murtagh","username":"CMurtagh-LGTM"},{"name":"Kip Hamiltons","username":"KipHamiltons"},{"name":"Mithun Sivanesan","username":"ZeoNyph"}],"lastCommit":{"date":"2026-03-14T03:44:02.000Z","hash":"3bb2ae933dbf2f5ac3ed8aa82f12de9f2598138b"}}}},"pageContext":{"mdxPath":"src/book/03-guides/03-hardware/02-flashing.mdx","id":"42596a2c-8143-5dbc-a333-f55cb65abfeb","next":{"chapter":"Hardware","title":"Servo Setup and Calibration","description":"Learn how to test and calibrate servos.","slug":"/guides/hardware/servo-calibration","hidden":null},"previous":{"chapter":"Hardware","title":"Working with Robots","description":"How to safely handle and work with robots.","slug":"/guides/hardware/working-with-robots","hidden":null},"menu":[{"title":"Team","slug":"/team/introduction","chapters":[{"title":"Introduction","slug":"/team/introduction","pages":[{"title":"Introduction to NUbots","slug":"/team/introduction","hidden":null},{"title":"Areas of Research","slug":"/team/areas-of-research","hidden":null},{"title":"Current Team","slug":"/team/current-members","hidden":null}],"hidden":false},{"title":"Joining the Team","slug":"/team/how-we-work","pages":[{"title":"How We Work","slug":"/team/how-we-work","hidden":null},{"title":"How to Join NUbots","slug":"/team/how-to-join","hidden":null},{"title":"Lab Induction","slug":"/team/induction","hidden":null}],"hidden":false},{"title":"Community","slug":"/team/sponsors","pages":[{"title":"Sponsors","slug":"/team/sponsors","hidden":null},{"title":"Connect","slug":"/team/connect","hidden":null}],"hidden":false},{"title":"History","slug":"/team/history","pages":[{"title":"Team History","slug":"/team/history","hidden":null},{"title":"Past Members","slug":"/team/past-members","hidden":null},{"title":"Publications","slug":"/team/publications","hidden":null}],"hidden":false},{"title":"RoboCup","slug":"/team/robocup","pages":[{"title":"RoboCup","slug":"/team/robocup","hidden":null},{"title":"Resources","slug":"/team/robocup/resources","hidden":null},{"title":"Debriefs","slug":"/team/robocup/debriefs","hidden":null}],"hidden":false}],"hidden":false},{"title":"System","slug":"/system/foundations/overview","chapters":[{"title":"Foundations","slug":"/system/foundations/overview","pages":[{"title":"Overview","slug":"/system/foundations/overview","hidden":null},{"title":"Build System","slug":"/system/foundations/build-system","hidden":null},{"title":"Continuous Integration","slug":"/system/foundations/ci-system","hidden":null},{"title":"NUClear","slug":"/system/foundations/nuclear","hidden":null},{"title":"Mathematics","slug":"/system/foundations/mathematics","hidden":null},{"title":"Configuration and Script System","slug":"/system/foundations/config-script","hidden":null},{"title":"Director","slug":"/system/foundations/director","hidden":null}],"hidden":false},{"title":"Subsystems","slug":"/system/subsystems/input","pages":[{"title":"Input","slug":"/system/subsystems/input","hidden":null},{"title":"Odometry","slug":"/system/subsystems/odometry","hidden":null},{"title":"Localisation","slug":"/system/subsystems/localisation","hidden":null},{"title":"Motion","slug":"/system/subsystems/motion","hidden":null},{"title":"Vision","slug":"/system/subsystems/vision","hidden":null},{"title":"Behaviour","slug":"/system/subsystems/behaviour","hidden":null},{"title":"Logging","slug":"/system/subsystems/logging","hidden":null}],"hidden":false},{"title":"Tools","slug":"/system/tools/nusight","pages":[{"title":"NUsight","slug":"/system/tools/nusight","hidden":null},{"title":"NUbook","slug":"/system/tools/nubook","hidden":null},{"title":"NUpbr","slug":"/system/tools/nupbr","hidden":null},{"title":"NUgan","slug":"/system/tools/nugan","hidden":null},{"title":"System Configuration","slug":"/system/tools/system_configuration","hidden":null},{"title":"NatNet SDK","slug":"/system/tools/natnet_sdk","hidden":null}],"hidden":false},{"title":"Hardware","slug":"/system/hardware/overview","pages":[{"title":"Overview and Specifications","slug":"/system/hardware/overview","hidden":null}],"hidden":false},{"title":"Modules","slug":"/system/modules/actuation/","pages":[{"title":"Actuation","slug":"/system/modules/actuation/","hidden":null},{"title":"Extension","slug":"/system/modules/extension/","hidden":null},{"title":"Input","slug":"/system/modules/input/","hidden":null},{"title":"Localisation","slug":"/system/modules/localisation/","hidden":null},{"title":"Nbs","slug":"/system/modules/nbs/","hidden":null},{"title":"Network","slug":"/system/modules/network/","hidden":null},{"title":"Output","slug":"/system/modules/output/","hidden":null},{"title":"Planning","slug":"/system/modules/planning/","hidden":null},{"title":"Platform","slug":"/system/modules/platform/","hidden":null},{"title":"Purpose","slug":"/system/modules/purpose/","hidden":null},{"title":"Skill","slug":"/system/modules/skill/","hidden":null},{"title":"Strategy","slug":"/system/modules/strategy/","hidden":null},{"title":"Support","slug":"/system/modules/support/","hidden":null},{"title":"Tools","slug":"/system/modules/tools/","hidden":null},{"title":"Vision","slug":"/system/modules/vision/","hidden":null}],"hidden":false}],"hidden":false},{"title":"Guides","slug":"/guides/main/getting-started","chapters":[{"title":"Main Codebase","slug":"/guides/main/getting-started","pages":[{"title":"Getting Started","slug":"/guides/main/getting-started","hidden":null},{"title":"NUClear","slug":"/guides/main/nuclear-tutorial","hidden":null},{"title":"Running and Tuning Scripts","slug":"/guides/main/tuning-and-running-scripts","hidden":null},{"title":"Maintaining Subsystems","slug":"/guides/main/maintaining-subsystems","hidden":null},{"title":"Data Recording and Playback","slug":"/guides/main/data-recording-playback","hidden":null},{"title":"Camera Calibration","slug":"/guides/main/camera-calibration","hidden":null},{"title":"Onboarding Workshop","slug":"/guides/main/onboarding","hidden":null}],"hidden":false},{"title":"Tools","slug":"/guides/tools/nusight-contribution","pages":[{"title":"Contributing to NUsight","slug":"/guides/tools/nusight-contribution","hidden":null},{"title":"Setting Up Webots","slug":"/guides/tools/webots-setup","hidden":null},{"title":"Visual Mesh Getting Started","slug":"/guides/tools/visualmesh","hidden":null},{"title":"Using NUpbr","slug":"/guides/tools/nupbr-guide","hidden":null},{"title":"GameController Setup","slug":"/guides/tools/gamecontroller","hidden":null}],"hidden":false},{"title":"Hardware","slug":"/guides/hardware/working-with-robots","pages":[{"title":"Working with Robots","slug":"/guides/hardware/working-with-robots","hidden":null},{"title":"Flashing a Robot","slug":"/guides/hardware/flashing","hidden":null},{"title":"Servo Setup and Calibration","slug":"/guides/hardware/servo-calibration","hidden":null},{"title":"Batteries","slug":"/guides/hardware/batteries","hidden":null},{"title":"DARwIn Op2 Robot Restoration and Calibration Guide","slug":"/guides/hardware/darwin-op2-guide","hidden":null}],"hidden":false},{"title":"General","slug":"/guides/general/learning-resources","pages":[{"title":"Learning Resources","slug":"/guides/general/learning-resources","hidden":null},{"title":"Contribution Workflow","slug":"/guides/general/contribute","hidden":null},{"title":"RoboCup Setup","slug":"/guides/general/robocup-setup","hidden":null},{"title":"Troubleshooting","slug":"/guides/general/troubleshooting","hidden":null},{"title":"Code Conventions","slug":"/guides/general/code-conventions","hidden":null},{"title":"Glossary","slug":"/guides/general/glossary","hidden":null}],"hidden":false}],"hidden":false},{"title":"Kitchen Sink","slug":"/kitchen-sink/headers","chapters":[{"title":"Markdown","slug":"/kitchen-sink/headers","pages":[{"title":"Headers","slug":"/kitchen-sink/headers","hidden":true},{"title":"Formatting and Paragraphs","slug":"/kitchen-sink/formatting-and-paragraphs","hidden":true},{"title":"Blockquotes","slug":"/kitchen-sink/blockquotes","hidden":true},{"title":"Alerts","slug":"/kitchen-sink/alerts","hidden":true},{"title":"Images","slug":"/kitchen-sink/images","hidden":true},{"title":"Lists","slug":"/kitchen-sink/lists","hidden":true},{"title":"Code","slug":"/kitchen-sink/code","hidden":true},{"title":"Math","slug":"/kitchen-sink/math","hidden":true},{"title":"Table of Contents","slug":"/kitchen-sink/table-of-contents","hidden":true},{"title":"Tables","slug":"/kitchen-sink/tables","hidden":true},{"title":"Collapsible Content","slug":"/kitchen-sink/collapsible","hidden":true},{"title":"GraphViz Diagrams","slug":"/kitchen-sink/graphviz-diagrams","hidden":true},{"title":"Referencing","slug":"/kitchen-sink/referencing","hidden":true}],"hidden":true}],"hidden":true}],"references":null,"hidden":null}},
    "staticQueryHashes": ["3715292327","445096115","466146812"]}