<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.openmower.de/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Potter-91</id>
	<title>Open Mower Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.openmower.de/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Potter-91"/>
	<link rel="alternate" type="text/html" href="https://wiki.openmower.de/index.php?title=Special:Contributions/Potter-91"/>
	<updated>2026-04-30T16:08:17Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://wiki.openmower.de/index.php?title=Getting_Started_with_V2&amp;diff=415</id>
		<title>Getting Started with V2</title>
		<link rel="alternate" type="text/html" href="https://wiki.openmower.de/index.php?title=Getting_Started_with_V2&amp;diff=415"/>
		<updated>2025-04-23T12:20:02Z</updated>

		<summary type="html">&lt;p&gt;Potter-91: /* Reflashing the Bootloader onto the STM32 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page gathers information on how to get started with the Open Mower v2 software. Although things are getting stable, expect some changes and issues at the moment.&lt;br /&gt;
&lt;br /&gt;
If you have any questions, reach out on Discord, we try to help.&lt;br /&gt;
&lt;br /&gt;
== Reflashing the Bootloader onto the STM32 ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;&#039;&#039;&#039;If you got one of the very first x-core boards, you will need to re-flash the bootloader from the CM4&#039;&#039;&#039; &#039;&#039;(or by the SWD port).&#039;&#039;&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;&#039;&#039;&#039;Cause of a bug the ethernet ports are in a reset loop and there have been breaking changes in the protocol.&#039;&#039;&#039;&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
*CM4 on the core board&lt;br /&gt;
&lt;br /&gt;
*DHCP server on the ethernet where the STM32 is connected (I recommend installing &amp;lt;code&amp;gt;isc-dhcp-server&amp;lt;/code&amp;gt;. Its easy and works well for me)&lt;br /&gt;
&lt;br /&gt;
*OpenOCD installed on the CM4 (see here for how to do it: https://core.x-tech.online/docs/tutorials/flashing-stm32-from-cm4/)&lt;br /&gt;
&lt;br /&gt;
*Docker or Podman installed on the CM4. I am using podman here, you can replace `podman` for `docker` and it should work the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Step 1: Get the latest firmware===&lt;br /&gt;
&lt;br /&gt;
SSH into your CM4 and execute the following commands:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
mkdir ~/bootloader &amp;amp;&amp;amp; cd ~/bootloader&lt;br /&gt;
wget https://github.com/xtech/fw-xcore-boot/releases/download/v1.1.4/xcore-boot-v1.1.4.zip&lt;br /&gt;
unzip xcore-boot-v1.1.4.zip&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should now have a folder `artifacts` in your working directory. It contains the bootloader binaries.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Step 2: Flash the bootloader to your STM32===&lt;br /&gt;
&lt;br /&gt;
Run the following command to write the bootloader to your STM32.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
openocd -f interface/xcore.cfg -f target/stm32h7x.cfg -c &amp;quot;program artifacts/bootloader/xcore-boot.elf verify reset exit&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the command succeeded, the updated bootloader is stored in the STM32.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Step 3: Check, if it worked===&lt;br /&gt;
&lt;br /&gt;
Whenever the bootloader is running, the Heartbeat LED (heart icon on the PCB) should be flashing *BLUE*. Check, if this is the case.&lt;br /&gt;
&lt;br /&gt;
If this is not the case, the STM32 is in user-program mode and not in the bootloader. In order to force the STM32 into the bootloader, you need to power cycle the STM32 (RESET button is not enough).&lt;br /&gt;
&lt;br /&gt;
After power cycling, you should see the blue LED flashing. If not, ask on Discord - something has gone wrong.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Step 4: Use the bootloader host program to connect to the bootloader.===&lt;br /&gt;
&lt;br /&gt;
In this step we test that the host application can talk to the bootloader.&lt;br /&gt;
&lt;br /&gt;
Run the following command to disable the developer mode on the bootloader:&lt;br /&gt;
 podman run --rm -it --network=host ghcr.io/xtech/fw-xcore-boot --interface=eth0 set_dev_mode --disable&lt;br /&gt;
&lt;br /&gt;
Information about the used flags:&lt;br /&gt;
&lt;br /&gt;
*--rm: removes the temporary container after uploading the firmware&lt;br /&gt;
*-it: Allows terminal output to be instantly visible&lt;br /&gt;
*--network=host: Allows the container to access the hosts&#039; network directly&lt;br /&gt;
*--interface=eth0: Forces the bootloader software to use eth0, change to whatever your ethernet interface name is&lt;br /&gt;
*set_dev_mode --disable: Disables the bootloader&#039;s developer mode. Developer mode will just jump into the user space program without any verification. You won&#039;t need it when using the bootloader.&lt;br /&gt;
&lt;br /&gt;
A successful run should look like this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
openmower@openmower:~/bootloader $ podman run --rm -it --network=host ghcr.io/xtech/fw-xcore-boot --interface=eth0 set_dev_mode --disable&lt;br /&gt;
Using interface eth0 with IP 172.16.78.1&lt;br /&gt;
Received advertisement from 172.16.78.150: BOARD_ADVERTISEMENT:xcore-boot;application-mode&lt;br /&gt;
Board in application mode, sending RESET to board&lt;br /&gt;
Timeout (1/25)&lt;br /&gt;
Received advertisement from 172.16.78.150: BOARD_ADVERTISEMENT:xcore-boot&lt;br /&gt;
Found board at 172.16.78.150&lt;br /&gt;
Connected to 172.16.78.150:8007&lt;br /&gt;
Variables received from board:&lt;br /&gt;
BOOTLOADER VERSION: xcore-boot v1.1&lt;br /&gt;
BOARD: xcore&lt;br /&gt;
HARDWARE VERSION: 1.1.7&lt;br /&gt;
CARRIER BOARD: hw-openmower-yardforce&lt;br /&gt;
CARRIER BOARD VERSION: 1.0.1&lt;br /&gt;
Sent SET_DEV_MODE to board&lt;br /&gt;
&amp;gt; Got command: SET_DEV_MODE&lt;br /&gt;
Received HASH OK&lt;br /&gt;
Sent new value to board&lt;br /&gt;
&amp;gt; Dev Mode: Disabled.&lt;br /&gt;
&amp;gt;Successfully updated EEPROM&lt;br /&gt;
Error reading line: Connection closed by remote host&lt;br /&gt;
Connection closed&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Step 5: Upload a user firmware===&lt;br /&gt;
&lt;br /&gt;
We can now use the bootloader to upload a firmware to the STM32.&lt;br /&gt;
&lt;br /&gt;
In this example we flash the OpenMower v2 firmware for a YardForce robot.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Download the firmware you want to upload (.bin file)&lt;br /&gt;
# Get it here: https://github.com/xtech/fw-openmower-v2/actions&lt;br /&gt;
# Select the latest successful run, login and download the artifact&lt;br /&gt;
&lt;br /&gt;
# Extract the zip:&lt;br /&gt;
unzip openmower.zip&lt;br /&gt;
&lt;br /&gt;
# Upload the firmware&lt;br /&gt;
podman run --rm -it -v $(pwd):/workdir --network=host ghcr.io/xtech/fw-xcore-boot --interface=eth0 upload /workdir/openmower-yardforce.bin&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A successful run should look like this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
openmower@openmower:~/firmware $ podman run --rm -it -v $(pwd):/workdir --network=host ghcr.io/xtech/fw-xcore-boot --interface=eth0 upload /workdir/openmower-yardforce.bin&lt;br /&gt;
Using interface eth0 with IP 172.16.78.1&lt;br /&gt;
Received advertisement from 172.16.78.150: BOARD_ADVERTISEMENT:xcore-boot;application-mode&lt;br /&gt;
Board in application mode, sending RESET to board&lt;br /&gt;
Timeout (1/25)&lt;br /&gt;
Received advertisement from 172.16.78.150: BOARD_ADVERTISEMENT:xcore-boot&lt;br /&gt;
Found board at 172.16.78.150&lt;br /&gt;
File SHA256: 92d8213153e4a757edaff8070c3c51b7de48da1383bb2c9ef1042c3469b89130&lt;br /&gt;
File Length: 191208&lt;br /&gt;
Connected to 172.16.78.150:8007&lt;br /&gt;
Variables received from board:&lt;br /&gt;
BOOTLOADER VERSION: xcore-boot v1.1&lt;br /&gt;
BOARD: xcore&lt;br /&gt;
HARDWARE VERSION: 1.1.7&lt;br /&gt;
CARRIER BOARD: hw-openmower-yardforce&lt;br /&gt;
CARRIER BOARD VERSION: 1.0.1&lt;br /&gt;
Sending UPLOAD command&lt;br /&gt;
&amp;gt; Got command: UPLOAD&lt;br /&gt;
Received SEND HASH&lt;br /&gt;
Sent SHA256 to board&lt;br /&gt;
Received HASH OK&lt;br /&gt;
Sent file length to board&lt;br /&gt;
&amp;gt;Image size: 191208&lt;br /&gt;
&amp;gt;Erasing 2 Flash Pages.&lt;br /&gt;
&amp;gt;Erasing Chip...&lt;br /&gt;
&amp;gt;Erasing Done&lt;br /&gt;
Uploading file...&lt;br /&gt;
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 191k/191k [00:01&amp;lt;00:00, 182kB/s]&lt;br /&gt;
File content sent&lt;br /&gt;
Connection closed&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>
	</entry>
	<entry>
		<id>https://wiki.openmower.de/index.php?title=Getting_Started_with_V2&amp;diff=414</id>
		<title>Getting Started with V2</title>
		<link rel="alternate" type="text/html" href="https://wiki.openmower.de/index.php?title=Getting_Started_with_V2&amp;diff=414"/>
		<updated>2025-04-23T11:25:47Z</updated>

		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page gathers information on how to get started with the Open Mower v2 software. Although things are getting stable, expect some changes and issues at the moment.&lt;br /&gt;
&lt;br /&gt;
If you have any questions, reach out on Discord, we try to help.&lt;br /&gt;
&lt;br /&gt;
== Reflashing the Bootloader onto the STM32 ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;&#039;&#039;&#039;If you got one of the very first x-core boards, you will need to re-flash the bootloader frm the CM4 or by the SWD port.&#039;&#039;&#039;&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;&#039;&#039;&#039;Cause of a bug the ethernet ports are in a reset loop and there have been breaking changes in the protocol.&#039;&#039;&#039;&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
*CM4 on the core board&lt;br /&gt;
&lt;br /&gt;
*DHCP server on the ethernet where the STM32 is connected (I recommend installing &amp;lt;code&amp;gt;isc-dhcp-server&amp;lt;/code&amp;gt;. Its easy and works well for me)&lt;br /&gt;
&lt;br /&gt;
*OpenOCD installed on the CM4 (see here for how to do it: https://core.x-tech.online/docs/tutorials/flashing-stm32-from-cm4/)&lt;br /&gt;
&lt;br /&gt;
*Docker or Podman installed on the CM4. I am using podman here, you can replace `podman` for `docker` and it should work the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Step 1: Get the latest firmware===&lt;br /&gt;
&lt;br /&gt;
SSH into your CM4 and execute the following commands:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
mkdir ~/bootloader &amp;amp;&amp;amp; cd ~/bootloader&lt;br /&gt;
wget https://github.com/xtech/fw-xcore-boot/releases/download/v1.1.4/xcore-boot-v1.1.4.zip&lt;br /&gt;
unzip xcore-boot-v1.1.4.zip&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should now have a folder `artifacts` in your working directory. It contains the bootloader binaries.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Step 2: Flash the bootloader to your STM32===&lt;br /&gt;
&lt;br /&gt;
Run the following command to write the bootloader to your STM32.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
openocd -f interface/xcore.cfg -f target/stm32h7x.cfg -c &amp;quot;program artifacts/bootloader/xcore-boot.elf verify reset exit&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the command succeeded, the updated bootloader is stored in the STM32.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Step 3: Check, if it worked===&lt;br /&gt;
&lt;br /&gt;
Whenever the bootloader is running, the Heartbeat LED (heart icon on the PCB) should be flashing *BLUE*. Check, if this is the case.&lt;br /&gt;
&lt;br /&gt;
If this is not the case, the STM32 is in user-program mode and not in the bootloader. In order to force the STM32 into the bootloader, you need to power cycle the STM32 (RESET button is not enough).&lt;br /&gt;
&lt;br /&gt;
After power cycling, you should see the blue LED flashing. If not, ask on Discord - something has gone wrong.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Step 4: Use the bootloader host program to connect to the bootloader. ===&lt;br /&gt;
&lt;br /&gt;
In this step we test that the host application can talk to the bootloader.&lt;br /&gt;
&lt;br /&gt;
Run the following command to disable the developer mode on the bootloader:&lt;br /&gt;
 podman run --rm -it --network=host ghcr.io/xtech/fw-xcore-boot --interface=eth0 set_dev_mode --disable&lt;br /&gt;
&lt;br /&gt;
Information about the used flags:&lt;br /&gt;
&lt;br /&gt;
*--rm: removes the temporary container after uploading the firmware&lt;br /&gt;
*-it: Allows terminal output to be instantly visible&lt;br /&gt;
*--network=host: Allows the container to access the hosts&#039; network directly&lt;br /&gt;
*--interface=eth0: Forces the bootloader software to use eth0, change to whatever your ethernet interface name is&lt;br /&gt;
*set_dev_mode --disable: Disables the bootloader&#039;s developer mode. Developer mode will just jump into the user space program without any verification. You won&#039;t need it when using the bootloader.&lt;br /&gt;
&lt;br /&gt;
A successful run should look like this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
openmower@openmower:~/bootloader $ podman run --rm -it --network=host ghcr.io/xtech/fw-xcore-boot --interface=eth0 set_dev_mode --disable&lt;br /&gt;
Using interface eth0 with IP 172.16.78.1&lt;br /&gt;
Received advertisement from 172.16.78.150: BOARD_ADVERTISEMENT:xcore-boot;application-mode&lt;br /&gt;
Board in application mode, sending RESET to board&lt;br /&gt;
Timeout (1/25)&lt;br /&gt;
Received advertisement from 172.16.78.150: BOARD_ADVERTISEMENT:xcore-boot&lt;br /&gt;
Found board at 172.16.78.150&lt;br /&gt;
Connected to 172.16.78.150:8007&lt;br /&gt;
Variables received from board:&lt;br /&gt;
BOOTLOADER VERSION: xcore-boot v1.1&lt;br /&gt;
BOARD: xcore&lt;br /&gt;
HARDWARE VERSION: 1.1.7&lt;br /&gt;
CARRIER BOARD: hw-openmower-yardforce&lt;br /&gt;
CARRIER BOARD VERSION: 1.0.1&lt;br /&gt;
Sent SET_DEV_MODE to board&lt;br /&gt;
&amp;gt; Got command: SET_DEV_MODE&lt;br /&gt;
Received HASH OK&lt;br /&gt;
Sent new value to board&lt;br /&gt;
&amp;gt; Dev Mode: Disabled.&lt;br /&gt;
&amp;gt;Successfully updated EEPROM&lt;br /&gt;
Error reading line: Connection closed by remote host&lt;br /&gt;
Connection closed&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Step 5: Upload a user firmware===&lt;br /&gt;
&lt;br /&gt;
We can now use the bootloader to upload a firmware to the STM32.&lt;br /&gt;
&lt;br /&gt;
In this example we flash the OpenMower v2 firmware for a YardForce robot.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Download the firmware you want to upload (.bin file)&lt;br /&gt;
# Get it here: https://github.com/xtech/fw-openmower-v2/actions&lt;br /&gt;
# Select the latest successful run, login and download the artifact&lt;br /&gt;
&lt;br /&gt;
# Extract the zip:&lt;br /&gt;
unzip openmower.zip&lt;br /&gt;
&lt;br /&gt;
# Upload the firmware&lt;br /&gt;
podman run --rm -it -v $(pwd):/workdir --network=host ghcr.io/xtech/fw-xcore-boot --interface=eth0 upload /workdir/openmower-yardforce.bin&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A successful run should look like this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
openmower@openmower:~/firmware $ podman run --rm -it -v $(pwd):/workdir --network=host ghcr.io/xtech/fw-xcore-boot --interface=eth0 upload /workdir/openmower-yardforce.bin&lt;br /&gt;
Using interface eth0 with IP 172.16.78.1&lt;br /&gt;
Received advertisement from 172.16.78.150: BOARD_ADVERTISEMENT:xcore-boot;application-mode&lt;br /&gt;
Board in application mode, sending RESET to board&lt;br /&gt;
Timeout (1/25)&lt;br /&gt;
Received advertisement from 172.16.78.150: BOARD_ADVERTISEMENT:xcore-boot&lt;br /&gt;
Found board at 172.16.78.150&lt;br /&gt;
File SHA256: 92d8213153e4a757edaff8070c3c51b7de48da1383bb2c9ef1042c3469b89130&lt;br /&gt;
File Length: 191208&lt;br /&gt;
Connected to 172.16.78.150:8007&lt;br /&gt;
Variables received from board:&lt;br /&gt;
BOOTLOADER VERSION: xcore-boot v1.1&lt;br /&gt;
BOARD: xcore&lt;br /&gt;
HARDWARE VERSION: 1.1.7&lt;br /&gt;
CARRIER BOARD: hw-openmower-yardforce&lt;br /&gt;
CARRIER BOARD VERSION: 1.0.1&lt;br /&gt;
Sending UPLOAD command&lt;br /&gt;
&amp;gt; Got command: UPLOAD&lt;br /&gt;
Received SEND HASH&lt;br /&gt;
Sent SHA256 to board&lt;br /&gt;
Received HASH OK&lt;br /&gt;
Sent file length to board&lt;br /&gt;
&amp;gt;Image size: 191208&lt;br /&gt;
&amp;gt;Erasing 2 Flash Pages.&lt;br /&gt;
&amp;gt;Erasing Chip...&lt;br /&gt;
&amp;gt;Erasing Done&lt;br /&gt;
Uploading file...&lt;br /&gt;
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 191k/191k [00:01&amp;lt;00:00, 182kB/s]&lt;br /&gt;
File content sent&lt;br /&gt;
Connection closed&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>
	</entry>
	<entry>
		<id>https://wiki.openmower.de/index.php?title=Getting_Started_with_V2&amp;diff=413</id>
		<title>Getting Started with V2</title>
		<link rel="alternate" type="text/html" href="https://wiki.openmower.de/index.php?title=Getting_Started_with_V2&amp;diff=413"/>
		<updated>2025-04-23T11:24:16Z</updated>

		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page gathers information on how to get started with the Open Mower v2 software. Although things are getting stable, expect some changes and issues at the moment.&lt;br /&gt;
&lt;br /&gt;
If you have any questions, reach out on Discord, we try to help.&lt;br /&gt;
&lt;br /&gt;
== Reflashing the Bootloader onto the STM32 ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;&#039;&#039;&#039;If you got one of the very first x-core boards, you will need to re-flash the bootloader frm the CM4 or by the SWD port.&#039;&#039;&#039;&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;&#039;&#039;&#039;Cause of a bug the ethernet ports are in a reset loop and there have been breaking changes in the protocol.&#039;&#039;&#039;&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
*CM4 on the core board&lt;br /&gt;
&lt;br /&gt;
*DHCP server on the ethernet where the STM32 is connected (I recommend installing &amp;lt;code&amp;gt;isc-dhcp-server&amp;lt;/code&amp;gt;. Its easy and works well for me)&lt;br /&gt;
&lt;br /&gt;
*OpenOCD installed on the CM4 (see here for how to do it: https://core.x-tech.online/docs/tutorials/flashing-stm32-from-cm4/)&lt;br /&gt;
&lt;br /&gt;
*Docker or Podman installed on the CM4. I am using podman here, you can replace `podman` for `docker` and it should work the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Step 1: Get the latest firmware===&lt;br /&gt;
&lt;br /&gt;
SSH into your CM4 and execute the following commands:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
mkdir ~/bootloader &amp;amp;&amp;amp; cd ~/bootloader&lt;br /&gt;
wget https://github.com/xtech/fw-xcore-boot/releases/download/v1.1.4/xcore-boot-v1.1.4.zip&lt;br /&gt;
unzip xcore-boot-v1.1.4.zip&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should now have a folder `artifacts` in your working directory. It contains the bootloader binaries.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Step 2: Flash the bootloader to your STM32===&lt;br /&gt;
&lt;br /&gt;
Run the following command to write the bootloader to your STM32.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
openocd -f interface/xcore.cfg -f target/stm32h7x.cfg -c &amp;quot;program artifacts/bootloader/xcore-boot.elf verify reset exit&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the command succeeded, the updated bootloader is stored in the STM32.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Step 3: Check, if it worked===&lt;br /&gt;
&lt;br /&gt;
Whenever the bootloader is running, the Heartbeat LED (heart icon on the PCB) should be flashing *BLUE*. Check, if this is the case.&lt;br /&gt;
&lt;br /&gt;
If this is not the case, the STM32 is in user-program mode and not in the bootloader. In order to force the STM32 into the bootloader, you need to power cycle the STM32 (RESET button is not enough).&lt;br /&gt;
&lt;br /&gt;
After power cycling, you should see the blue LED flashing. If not, ask on Discord - something has gone wrong.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Step 4: Use the bootloader host program to connect to the bootloader. ===&lt;br /&gt;
&lt;br /&gt;
In this step we test that the host application can talk to the bootloader.&lt;br /&gt;
&lt;br /&gt;
Run the following command to disable the developer mode on the bootloader:&lt;br /&gt;
 podman run --rm -it --network=host ghcr.io/xtech/fw-xcore-boot --interface=eth0 set_dev_mode --disable&lt;br /&gt;
&lt;br /&gt;
Information about the used flags:&lt;br /&gt;
&lt;br /&gt;
*--rm: removes the temporary container after uploading the firmware&lt;br /&gt;
*-it: Allows terminal output to be instantly visible&lt;br /&gt;
*--network=host: Allows the container to access the hosts&#039; network directly&lt;br /&gt;
*--interface=eth0: Forces the bootloader software to use eth0, change to whatever your ethernet interface name is&lt;br /&gt;
*set_dev_mode --disable: Disables the bootloader&#039;s developer mode. Developer mode will just jump into the user space program without any verification. You won&#039;t need it when using the bootloader.&lt;br /&gt;
&lt;br /&gt;
A successful run should look like this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
openmower@openmower:~/bootloader $ podman run --rm -it --network=host ghcr.io/xtech/fw-xcore-boot --interface=eth0 set_dev_mode --disable&lt;br /&gt;
Using interface eth0 with IP 172.16.78.1&lt;br /&gt;
Received advertisement from 172.16.78.150: BOARD_ADVERTISEMENT:xcore-boot;application-mode&lt;br /&gt;
Board in application mode, sending RESET to board&lt;br /&gt;
Timeout (1/25)&lt;br /&gt;
Received advertisement from 172.16.78.150: BOARD_ADVERTISEMENT:xcore-boot&lt;br /&gt;
Found board at 172.16.78.150&lt;br /&gt;
Connected to 172.16.78.150:8007&lt;br /&gt;
Variables received from board:&lt;br /&gt;
BOOTLOADER VERSION: xcore-boot v1.1&lt;br /&gt;
BOARD: xcore&lt;br /&gt;
HARDWARE VERSION: 1.1.7&lt;br /&gt;
CARRIER BOARD: hw-openmower-yardforce&lt;br /&gt;
CARRIER BOARD VERSION: 1.0.1&lt;br /&gt;
Sent SET_DEV_MODE to board&lt;br /&gt;
&amp;gt; Got command: SET_DEV_MODE&lt;br /&gt;
Received HASH OK&lt;br /&gt;
Sent new value to board&lt;br /&gt;
&amp;gt; Dev Mode: Disabled.&lt;br /&gt;
&amp;gt;Successfully updated EEPROM&lt;br /&gt;
Error reading line: Connection closed by remote host&lt;br /&gt;
Connection closed&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Step 5: Upload a user firmware===&lt;br /&gt;
&lt;br /&gt;
We can now use the bootloader to upload a firmware to the STM32.&lt;br /&gt;
&lt;br /&gt;
In this example we flash the OpenMower v2 firmware for a YardForce robot.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Download the firmware you want to upload (.bin file)&lt;br /&gt;
# Get it here: https://github.com/xtech/fw-openmower-v2/actions&lt;br /&gt;
# Select the latest successful run, login and download the artifact&lt;br /&gt;
&lt;br /&gt;
# Extract the zip:&lt;br /&gt;
unzip openmower.zip&lt;br /&gt;
&lt;br /&gt;
# Upload the firmware&lt;br /&gt;
podman run --rm -it -v $(pwd):/workdir --network=host ghcr.io/xtech/fw-xcore-boot --interface=eth0 upload /workdir/openmower-yardforce.bin&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A successful run should look like this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
openmower@openmower:~/firmware $ podman run --rm -it -v $(pwd):/workdir --network=host ghcr.io/xtech/fw-xcore-boot --interface=eth0 upload /workdir/openmower-yardforce.bin&lt;br /&gt;
Using interface eth0 with IP 172.16.78.1&lt;br /&gt;
Received advertisement from 172.16.78.150: BOARD_ADVERTISEMENT:xcore-boot;application-mode&lt;br /&gt;
Board in application mode, sending RESET to board&lt;br /&gt;
Timeout (1/25)&lt;br /&gt;
Received advertisement from 172.16.78.150: BOARD_ADVERTISEMENT:xcore-boot&lt;br /&gt;
Found board at 172.16.78.150&lt;br /&gt;
File SHA256: 92d8213153e4a757edaff8070c3c51b7de48da1383bb2c9ef1042c3469b89130&lt;br /&gt;
File Length: 191208&lt;br /&gt;
Connected to 172.16.78.150:8007&lt;br /&gt;
Variables received from board:&lt;br /&gt;
BOOTLOADER VERSION: xcore-boot v1.1&lt;br /&gt;
BOARD: xcore&lt;br /&gt;
HARDWARE VERSION: 1.1.7&lt;br /&gt;
CARRIER BOARD: hw-openmower-yardforce&lt;br /&gt;
CARRIER BOARD VERSION: 1.0.1&lt;br /&gt;
Sending UPLOAD command&lt;br /&gt;
&amp;gt; Got command: UPLOAD&lt;br /&gt;
Received SEND HASH&lt;br /&gt;
Sent SHA256 to board&lt;br /&gt;
Received HASH OK&lt;br /&gt;
Sent file length to board&lt;br /&gt;
&amp;gt;Image size: 191208&lt;br /&gt;
&amp;gt;Erasing 2 Flash Pages.&lt;br /&gt;
&amp;gt;Erasing Chip...&lt;br /&gt;
&amp;gt;Erasing Done&lt;br /&gt;
Uploading file...&lt;br /&gt;
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 191k/191k [00:01&amp;lt;00:00, 182kB/s]&lt;br /&gt;
File content sent&lt;br /&gt;
Connection closed&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>
	</entry>
	<entry>
		<id>https://wiki.openmower.de/index.php?title=Getting_Started_with_V2&amp;diff=412</id>
		<title>Getting Started with V2</title>
		<link rel="alternate" type="text/html" href="https://wiki.openmower.de/index.php?title=Getting_Started_with_V2&amp;diff=412"/>
		<updated>2025-04-21T19:49:24Z</updated>

		<summary type="html">&lt;p&gt;Potter-91: /* Step 4: Use the bootloader host program to connect to the bootloader. */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page gathers information on how to get started with the Open Mower v2 software. Although things are getting stable, expect some changes and issues at the moment.&lt;br /&gt;
&lt;br /&gt;
If you have any questions, reach out on Discord, we try to help.&lt;br /&gt;
&lt;br /&gt;
== Reflashing the Bootloader onto the STM32 ==&lt;br /&gt;
&lt;br /&gt;
If you got one of the very first x-core boards, you will need to re-flash the bootloader (there have been breaking changes in the protocol).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* CM4 on the core board&lt;br /&gt;
&lt;br /&gt;
* DHCP server on the ethernet where the STM32 is connected (I recommend installing &amp;lt;code&amp;gt;isc-dhcp-server&amp;lt;/code&amp;gt;. Its easy and works well for me)&lt;br /&gt;
&lt;br /&gt;
* OpenOCD installed on the CM4 (see here for how to do it: https://core.x-tech.online/docs/tutorials/flashing-stm32-from-cm4/)&lt;br /&gt;
&lt;br /&gt;
* Docker or Podman installed on the CM4. I am using podman here, you can replace `podman` for `docker` and it should work the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Step 1: Get the latest firmware ===&lt;br /&gt;
&lt;br /&gt;
SSH into your CM4 and execute the following commands:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
mkdir ~/bootloader &amp;amp;&amp;amp; cd ~/bootloader&lt;br /&gt;
wget https://github.com/xtech/fw-xcore-boot/releases/download/v1.1.4/xcore-boot-v1.1.4.zip&lt;br /&gt;
unzip xcore-boot-v1.1.4.zip&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should now have a folder `artifacts` in your working directory. It contains the bootloader binaries.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Step 2: Flash the bootloader to your STM32 ===&lt;br /&gt;
&lt;br /&gt;
Run the following command to write the bootloader to your STM32.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
openocd -f interface/xcore.cfg -f target/stm32h7x.cfg -c &amp;quot;program artifacts/bootloader/xcore-boot.elf verify reset exit&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the command succeeded, the updated bootloader is stored in the STM32.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Step 3: Check, if it worked ===&lt;br /&gt;
&lt;br /&gt;
Whenever the bootloader is running, the Heartbeat LED (heart icon on the PCB) should be flashing *BLUE*. Check, if this is the case.&lt;br /&gt;
&lt;br /&gt;
If this is not the case, the STM32 is in user-program mode and not in the bootloader. In order to force the STM32 into the bootloader, you need to power cycle the STM32 (RESET button is not enough).&lt;br /&gt;
&lt;br /&gt;
After power cycling, you should see the blue LED flashing. If not, ask on Discord - something has gone wrong.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Step 4: Use the bootloader host program to connect to the bootloader. ===&lt;br /&gt;
&lt;br /&gt;
In this step we test that the host application can talk to the bootloader.&lt;br /&gt;
&lt;br /&gt;
Run the following command to disable the developer mode on the bootloader:&lt;br /&gt;
 podman run --rm -it --network=host ghcr.io/xtech/fw-xcore-boot --interface=eth0 set_dev_mode --disable&lt;br /&gt;
&lt;br /&gt;
Information about the used flags:&lt;br /&gt;
&lt;br /&gt;
* --rm: removes the temporary container after uploading the firmware&lt;br /&gt;
* -it: Allows terminal output to be instantly visible&lt;br /&gt;
* --network=host: Allows the container to access the hosts&#039; network directly&lt;br /&gt;
* --interface=eth0: Forces the bootloader software to use eth0, change to whatever your ethernet interface name is&lt;br /&gt;
* set_dev_mode --disable: Disables the bootloader&#039;s developer mode. Developer mode will just jump into the user space program without any verification. You won&#039;t need it when using the bootloader.&lt;br /&gt;
&lt;br /&gt;
A successful run should look like this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
openmower@openmower:~/bootloader $ podman run --rm -it --network=host ghcr.io/xtech/fw-xcore-boot --interface=eth0 set_dev_mode --disable&lt;br /&gt;
Using interface eth0 with IP 172.16.78.1&lt;br /&gt;
Received advertisement from 172.16.78.150: BOARD_ADVERTISEMENT:xcore-boot;application-mode&lt;br /&gt;
Board in application mode, sending RESET to board&lt;br /&gt;
Timeout (1/25)&lt;br /&gt;
Received advertisement from 172.16.78.150: BOARD_ADVERTISEMENT:xcore-boot&lt;br /&gt;
Found board at 172.16.78.150&lt;br /&gt;
Connected to 172.16.78.150:8007&lt;br /&gt;
Variables received from board:&lt;br /&gt;
BOOTLOADER VERSION: xcore-boot v1.1&lt;br /&gt;
BOARD: xcore&lt;br /&gt;
HARDWARE VERSION: 1.1.7&lt;br /&gt;
CARRIER BOARD: hw-openmower-yardforce&lt;br /&gt;
CARRIER BOARD VERSION: 1.0.1&lt;br /&gt;
Sent SET_DEV_MODE to board&lt;br /&gt;
&amp;gt; Got command: SET_DEV_MODE&lt;br /&gt;
Received HASH OK&lt;br /&gt;
Sent new value to board&lt;br /&gt;
&amp;gt; Dev Mode: Disabled.&lt;br /&gt;
&amp;gt;Successfully updated EEPROM&lt;br /&gt;
Error reading line: Connection closed by remote host&lt;br /&gt;
Connection closed&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Step 5: Upload a user firmware ===&lt;br /&gt;
&lt;br /&gt;
We can now use the bootloader to upload a firmware to the STM32.&lt;br /&gt;
&lt;br /&gt;
In this example we flash the OpenMower v2 firmware for a YardForce robot.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Download the firmware you want to upload (.bin file)&lt;br /&gt;
# Get it here: https://github.com/xtech/fw-openmower-v2/actions&lt;br /&gt;
# Select the latest successful run, login and download the artifact&lt;br /&gt;
&lt;br /&gt;
# Extract the zip:&lt;br /&gt;
unzip openmower.zip&lt;br /&gt;
&lt;br /&gt;
# Upload the firmware&lt;br /&gt;
podman run --rm -it -v $(pwd):/workdir --network=host ghcr.io/xtech/fw-xcore-boot --interface=eth0 upload /workdir/openmower-yardforce.bin&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A successful run should look like this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
openmower@openmower:~/firmware $ podman run --rm -it -v $(pwd):/workdir --network=host ghcr.io/xtech/fw-xcore-boot --interface=eth0 upload /workdir/openmower-yardforce.bin&lt;br /&gt;
Using interface eth0 with IP 172.16.78.1&lt;br /&gt;
Received advertisement from 172.16.78.150: BOARD_ADVERTISEMENT:xcore-boot;application-mode&lt;br /&gt;
Board in application mode, sending RESET to board&lt;br /&gt;
Timeout (1/25)&lt;br /&gt;
Received advertisement from 172.16.78.150: BOARD_ADVERTISEMENT:xcore-boot&lt;br /&gt;
Found board at 172.16.78.150&lt;br /&gt;
File SHA256: 92d8213153e4a757edaff8070c3c51b7de48da1383bb2c9ef1042c3469b89130&lt;br /&gt;
File Length: 191208&lt;br /&gt;
Connected to 172.16.78.150:8007&lt;br /&gt;
Variables received from board:&lt;br /&gt;
BOOTLOADER VERSION: xcore-boot v1.1&lt;br /&gt;
BOARD: xcore&lt;br /&gt;
HARDWARE VERSION: 1.1.7&lt;br /&gt;
CARRIER BOARD: hw-openmower-yardforce&lt;br /&gt;
CARRIER BOARD VERSION: 1.0.1&lt;br /&gt;
Sending UPLOAD command&lt;br /&gt;
&amp;gt; Got command: UPLOAD&lt;br /&gt;
Received SEND HASH&lt;br /&gt;
Sent SHA256 to board&lt;br /&gt;
Received HASH OK&lt;br /&gt;
Sent file length to board&lt;br /&gt;
&amp;gt;Image size: 191208&lt;br /&gt;
&amp;gt;Erasing 2 Flash Pages.&lt;br /&gt;
&amp;gt;Erasing Chip...&lt;br /&gt;
&amp;gt;Erasing Done&lt;br /&gt;
Uploading file...&lt;br /&gt;
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 191k/191k [00:01&amp;lt;00:00, 182kB/s]&lt;br /&gt;
File content sent&lt;br /&gt;
Connection closed&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>
	</entry>
	<entry>
		<id>https://wiki.openmower.de/index.php?title=Getting_Started_with_V2&amp;diff=411</id>
		<title>Getting Started with V2</title>
		<link rel="alternate" type="text/html" href="https://wiki.openmower.de/index.php?title=Getting_Started_with_V2&amp;diff=411"/>
		<updated>2025-04-21T19:46:10Z</updated>

		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page gathers information on how to get started with the Open Mower v2 software. Although things are getting stable, expect some changes and issues at the moment.&lt;br /&gt;
&lt;br /&gt;
If you have any questions, reach out on Discord, we try to help.&lt;br /&gt;
&lt;br /&gt;
== Reflashing the Bootloader onto the STM32 ==&lt;br /&gt;
&lt;br /&gt;
If you got one of the very first x-core boards, you will need to re-flash the bootloader (there have been breaking changes in the protocol).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Requirements:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* CM4 on the core board&lt;br /&gt;
&lt;br /&gt;
* DHCP server on the ethernet where the STM32 is connected (I recommend installing &amp;lt;code&amp;gt;isc-dhcp-server&amp;lt;/code&amp;gt;. Its easy and works well for me)&lt;br /&gt;
&lt;br /&gt;
* OpenOCD installed on the CM4 (see here for how to do it: https://core.x-tech.online/docs/tutorials/flashing-stm32-from-cm4/)&lt;br /&gt;
&lt;br /&gt;
* Docker or Podman installed on the CM4. I am using podman here, you can replace `podman` for `docker` and it should work the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Step 1: Get the latest firmware ===&lt;br /&gt;
&lt;br /&gt;
SSH into your CM4 and execute the following commands:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
mkdir ~/bootloader &amp;amp;&amp;amp; cd ~/bootloader&lt;br /&gt;
wget https://github.com/xtech/fw-xcore-boot/releases/download/v1.1.4/xcore-boot-v1.1.4.zip&lt;br /&gt;
unzip xcore-boot-v1.1.4.zip&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should now have a folder `artifacts` in your working directory. It contains the bootloader binaries.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Step 2: Flash the bootloader to your STM32 ===&lt;br /&gt;
&lt;br /&gt;
Run the following command to write the bootloader to your STM32.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
openocd -f interface/xcore.cfg -f target/stm32h7x.cfg -c &amp;quot;program artifacts/bootloader/xcore-boot.elf verify reset exit&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the command succeeded, the updated bootloader is stored in the STM32.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Step 3: Check, if it worked ===&lt;br /&gt;
&lt;br /&gt;
Whenever the bootloader is running, the Heartbeat LED (heart icon on the PCB) should be flashing *BLUE*. Check, if this is the case.&lt;br /&gt;
&lt;br /&gt;
If this is not the case, the STM32 is in user-program mode and not in the bootloader. In order to force the STM32 into the bootloader, you need to power cycle the STM32 (RESET button is not enough).&lt;br /&gt;
&lt;br /&gt;
After power cycling, you should see the blue LED flashing. If not, ask on Discord - something has gone wrong.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Step 4: Use the bootloader host program to connect to the bootloader. ===&lt;br /&gt;
&lt;br /&gt;
In this step we test that the host application can talk to the bootloader.&lt;br /&gt;
&lt;br /&gt;
Run the following command to disable the developer mode on the bootloader:&lt;br /&gt;
 podman run --rm -it --network=host ghcr.io/xtech/fw-xcore-boot --interface=eth0 set_dev_mode --disable&lt;br /&gt;
&lt;br /&gt;
Information about the used flags:&lt;br /&gt;
&lt;br /&gt;
* --rm: removes the temporary container after uploading the firmware&lt;br /&gt;
* -it: Allows terminal output to be instantly visible&lt;br /&gt;
* --network=host: Allows the container to access the hosts&#039; network directly&lt;br /&gt;
* --interface=eth0: Forces the bootloader software to use eth0, change to whatever your ethernet interface name is&lt;br /&gt;
* set_dev_mode --disable: Disables the bootloader&#039;s developer mode. Developer mode will just jump into the user space program without any verification. You won&#039;t need it when using the bootloader.&lt;br /&gt;
&lt;br /&gt;
A successful run should look like this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
openmower@openmower:~/bootloader $ podman run --rm -it --network=host ghcr.io/xtech/fw-xcore-boot --interface=eth0 set_dev_mode --disable&lt;br /&gt;
&lt;br /&gt;
Using interface eth0 with IP 172.16.78.1&lt;br /&gt;
&lt;br /&gt;
Received advertisement from 172.16.78.150: BOARD_ADVERTISEMENT:xcore-boot;application-mode&lt;br /&gt;
&lt;br /&gt;
Board in application mode, sending RESET to board&lt;br /&gt;
&lt;br /&gt;
Timeout (1/25)&lt;br /&gt;
&lt;br /&gt;
Received advertisement from 172.16.78.150: BOARD_ADVERTISEMENT:xcore-boot&lt;br /&gt;
&lt;br /&gt;
Found board at 172.16.78.150&lt;br /&gt;
&lt;br /&gt;
Connected to 172.16.78.150:8007&lt;br /&gt;
&lt;br /&gt;
Variables received from board:&lt;br /&gt;
&lt;br /&gt;
BOOTLOADER VERSION: xcore-boot v1.1&lt;br /&gt;
&lt;br /&gt;
BOARD: xcore&lt;br /&gt;
&lt;br /&gt;
HARDWARE VERSION: 1.1.7&lt;br /&gt;
&lt;br /&gt;
CARRIER BOARD: hw-openmower-yardforce&lt;br /&gt;
&lt;br /&gt;
CARRIER BOARD VERSION: 1.0.1&lt;br /&gt;
&lt;br /&gt;
Sent SET_DEV_MODE to board&lt;br /&gt;
&lt;br /&gt;
&amp;gt; Got command: SET_DEV_MODE&lt;br /&gt;
&lt;br /&gt;
Received HASH OK&lt;br /&gt;
&lt;br /&gt;
Sent new value to board&lt;br /&gt;
&lt;br /&gt;
&amp;gt; Dev Mode: Disabled.&lt;br /&gt;
&lt;br /&gt;
&amp;gt;Successfully updated EEPROM&lt;br /&gt;
&lt;br /&gt;
Error reading line: Connection closed by remote host&lt;br /&gt;
&lt;br /&gt;
Connection closed&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Step 5: Upload a user firmware ===&lt;br /&gt;
&lt;br /&gt;
We can now use the bootloader to upload a firmware to the STM32.&lt;br /&gt;
&lt;br /&gt;
In this example we flash the OpenMower v2 firmware for a YardForce robot.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Download the firmware you want to upload (.bin file)&lt;br /&gt;
# Get it here: https://github.com/xtech/fw-openmower-v2/actions&lt;br /&gt;
# Select the latest successful run, login and download the artifact&lt;br /&gt;
&lt;br /&gt;
# Extract the zip:&lt;br /&gt;
unzip openmower.zip&lt;br /&gt;
&lt;br /&gt;
# Upload the firmware&lt;br /&gt;
podman run --rm -it -v $(pwd):/workdir --network=host ghcr.io/xtech/fw-xcore-boot --interface=eth0 upload /workdir/openmower-yardforce.bin&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A successful run should look like this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
openmower@openmower:~/firmware $ podman run --rm -it -v $(pwd):/workdir --network=host ghcr.io/xtech/fw-xcore-boot --interface=eth0 upload /workdir/openmower-yardforce.bin&lt;br /&gt;
Using interface eth0 with IP 172.16.78.1&lt;br /&gt;
Received advertisement from 172.16.78.150: BOARD_ADVERTISEMENT:xcore-boot;application-mode&lt;br /&gt;
Board in application mode, sending RESET to board&lt;br /&gt;
Timeout (1/25)&lt;br /&gt;
Received advertisement from 172.16.78.150: BOARD_ADVERTISEMENT:xcore-boot&lt;br /&gt;
Found board at 172.16.78.150&lt;br /&gt;
File SHA256: 92d8213153e4a757edaff8070c3c51b7de48da1383bb2c9ef1042c3469b89130&lt;br /&gt;
File Length: 191208&lt;br /&gt;
Connected to 172.16.78.150:8007&lt;br /&gt;
Variables received from board:&lt;br /&gt;
BOOTLOADER VERSION: xcore-boot v1.1&lt;br /&gt;
BOARD: xcore&lt;br /&gt;
HARDWARE VERSION: 1.1.7&lt;br /&gt;
CARRIER BOARD: hw-openmower-yardforce&lt;br /&gt;
CARRIER BOARD VERSION: 1.0.1&lt;br /&gt;
Sending UPLOAD command&lt;br /&gt;
&amp;gt; Got command: UPLOAD&lt;br /&gt;
Received SEND HASH&lt;br /&gt;
Sent SHA256 to board&lt;br /&gt;
Received HASH OK&lt;br /&gt;
Sent file length to board&lt;br /&gt;
&amp;gt;Image size: 191208&lt;br /&gt;
&amp;gt;Erasing 2 Flash Pages.&lt;br /&gt;
&amp;gt;Erasing Chip...&lt;br /&gt;
&amp;gt;Erasing Done&lt;br /&gt;
Uploading file...&lt;br /&gt;
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 191k/191k [00:01&amp;lt;00:00, 182kB/s]&lt;br /&gt;
File content sent&lt;br /&gt;
Connection closed&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>
	</entry>
	<entry>
		<id>https://wiki.openmower.de/index.php?title=Main_Page&amp;diff=342</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.openmower.de/index.php?title=Main_Page&amp;diff=342"/>
		<updated>2023-06-05T11:51:06Z</updated>

		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The OpenMower Community Wiki ==&lt;br /&gt;
&lt;br /&gt;
Welcome to the OpenMower Community Wiki!&lt;br /&gt;
&lt;br /&gt;
This WIKI was only just started on 2022-04-22, but we&#039;ll collaborate on getting good information on the OpenMower project collected here.&lt;br /&gt;
&lt;br /&gt;
If you want to contribute to the Wiki: [https://discord.gg/jE7QNaSxW7 join the Discord], ask at the [https://discord.com/channels/958476543846412329/967345181013725194 #wiki-authors channel] for a wiki account and a wiki admin will create one.&lt;br /&gt;
&lt;br /&gt;
Also head over to the [https://discord.com/channels/958476543846412329/967345181013725194 #wiki-authors channel] if you want talk about wiki related stuff.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to Get Started ==&lt;br /&gt;
&lt;br /&gt;
One of the first steps currently is to browse around the discord and understand what the project is about. You can also have a look at Clemens&#039; second video ([https://www.youtube.com/watch?v=_bImqD-pQSA here]) of the project that details how to assemble the bot. &lt;br /&gt;
&lt;br /&gt;
First: Check the &#039;&#039;&#039;[[FAQ]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When you&#039;re ready, you can have a look at the &#039;&#039;&#039;[[Building the Mower]]&#039;&#039;&#039; section to see the Bill of Materials and steps required and check out &#039;&#039;&#039;[[Builder Road Map]]&#039;&#039;&#039; for a practical take on what to do.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;(Note this wiki is in progress and not complete yet, but we&#039;re working on it!)&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;&#039;&#039;&#039;⚡ Before checking out the community wiki head over to the Official Documentation at [https://openmower.de/ openmower.de] ⚡&#039;&#039;&#039;&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Resources==&lt;br /&gt;
&lt;br /&gt;
===[[FAQ]]===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;There is a continually evolving [[FAQ]] that is a good starting point for understanding the project and getting answers to some key questions.&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===[[Project overview|Project overview and timeline]]===&lt;br /&gt;
&lt;br /&gt;
Current status and future goals - [[Project overview|See it here]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Hardware Revisions===&lt;br /&gt;
&lt;br /&gt;
Open Mower hardware revisions, changelog, info: [https://openmower.de/docs/versions/ Moved to the official docs]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===[[System Image|Software Installation]] &#039;&#039;Old bare metal installation - not for users&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
On this page, you can find steps how to install a basic OpenMower system image.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===[[Running OpenMower]]===&lt;br /&gt;
&lt;br /&gt;
On this page, you can find steps how to run the OpenMower software.&lt;br /&gt;
We&#039;re doing:&lt;br /&gt;
- Starting the Software&lt;br /&gt;
- Magnetometer Calibration&lt;br /&gt;
- Recording a Map&lt;br /&gt;
- Starting the Mowing Process&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===[[Mini HOWTOs]]===&lt;br /&gt;
&lt;br /&gt;
On this page, you can find small HOWTOs for various things. Set [[Mini HOWTOs|here]]&lt;br /&gt;
&lt;br /&gt;
===Where to find more information===&lt;br /&gt;
&lt;br /&gt;
The entry points for more information are:&lt;br /&gt;
&lt;br /&gt;
*[https://discord.com/channels/958476543846412329/958476543846412331 The Discord for the project]&lt;br /&gt;
*[https://discord.com/channels/958476543846412329/958476543846412332 Annoncements in the Discord]&lt;br /&gt;
*[https://youtube.com/c/ClemensElflein/videos YouTube]&lt;br /&gt;
*[https://github.com/ClemensElflein/OpenMower Open Mower Main GitHub Repo - Overall and hardware]&lt;br /&gt;
*[https://github.com/ClemensElflein/open_mower_ros Open Mower GitHub Repo for the ROS logic in the OpenMower]&lt;br /&gt;
*[https://github.com/ClemensElflein/xESC xESC Motor Controller Repo (custom part for main board)]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==How to contribute==&lt;br /&gt;
&lt;br /&gt;
At the moment, there are different ways to contribute:&lt;br /&gt;
&lt;br /&gt;
*Building your own mower, testing the software and reporting bugs / committing fixes on the github repository&lt;br /&gt;
&lt;br /&gt;
*If you&#039;re not scared to see the inside of some mowers, please help us understand more about how they are built following instructions in the &#039;&#039;&#039;[[Mower Dissection]]&#039;&#039;&#039; page.&lt;br /&gt;
&lt;br /&gt;
*And finally, [https://www.patreon.com/ClemensElflein Patreon to support Clemens&#039; amazing work]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Disclaimer==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;This Wiki is provided as-is and free of charge. No guarantees of any kind are made that the information contained herein is exact or correct or does not violate any local regulations or cause any security risk. Any use you make of any information given here is at your own discretion and risk.&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>
	</entry>
	<entry>
		<id>https://wiki.openmower.de/index.php?title=Main_Page&amp;diff=341</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.openmower.de/index.php?title=Main_Page&amp;diff=341"/>
		<updated>2023-06-05T11:47:49Z</updated>

		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The OpenMower Community Wiki ==&lt;br /&gt;
&lt;br /&gt;
Welcome to the OpenMower Community Wiki!&lt;br /&gt;
&lt;br /&gt;
This WIKI was only just started on 2022-04-22, but we&#039;ll collaborate on getting good information on the OpenMower project collected here.&lt;br /&gt;
&lt;br /&gt;
If you want to contribute to the Wiki: [https://discord.gg/jE7QNaSxW7 join the Discord], ask at the [https://discord.com/channels/958476543846412329/967345181013725194 #wiki-authors channel] for a wiki account and a wiki admin will create one.&lt;br /&gt;
&lt;br /&gt;
Also head over to the [https://discord.com/channels/958476543846412329/967345181013725194 #wiki-authors channel] if you want talk about wiki related stuff.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to Get Started ==&lt;br /&gt;
&lt;br /&gt;
One of the first steps currently is to browse around the discord and understand what the project is about. You can also have a look at Clemens&#039; second video ([https://www.youtube.com/watch?v=_bImqD-pQSA here]) of the project that details how to assemble the bot. &lt;br /&gt;
&lt;br /&gt;
First: Check the &#039;&#039;&#039;[[FAQ]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When you&#039;re ready, you can have a look at the &#039;&#039;&#039;[[Building the Mower]]&#039;&#039;&#039; section to see the Bill of Materials and steps required and check out &#039;&#039;&#039;[[Builder Road Map]]&#039;&#039;&#039; for a practical take on what to do.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;(Note this wiki is in progress and not complete yet, but we&#039;re working on it!)&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;&#039;&#039;&#039;⚡ Before checking out the community wiki head over to the Official Documentation at [https://openmower.de/ openmower.de] ⚡&#039;&#039;&#039;&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Resources==&lt;br /&gt;
&lt;br /&gt;
===[[FAQ]]===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;There is a continually evolving [[FAQ]] that is a good starting point for understanding the project and getting answers to some key questions.&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===[[Project overview|Project overview and timeline]]===&lt;br /&gt;
&lt;br /&gt;
Current status and future goals - [[Project overview|See it here]]&lt;br /&gt;
&lt;br /&gt;
===Hardware Revisions===&lt;br /&gt;
&lt;br /&gt;
Open Mower hardware revisions, changelog, info: [https://openmower.de/docs/versions/ Moved to the official docs]&lt;br /&gt;
&lt;br /&gt;
===[[System Image|Software Installation]] &#039;&#039;Old bare metal installation - not for users&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
On this page, you can find steps how to install a basic OpenMower system image.&lt;br /&gt;
&lt;br /&gt;
===[[Running OpenMower]]===&lt;br /&gt;
&lt;br /&gt;
On this page, you can find steps how to run the OpenMower software.&lt;br /&gt;
We&#039;re doing:&lt;br /&gt;
- Starting the Software&lt;br /&gt;
- Magnetometer Calibration&lt;br /&gt;
- Recording a Map&lt;br /&gt;
- Starting the Mowing Process&lt;br /&gt;
&lt;br /&gt;
===[[Mini HOWTOs]]===&lt;br /&gt;
&lt;br /&gt;
On this page, you can find small HOWTOs for various things. Set [[Mini HOWTOs|here]]&lt;br /&gt;
&lt;br /&gt;
===Where to find more information===&lt;br /&gt;
&lt;br /&gt;
The entry points for more information are:&lt;br /&gt;
&lt;br /&gt;
*[https://discord.com/channels/958476543846412329/958476543846412331 The Discord for the project]&lt;br /&gt;
*[https://discord.com/channels/958476543846412329/958476543846412332 Annoncements in the Discord]&lt;br /&gt;
*[https://youtube.com/c/ClemensElflein/videos YouTube]&lt;br /&gt;
*[https://github.com/ClemensElflein/OpenMower Open Mower Main GitHub Repo - Overall and hardware]&lt;br /&gt;
*[https://github.com/ClemensElflein/open_mower_ros Open Mower GitHub Repo for the ROS logic in the OpenMower]&lt;br /&gt;
*[https://github.com/ClemensElflein/xESC xESC Motor Controller Repo (custom part for main board)]&lt;br /&gt;
&lt;br /&gt;
==How to contribute==&lt;br /&gt;
&lt;br /&gt;
At the moment, there are different ways to contribute:&lt;br /&gt;
&lt;br /&gt;
*Building your own mower, testing the software and reporting bugs / committing fixes on the github repository&lt;br /&gt;
&lt;br /&gt;
*If you&#039;re not scared to see the inside of some mowers, please help us understand more about how they are built following instructions in the &#039;&#039;&#039;[[Mower Dissection]]&#039;&#039;&#039; page.&lt;br /&gt;
&lt;br /&gt;
*And finally, [https://www.patreon.com/ClemensElflein Patreon to support Clemens&#039; amazing work]&lt;br /&gt;
&lt;br /&gt;
==Disclaimer==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;This Wiki is provided as-is and free of charge. No guarantees of any kind are made that the information contained herein is exact or correct or does not violate any local regulations or cause any security risk. Any use you make of any information given here is at your own discretion and risk.&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>
	</entry>
	<entry>
		<id>https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=340</id>
		<title>OLD Bare Metal System Image</title>
		<link rel="alternate" type="text/html" href="https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=340"/>
		<updated>2023-06-05T11:45:20Z</updated>

		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page will guide you through the steps to install a basic system image.&lt;br /&gt;
&lt;br /&gt;
On this image you will have the ROS base system, the OpenMower installation, local configuration for your mower and some tools to help you work with the mower.&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
In order to follow this guide, you will need the following:&lt;br /&gt;
&lt;br /&gt;
#A Raspberry Pi 4 (4GB or more recommended, [[System Image#Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM)|2GB works with swap, see here]])&lt;br /&gt;
#An SD card&lt;br /&gt;
#A soldered OpenMower mainboard&lt;br /&gt;
&lt;br /&gt;
==Installing the Base System==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;&#039;&#039;&#039;There is also a YouTube video explaining the steps in this section:&#039;&#039;&#039; https://youtu.be/_bImqD-pQSA?t=562&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Flashing Ubuntu to SD Card ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first step is to install the base system. We&#039;re using Ubuntu 20.04 Server for the Raspberry Pi. This is, because this image gives us best support ROS Noetic.&lt;br /&gt;
&lt;br /&gt;
Installing the base image is easy:&lt;br /&gt;
&lt;br /&gt;
#[https://www.raspberrypi.com/software/ Get the Raspberry Pi Imager software]&lt;br /&gt;
#Select the correct operating system:  &#039;&#039;Other-general-purpose OS &amp;gt; Ubuntu &amp;gt; Ubuntu Server 20.04.4 LTS (RPI 3/4/400) 64-bit&#039;&#039;&lt;br /&gt;
#Insert your SD card into your PC and select it in the &#039;&#039;Storage&#039;&#039; part of the software&lt;br /&gt;
#Click &#039;&#039;write&#039;&#039; and wait for the process to finish&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have successfully flashed your image, remove the SD for your PC &#039;&#039;&#039;and reinsert it again.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Then replace the &amp;lt;code&amp;gt;/boot/config.txt&amp;lt;/code&amp;gt; file with the one provided here: [https://github.com/ClemensElflein/OpenMower/blob/main/configs/RaspberryPiConfig/config.txt]&lt;br /&gt;
&lt;br /&gt;
This will enable all hardware serial ports on the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can theoretically configure networking in this step as well, but I&#039;m not recommending it. This is, because the networking information file gets only copied once and if you have an error it won&#039;t work.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;We need an interactive terminal in the next step anyways.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have done this step, you can eject the SD card and plug it into your Raspberry Pi 4.&lt;br /&gt;
&lt;br /&gt;
=== Opening a Serial Terminal ===&lt;br /&gt;
[[File:SerialRedirect.png|thumb|Serial Terminal: minicom -D /dev/ttyACM0]]&lt;br /&gt;
This step is needed for the following sections. The goal is to have a serial terminal to do basic config (networking etc) easily.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The easiest way of doing so is:&lt;br /&gt;
# Flash the SerialRedirect firmware into your Pico. Get it here: https://github.com/ClemensElflein/OpenMower/tree/main/Firmware/SerialRedirect/bin&lt;br /&gt;
# Provide your mainboard with power&lt;br /&gt;
# Plug your Pico into a computer. A virtual COM port should appear&lt;br /&gt;
# Connect to the COM port (I&#039;m using minicom, see image on the right), then press enter to start the Raspberry Pi.&lt;br /&gt;
#The Pi boots and a serial terminal will appear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you can login with the default credentials:&lt;br /&gt;
&lt;br /&gt;
username: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
password: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that you will need to change the password immediately.&lt;br /&gt;
&lt;br /&gt;
=== Disable Boot Interrupt ===&lt;br /&gt;
[[File:Image.png|thumb|Commands needed to disable boot interrupt on serial input.]]&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi boot loader will interrupt the boot sequence if data is sent through the main serial port of the Raspberry Pi. Since we&#039;re connecting &amp;quot;nosiy&amp;quot; hardware to the port, this will always interrupt the boot sequence and we need to disable this feature. &lt;br /&gt;
&lt;br /&gt;
In order to do this, reboot the Pi (sudo reboot) and send anything during the count-down in the bootloader (check the YouTube video linked above, if you&#039;re not sure).&lt;br /&gt;
&lt;br /&gt;
Then enter the following commands into the bootloader prompt:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
setenv bootdelay -2&lt;br /&gt;
saveenv&lt;br /&gt;
reset&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The Pi should reboot and the count-down should be gone.&lt;br /&gt;
&lt;br /&gt;
=== Some Settings ===&lt;br /&gt;
&lt;br /&gt;
[TODO/WIP]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are some miscellaneous settings I think are a good idea for an OpenMower install:&lt;br /&gt;
&lt;br /&gt;
* Remove the unnecessary snap system: &amp;lt;code&amp;gt;sudo snap remove --purge lxd &amp;amp;&amp;amp; sudo snap remove --purge core20 &amp;amp;&amp;amp; sudo snap remove --purge snapd &amp;amp;&amp;amp; sudo apt purge --autoremove snapd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Disable unattended upgrades: &amp;lt;code&amp;gt;sudo systemctl stop --force unattended-upgrades &amp;amp;&amp;amp; sudo systemctl disable unattended-upgrades &amp;amp;&amp;amp; sudo systemctl mask unattended-upgrades&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* I like to add the following to &amp;lt;code&amp;gt;cmdline.txt&amp;lt;/code&amp;gt; in order to fsck on boot:  &amp;lt;code&amp;gt;fsck.mode=force fsck.repair=yes&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* I prefer to use a static IP (If you use the [[System_Image#Installing_a_WiFi_Hot-Spot_(optional,_but_recommended)|recommend WiFi Hot-Spot]] use &amp;lt;code&amp;gt;sudo nmtui&amp;lt;/code&amp;gt; to configure a static IP)&lt;br /&gt;
&lt;br /&gt;
* If you like to have a terminal wifi scanner/signal monitor just install &amp;lt;code&amp;gt;sudo apt install wavemon&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you like you can change the timezone: &amp;lt;code&amp;gt;sudo timedatectl set-timezone Region/Location&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;sudo dpkg-reconfigure tzdata&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you ever like to plug a keyboard into the Pi don&#039;t forget to change the keymap: &amp;lt;code&amp;gt;sudo dpkg-reconfigure keyboard-configuration&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM)===&lt;br /&gt;
Compiling the OpenMower software will need more than 2GB of RAM. In order to still do this on a Pi with &amp;lt;= 2GB of RAM, we will add a 2GB swap file to the system by entering the following commands:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Create a new 2GB swap file&lt;br /&gt;
sudo fallocate -l 2G /swapfile&lt;br /&gt;
# Change permissions, so that only root can read and write&lt;br /&gt;
sudo chmod 600 /swapfile&lt;br /&gt;
# Create swap space in the file&lt;br /&gt;
sudo mkswap /swapfile&lt;br /&gt;
# Add it to the fstab&lt;br /&gt;
echo &#039;/swapfile swap swap defaults 0 0&#039; | sudo tee -a /etc/fstab /swapfile swap swap defaults 0 0&lt;br /&gt;
# Reboot to activate&lt;br /&gt;
sudo reboot&lt;br /&gt;
&lt;br /&gt;
# Check if it&#039;s activated&lt;br /&gt;
sudo swapon --show&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Installing a WiFi Hot-Spot (optional, but recommended)===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Since we will be configuring the WiFi interface, make sure that you have connected Ethernet to your Raspberry Pi for this step.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As soon as you have closed your mower&#039;s enclosure, you won&#039;t have physical access to your Raspberry Pi anymore. If for some reason it&#039;s unable to connect to your WiFi (e.g. you have changed your password), you would need to open the case to get access to the SD card or Ethernet port on the Pi to regain access.&lt;br /&gt;
&lt;br /&gt;
To prevent this, we&#039;re going to install a hot-spot software which helps you to connect to WiFi by opening a hot-spot each time the Pi cannot connect to a known WiFi connection.&lt;br /&gt;
&lt;br /&gt;
Now is the best time to do this, because we have a serial terminal anyways and can mess with the network interfaces without shutting us out of the system!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Just use the following commands for this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# We need to disable systemd-resolveds caching DNS stub resolver&lt;br /&gt;
# if you want to know why check: https://github.com/pi-hole/docker-pi-hole/#installing-on-ubuntu&lt;br /&gt;
sudo sed -r -i.orig &#039;s/#?DNSStubListener=yes/DNSStubListener=no/g&#039; /etc/systemd/resolved.conf&lt;br /&gt;
sudo systemctl restart systemd-resolved.service&lt;br /&gt;
&lt;br /&gt;
ping ntp.org&lt;br /&gt;
# This will throw an dns error:&lt;br /&gt;
#   ping: ntp.org: Temporary failure in name resolution&lt;br /&gt;
sudo sh -c &#039;rm /etc/resolv.conf &amp;amp;&amp;amp; ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf&#039;&lt;br /&gt;
sudo systemctl restart systemd-resolved.service&lt;br /&gt;
nslookup ntp.org&lt;br /&gt;
# DNS should work now&lt;br /&gt;
&lt;br /&gt;
# Install comitup using the latest version from the projects repo&lt;br /&gt;
wget https://davesteele.github.io/comitup/latest/davesteele-comitup-apt-source_latest.deb&lt;br /&gt;
sudo dpkg -i --force-all davesteele-comitup-apt-source_latest.deb&lt;br /&gt;
rm davesteele-comitup-apt-source_latest.deb&lt;br /&gt;
sudo apt update&lt;br /&gt;
sudo apt install comitup --no-install-recommends&lt;br /&gt;
&lt;br /&gt;
sudo systemctl stop comitup&lt;br /&gt;
# Now use network-manager to:&lt;br /&gt;
# - add you wifi network&lt;br /&gt;
# optional:&lt;br /&gt;
# - change your hostname&lt;br /&gt;
# - add a dhcp ethernet connection without any device assigned&lt;br /&gt;
# (if even the hotspot malfunctions you can plug in a usb ethernet adapter)&lt;br /&gt;
sudo nmtui&lt;br /&gt;
&lt;br /&gt;
# Edit comitup.conf to change the wifi name and password (I use OpenMower-&amp;lt;nn&amp;gt;)&lt;br /&gt;
sudo nano /etc/comitup.conf&lt;br /&gt;
sudo systemctl restart comitup&lt;br /&gt;
# reboot - it should work now&lt;br /&gt;
sudo reboot&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable Serial Console===&lt;br /&gt;
Now that we have setup the network and can access the Pi even if our WiFi is not in range, we need to disable that serial console so that we can use the serial port for hardware.&lt;br /&gt;
&lt;br /&gt;
To do this, enter: &amp;lt;code&amp;gt;sudo nano /boot/firmware/cmdline.txt&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and remove the &amp;lt;code&amp;gt;console=serial0,115200&amp;lt;/code&amp;gt; part of the line.&lt;br /&gt;
&lt;br /&gt;
Save the file and reboot. You should still see the bootloader output, but no serial output after that.&lt;br /&gt;
&lt;br /&gt;
==Installing Tools==&lt;br /&gt;
If you&#039;re happy with your basic Ubuntu setup, it&#039;s time to install some tools required for the OpenMower&lt;br /&gt;
&lt;br /&gt;
=== General Dependencies ===&lt;br /&gt;
Just install them with apt:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install --no-install-recommends build-essential git&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===STR2STR (optional, recommended; only needed if you&#039;re using NTRIP, so probably most of you)===&lt;br /&gt;
We need a newer version than the one available in apt, so install it from source:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install gfortran&lt;br /&gt;
git clone https://github.com/rtklibexplorer/RTKLIB&lt;br /&gt;
cd RTKLIB&lt;br /&gt;
git checkout tags/b34c&lt;br /&gt;
cd app/consapp/&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You should now be able to run str2str from anywhere.&lt;br /&gt;
&lt;br /&gt;
=== OpenOCD (optional, recommended; only needed if you want to flash Pico from Raspberry Pi)===&lt;br /&gt;
We need to get the OpenOCD version from the Raspberry Pi foundation, because the &amp;quot;original&amp;quot; one doesn&#039;t have the Pico support built in yet.&lt;br /&gt;
&lt;br /&gt;
Install it from source:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install automake autoconf build-essential libtool libftdi-dev libusb-1.0-0-dev texinfo pkg-config rpi.gpio-common&lt;br /&gt;
git clone https://github.com/raspberrypi/openocd.git --recursive --branch rp2040 --depth=1&lt;br /&gt;
cd openocd&lt;br /&gt;
./bootstrap&lt;br /&gt;
./configure --enable-ftdi --enable-sysfsgpio --enable-bcm2835gpio&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You can test if it was a success by running:&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
ubuntu@ubuntu:~$ openocd -v&lt;br /&gt;
Open On-Chip Debugger 0.11.0-g610f137-dirty (2022-06-07-00:39)&lt;br /&gt;
Licensed under GNU GPL v2&lt;br /&gt;
For bug reports, read&lt;br /&gt;
	http://openocd.org/doc/doxygen/bugs.html&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installing ROS and OpenMower==&lt;br /&gt;
We&#039;re using ROS Noetic for the OpenMower project. In this step we will install it, get the OpenMower sources, build the sources and create a basic configuration file for your mower.&lt;br /&gt;
&lt;br /&gt;
===Install ROS Noetic===&lt;br /&gt;
Since we&#039;re running Ubuntu 20.04 installing ROS is as easy as running the following commands:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Get the ROS apt repository&lt;br /&gt;
sudo sh -c &#039;echo &amp;quot;deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main&amp;quot; &amp;gt; /etc/apt/sources.list.d/ros-latest.list&#039;&lt;br /&gt;
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -&lt;br /&gt;
&lt;br /&gt;
# Install the ROS base system&lt;br /&gt;
sudo apt update&lt;br /&gt;
sudo apt install --no-install-recommends ros-noetic-ros-base&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;We only need to register the ROS installation in your &amp;lt;code&amp;gt;.bashrc&amp;lt;/code&amp;gt; file. This will enable you to call ROS specific commands from your terminal:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.bash&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Installing OpenMower Software===&lt;br /&gt;
Now we&#039;re finally able to install the OpenMower software. First, we&#039;re checking out the current version of the sources, then we&#039;re getting the dependencies and finally we&#039;re building the sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Clone the GitHub Repository:&lt;br /&gt;
git clone --recursive https://github.com/ClemensElflein/open_mower_ros.git&lt;br /&gt;
&lt;br /&gt;
# Get rosdep, only needed once&lt;br /&gt;
sudo apt install --no-install-recommends python3-rosdep&lt;br /&gt;
sudo rosdep init&lt;br /&gt;
rosdep update&lt;br /&gt;
&lt;br /&gt;
# Get the dependencies using rosdep&lt;br /&gt;
cd ~/open_mower_ros/&lt;br /&gt;
sudo apt-get install --no-install-recommends $(rosdep install --from-paths src --ignore-src --simulate | sed --expression &#039;1d&#039; | sort | tr -d &#039;\n&#039; | sed -e &#039;s/  sudo -H apt-get install//g&#039;)&lt;br /&gt;
&lt;br /&gt;
# Finally, build the sources. This will take a while! &lt;br /&gt;
catkin_make -j1 # on 2GB Pi with SWAP - this takes at least 30min&lt;br /&gt;
# OR&lt;br /&gt;
catkin_make -j2 # on 4/8GB Pi - this takes at least 20min&lt;br /&gt;
&lt;br /&gt;
# Copy the default configuration file to your home directory&lt;br /&gt;
cp ~/open_mower_ros/src/open_mower/config/mower_config.sh.example ~/mower_config.sh&lt;br /&gt;
&lt;br /&gt;
# The next step is to also source the OpenMower ROS install&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source ~/open_mower_ros/devel/setup.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
echo &amp;quot;source ~/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source ~/open_mower_ros/devel/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
echo &amp;quot;source ~/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;At this point the OpenMower software is successfully installed! You will need to configure the OpenMower software and then you&#039;re finally ready to mow.&lt;br /&gt;
&lt;br /&gt;
== Some Additional Issues==&lt;br /&gt;
&lt;br /&gt;
===I&#039;m using an external WiFi dongle for better coverage, but sometimes it doesn&#039;t work===&lt;br /&gt;
It seems that the Ubuntu sometimes puts external WiFi dongles to sleep. To prevent this, we create a service which disables powersave:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Enter this to create the service&lt;br /&gt;
sudo systemctl --full --force edit wifi_powersave@.service&lt;br /&gt;
&lt;br /&gt;
# Paste the following:&lt;br /&gt;
[Unit]&lt;br /&gt;
Description=Set WiFi power save %i&lt;br /&gt;
After=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
Type=oneshot&lt;br /&gt;
RemainAfterExit=yes&lt;br /&gt;
ExecStart=/sbin/iw dev wlan1 set power_save %i&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
# Save and exit, then activate using:&lt;br /&gt;
sudo systemctl disable wifi_powersave@on.service&lt;br /&gt;
sudo systemctl enable wifi_powersave@off.service&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>
	</entry>
	<entry>
		<id>https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=339</id>
		<title>OLD Bare Metal System Image</title>
		<link rel="alternate" type="text/html" href="https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=339"/>
		<updated>2023-06-05T10:19:34Z</updated>

		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page will guide you through the steps to install a basic system image.&lt;br /&gt;
&lt;br /&gt;
On this image you will have the ROS base system, the OpenMower installation, local configuration for your mower and some tools to help you work with the mower.&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
In order to follow this guide, you will need the following:&lt;br /&gt;
&lt;br /&gt;
#A Raspberry Pi 4 (4GB or more recommended, [[System Image#Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM)|2GB works with swap, see here]])&lt;br /&gt;
#An SD card&lt;br /&gt;
#A soldered OpenMower mainboard&lt;br /&gt;
&lt;br /&gt;
==Installing the Base System==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;&#039;&#039;&#039;There is also a YouTube video explaining the steps in this section:&#039;&#039;&#039; https://youtu.be/_bImqD-pQSA?t=562&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Flashing Ubuntu to SD Card ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first step is to install the base system. We&#039;re using Ubuntu 20.04 Server for the Raspberry Pi. This is, because this image gives us best support ROS Noetic.&lt;br /&gt;
&lt;br /&gt;
Installing the base image is easy:&lt;br /&gt;
&lt;br /&gt;
#[https://www.raspberrypi.com/software/ Get the Raspberry Pi Imager software]&lt;br /&gt;
#Select the correct operating system:  &#039;&#039;Other-general-purpose OS &amp;gt; Ubuntu &amp;gt; Ubuntu Server 20.04.4 LTS (RPI 3/4/400) 64-bit&#039;&#039;&lt;br /&gt;
#Insert your SD card into your PC and select it in the &#039;&#039;Storage&#039;&#039; part of the software&lt;br /&gt;
#Click &#039;&#039;write&#039;&#039; and wait for the process to finish&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have successfully flashed your image, remove the SD for your PC &#039;&#039;&#039;and reinsert it again.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Then replace the &amp;lt;code&amp;gt;/boot/config.txt&amp;lt;/code&amp;gt; file with the one provided here: [https://github.com/ClemensElflein/OpenMower/blob/main/configs/RaspberryPiConfig/config.txt]&lt;br /&gt;
&lt;br /&gt;
This will enable all hardware serial ports on the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can theoretically configure networking in this step as well, but I&#039;m not recommending it. This is, because the networking information file gets only copied once and if you have an error it won&#039;t work.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;We need an interactive terminal in the next step anyways.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have done this step, you can eject the SD card and plug it into your Raspberry Pi 4.&lt;br /&gt;
&lt;br /&gt;
=== Opening a Serial Terminal ===&lt;br /&gt;
[[File:SerialRedirect.png|thumb|Serial Terminal: minicom -D /dev/ttyACM0]]&lt;br /&gt;
This step is needed for the following sections. The goal is to have a serial terminal to do basic config (networking etc) easily.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The easiest way of doing so is:&lt;br /&gt;
# Flash the SerialRedirect firmware into your Pico. Get it here: https://github.com/ClemensElflein/OpenMower/tree/main/Firmware/SerialRedirect/bin&lt;br /&gt;
# Provide your mainboard with power&lt;br /&gt;
# Plug your Pico into a computer. A virtual COM port should appear&lt;br /&gt;
# Connect to the COM port (I&#039;m using minicom, see image on the right), then press enter to start the Raspberry Pi.&lt;br /&gt;
#The Pi boots and a serial terminal will appear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you can login with the default credentials:&lt;br /&gt;
&lt;br /&gt;
username: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
password: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that you will need to change the password immediately.&lt;br /&gt;
&lt;br /&gt;
=== Disable Boot Interrupt ===&lt;br /&gt;
[[File:Image.png|thumb|Commands needed to disable boot interrupt on serial input.]]&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi boot loader will interrupt the boot sequence if data is sent through the main serial port of the Raspberry Pi. Since we&#039;re connecting &amp;quot;nosiy&amp;quot; hardware to the port, this will always interrupt the boot sequence and we need to disable this feature. &lt;br /&gt;
&lt;br /&gt;
In order to do this, reboot the Pi (sudo reboot) and send anything during the count-down in the bootloader (check the YouTube video linked above, if you&#039;re not sure).&lt;br /&gt;
&lt;br /&gt;
Then enter the following commands into the bootloader prompt:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
setenv bootdelay -2&lt;br /&gt;
saveenv&lt;br /&gt;
reset&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The Pi should reboot and the count-down should be gone.&lt;br /&gt;
&lt;br /&gt;
=== Some Settings ===&lt;br /&gt;
&lt;br /&gt;
[TODO/WIP]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are some miscellaneous settings I think are a good idea for an OpenMower install:&lt;br /&gt;
&lt;br /&gt;
* Remove the unnecessary snap system: &amp;lt;code&amp;gt;sudo snap remove --purge lxd &amp;amp;&amp;amp; sudo snap remove --purge core20 &amp;amp;&amp;amp; sudo snap remove --purge snapd &amp;amp;&amp;amp; sudo apt purge --autoremove snapd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Disable unattended upgrades: &amp;lt;code&amp;gt;sudo systemctl stop --force unattended-upgrades &amp;amp;&amp;amp; sudo systemctl disable unattended-upgrades &amp;amp;&amp;amp; sudo systemctl mask unattended-upgrades&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* I like to add the following to &amp;lt;code&amp;gt;cmdline.txt&amp;lt;/code&amp;gt; in order to fsck on boot:  &amp;lt;code&amp;gt;fsck.mode=force fsck.repair=yes&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* I prefer to use a static IP (If you use the [[System_Image#Installing_a_WiFi_Hot-Spot_(optional,_but_recommended)|recommend WiFi Hot-Spot]] use &amp;lt;code&amp;gt;sudo nmtui&amp;lt;/code&amp;gt; to configure a static IP)&lt;br /&gt;
&lt;br /&gt;
* If you like to have a terminal wifi scanner/signal monitor just install &amp;lt;code&amp;gt;sudo apt install wavemon&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you like you can change the timezone: &amp;lt;code&amp;gt;sudo timedatectl set-timezone Region/Location&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;sudo dpkg-reconfigure tzdata&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you ever like to plug a keyboard into the Pi don&#039;t forget to change the keymap: &amp;lt;code&amp;gt;sudo dpkg-reconfigure keyboard-configuration&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM)===&lt;br /&gt;
Compiling the OpenMower software will need more than 2GB of RAM. In order to still do this on a Pi with &amp;lt;= 2GB of RAM, we will add a 2GB swap file to the system by entering the following commands:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Create a new 2GB swap file&lt;br /&gt;
sudo fallocate -l 2G /swapfile&lt;br /&gt;
# Change permissions, so that only root can read and write&lt;br /&gt;
sudo chmod 600 /swapfile&lt;br /&gt;
# Create swap space in the file&lt;br /&gt;
sudo mkswap /swapfile&lt;br /&gt;
# Add it to the fstab&lt;br /&gt;
echo &#039;/swapfile swap swap defaults 0 0&#039; | sudo tee -a /etc/fstab /swapfile swap swap defaults 0 0&lt;br /&gt;
# Reboot to activate&lt;br /&gt;
sudo reboot&lt;br /&gt;
&lt;br /&gt;
# Check if it&#039;s activated&lt;br /&gt;
sudo swapon --show&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Installing a WiFi Hot-Spot (optional, but recommended)===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Since we will be configuring the WiFi interface, make sure that you have connected Ethernet to your Raspberry Pi for this step.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As soon as you have closed your mower&#039;s enclosure, you won&#039;t have physical access to your Raspberry Pi anymore. If for some reason it&#039;s unable to connect to your WiFi (e.g. you have changed your password), you would need to open the case to get access to the SD card or Ethernet port on the Pi to regain access.&lt;br /&gt;
&lt;br /&gt;
To prevent this, we&#039;re going to install a hot-spot software which helps you to connect to WiFi by opening a hot-spot each time the Pi cannot connect to a known WiFi connection.&lt;br /&gt;
&lt;br /&gt;
Now is the best time to do this, because we have a serial terminal anyways and can mess with the network interfaces without shutting us out of the system!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Just use the following commands for this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# We need to disable systemd-resolveds caching DNS stub resolver&lt;br /&gt;
# if you want to know why check: https://github.com/pi-hole/docker-pi-hole/#installing-on-ubuntu&lt;br /&gt;
sudo sed -r -i.orig &#039;s/#?DNSStubListener=yes/DNSStubListener=no/g&#039; /etc/systemd/resolved.conf&lt;br /&gt;
sudo systemctl restart systemd-resolved.service&lt;br /&gt;
&lt;br /&gt;
ping ntp.org&lt;br /&gt;
# This will throw an dns error:&lt;br /&gt;
#   ping: ntp.org: Temporary failure in name resolution&lt;br /&gt;
sudo sh -c &#039;rm /etc/resolv.conf &amp;amp;&amp;amp; ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf&#039;&lt;br /&gt;
sudo systemctl restart systemd-resolved.service&lt;br /&gt;
nslookup ntp.org&lt;br /&gt;
# DNS should work now&lt;br /&gt;
&lt;br /&gt;
# Install comitup using the latest version from the projects repo&lt;br /&gt;
wget https://davesteele.github.io/comitup/latest/davesteele-comitup-apt-source_latest.deb&lt;br /&gt;
sudo dpkg -i --force-all davesteele-comitup-apt-source_latest.deb&lt;br /&gt;
rm davesteele-comitup-apt-source_latest.deb&lt;br /&gt;
sudo apt update&lt;br /&gt;
sudo apt install comitup --no-install-recommends&lt;br /&gt;
&lt;br /&gt;
sudo systemctl stop comitup&lt;br /&gt;
# Now use network-manager to:&lt;br /&gt;
# - add you wifi network&lt;br /&gt;
# optional:&lt;br /&gt;
# - change your hostname&lt;br /&gt;
# - add a dhcp ethernet connection without any device assigned&lt;br /&gt;
# (if even the hotspot malfunctions you can plug in a usb ethernet adapter)&lt;br /&gt;
sudo nmtui&lt;br /&gt;
&lt;br /&gt;
# Edit comitup.conf to change the wifi name and password (I use OpenMower-&amp;lt;nn&amp;gt;)&lt;br /&gt;
sudo nano /etc/comitup.conf&lt;br /&gt;
sudo systemctl restart comitup&lt;br /&gt;
# reboot - it should work now&lt;br /&gt;
sudo reboot&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable Serial Console===&lt;br /&gt;
Now that we have setup the network and can access the Pi even if our WiFi is not in range, we need to disable that serial console so that we can use the serial port for hardware.&lt;br /&gt;
&lt;br /&gt;
To do this, enter: &amp;lt;code&amp;gt;sudo nano /boot/firmware/cmdline.txt&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and remove the &amp;lt;code&amp;gt;console=serial0,115200&amp;lt;/code&amp;gt; part of the line.&lt;br /&gt;
&lt;br /&gt;
Save the file and reboot. You should still see the bootloader output, but no serial output after that.&lt;br /&gt;
&lt;br /&gt;
==Installing Tools==&lt;br /&gt;
If you&#039;re happy with your basic Ubuntu setup, it&#039;s time to install some tools required for the OpenMower&lt;br /&gt;
&lt;br /&gt;
=== General Dependencies ===&lt;br /&gt;
Just install them with apt:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install --no-install-recommends build-essential git&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===STR2STR (optional, recommended; only needed if you&#039;re using NTRIP, so probably most of you)===&lt;br /&gt;
We need a newer version than the one available in apt, so install it from source:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install gfortran&lt;br /&gt;
git clone https://github.com/rtklibexplorer/RTKLIB&lt;br /&gt;
cd RTKLIB&lt;br /&gt;
git checkout tags/b34c&lt;br /&gt;
cd app/consapp/&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You should now be able to run str2str from anywhere.&lt;br /&gt;
&lt;br /&gt;
=== OpenOCD (optional, recommended; only needed if you want to flash Pico from Raspberry Pi)===&lt;br /&gt;
We need to get the OpenOCD version from the Raspberry Pi foundation, because the &amp;quot;original&amp;quot; one doesn&#039;t have the Pico support built in yet.&lt;br /&gt;
&lt;br /&gt;
Install it from source:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install automake autoconf build-essential libtool libftdi-dev libusb-1.0-0-dev texinfo pkg-config rpi.gpio-common&lt;br /&gt;
git clone https://github.com/raspberrypi/openocd.git --recursive --branch rp2040 --depth=1&lt;br /&gt;
cd openocd&lt;br /&gt;
./bootstrap&lt;br /&gt;
./configure --enable-ftdi --enable-sysfsgpio --enable-bcm2835gpio&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You can test if it was a success by running:&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
ubuntu@ubuntu:~$ openocd -v&lt;br /&gt;
Open On-Chip Debugger 0.11.0-g610f137-dirty (2022-06-07-00:39)&lt;br /&gt;
Licensed under GNU GPL v2&lt;br /&gt;
For bug reports, read&lt;br /&gt;
	http://openocd.org/doc/doxygen/bugs.html&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installing ROS and OpenMower==&lt;br /&gt;
We&#039;re using ROS Noetic for the OpenMower project. In this step we will install it, get the OpenMower sources, build the sources and create a basic configuration file for your mower.&lt;br /&gt;
&lt;br /&gt;
===Install ROS Noetic===&lt;br /&gt;
Since we&#039;re running Ubuntu 20.04 installing ROS is as easy as running the following commands:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Get the ROS apt repository&lt;br /&gt;
sudo sh -c &#039;echo &amp;quot;deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main&amp;quot; &amp;gt; /etc/apt/sources.list.d/ros-latest.list&#039;&lt;br /&gt;
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -&lt;br /&gt;
&lt;br /&gt;
# Install the ROS base system&lt;br /&gt;
sudo apt update&lt;br /&gt;
sudo apt install --no-install-recommends ros-noetic-ros-base&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;We only need to register the ROS installation in your &amp;lt;code&amp;gt;.bashrc&amp;lt;/code&amp;gt; file. This will enable you to call ROS specific commands from your terminal:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.bash&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Installing OpenMower Software===&lt;br /&gt;
Now we&#039;re finally able to install the OpenMower software. First, we&#039;re checking out the current version of the sources, then we&#039;re getting the dependencies and finally we&#039;re building the sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Clone the GitHub Repository:&lt;br /&gt;
git clone --recursive https://github.com/ClemensElflein/open_mower_ros.git&lt;br /&gt;
&lt;br /&gt;
# Get rosdep, only needed once&lt;br /&gt;
sudo apt install --no-install-recommends python3-rosdep&lt;br /&gt;
sudo rosdep init&lt;br /&gt;
rosdep update&lt;br /&gt;
&lt;br /&gt;
# Get the dependencies using rosdep&lt;br /&gt;
cd ~/open_mower_ros/&lt;br /&gt;
sudo apt-get install --no-install-recommends $(rosdep install --from-paths src --ignore-src --simulate | sed --expression &#039;1d&#039; | sort | tr -d &#039;\n&#039; | sed -e &#039;s/  sudo -H apt-get install//g&#039;)&lt;br /&gt;
&lt;br /&gt;
# Finally, build the sources. This will take a while! &lt;br /&gt;
catkin_make -j1 # on 2GB Pi with SWAP - this takes at least 30min&lt;br /&gt;
# OR&lt;br /&gt;
catkin_make -j2 # on 4/8GB Pi - this takes at least 20min&lt;br /&gt;
&lt;br /&gt;
# Copy the default configuration file to your home directory&lt;br /&gt;
cp ~/open_mower_ros/src/open_mower/config/mower_config.sh.example ~/mower_config.sh&lt;br /&gt;
&lt;br /&gt;
# The next step is to also source the OpenMower ROS install&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;At this point the OpenMower software is successfully installed! You will need to configure the OpenMower software and then you&#039;re finally ready to mow.&lt;br /&gt;
&lt;br /&gt;
== Some Additional Issues==&lt;br /&gt;
&lt;br /&gt;
===I&#039;m using an external WiFi dongle for better coverage, but sometimes it doesn&#039;t work===&lt;br /&gt;
It seems that the Ubuntu sometimes puts external WiFi dongles to sleep. To prevent this, we create a service which disables powersave:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Enter this to create the service&lt;br /&gt;
sudo systemctl --full --force edit wifi_powersave@.service&lt;br /&gt;
&lt;br /&gt;
# Paste the following:&lt;br /&gt;
[Unit]&lt;br /&gt;
Description=Set WiFi power save %i&lt;br /&gt;
After=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
Type=oneshot&lt;br /&gt;
RemainAfterExit=yes&lt;br /&gt;
ExecStart=/sbin/iw dev wlan1 set power_save %i&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
# Save and exit, then activate using:&lt;br /&gt;
sudo systemctl disable wifi_powersave@on.service&lt;br /&gt;
sudo systemctl enable wifi_powersave@off.service&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>
	</entry>
	<entry>
		<id>https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=338</id>
		<title>OLD Bare Metal System Image</title>
		<link rel="alternate" type="text/html" href="https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=338"/>
		<updated>2023-06-05T09:52:17Z</updated>

		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page will guide you through the steps to install a basic system image.&lt;br /&gt;
&lt;br /&gt;
On this image you will have the ROS base system, the OpenMower installation, local configuration for your mower and some tools to help you work with the mower.&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
In order to follow this guide, you will need the following:&lt;br /&gt;
&lt;br /&gt;
#A Raspberry Pi 4 (4GB or more recommended, [[System Image#Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM)|2GB works with swap, see here]])&lt;br /&gt;
#An SD card&lt;br /&gt;
#A soldered OpenMower mainboard&lt;br /&gt;
&lt;br /&gt;
==Installing the Base System==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;&#039;&#039;&#039;There is also a YouTube video explaining the steps in this section:&#039;&#039;&#039; https://youtu.be/_bImqD-pQSA?t=562&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Flashing Ubuntu to SD Card ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first step is to install the base system. We&#039;re using Ubuntu 20.04 Server for the Raspberry Pi. This is, because this image gives us best support ROS Noetic.&lt;br /&gt;
&lt;br /&gt;
Installing the base image is easy:&lt;br /&gt;
&lt;br /&gt;
#[https://www.raspberrypi.com/software/ Get the Raspberry Pi Imager software]&lt;br /&gt;
#Select the correct operating system:  &#039;&#039;Other-general-purpose OS &amp;gt; Ubuntu &amp;gt; Ubuntu Server 20.04.4 LTS (RPI 3/4/400) 64-bit&#039;&#039;&lt;br /&gt;
#Insert your SD card into your PC and select it in the &#039;&#039;Storage&#039;&#039; part of the software&lt;br /&gt;
#Click &#039;&#039;write&#039;&#039; and wait for the process to finish&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have successfully flashed your image, remove the SD for your PC &#039;&#039;&#039;and reinsert it again.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Then replace the &amp;lt;code&amp;gt;/boot/config.txt&amp;lt;/code&amp;gt; file with the one provided here: [https://github.com/ClemensElflein/OpenMower/blob/main/configs/RaspberryPiConfig/config.txt]&lt;br /&gt;
&lt;br /&gt;
This will enable all hardware serial ports on the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can theoretically configure networking in this step as well, but I&#039;m not recommending it. This is, because the networking information file gets only copied once and if you have an error it won&#039;t work.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;We need an interactive terminal in the next step anyways.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have done this step, you can eject the SD card and plug it into your Raspberry Pi 4.&lt;br /&gt;
&lt;br /&gt;
=== Opening a Serial Terminal ===&lt;br /&gt;
[[File:SerialRedirect.png|thumb|Serial Terminal: minicom -D /dev/ttyACM0]]&lt;br /&gt;
This step is needed for the following sections. The goal is to have a serial terminal to do basic config (networking etc) easily.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The easiest way of doing so is:&lt;br /&gt;
# Flash the SerialRedirect firmware into your Pico. Get it here: https://github.com/ClemensElflein/OpenMower/tree/main/Firmware/SerialRedirect/bin&lt;br /&gt;
# Provide your mainboard with power&lt;br /&gt;
# Plug your Pico into a computer. A virtual COM port should appear&lt;br /&gt;
# Connect to the COM port (I&#039;m using minicom, see image on the right), then press enter to start the Raspberry Pi.&lt;br /&gt;
#The Pi boots and a serial terminal will appear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you can login with the default credentials:&lt;br /&gt;
&lt;br /&gt;
username: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
password: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that you will need to change the password immediately.&lt;br /&gt;
&lt;br /&gt;
=== Disable Boot Interrupt ===&lt;br /&gt;
[[File:Image.png|thumb|Commands needed to disable boot interrupt on serial input.]]&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi boot loader will interrupt the boot sequence if data is sent through the main serial port of the Raspberry Pi. Since we&#039;re connecting &amp;quot;nosiy&amp;quot; hardware to the port, this will always interrupt the boot sequence and we need to disable this feature. &lt;br /&gt;
&lt;br /&gt;
In order to do this, reboot the Pi (sudo reboot) and send anything during the count-down in the bootloader (check the YouTube video linked above, if you&#039;re not sure).&lt;br /&gt;
&lt;br /&gt;
Then enter the following commands into the bootloader prompt:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
setenv bootdelay -2&lt;br /&gt;
saveenv&lt;br /&gt;
reset&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The Pi should reboot and the count-down should be gone.&lt;br /&gt;
&lt;br /&gt;
=== Some Settings ===&lt;br /&gt;
&lt;br /&gt;
[TODO/WIP]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are some miscellaneous settings I think are a good idea for an OpenMower install:&lt;br /&gt;
&lt;br /&gt;
* Remove the unnecessary snap system: &amp;lt;code&amp;gt;sudo snap remove --purge lxd &amp;amp;&amp;amp; sudo snap remove --purge core20 &amp;amp;&amp;amp; sudo snap remove --purge snapd &amp;amp;&amp;amp; sudo apt purge --autoremove snapd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Disable unattended upgrades: &amp;lt;code&amp;gt;sudo systemctl stop --force unattended-upgrades &amp;amp;&amp;amp; sudo systemctl disable unattended-upgrades &amp;amp;&amp;amp; sudo systemctl mask unattended-upgrades&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* I like to add the following to &amp;lt;code&amp;gt;cmdline.txt&amp;lt;/code&amp;gt; in order to fsck on boot:  &amp;lt;code&amp;gt;fsck.mode=force fsck.repair=yes&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* I prefer to use a static IP (If you use the [[System_Image#Installing_a_WiFi_Hot-Spot_(optional,_but_recommended)|recommend WiFi Hot-Spot]] use &amp;lt;code&amp;gt;sudo nmtui&amp;lt;/code&amp;gt; to configure a static IP)&lt;br /&gt;
&lt;br /&gt;
* If you like to have a terminal wifi scanner/signal monitor just install &amp;lt;code&amp;gt;sudo apt install wavemon&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you like you can change the timezone: &amp;lt;code&amp;gt;sudo timedatectl set-timezone Region/Location&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;sudo dpkg-reconfigure tzdata&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you ever like to plug a keyboard into the Pi don&#039;t forget to change the keymap: &amp;lt;code&amp;gt;sudo dpkg-reconfigure keyboard-configuration&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM)===&lt;br /&gt;
Compiling the OpenMower software will need more than 2GB of RAM. In order to still do this on a Pi with &amp;lt;= 2GB of RAM, we will add a 2GB swap file to the system by entering the following commands:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Create a new 2GB swap file&lt;br /&gt;
sudo fallocate -l 2G /swapfile&lt;br /&gt;
# Change permissions, so that only root can read and write&lt;br /&gt;
sudo chmod 600 /swapfile&lt;br /&gt;
# Create swap space in the file&lt;br /&gt;
sudo mkswap /swapfile&lt;br /&gt;
# Add it to the fstab&lt;br /&gt;
echo &#039;/swapfile swap swap defaults 0 0&#039; | sudo tee -a /etc/fstab /swapfile swap swap defaults 0 0&lt;br /&gt;
# Reboot to activate&lt;br /&gt;
sudo reboot&lt;br /&gt;
&lt;br /&gt;
# Check if it&#039;s activated&lt;br /&gt;
sudo swapon --show&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Installing a WiFi Hot-Spot (optional, but recommended)===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Since we will be configuring the WiFi interface, make sure that you have connected Ethernet to your Raspberry Pi for this step.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As soon as you have closed your mower&#039;s enclosure, you won&#039;t have physical access to your Raspberry Pi anymore. If for some reason it&#039;s unable to connect to your WiFi (e.g. you have changed your password), you would need to open the case to get access to the SD card or Ethernet port on the Pi to regain access.&lt;br /&gt;
&lt;br /&gt;
To prevent this, we&#039;re going to install a hot-spot software which helps you to connect to WiFi by opening a hot-spot each time the Pi cannot connect to a known WiFi connection.&lt;br /&gt;
&lt;br /&gt;
Now is the best time to do this, because we have a serial terminal anyways and can mess with the network interfaces without shutting us out of the system!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Just use the following commands for this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# We need to disable systemd-resolveds caching DNS stub resolver&lt;br /&gt;
# if you want to know why check: https://github.com/pi-hole/docker-pi-hole/#installing-on-ubuntu&lt;br /&gt;
sudo sed -r -i.orig &#039;s/#?DNSStubListener=yes/DNSStubListener=no/g&#039; /etc/systemd/resolved.conf&lt;br /&gt;
sudo systemctl restart systemd-resolved.service&lt;br /&gt;
&lt;br /&gt;
ping ntp.org&lt;br /&gt;
# This will throw an dns error:&lt;br /&gt;
#   ping: ntp.org: Temporary failure in name resolution&lt;br /&gt;
sudo sh -c &#039;rm /etc/resolv.conf &amp;amp;&amp;amp; ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf&#039;&lt;br /&gt;
sudo systemctl restart systemd-resolved.service&lt;br /&gt;
nslookup ntp.org&lt;br /&gt;
# DNS should work now&lt;br /&gt;
&lt;br /&gt;
# Install comitup using the latest version from the projects repo&lt;br /&gt;
wget https://davesteele.github.io/comitup/latest/davesteele-comitup-apt-source_latest.deb&lt;br /&gt;
sudo dpkg -i --force-all davesteele-comitup-apt-source_latest.deb&lt;br /&gt;
rm davesteele-comitup-apt-source_latest.deb&lt;br /&gt;
sudo apt update&lt;br /&gt;
sudo apt install comitup --no-install-recommends&lt;br /&gt;
&lt;br /&gt;
sudo systemctl stop comitup&lt;br /&gt;
# Now use network-manager to:&lt;br /&gt;
# - add you wifi network&lt;br /&gt;
# optional:&lt;br /&gt;
# - change your hostname&lt;br /&gt;
# - add a dhcp ethernet connection without any device assigned&lt;br /&gt;
# (if even the hotspot malfunctions you can plug in a usb ethernet adapter)&lt;br /&gt;
sudo nmtui&lt;br /&gt;
&lt;br /&gt;
# Edit comitup.conf to change the wifi name and password (I use OpenMower-&amp;lt;nn&amp;gt;)&lt;br /&gt;
sudo nano /etc/comitup.conf&lt;br /&gt;
sudo systemctl restart comitup&lt;br /&gt;
# reboot - it should work now&lt;br /&gt;
sudo reboot&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable Serial Console===&lt;br /&gt;
Now that we have setup the network and can access the Pi even if our WiFi is not in range, we need to disable that serial console so that we can use the serial port for hardware.&lt;br /&gt;
&lt;br /&gt;
To do this, enter: &amp;lt;code&amp;gt;sudo nano /boot/firmware/cmdline.txt&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and remove the &amp;lt;code&amp;gt;console=serial0,115200&amp;lt;/code&amp;gt; part of the line.&lt;br /&gt;
&lt;br /&gt;
Save the file and reboot. You should still see the bootloader output, but no serial output after that.&lt;br /&gt;
&lt;br /&gt;
==Installing Tools==&lt;br /&gt;
If you&#039;re happy with your basic Ubuntu setup, it&#039;s time to install some tools required for the OpenMower&lt;br /&gt;
&lt;br /&gt;
=== General Dependencies ===&lt;br /&gt;
Just install them with apt:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install --no-install-recommends build-essential git&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===STR2STR (optional, recommended; only needed if you&#039;re using NTRIP, so probably most of you)===&lt;br /&gt;
We need a newer version than the one available in apt, so install it from source:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install gfortran&lt;br /&gt;
git clone https://github.com/rtklibexplorer/RTKLIB&lt;br /&gt;
cd RTKLIB&lt;br /&gt;
git checkout tags/b34c&lt;br /&gt;
cd app/consapp/&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You should now be able to run str2str from anywhere.&lt;br /&gt;
&lt;br /&gt;
=== OpenOCD (optional, recommended; only needed if you want to flash Pico from Raspberry Pi)===&lt;br /&gt;
We need to get the OpenOCD version from the Raspberry Pi foundation, because the &amp;quot;original&amp;quot; one doesn&#039;t have the Pico support built in yet.&lt;br /&gt;
&lt;br /&gt;
Install it from source:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install automake autoconf build-essential libtool libftdi-dev libusb-1.0-0-dev texinfo pkg-config rpi.gpio-common&lt;br /&gt;
git clone https://github.com/raspberrypi/openocd.git --recursive --branch rp2040 --depth=1&lt;br /&gt;
cd openocd&lt;br /&gt;
./bootstrap&lt;br /&gt;
./configure --enable-ftdi --enable-sysfsgpio --enable-bcm2835gpio&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You can test if it was a success by running:&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
ubuntu@ubuntu:~$ openocd -v&lt;br /&gt;
Open On-Chip Debugger 0.11.0-g610f137-dirty (2022-06-07-00:39)&lt;br /&gt;
Licensed under GNU GPL v2&lt;br /&gt;
For bug reports, read&lt;br /&gt;
	http://openocd.org/doc/doxygen/bugs.html&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installing ROS and OpenMower==&lt;br /&gt;
We&#039;re using ROS Noetic for the OpenMower project. In this step we will install it, get the OpenMower sources, build the sources and create a basic configuration file for your mower.&lt;br /&gt;
&lt;br /&gt;
===Install ROS Noetic===&lt;br /&gt;
Since we&#039;re running Ubuntu 20.04 installing ROS is as easy as running the following commands:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Get the ROS apt repository&lt;br /&gt;
sudo sh -c &#039;echo &amp;quot;deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main&amp;quot; &amp;gt; /etc/apt/sources.list.d/ros-latest.list&#039;&lt;br /&gt;
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -&lt;br /&gt;
&lt;br /&gt;
# Install the ROS base system&lt;br /&gt;
sudo apt update&lt;br /&gt;
sudo apt install --no-install-recommends ros-noetic-ros-base&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;We only need to register the ROS installation in your &amp;lt;code&amp;gt;.bashrc&amp;lt;/code&amp;gt; file. This will enable you to call ROS specific commands from your terminal:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.bash&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Installing OpenMower Software===&lt;br /&gt;
Now we&#039;re finally able to install the OpenMower software. First, we&#039;re checking out the current version of the sources, then we&#039;re getting the dependencies and finally we&#039;re building the sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Clone the GitHub Repository:&lt;br /&gt;
git clone --recursive https://github.com/ClemensElflein/open_mower_ros.git&lt;br /&gt;
&lt;br /&gt;
# Get rosdep, only needed once&lt;br /&gt;
sudo apt install --no-install-recommends python3-rosdep&lt;br /&gt;
sudo rosdep init&lt;br /&gt;
rosdep update&lt;br /&gt;
&lt;br /&gt;
# Get the dependencies using rosdep&lt;br /&gt;
cd ~/open_mower_ros/&lt;br /&gt;
rosdep install --from-paths src --ignore-src --simulate | sed --expression &#039;1d&#039; | sort | tr -d &#039;\n&#039; | sed -e &#039;s/  apt-get install//g&#039; &amp;gt; ./apt-install_list&lt;br /&gt;
sudo apt-get install --no-install-recommends $(cat apt-install_list)&lt;br /&gt;
&lt;br /&gt;
# Finally, build the sources. This will take a while! &lt;br /&gt;
catkin_make -j1 # on 2GB Pi with SWAP - this takes at least 30min&lt;br /&gt;
# OR&lt;br /&gt;
catkin_make -j2 # on 4/8GB Pi - this takes at least 20min&lt;br /&gt;
&lt;br /&gt;
# Copy the default configuration file to your home directory&lt;br /&gt;
cp ~/open_mower_ros/src/open_mower/config/mower_config.sh.example ~/mower_config.sh&lt;br /&gt;
&lt;br /&gt;
# The next step is to also source the OpenMower ROS install&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;At this point the OpenMower software is successfully installed! You will need to configure the OpenMower software and then you&#039;re finally ready to mow.&lt;br /&gt;
&lt;br /&gt;
== Some Additional Issues==&lt;br /&gt;
&lt;br /&gt;
===I&#039;m using an external WiFi dongle for better coverage, but sometimes it doesn&#039;t work===&lt;br /&gt;
It seems that the Ubuntu sometimes puts external WiFi dongles to sleep. To prevent this, we create a service which disables powersave:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Enter this to create the service&lt;br /&gt;
sudo systemctl --full --force edit wifi_powersave@.service&lt;br /&gt;
&lt;br /&gt;
# Paste the following:&lt;br /&gt;
[Unit]&lt;br /&gt;
Description=Set WiFi power save %i&lt;br /&gt;
After=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
Type=oneshot&lt;br /&gt;
RemainAfterExit=yes&lt;br /&gt;
ExecStart=/sbin/iw dev wlan1 set power_save %i&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
# Save and exit, then activate using:&lt;br /&gt;
sudo systemctl disable wifi_powersave@on.service&lt;br /&gt;
sudo systemctl enable wifi_powersave@off.service&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>
	</entry>
	<entry>
		<id>https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=330</id>
		<title>OLD Bare Metal System Image</title>
		<link rel="alternate" type="text/html" href="https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=330"/>
		<updated>2023-06-02T09:41:23Z</updated>

		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page will guide you through the steps to install a basic system image.&lt;br /&gt;
&lt;br /&gt;
On this image you will have the ROS base system, the OpenMower installation, local configuration for your mower and some tools to help you work with the mower.&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
In order to follow this guide, you will need the following:&lt;br /&gt;
&lt;br /&gt;
#A Raspberry Pi 4 (4GB or more recommended, [[System Image#Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM)|2GB works with swap, see here]])&lt;br /&gt;
#An SD card&lt;br /&gt;
#A soldered OpenMower mainboard&lt;br /&gt;
&lt;br /&gt;
==Installing the Base System==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;&#039;&#039;&#039;There is also a YouTube video explaining the steps in this section:&#039;&#039;&#039; https://youtu.be/_bImqD-pQSA?t=562&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Flashing Ubuntu to SD Card ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first step is to install the base system. We&#039;re using Ubuntu 20.04 Server for the Raspberry Pi. This is, because this image gives us best support ROS Noetic.&lt;br /&gt;
&lt;br /&gt;
Installing the base image is easy:&lt;br /&gt;
&lt;br /&gt;
#[https://www.raspberrypi.com/software/ Get the Raspberry Pi Imager software]&lt;br /&gt;
#Select the correct operating system:  &#039;&#039;Other-general-purpose OS &amp;gt; Ubuntu &amp;gt; Ubuntu Server 20.04.4 LTS (RPI 3/4/400) 64-bit&#039;&#039;&lt;br /&gt;
#Insert your SD card into your PC and select it in the &#039;&#039;Storage&#039;&#039; part of the software&lt;br /&gt;
#Click &#039;&#039;write&#039;&#039; and wait for the process to finish&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have successfully flashed your image, remove the SD for your PC &#039;&#039;&#039;and reinsert it again.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Then replace the &amp;lt;code&amp;gt;/boot/config.txt&amp;lt;/code&amp;gt; file with the one provided here: [https://github.com/ClemensElflein/OpenMower/blob/main/configs/RaspberryPiConfig/config.txt]&lt;br /&gt;
&lt;br /&gt;
This will enable all hardware serial ports on the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can theoretically configure networking in this step as well, but I&#039;m not recommending it. This is, because the networking information file gets only copied once and if you have an error it won&#039;t work.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;We need an interactive terminal in the next step anyways.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have done this step, you can eject the SD card and plug it into your Raspberry Pi 4.&lt;br /&gt;
&lt;br /&gt;
=== Opening a Serial Terminal ===&lt;br /&gt;
[[File:SerialRedirect.png|thumb|Serial Terminal: minicom -D /dev/ttyACM0]]&lt;br /&gt;
This step is needed for the following sections. The goal is to have a serial terminal to do basic config (networking etc) easily.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The easiest way of doing so is:&lt;br /&gt;
# Flash the SerialRedirect firmware into your Pico. Get it here: https://github.com/ClemensElflein/OpenMower/tree/main/Firmware/SerialRedirect/bin&lt;br /&gt;
# Provide your mainboard with power&lt;br /&gt;
# Plug your Pico into a computer. A virtual COM port should appear&lt;br /&gt;
# Connect to the COM port (I&#039;m using minicom, see image on the right), then press enter to start the Raspberry Pi.&lt;br /&gt;
#The Pi boots and a serial terminal will appear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you can login with the default credentials:&lt;br /&gt;
&lt;br /&gt;
username: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
password: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that you will need to change the password immediately.&lt;br /&gt;
&lt;br /&gt;
=== Disable Boot Interrupt ===&lt;br /&gt;
[[File:Image.png|thumb|Commands needed to disable boot interrupt on serial input.]]&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi boot loader will interrupt the boot sequence if data is sent through the main serial port of the Raspberry Pi. Since we&#039;re connecting &amp;quot;nosiy&amp;quot; hardware to the port, this will always interrupt the boot sequence and we need to disable this feature. &lt;br /&gt;
&lt;br /&gt;
In order to do this, reboot the Pi (sudo reboot) and send anything during the count-down in the bootloader (check the YouTube video linked above, if you&#039;re not sure).&lt;br /&gt;
&lt;br /&gt;
Then enter the following commands into the bootloader prompt:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
setenv bootdelay -2&lt;br /&gt;
saveenv&lt;br /&gt;
reset&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The Pi should reboot and the count-down should be gone.&lt;br /&gt;
&lt;br /&gt;
=== Some Settings ===&lt;br /&gt;
&lt;br /&gt;
[TODO/WIP]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are some miscellaneous settings I think are a good idea for an OpenMower install:&lt;br /&gt;
&lt;br /&gt;
* Remove the unnecessary snap system: &amp;lt;code&amp;gt;sudo snap remove --purge lxd &amp;amp;&amp;amp; sudo snap remove --purge core20 &amp;amp;&amp;amp; sudo snap remove --purge snapd &amp;amp;&amp;amp; sudo apt purge --autoremove snapd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Disable unattended upgrades: &amp;lt;code&amp;gt;sudo systemctl stop --force unattended-upgrades &amp;amp;&amp;amp; sudo systemctl disable unattended-upgrades &amp;amp;&amp;amp; sudo systemctl mask unattended-upgrades&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* I like to add the following to &amp;lt;code&amp;gt;cmdline.txt&amp;lt;/code&amp;gt; in order to fsck on boot:  &amp;lt;code&amp;gt;fsck.mode=force fsck.repair=yes&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* I prefer to use a static IP (If you use the [[System_Image#Installing_a_WiFi_Hot-Spot_(optional,_but_recommended)|recommend WiFi Hot-Spot]] use &amp;lt;code&amp;gt;sudo nmtui&amp;lt;/code&amp;gt; to configure a static IP)&lt;br /&gt;
&lt;br /&gt;
* If you like to have a terminal wifi scanner/signal monitor just install &amp;lt;code&amp;gt;sudo apt install wavemon&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you like you can change the timezone: &amp;lt;code&amp;gt;sudo timedatectl set-timezone Region/Location&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;sudo dpkg-reconfigure tzdata&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you ever like to plug a keyboard into the Pi don&#039;t forget to change the keymap: &amp;lt;code&amp;gt;sudo dpkg-reconfigure keyboard-configuration&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM)===&lt;br /&gt;
Compiling the OpenMower software will need more than 2GB of RAM. In order to still do this on a Pi with &amp;lt;= 2GB of RAM, we will add a 2GB swap file to the system by entering the following commands:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Create a new 2GB swap file&lt;br /&gt;
sudo fallocate -l 2G /swapfile&lt;br /&gt;
# Change permissions, so that only root can read and write&lt;br /&gt;
sudo chmod 600 /swapfile&lt;br /&gt;
# Create swap space in the file&lt;br /&gt;
sudo mkswap /swapfile&lt;br /&gt;
# Add it to the fstab&lt;br /&gt;
echo &#039;/swapfile swap swap defaults 0 0&#039; | sudo tee -a /etc/fstab /swapfile swap swap defaults 0 0&lt;br /&gt;
# Reboot to activate&lt;br /&gt;
sudo reboot&lt;br /&gt;
&lt;br /&gt;
# Check if it&#039;s activated&lt;br /&gt;
sudo swapon --show&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Installing a WiFi Hot-Spot (optional, but recommended)===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Since we will be configuring the WiFi interface, make sure that you have connected Ethernet to your Raspberry Pi for this step.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As soon as you have closed your mower&#039;s enclosure, you won&#039;t have physical access to your Raspberry Pi anymore. If for some reason it&#039;s unable to connect to your WiFi (e.g. you have changed your password), you would need to open the case to get access to the SD card or Ethernet port on the Pi to regain access.&lt;br /&gt;
&lt;br /&gt;
To prevent this, we&#039;re going to install a hot-spot software which helps you to connect to WiFi by opening a hot-spot each time the Pi cannot connect to a known WiFi connection.&lt;br /&gt;
&lt;br /&gt;
Now is the best time to do this, because we have a serial terminal anyways and can mess with the network interfaces without shutting us out of the system!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Just use the following commands for this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# We need to disable systemd-resolveds caching DNS stub resolver&lt;br /&gt;
# if you want to know why check: https://github.com/pi-hole/docker-pi-hole/#installing-on-ubuntu&lt;br /&gt;
sudo sed -r -i.orig &#039;s/#?DNSStubListener=yes/DNSStubListener=no/g&#039; /etc/systemd/resolved.conf&lt;br /&gt;
sudo systemctl restart systemd-resolved.service&lt;br /&gt;
&lt;br /&gt;
ping ntp.org&lt;br /&gt;
# This will throw an dns error:&lt;br /&gt;
#   ping: ntp.org: Temporary failure in name resolution&lt;br /&gt;
sudo sh -c &#039;rm /etc/resolv.conf &amp;amp;&amp;amp; ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf&#039;&lt;br /&gt;
sudo systemctl restart systemd-resolved.service&lt;br /&gt;
nslookup ntp.org&lt;br /&gt;
# DNS should work now&lt;br /&gt;
&lt;br /&gt;
# Install comitup using the latest version from the projects repo&lt;br /&gt;
wget https://davesteele.github.io/comitup/latest/davesteele-comitup-apt-source_latest.deb&lt;br /&gt;
sudo dpkg -i --force-all davesteele-comitup-apt-source_latest.deb&lt;br /&gt;
rm davesteele-comitup-apt-source_latest.deb&lt;br /&gt;
sudo apt update&lt;br /&gt;
sudo apt install comitup --no-install-recommends&lt;br /&gt;
&lt;br /&gt;
sudo systemctl stop comitup&lt;br /&gt;
# Now use network-manager to:&lt;br /&gt;
# - add you wifi network&lt;br /&gt;
# optional:&lt;br /&gt;
# - change your hostname&lt;br /&gt;
# - add a dhcp ethernet connection without any device assigned&lt;br /&gt;
# (if even the hotspot malfunctions you can plug in a usb ethernet adapter)&lt;br /&gt;
sudo nmtui&lt;br /&gt;
&lt;br /&gt;
# Edit comitup.conf to change the wifi name and password (I use OpenMower-&amp;lt;nn&amp;gt;)&lt;br /&gt;
sudo nano /etc/comitup.conf&lt;br /&gt;
sudo systemctl restart comitup&lt;br /&gt;
# reboot - it should work now&lt;br /&gt;
sudo reboot&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable Serial Console===&lt;br /&gt;
Now that we have setup the network and can access the Pi even if our WiFi is not in range, we need to disable that serial console so that we can use the serial port for hardware.&lt;br /&gt;
&lt;br /&gt;
To do this, enter: &amp;lt;code&amp;gt;sudo nano /boot/firmware/cmdline.txt&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and remove the &amp;lt;code&amp;gt;console=serial0,115200&amp;lt;/code&amp;gt; part of the line.&lt;br /&gt;
&lt;br /&gt;
Save the file and reboot. You should still see the bootloader output, but no serial output after that.&lt;br /&gt;
&lt;br /&gt;
==Installing Tools==&lt;br /&gt;
If you&#039;re happy with your basic Ubuntu setup, it&#039;s time to install some tools required for the OpenMower&lt;br /&gt;
&lt;br /&gt;
=== General Dependencies ===&lt;br /&gt;
Just install them with apt:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install --no-install-recommends build-essential git&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===STR2STR (optional, recommended; only needed if you&#039;re using NTRIP, so probably most of you)===&lt;br /&gt;
We need a newer version than the one available in apt, so install it from source:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install gfortran&lt;br /&gt;
git clone https://github.com/rtklibexplorer/RTKLIB&lt;br /&gt;
cd RTKLIB&lt;br /&gt;
git checkout tags/b34c&lt;br /&gt;
cd app/consapp/&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You should now be able to run str2str from anywhere.&lt;br /&gt;
&lt;br /&gt;
=== OpenOCD (optional, recommended; only needed if you want to flash Pico from Raspberry Pi)===&lt;br /&gt;
We need to get the OpenOCD version from the Raspberry Pi foundation, because the &amp;quot;original&amp;quot; one doesn&#039;t have the Pico support built in yet.&lt;br /&gt;
&lt;br /&gt;
Install it from source:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install automake autoconf build-essential libtool libftdi-dev libusb-1.0-0-dev texinfo pkg-config rpi.gpio-common&lt;br /&gt;
git clone https://github.com/raspberrypi/openocd.git --recursive --branch rp2040 --depth=1&lt;br /&gt;
cd openocd&lt;br /&gt;
./bootstrap&lt;br /&gt;
./configure --enable-ftdi --enable-sysfsgpio --enable-bcm2835gpio&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You can test if it was a success by running:&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
ubuntu@ubuntu:~$ openocd -v&lt;br /&gt;
Open On-Chip Debugger 0.11.0-g610f137-dirty (2022-06-07-00:39)&lt;br /&gt;
Licensed under GNU GPL v2&lt;br /&gt;
For bug reports, read&lt;br /&gt;
	http://openocd.org/doc/doxygen/bugs.html&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installing ROS and OpenMower==&lt;br /&gt;
We&#039;re using ROS Noetic for the OpenMower project. In this step we will install it, get the OpenMower sources, build the sources and create a basic configuration file for your mower.&lt;br /&gt;
&lt;br /&gt;
===Install ROS Noetic===&lt;br /&gt;
Since we&#039;re running Ubuntu 20.04 installing ROS is as easy as running the following commands:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Get the ROS apt repository&lt;br /&gt;
sudo sh -c &#039;echo &amp;quot;deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main&amp;quot; &amp;gt; /etc/apt/sources.list.d/ros-latest.list&#039;&lt;br /&gt;
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -&lt;br /&gt;
&lt;br /&gt;
# Install the ROS base system&lt;br /&gt;
sudo apt update&lt;br /&gt;
sudo apt install --no-install-recommends ros-noetic-ros-base&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;We only need to register the ROS installation in your &amp;lt;code&amp;gt;.bashrc&amp;lt;/code&amp;gt; file. This will enable you to call ROS specific commands from your terminal:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.bash&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Installing OpenMower Software===&lt;br /&gt;
Now we&#039;re finally able to install the OpenMower software. First, we&#039;re checking out the current version of the sources, then we&#039;re getting the dependencies and finally we&#039;re building the sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Clone the GitHub Repository:&lt;br /&gt;
git clone --recursive https://github.com/ClemensElflein/open_mower_ros.git&lt;br /&gt;
&lt;br /&gt;
# Get rosdep, only needed once&lt;br /&gt;
sudo apt install --no-install-recommends python3-rosdep&lt;br /&gt;
sudo rosdep init&lt;br /&gt;
rosdep update&lt;br /&gt;
&lt;br /&gt;
# Get the dependencies using rosdep&lt;br /&gt;
cd ~/open_mower_ros/&lt;br /&gt;
rosdep install --from-paths src --ignore-src --simulate | sed --expression &#039;1d&#039; | sort | tr -d &#039;\n&#039; | sed -e &#039;s/  apt-get install//g&#039; &amp;gt; /apt-install_list&lt;br /&gt;
sudo apt-get install --no-install-recommends $(cat apt-install_list)&lt;br /&gt;
&lt;br /&gt;
# Finally, build the sources. This will take a while! &lt;br /&gt;
catkin_make -j1 # on 2GB Pi with SWAP - this takes at least 30min&lt;br /&gt;
# OR&lt;br /&gt;
catkin_make -j2 # on 4/8GB Pi - this takes at least 20min&lt;br /&gt;
&lt;br /&gt;
# Copy the default configuration file to your home directory&lt;br /&gt;
cp ~/open_mower_ros/src/open_mower/config/mower_config.sh.example ~/mower_config.sh&lt;br /&gt;
&lt;br /&gt;
# The next step is to also source the OpenMower ROS install&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;At this point the OpenMower software is successfully installed! You will need to configure the OpenMower software and then you&#039;re finally ready to mow.&lt;br /&gt;
&lt;br /&gt;
== Some Additional Issues==&lt;br /&gt;
&lt;br /&gt;
===I&#039;m using an external WiFi dongle for better coverage, but sometimes it doesn&#039;t work===&lt;br /&gt;
It seems that the Ubuntu sometimes puts external WiFi dongles to sleep. To prevent this, we create a service which disables powersave:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Enter this to create the service&lt;br /&gt;
sudo systemctl --full --force edit wifi_powersave@.service&lt;br /&gt;
&lt;br /&gt;
# Paste the following:&lt;br /&gt;
[Unit]&lt;br /&gt;
Description=Set WiFi power save %i&lt;br /&gt;
After=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
Type=oneshot&lt;br /&gt;
RemainAfterExit=yes&lt;br /&gt;
ExecStart=/sbin/iw dev wlan1 set power_save %i&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
# Save and exit, then activate using:&lt;br /&gt;
sudo systemctl disable wifi_powersave@on.service&lt;br /&gt;
sudo systemctl enable wifi_powersave@off.service&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>
	</entry>
	<entry>
		<id>https://wiki.openmower.de/index.php?title=System_Image&amp;diff=329</id>
		<title>System Image</title>
		<link rel="alternate" type="text/html" href="https://wiki.openmower.de/index.php?title=System_Image&amp;diff=329"/>
		<updated>2023-05-29T09:44:50Z</updated>

		<summary type="html">&lt;p&gt;Potter-91: Potter-91 moved page System Image to OLD Bare Metal System Image&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[OLD Bare Metal System Image]]&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>
	</entry>
	<entry>
		<id>https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=328</id>
		<title>OLD Bare Metal System Image</title>
		<link rel="alternate" type="text/html" href="https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=328"/>
		<updated>2023-05-29T09:44:47Z</updated>

		<summary type="html">&lt;p&gt;Potter-91: Potter-91 moved page System Image to OLD Bare Metal System Image&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page will guide you through the steps to install a basic system image.&lt;br /&gt;
&lt;br /&gt;
On this image you will have the ROS base system, the OpenMower installation, local configuration for your mower and some tools to help you work with the mower.&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
In order to follow this guide, you will need the following:&lt;br /&gt;
&lt;br /&gt;
#A Raspberry Pi 4 (4GB or more recommended, [[System Image#Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM)|2GB works with swap, see here]])&lt;br /&gt;
#An SD card&lt;br /&gt;
#A soldered OpenMower mainboard&lt;br /&gt;
&lt;br /&gt;
==Installing the Base System==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;&#039;&#039;&#039;There is also a YouTube video explaining the steps in this section:&#039;&#039;&#039; https://youtu.be/_bImqD-pQSA?t=562&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Flashing Ubuntu to SD Card ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first step is to install the base system. We&#039;re using Ubuntu 20.04 Server for the Raspberry Pi. This is, because this image gives us best support ROS Noetic.&lt;br /&gt;
&lt;br /&gt;
Installing the base image is easy:&lt;br /&gt;
&lt;br /&gt;
#[https://www.raspberrypi.com/software/ Get the Raspberry Pi Imager software]&lt;br /&gt;
#Select the correct operating system:  &#039;&#039;Other-general-purpose OS &amp;gt; Ubuntu &amp;gt; Ubuntu Server 20.04.4 LTS (RPI 3/4/400) 64-bit&#039;&#039;&lt;br /&gt;
#Insert your SD card into your PC and select it in the &#039;&#039;Storage&#039;&#039; part of the software&lt;br /&gt;
#Click &#039;&#039;write&#039;&#039; and wait for the process to finish&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have successfully flashed your image, remove the SD for your PC &#039;&#039;&#039;and reinsert it again.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Then replace the &amp;lt;code&amp;gt;/boot/config.txt&amp;lt;/code&amp;gt; file with the one provided here: [https://github.com/ClemensElflein/OpenMower/blob/main/configs/RaspberryPiConfig/config.txt]&lt;br /&gt;
&lt;br /&gt;
This will enable all hardware serial ports on the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can theoretically configure networking in this step as well, but I&#039;m not recommending it. This is, because the networking information file gets only copied once and if you have an error it won&#039;t work.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;We need an interactive terminal in the next step anyways.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have done this step, you can eject the SD card and plug it into your Raspberry Pi 4.&lt;br /&gt;
&lt;br /&gt;
=== Opening a Serial Terminal ===&lt;br /&gt;
[[File:SerialRedirect.png|thumb|Serial Terminal: minicom -D /dev/ttyACM0]]&lt;br /&gt;
This step is needed for the following sections. The goal is to have a serial terminal to do basic config (networking etc) easily.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The easiest way of doing so is:&lt;br /&gt;
# Flash the SerialRedirect firmware into your Pico. Get it here: https://github.com/ClemensElflein/OpenMower/tree/main/Firmware/SerialRedirect/bin&lt;br /&gt;
# Provide your mainboard with power&lt;br /&gt;
# Plug your Pico into a computer. A virtual COM port should appear&lt;br /&gt;
# Connect to the COM port (I&#039;m using minicom, see image on the right), then press enter to start the Raspberry Pi.&lt;br /&gt;
#The Pi boots and a serial terminal will appear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you can login with the default credentials:&lt;br /&gt;
&lt;br /&gt;
username: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
password: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that you will need to change the password immediately.&lt;br /&gt;
&lt;br /&gt;
=== Disable Boot Interrupt ===&lt;br /&gt;
[[File:Image.png|thumb|Commands needed to disable boot interrupt on serial input.]]&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi boot loader will interrupt the boot sequence if data is sent through the main serial port of the Raspberry Pi. Since we&#039;re connecting &amp;quot;nosiy&amp;quot; hardware to the port, this will always interrupt the boot sequence and we need to disable this feature. &lt;br /&gt;
&lt;br /&gt;
In order to do this, reboot the Pi (sudo reboot) and send anything during the count-down in the bootloader (check the YouTube video linked above, if you&#039;re not sure).&lt;br /&gt;
&lt;br /&gt;
Then enter the following commands into the bootloader prompt:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
setenv bootdelay -2&lt;br /&gt;
saveenv&lt;br /&gt;
reset&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The Pi should reboot and the count-down should be gone.&lt;br /&gt;
&lt;br /&gt;
=== Some Settings ===&lt;br /&gt;
&lt;br /&gt;
[TODO/WIP]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are some miscellaneous settings I think are a good idea for an OpenMower install:&lt;br /&gt;
&lt;br /&gt;
* Remove the unnecessary snap system: &amp;lt;code&amp;gt;sudo snap remove --purge lxd &amp;amp;&amp;amp; sudo snap remove --purge core20 &amp;amp;&amp;amp; sudo snap remove --purge snapd &amp;amp;&amp;amp; sudo apt purge --autoremove snapd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Disable unattended upgrades: &amp;lt;code&amp;gt;sudo systemctl stop --force unattended-upgrades &amp;amp;&amp;amp; sudo systemctl disable unattended-upgrades &amp;amp;&amp;amp; sudo systemctl mask unattended-upgrades&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* I like to add the following to &amp;lt;code&amp;gt;cmdline.txt&amp;lt;/code&amp;gt; in order to fsck on boot:  &amp;lt;code&amp;gt;fsck.mode=force fsck.repair=yes&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* I prefer to use a static IP (If you use the [[System_Image#Installing_a_WiFi_Hot-Spot_(optional,_but_recommended)|recommend WiFi Hot-Spot]] use &amp;lt;code&amp;gt;sudo nmtui&amp;lt;/code&amp;gt; to configure a static IP)&lt;br /&gt;
&lt;br /&gt;
* If you like to have a terminal wifi scanner/signal monitor just install &amp;lt;code&amp;gt;sudo apt install wavemon&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you like you can change the timezone: &amp;lt;code&amp;gt;sudo timedatectl set-timezone Region/Location&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;sudo dpkg-reconfigure tzdata&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you ever like to plug a keyboard into the Pi don&#039;t forget to change the keymap: &amp;lt;code&amp;gt;sudo dpkg-reconfigure keyboard-configuration&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM)===&lt;br /&gt;
Compiling the OpenMower software will need more than 2GB of RAM. In order to still do this on a Pi with &amp;lt;= 2GB of RAM, we will add a 2GB swap file to the system by entering the following commands:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Create a new 2GB swap file&lt;br /&gt;
sudo fallocate -l 2G /swapfile&lt;br /&gt;
# Change permissions, so that only root can read and write&lt;br /&gt;
sudo chmod 600 /swapfile&lt;br /&gt;
# Create swap space in the file&lt;br /&gt;
sudo mkswap /swapfile&lt;br /&gt;
# Add it to the fstab&lt;br /&gt;
echo &#039;/swapfile swap swap defaults 0 0&#039; | sudo tee -a /etc/fstab /swapfile swap swap defaults 0 0&lt;br /&gt;
# Reboot to activate&lt;br /&gt;
sudo reboot&lt;br /&gt;
&lt;br /&gt;
# Check if it&#039;s activated&lt;br /&gt;
sudo swapon --show&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Installing a WiFi Hot-Spot (optional, but recommended)===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Since we will be configuring the WiFi interface, make sure that you have connected Etherent to your Raspberry Pi for this step.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As soon as you have closed your mower&#039;s enclosure, you won&#039;t have physical access to your Raspberry Pi anymore. If for some reason it&#039;s unable to connect to your WiFi (e.g. you have changed your password), you would need to open the case to get access to the SD card or Ethernet port on the Pi to regain access.&lt;br /&gt;
&lt;br /&gt;
To prevent this, we&#039;re going to install a hot-spot software which helps you to connect to WiFi by opening a hot-spot each time the Pi cannot connect to a known WiFi connection.&lt;br /&gt;
&lt;br /&gt;
Now is the best time to do this, because we have a serial terminal anyways and can mess with the network interfaces without shutting us out of the system!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Just use the following commands for this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# We need to disable systemd-resolveds caching DNS stub resolver&lt;br /&gt;
# if you want to know why check: https://github.com/pi-hole/docker-pi-hole/#installing-on-ubuntu&lt;br /&gt;
sudo sed -r -i.orig &#039;s/#?DNSStubListener=yes/DNSStubListener=no/g&#039; /etc/systemd/resolved.conf&lt;br /&gt;
sudo systemctl restart systemd-resolved.service&lt;br /&gt;
&lt;br /&gt;
ping ntp.org&lt;br /&gt;
# This will throw an dns error:&lt;br /&gt;
#   ping: ntp.org: Temporary failure in name resolution&lt;br /&gt;
sudo sh -c &#039;rm /etc/resolv.conf &amp;amp;&amp;amp; ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf&#039;&lt;br /&gt;
sudo systemctl restart systemd-resolved.service&lt;br /&gt;
nslookup ntp.org&lt;br /&gt;
# DNS should work now&lt;br /&gt;
&lt;br /&gt;
# Install comitup using the latest version from the projects repo&lt;br /&gt;
wget https://davesteele.github.io/comitup/latest/davesteele-comitup-apt-source_latest.deb&lt;br /&gt;
sudo dpkg -i --force-all davesteele-comitup-apt-source_latest.deb&lt;br /&gt;
rm davesteele-comitup-apt-source_latest.deb&lt;br /&gt;
sudo apt update&lt;br /&gt;
sudo apt install comitup --no-install-recommends&lt;br /&gt;
&lt;br /&gt;
sudo systemctl stop comitup&lt;br /&gt;
# Now use network-manager to:&lt;br /&gt;
# - add you wifi network&lt;br /&gt;
# optional:&lt;br /&gt;
# - change your hostname&lt;br /&gt;
# - add a dhcp ethernet connection without any device assigned&lt;br /&gt;
# (if even the hotspot malfunctions you can plug in a usb ethernet adapter)&lt;br /&gt;
sudo nmtui&lt;br /&gt;
&lt;br /&gt;
# Edit comitup.conf to change the wifi name and password (I use OpenMower-&amp;lt;nn&amp;gt;)&lt;br /&gt;
sudo nano /etc/comitup.conf&lt;br /&gt;
sudo systemctl restart comitup&lt;br /&gt;
# reboot - it should work now&lt;br /&gt;
sudo reboot&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable Serial Console===&lt;br /&gt;
Now that we have setup the network and can access the Pi even if our WiFi is not in range, we need to disable that serial console so that we can use the serial port for hardware.&lt;br /&gt;
&lt;br /&gt;
To do this, enter: &amp;lt;code&amp;gt;sudo nano /boot/firmware/cmdline.txt&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and remove the &amp;lt;code&amp;gt;console=serial0,115200&amp;lt;/code&amp;gt; part of the line.&lt;br /&gt;
&lt;br /&gt;
Save the file and reboot. You should still see the bootloader output, but no serial output after that.&lt;br /&gt;
&lt;br /&gt;
==Installing Tools==&lt;br /&gt;
If you&#039;re happy with your basic Ubuntu setup, it&#039;s time to install some tools required for the OpenMower&lt;br /&gt;
&lt;br /&gt;
=== General Dependencies ===&lt;br /&gt;
Just install them with apt:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install --no-install-recommends build-essential git&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===STR2STR (optional, recommended; only needed if you&#039;re using NTRIP, so probably most of you)===&lt;br /&gt;
We need a newer version than the one available in apt, so install it from source:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install gfortran&lt;br /&gt;
git clone https://github.com/rtklibexplorer/RTKLIB&lt;br /&gt;
cd RTKLIB&lt;br /&gt;
git checkout tags/b34c&lt;br /&gt;
cd app/consapp/&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You should now be able to run str2str from anywhere.&lt;br /&gt;
&lt;br /&gt;
=== OpenOCD (optional, recommended; only needed if you want to flash Pico from Raspberry Pi)===&lt;br /&gt;
We need to get the OpenOCD version from the Raspberry Pi foundation, because the &amp;quot;original&amp;quot; one doesn&#039;t have the Pico support built in yet.&lt;br /&gt;
&lt;br /&gt;
Install it from source:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install automake autoconf build-essential libtool libftdi-dev libusb-1.0-0-dev texinfo pkg-config rpi.gpio-common&lt;br /&gt;
git clone https://github.com/raspberrypi/openocd.git --recursive --branch rp2040 --depth=1&lt;br /&gt;
cd openocd&lt;br /&gt;
./bootstrap&lt;br /&gt;
./configure --enable-ftdi --enable-sysfsgpio --enable-bcm2835gpio&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You can test if it was a success by running:&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
ubuntu@ubuntu:~$ openocd -v&lt;br /&gt;
Open On-Chip Debugger 0.11.0-g610f137-dirty (2022-06-07-00:39)&lt;br /&gt;
Licensed under GNU GPL v2&lt;br /&gt;
For bug reports, read&lt;br /&gt;
	http://openocd.org/doc/doxygen/bugs.html&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installing ROS and OpenMower==&lt;br /&gt;
We&#039;re using ROS Noetic for the OpenMower project. In this step we will install it, get the OpenMower sources, build the sources and create a basic configuration file for your mower.&lt;br /&gt;
&lt;br /&gt;
===Install ROS Noetic===&lt;br /&gt;
Since we&#039;re running Ubuntu 20.04 installing ROS is as easy as running the following commands:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Get the ROS apt repository&lt;br /&gt;
sudo sh -c &#039;echo &amp;quot;deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main&amp;quot; &amp;gt; /etc/apt/sources.list.d/ros-latest.list&#039;&lt;br /&gt;
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -&lt;br /&gt;
&lt;br /&gt;
# Install the ROS base system&lt;br /&gt;
sudo apt update&lt;br /&gt;
sudo apt install --no-install-recommends ros-noetic-ros-base&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;We only need to register the ROS installation in your &amp;lt;code&amp;gt;.bashrc&amp;lt;/code&amp;gt; file. This will enable you to call ROS specific commands from your terminal:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.bash&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Installing OpenMower Software===&lt;br /&gt;
Now we&#039;re finally able to install the OpenMower software. First, we&#039;re checking out the current version of the sources, then we&#039;re getting the dependencies and finally we&#039;re building the sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Clone the GitHub Repository:&lt;br /&gt;
git clone --recursive https://github.com/ClemensElflein/open_mower_ros.git&lt;br /&gt;
&lt;br /&gt;
# Get rosdep, only needed once&lt;br /&gt;
sudo apt install --no-install-recommends python3-rosdep&lt;br /&gt;
sudo rosdep init&lt;br /&gt;
rosdep update&lt;br /&gt;
&lt;br /&gt;
# Get the dependencies using rosdep&lt;br /&gt;
cd open_mower_ros/&lt;br /&gt;
rosdep install --from-paths src --ignore-src --simulate | sed --expression &#039;1d&#039; --expression &#039;s/apt-get install/apt-get install --no-install-recommends --yes/g&#039; | bash&lt;br /&gt;
&lt;br /&gt;
# Finally, build the sources. This will take a while! &lt;br /&gt;
catkin_make -j1 # on 2GB Pi with SWAP - this takes at least 30min&lt;br /&gt;
# OR&lt;br /&gt;
catkin_make -j2 # on 4/8GB Pi - this takes at least 20min&lt;br /&gt;
&lt;br /&gt;
# Copy the default configuration file to your home directory&lt;br /&gt;
cp ~/open_mower_ros/src/open_mower/config/mower_config.sh.example ~/mower_config.sh&lt;br /&gt;
&lt;br /&gt;
# The next step is to also source the OpenMower ROS install&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;At this point the OpenMower software is successfully installed! You will need to configure the OpenMower software and then you&#039;re finally ready to mow.&lt;br /&gt;
&lt;br /&gt;
== Some Additional Issues==&lt;br /&gt;
&lt;br /&gt;
===I&#039;m using an external WiFi dongle for better coverage, but sometimes it doesn&#039;t work===&lt;br /&gt;
It seems that the Ubuntu sometimes puts external WiFi dongles to sleep. To prevent this, we create a service which disables powersave:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Enter this to create the service&lt;br /&gt;
sudo systemctl --full --force edit wifi_powersave@.service&lt;br /&gt;
&lt;br /&gt;
# Paste the following:&lt;br /&gt;
[Unit]&lt;br /&gt;
Description=Set WiFi power save %i&lt;br /&gt;
After=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
Type=oneshot&lt;br /&gt;
RemainAfterExit=yes&lt;br /&gt;
ExecStart=/sbin/iw dev wlan1 set power_save %i&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
# Save and exit, then activate using:&lt;br /&gt;
sudo systemctl disable wifi_powersave@on.service&lt;br /&gt;
sudo systemctl enable wifi_powersave@off.service&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>
	</entry>
	<entry>
		<id>https://wiki.openmower.de/index.php?title=Main_Page&amp;diff=327</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.openmower.de/index.php?title=Main_Page&amp;diff=327"/>
		<updated>2023-05-29T09:43:25Z</updated>

		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The OpenMower Community Wiki ==&lt;br /&gt;
&lt;br /&gt;
Welcome to the OpenMower Community Wiki!&lt;br /&gt;
&lt;br /&gt;
This WIKI was only just started on 2022-04-22, but we&#039;ll collaborate on getting good information on the OpenMower project collected here.&lt;br /&gt;
&lt;br /&gt;
If you want to contribute to the Wiki: [https://discord.gg/jE7QNaSxW7 join the Discord], ask at the [https://discord.com/channels/958476543846412329/967345181013725194 #wiki-authors channel] for a wiki account and a wiki admin will create one.&lt;br /&gt;
&lt;br /&gt;
Also head over to the [https://discord.com/channels/958476543846412329/967345181013725194 #wiki-authors channel] if you want talk about wiki related stuff.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to Get Started ==&lt;br /&gt;
&lt;br /&gt;
One of the first steps currently is to browse around the discord and understand what the project is about. You can also have a look at Clemens&#039; second video ([https://www.youtube.com/watch?v=_bImqD-pQSA here]) of the project that details how to assemble the bot. &lt;br /&gt;
&lt;br /&gt;
First: Check the &#039;&#039;&#039;[[FAQ]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When you&#039;re ready, you can have a look at the &#039;&#039;&#039;[[Building the Mower]]&#039;&#039;&#039; section to see the Bill of Materials and steps required and check out &#039;&#039;&#039;[[Builder Road Map]]&#039;&#039;&#039; for a practical take on what to do.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;(Note this wiki is in progress and not complete yet, but we&#039;re working on it!)&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;&#039;&#039;&#039;⚡ Before checking out the community wiki head over to the Official Documentation at [https://openmower.de/ openmower.de] ⚡&#039;&#039;&#039;&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Resources==&lt;br /&gt;
&lt;br /&gt;
===[[FAQ]]===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;There is a continually evolving [[FAQ]] that is a good starting point for understanding the project and getting answers to some key questions.&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===[[Project overview|Project overview and timeline]]===&lt;br /&gt;
&lt;br /&gt;
Current status and future goals - [[Project overview|See it here]]&lt;br /&gt;
&lt;br /&gt;
===[[Hardware|&amp;lt;s&amp;gt;Hardware Revisions&amp;lt;/s&amp;gt;]] &#039;&#039;Outdated&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;s&amp;gt;Open Mower hardware revisions, changelog, info: [[Hardware|Here]]&amp;lt;/s&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===[[System Image|Software Installation]] &#039;&#039;Old bare metal installation - not for users&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
On this page, you can find steps how to install a basic OpenMower system image.&lt;br /&gt;
&lt;br /&gt;
===[[Running OpenMower]]===&lt;br /&gt;
&lt;br /&gt;
On this page, you can find steps how to run the OpenMower software.&lt;br /&gt;
We&#039;re doing:&lt;br /&gt;
- Starting the Software&lt;br /&gt;
- Magnetometer Calibration&lt;br /&gt;
- Recording a Map&lt;br /&gt;
- Starting the Mowing Process&lt;br /&gt;
&lt;br /&gt;
===[[Mini HOWTOs]]===&lt;br /&gt;
&lt;br /&gt;
On this page, you can find small HOWTOs for various things. Set [[Mini HOWTOs|here]]&lt;br /&gt;
&lt;br /&gt;
===Where to find more information===&lt;br /&gt;
&lt;br /&gt;
The entry points for more information are:&lt;br /&gt;
&lt;br /&gt;
*[https://discord.com/channels/958476543846412329/958476543846412331 The Discord for the project]&lt;br /&gt;
*[https://discord.com/channels/958476543846412329/958476543846412332 Annoncements in the Discord]&lt;br /&gt;
*[https://youtube.com/c/ClemensElflein/videos YouTube]&lt;br /&gt;
*[https://github.com/ClemensElflein/OpenMower Open Mower Main GitHub Repo - Overall and hardware]&lt;br /&gt;
*[https://github.com/ClemensElflein/open_mower_ros Open Mower GitHub Repo for the ROS logic in the OpenMower]&lt;br /&gt;
*[https://github.com/ClemensElflein/xESC xESC Motor Controller Repo (custom part for main board)]&lt;br /&gt;
&lt;br /&gt;
==How to contribute==&lt;br /&gt;
&lt;br /&gt;
At the moment, there are different ways to contribute:&lt;br /&gt;
&lt;br /&gt;
*Building your own mower, testing the software and reporting bugs / committing fixes on the github repository&lt;br /&gt;
&lt;br /&gt;
*If you&#039;re not scared to see the inside of some mowers, please help us understand more about how they are built following instructions in the &#039;&#039;&#039;[[Mower Dissection]]&#039;&#039;&#039; page.&lt;br /&gt;
&lt;br /&gt;
*And finally, [https://www.patreon.com/ClemensElflein Patreon to support Clemens&#039; amazing work]&lt;br /&gt;
&lt;br /&gt;
==Disclaimer==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;This Wiki is provided as-is and free of charge. No guarantees of any kind are made that the information contained herein is exact or correct or does not violate any local regulations or cause any security risk. Any use you make of any information given here is at your own discretion and risk.&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>
	</entry>
	<entry>
		<id>https://wiki.openmower.de/index.php?title=Main_Page&amp;diff=326</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.openmower.de/index.php?title=Main_Page&amp;diff=326"/>
		<updated>2023-05-29T09:42:41Z</updated>

		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The OpenMower Community Wiki ==&lt;br /&gt;
&lt;br /&gt;
Welcome to the OpenMower Community Wiki!&lt;br /&gt;
&lt;br /&gt;
This WIKI was only just started on 2022-04-22, but we&#039;ll collaborate on getting good information on the OpenMower project collected here.&lt;br /&gt;
&lt;br /&gt;
If you want to contribute to the Wiki: [https://discord.gg/jE7QNaSxW7 join the Discord], ask at the [https://discord.com/channels/958476543846412329/967345181013725194 #wiki-authors channel] for a wiki account and a wiki admin will create one.&lt;br /&gt;
&lt;br /&gt;
Also head over to the [https://discord.com/channels/958476543846412329/967345181013725194 #wiki-authors channel] if you want talk about wiki related stuff.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to Get Started ==&lt;br /&gt;
&lt;br /&gt;
One of the first steps currently is to browse around the discord and understand what the project is about. You can also have a look at Clemens&#039; second video ([https://www.youtube.com/watch?v=_bImqD-pQSA here]) of the project that details how to assemble the bot. &lt;br /&gt;
&lt;br /&gt;
First: Check the &#039;&#039;&#039;[[FAQ]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When you&#039;re ready, you can have a look at the &#039;&#039;&#039;[[Building the Mower]]&#039;&#039;&#039; section to see the Bill of Materials and steps required and check out &#039;&#039;&#039;[[Builder Road Map]]&#039;&#039;&#039; for a practical take on what to do.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;(Note this wiki is in progress and not complete yet, but we&#039;re working on it!)&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;&#039;&#039;&#039;⚡ Before checking out the community wiki head over to the Official Documentation at [https://openmower.de/ openmower.de] ⚡&#039;&#039;&#039;&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Resources==&lt;br /&gt;
&lt;br /&gt;
===[[FAQ]]===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;There is a continually evolving [[FAQ]] that is a good starting point for understanding the project and getting answers to some key questions.&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===[[Project overview|Project overview and timeline]]===&lt;br /&gt;
&lt;br /&gt;
Current status and future goals - [[Project overview|See it here]]&lt;br /&gt;
&lt;br /&gt;
===[[Hardware|&amp;lt;s&amp;gt;Hardware Revisions&amp;lt;/s&amp;gt;]] &#039;&#039;Outdated&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;s&amp;gt;Open Mower hardware revisions, changelog, info: [[Hardware|Here]]&amp;lt;/s&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===[[System Image|Software Installation]] (Old bare metal installation - not suitable for users)===&lt;br /&gt;
&lt;br /&gt;
On this page, you can find steps how to install a basic OpenMower system image.&lt;br /&gt;
&lt;br /&gt;
===[[Running OpenMower]]===&lt;br /&gt;
&lt;br /&gt;
On this page, you can find steps how to run the OpenMower software.&lt;br /&gt;
We&#039;re doing:&lt;br /&gt;
- Starting the Software&lt;br /&gt;
- Magnetometer Calibration&lt;br /&gt;
- Recording a Map&lt;br /&gt;
- Starting the Mowing Process&lt;br /&gt;
&lt;br /&gt;
===[[Mini HOWTOs]]===&lt;br /&gt;
&lt;br /&gt;
On this page, you can find small HOWTOs for various things. Set [[Mini HOWTOs|here]]&lt;br /&gt;
&lt;br /&gt;
===Where to find more information===&lt;br /&gt;
&lt;br /&gt;
The entry points for more information are:&lt;br /&gt;
&lt;br /&gt;
*[https://discord.com/channels/958476543846412329/958476543846412331 The Discord for the project]&lt;br /&gt;
*[https://discord.com/channels/958476543846412329/958476543846412332 Annoncements in the Discord]&lt;br /&gt;
*[https://youtube.com/c/ClemensElflein/videos YouTube]&lt;br /&gt;
*[https://github.com/ClemensElflein/OpenMower Open Mower Main GitHub Repo - Overall and hardware]&lt;br /&gt;
*[https://github.com/ClemensElflein/open_mower_ros Open Mower GitHub Repo for the ROS logic in the OpenMower]&lt;br /&gt;
*[https://github.com/ClemensElflein/xESC xESC Motor Controller Repo (custom part for main board)]&lt;br /&gt;
&lt;br /&gt;
==How to contribute==&lt;br /&gt;
&lt;br /&gt;
At the moment, there are different ways to contribute:&lt;br /&gt;
&lt;br /&gt;
*Building your own mower, testing the software and reporting bugs / committing fixes on the github repository&lt;br /&gt;
&lt;br /&gt;
*If you&#039;re not scared to see the inside of some mowers, please help us understand more about how they are built following instructions in the &#039;&#039;&#039;[[Mower Dissection]]&#039;&#039;&#039; page.&lt;br /&gt;
&lt;br /&gt;
*And finally, [https://www.patreon.com/ClemensElflein Patreon to support Clemens&#039; amazing work]&lt;br /&gt;
&lt;br /&gt;
==Disclaimer==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;This Wiki is provided as-is and free of charge. No guarantees of any kind are made that the information contained herein is exact or correct or does not violate any local regulations or cause any security risk. Any use you make of any information given here is at your own discretion and risk.&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>
	</entry>
	<entry>
		<id>https://wiki.openmower.de/index.php?title=Builder_Road_Map&amp;diff=325</id>
		<title>Builder Road Map</title>
		<link rel="alternate" type="text/html" href="https://wiki.openmower.de/index.php?title=Builder_Road_Map&amp;diff=325"/>
		<updated>2023-05-29T09:40:18Z</updated>

		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Note: This WIKI was only just started on 2022-04-22, but we are actively working on filling it up and making a good documentation for the new builders out there!&lt;br /&gt;
&lt;br /&gt;
==Warning==&lt;br /&gt;
Please note that this project currently is in a very early stage! So don&#039;t go buying stuff right away! You will need to order and solder your own boards, since there are no assembled boards for sale yet.&lt;br /&gt;
&lt;br /&gt;
Please make sure that you&#039;re actually allowed to build this device in your area. There may be laws / patents prohibiting you of doing so!&lt;br /&gt;
&lt;br /&gt;
Please just be responsible and if you&#039;re not sure what you&#039;re doing, please don&#039;t do anything.&lt;br /&gt;
&lt;br /&gt;
BTW the warranty of your brand new mower will obviously be void as soon as you modify it in any way, so be aware.&lt;br /&gt;
&lt;br /&gt;
== Intro ==&lt;br /&gt;
If you want to embark on building an OpenMower, we have collected an overview of the various parts and where find information and what to to below. Beware that this is not complete, but it gives you some navigation to how to go about making a project for yourself.&lt;br /&gt;
&lt;br /&gt;
Please see the image to the right for an overview that will assist you when reading the road map description below. &lt;br /&gt;
&lt;br /&gt;
You can find more information on the various parts in the page [[Building the Mower|&#039;&#039;&#039;Building the Mower&#039;&#039;&#039;]]&lt;br /&gt;
[[File:Road map.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Disclaimer&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;This material is provided as-is and free of charge. No guarantees of any kind are made that the information contained herein is exact or correct or does not violate any local regulations or cause any security risk. Any use you make of any information given here is at your own discretion and risk.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Road map ==&lt;br /&gt;
&lt;br /&gt;
===The Mower===&lt;br /&gt;
&lt;br /&gt;
====Get a mower in a store ====&lt;br /&gt;
So far only the Yard Force 500 is supported. See [[FAQ]] for more about alternative mowers.&lt;br /&gt;
&lt;br /&gt;
====Disassemble the mower and Remove the old mainboard====&lt;br /&gt;
See @c.ez&#039;s YouTube video https://www.youtube.com/watch?v=_bImqD-pQSA&lt;br /&gt;
&lt;br /&gt;
Now, it is ready for a new main board. &lt;br /&gt;
&lt;br /&gt;
=== PCBs with components ===&lt;br /&gt;
You need to build 4 PCBs; 1 for the main board and 3 for the motor controls (ESCs). You have to get the PCBs, get the parts and solder it yourself at the current stage. Due to international parts shortage, getting parts is quite a detective task, but here, we give you some help.&lt;br /&gt;
&lt;br /&gt;
The recommended process for getting parts is the following:&lt;br /&gt;
&lt;br /&gt;
# There are some parts lists (BOMs) maintained in Octopart - they will be given below. &lt;br /&gt;
# Use the Octopart site to find out where there are parts available and order them. You will very likely have to use several vendors. We propose that you start at digikey and then move on for parts that you can not get there.&lt;br /&gt;
# Order the parts.&lt;br /&gt;
# Use the relevant Gerber files for the board that you are making to order PCBs at e.g. JLCPCB. If you plan to use a hot plate or an oven for the soldering process, consider simultaneously ordering a stencil for placing solder paste on your PCBs.&lt;br /&gt;
&lt;br /&gt;
====Main board parts====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!What&lt;br /&gt;
!Where&lt;br /&gt;
!Notes&lt;br /&gt;
|-&lt;br /&gt;
| Gerber files&lt;br /&gt;
|https://github.com/ClemensElflein/OpenMower/tree/main/dist/Mainboard&lt;br /&gt;
|Get the latest zip file here.&lt;br /&gt;
|-&lt;br /&gt;
|BOM .csv file&lt;br /&gt;
|https://github.com/ClemensElflein/OpenMower/blob/main/dist/Mainboard/OpenMowerMainboard_bom_.csv&lt;br /&gt;
|With a little effort can be used to create an Octpoart list or a digikey list, if you spend some time mapping fields. The file has digikey and lcsc part numbers in it already.&lt;br /&gt;
|-&lt;br /&gt;
|BOM on Octopart&lt;br /&gt;
|&amp;lt;s&amp;gt;https://octopart.com/bom-tool/ODFKeG8J&amp;lt;/s&amp;gt; &#039;&#039;&#039;&amp;lt;big&amp;gt;OUTDATED !&amp;lt;/big&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
|Use this to see where parts are available&lt;br /&gt;
|-&lt;br /&gt;
|Interactive BOM&lt;br /&gt;
|https://clemenselflein.github.io/OpenMower/release/OpenMowerMainboard-ibom.html&lt;br /&gt;
|Use this file to see where parts go, very useful when you start to assemble.&lt;br /&gt;
Download the file and use it locally on you workstation. It has option to save state for how far you have gotten.&lt;br /&gt;
|}&lt;br /&gt;
=====Further parts needed=====&lt;br /&gt;
You also need&lt;br /&gt;
&lt;br /&gt;
*A Raspberry Pi 4&lt;br /&gt;
* An RTK Module&lt;br /&gt;
*A Raspberry Pi Pico&lt;br /&gt;
*A 9-axis accelerometer, WT901&lt;br /&gt;
&lt;br /&gt;
====xESC2040====&lt;br /&gt;
This version of the three motor drivers uses the RP2040 chip which should be available. The ESC can be produced single-sided for the OpenMower project (so it is less complicated than the STM32 version that is dual sided). xESC2040 has an option to mount some component on the underside to enable CAN interfacing, but, as said, this is not needed for the OpenMower. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!What&lt;br /&gt;
!Where&lt;br /&gt;
!Notes&lt;br /&gt;
|-&lt;br /&gt;
|Gerber files&lt;br /&gt;
|https://github.com/ClemensElflein/xESC/blob/main/PCB/xESC2040/GERBER/&lt;br /&gt;
|Use latest zip file here &lt;br /&gt;
|-&lt;br /&gt;
|BOM .csv file&lt;br /&gt;
|https://github.com/ClemensElflein/xESC/blob/main/PCB/xESC2040/BOM/xESC2_bom.csv &lt;br /&gt;
|With a little effort can be used to create an Octpoart list or a digikey list, if you spend some time mapping fields. The file has digikey and lcsc part numbers in it already. &lt;br /&gt;
|-&lt;br /&gt;
|BOM on Octopart&lt;br /&gt;
|&amp;lt;s&amp;gt;https://octopart.com/bom-tool/p1aqUopq&amp;lt;/s&amp;gt;  &#039;&#039;&#039;&amp;lt;big&amp;gt;OUTDATED !&amp;lt;/big&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
|Use this to see where parts are available&lt;br /&gt;
Note: this BOM is &#039;&#039;without&#039;&#039; the CAN components for the underside (they are not needed for the OpenMower project). &lt;br /&gt;
|-&lt;br /&gt;
|BOM on Octopart&lt;br /&gt;
|&amp;lt;s&amp;gt;https://octopart.com/bom-tool/tZ27Fd1N&amp;lt;/s&amp;gt;  &#039;&#039;&#039;&amp;lt;big&amp;gt;OUTDATED !&amp;lt;/big&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
|Use this to see where parts are available&lt;br /&gt;
Note: this BOM is &#039;&#039;with&#039;&#039; the CAN components for the underside (they are not needed for the OpenMower project). &lt;br /&gt;
|-&lt;br /&gt;
|Interactive BOM&lt;br /&gt;
|https://github.com/ClemensElflein/xESC/blob/main/PCB/xESC2040/BOM/ibom.html&lt;br /&gt;
|Use this file to see where parts go, very useful when you start to assemble.&lt;br /&gt;
Download the file and use it locally on you workstation. It has option to save state for how far you have gotten.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====x-ESC (original STM32 version)====&lt;br /&gt;
&lt;br /&gt;
This version of the three motor drivers uses the STM32 chip which is in very short supply, therefore the xESC2040 was designed and you should probably go for the xESC2040, unless you actually have access to STM32s. Also the STM32 version uses a double-sided PCB, so it is harder to solder than xESC2040.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!What&lt;br /&gt;
!Where&lt;br /&gt;
!Notes&lt;br /&gt;
|-&lt;br /&gt;
|Gerber files&lt;br /&gt;
|https://github.com/ClemensElflein/xESC/tree/main/PCB/xESC2_mini_VESC/GERBER&lt;br /&gt;
|Zip the files in this directory &lt;br /&gt;
|-&lt;br /&gt;
|BOM .csv file&lt;br /&gt;
|https://github.com/ClemensElflein/xESC/blob/main/PCB/xESC2_mini_VESC/BOM/xESC2_bom.csv &lt;br /&gt;
|With a little effort can be used to create an Octpoart list or a digikey list, if you spend some time mapping fields. The file has digikey and lcsc part numbers in it already. &lt;br /&gt;
|-&lt;br /&gt;
|BOM on Octopart&lt;br /&gt;
|&amp;lt;s&amp;gt;https://octopart.com/bom-tool/hUY6qiSp&amp;lt;/s&amp;gt;  &#039;&#039;&#039;&amp;lt;big&amp;gt;OUTDATED !&amp;lt;/big&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
|Use this to see where parts are available&lt;br /&gt;
|-&lt;br /&gt;
|Interactive BOM&lt;br /&gt;
|https://github.com/ClemensElflein/xESC/blob/main/PCB/xESC2_mini_VESC/BOM/ibom.html&lt;br /&gt;
|Use this file to see where parts go, very useful when you start to assemble.&lt;br /&gt;
Download the file and use it locally on you workstation. It has option to save state for how far you have gotten.&lt;br /&gt;
|}&lt;br /&gt;
==== Ground plane====&lt;br /&gt;
&lt;br /&gt;
This is not really a PCB with parts. It is just a PCB that provides a conducting plane on which the GPR antenna can sit for better reception - and with a size that fits within the Yard Force 500. You may order this from e.g. JLCPCB using the Gerber files below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!What&lt;br /&gt;
!Where&lt;br /&gt;
! Notes &lt;br /&gt;
|-&lt;br /&gt;
|Gerber files &lt;br /&gt;
|https://github.com/ClemensElflein/OpenMower/tree/main/Hardware/GPSGroundPlane&lt;br /&gt;
|Zip the files in this directory&lt;br /&gt;
|}&lt;br /&gt;
===Base station with the base RTK GPS module===&lt;br /&gt;
[TODO] @c.ez : Need info.&lt;br /&gt;
&lt;br /&gt;
===Charging Station===&lt;br /&gt;
&lt;br /&gt;
=====Get a CC/CV module=====&lt;br /&gt;
This is currently needed to fix the charging station provided by Yard Force due to incompatibilities with the replaced main-board. It should be possible to fix this issue, but right now, it is necessary. See [[Building the Mower]]  for where to get it.&lt;br /&gt;
&lt;br /&gt;
====Upgrade the Charging Station====&lt;br /&gt;
[TODO] @c.ez : Need info.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__FORCETOC__&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>
	</entry>
	<entry>
		<id>https://wiki.openmower.de/index.php?title=Main_Page&amp;diff=316</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.openmower.de/index.php?title=Main_Page&amp;diff=316"/>
		<updated>2023-05-05T12:01:33Z</updated>

		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The OpenMower Community Wiki ==&lt;br /&gt;
&lt;br /&gt;
Welcome to the OpenMower Community Wiki!&lt;br /&gt;
&lt;br /&gt;
This WIKI was only just started on 2022-04-22, but we&#039;ll collaborate on getting good information on the OpenMower project collected here.&lt;br /&gt;
&lt;br /&gt;
If you want to contribute to the Wiki: [https://discord.gg/jE7QNaSxW7 join the Discord], ask at the [https://discord.com/channels/958476543846412329/967345181013725194 #wiki-authors channel] for a wiki account and a wiki admin will create one.&lt;br /&gt;
&lt;br /&gt;
Also head over to the [https://discord.com/channels/958476543846412329/967345181013725194 #wiki-authors channel] if you want talk about wiki related stuff.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to Get Started ==&lt;br /&gt;
&lt;br /&gt;
One of the first steps currently is to browse around the discord and understand what the project is about. You can also have a look at Clemens&#039; second video ([https://www.youtube.com/watch?v=_bImqD-pQSA here]) of the project that details how to assemble the bot. &lt;br /&gt;
&lt;br /&gt;
First: Check the &#039;&#039;&#039;[[FAQ]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When you&#039;re ready, you can have a look at the &#039;&#039;&#039;[[Building the Mower]]&#039;&#039;&#039; section to see the Bill of Materials and steps required and check out &#039;&#039;&#039;[[Builder Road Map]]&#039;&#039;&#039; for a practical take on what to do.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;(Note this wiki is in progress and not complete yet, but we&#039;re working on it!)&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;&#039;&#039;&#039;⚡ Before checking out the community wiki head over to the Official Documentation at [https://openmower.de/ openmower.de] ⚡&#039;&#039;&#039;&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Resources==&lt;br /&gt;
&lt;br /&gt;
===[[FAQ]]===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;There is a continually evolving [[FAQ]] that is a good starting point for understanding the project and getting answers to some key questions.&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===[[Project overview|Project overview and timeline]]===&lt;br /&gt;
&lt;br /&gt;
Current status and future goals - [[Project overview|See it here]]&lt;br /&gt;
&lt;br /&gt;
===[[Hardware|&amp;lt;s&amp;gt;Hardware Revisions&amp;lt;/s&amp;gt;]] &#039;&#039;Outdated&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;s&amp;gt;Open Mower hardware revisions, changelog, info: [[Hardware|Here]]&amp;lt;/s&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===[[System Image|Software Installation]]===&lt;br /&gt;
&lt;br /&gt;
On this page, you can find steps how to install a basic OpenMower system image.&lt;br /&gt;
&lt;br /&gt;
===[[Running OpenMower]]===&lt;br /&gt;
&lt;br /&gt;
On this page, you can find steps how to run the OpenMower software.&lt;br /&gt;
We&#039;re doing:&lt;br /&gt;
- Starting the Software&lt;br /&gt;
- Magnetometer Calibration&lt;br /&gt;
- Recording a Map&lt;br /&gt;
- Starting the Mowing Process&lt;br /&gt;
&lt;br /&gt;
===[[Mini HOWTOs]]===&lt;br /&gt;
&lt;br /&gt;
On this page, you can find small HOWTOs for various things. Set [[Mini HOWTOs|here]]&lt;br /&gt;
&lt;br /&gt;
===Where to find more information===&lt;br /&gt;
&lt;br /&gt;
The entry points for more information are:&lt;br /&gt;
&lt;br /&gt;
*[https://discord.com/channels/958476543846412329/958476543846412331 The Discord for the project]&lt;br /&gt;
*[https://discord.com/channels/958476543846412329/958476543846412332 Annoncements in the Discord]&lt;br /&gt;
*[https://youtube.com/c/ClemensElflein/videos YouTube]&lt;br /&gt;
*[https://github.com/ClemensElflein/OpenMower Open Mower Main GitHub Repo - Overall and hardware]&lt;br /&gt;
*[https://github.com/ClemensElflein/open_mower_ros Open Mower GitHub Repo for the ROS logic in the OpenMower]&lt;br /&gt;
*[https://github.com/ClemensElflein/xESC xESC Motor Controller Repo (custom part for main board)]&lt;br /&gt;
&lt;br /&gt;
==How to contribute==&lt;br /&gt;
&lt;br /&gt;
At the moment, there are different ways to contribute:&lt;br /&gt;
&lt;br /&gt;
*Building your own mower, testing the software and reporting bugs / committing fixes on the github repository&lt;br /&gt;
&lt;br /&gt;
*If you&#039;re not scared to see the inside of some mowers, please help us understand more about how they are built following instructions in the &#039;&#039;&#039;[[Mower Dissection]]&#039;&#039;&#039; page.&lt;br /&gt;
&lt;br /&gt;
*And finally, [https://www.patreon.com/ClemensElflein Patreon to support Clemens&#039; amazing work]&lt;br /&gt;
&lt;br /&gt;
==Disclaimer==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;This Wiki is provided as-is and free of charge. No guarantees of any kind are made that the information contained herein is exact or correct or does not violate any local regulations or cause any security risk. Any use you make of any information given here is at your own discretion and risk.&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>
	</entry>
	<entry>
		<id>https://wiki.openmower.de/index.php?title=Main_Page&amp;diff=315</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.openmower.de/index.php?title=Main_Page&amp;diff=315"/>
		<updated>2023-05-05T11:55:57Z</updated>

		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The OpenMower Community Wiki ==&lt;br /&gt;
&lt;br /&gt;
Welcome to the OpenMower Community Wiki!&lt;br /&gt;
&lt;br /&gt;
This WIKI was only just started on 2022-04-22, but we&#039;ll collaborate on getting good information on the OpenMower project collected here.&lt;br /&gt;
&lt;br /&gt;
If you want to contribute to the Wiki: [https://discord.gg/jE7QNaSxW7 join the Discord], ask at the [https://discord.com/channels/958476543846412329/967345181013725194 #wiki-authors channel] for a wiki account and a wiki admin will create one.&lt;br /&gt;
&lt;br /&gt;
Also head over to the [https://discord.com/channels/958476543846412329/967345181013725194 #wiki-authors channel] if you want talk about wiki related stuff.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to Get Started ==&lt;br /&gt;
&lt;br /&gt;
One of the first steps currently is to browse around the discord and understand what the project is about. You can also have a look at Clemens&#039; second video ([https://www.youtube.com/watch?v=_bImqD-pQSA here]) of the project that details how to assemble the bot. &lt;br /&gt;
&lt;br /&gt;
First: Check the &#039;&#039;&#039;[[FAQ]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When you&#039;re ready, you can have a look at the &#039;&#039;&#039;[[Building the Mower]]&#039;&#039;&#039; section to see the Bill of Materials and steps required and check out &#039;&#039;&#039;[[Builder Road Map]]&#039;&#039;&#039; for a practical take on what to do.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;(Note this wiki is in progress and not complete yet, but we&#039;re working on it!)&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;&#039;&#039;&#039;⚡ Before checking out the community wiki head over to the Official Documentation at [https://openmower.de/ openmower.de] ⚡&#039;&#039;&#039;&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Resources==&lt;br /&gt;
&lt;br /&gt;
===[[FAQ]]===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;There is a continually evolving [[FAQ]] that is a good starting point for understanding the project and getting answers to some key questions.&amp;lt;/big&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===[[Project overview|Project overview and timeline]]===&lt;br /&gt;
&lt;br /&gt;
Current status and future goals - [[Project overview|See it here]]&lt;br /&gt;
&lt;br /&gt;
===[[Hardware|&amp;lt;s&amp;gt;Hardware Revisions&amp;lt;/s&amp;gt;]] &#039;&#039;Outdated&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;s&amp;gt;Open Mower hardware revisions, changelog, info: [[Hardware|Here]]&amp;lt;/s&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===[[System Image|Software Installation]]===&lt;br /&gt;
&lt;br /&gt;
On this page, you can find steps how to install a basic OpenMower system image.&lt;br /&gt;
&lt;br /&gt;
===[[Running OpenMower]]===&lt;br /&gt;
&lt;br /&gt;
On this page, you can find steps how to run the OpenMower software.&lt;br /&gt;
We&#039;re doing:&lt;br /&gt;
- Starting the Software&lt;br /&gt;
- Magnetometer Calibration&lt;br /&gt;
- Recording a Map&lt;br /&gt;
- Starting the Mowing Process&lt;br /&gt;
&lt;br /&gt;
===[[Mini HOWTOs]]===&lt;br /&gt;
&lt;br /&gt;
On this page, you can find small HOWTOs for various things. Set [[Mini HOWTOs|here]]&lt;br /&gt;
&lt;br /&gt;
===Where to find more information===&lt;br /&gt;
&lt;br /&gt;
The entry points for more information are:&lt;br /&gt;
&lt;br /&gt;
*[https://discord.com/channels/958476543846412329/958476543846412331 The Discord for the project]&lt;br /&gt;
*[https://discord.com/channels/958476543846412329/958476543846412332 Annoncements in the Discord]&lt;br /&gt;
*[https://youtube.com/c/ClemensElflein/videos YouTube]&lt;br /&gt;
*[https://github.com/ClemensElflein/OpenMower Open Mower Main GitHub Repo - Overall and hardware]&lt;br /&gt;
*[https://github.com/ClemensElflein/open_mower_ros Open Mower GitHub Repo for the ROS logic in the OpenMower]&lt;br /&gt;
*[https://github.com/ClemensElflein/xESC xESC Motor Controller Repo (custom part for main board)]&lt;br /&gt;
&lt;br /&gt;
==How to contribute==&lt;br /&gt;
&lt;br /&gt;
At the moment, there are different ways to contribute:&lt;br /&gt;
&lt;br /&gt;
*Building your own mower, testing the software and reporting bugs / committing fixes on the github repository&lt;br /&gt;
&lt;br /&gt;
*If you&#039;re not scared to see the inside of some mowers, please help us understand more about how they are built following instructions in the &#039;&#039;&#039;[[Mower Dissection]]&#039;&#039;&#039; page.&lt;br /&gt;
&lt;br /&gt;
*And finally, [https://www.patreon.com/ClemensElflein Patreon to support Clemens&#039; amazing work]&lt;br /&gt;
&lt;br /&gt;
==Disclaimer==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;This Wiki is provided as-is and free of charge. No guarantees of any kind are made that the information contained herein is exact or correct or does not violate any local regulations or cause any security risk. Any use you make of any information given here is at your own discretion and risk.&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>
	</entry>
	<entry>
		<id>https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=313</id>
		<title>OLD Bare Metal System Image</title>
		<link rel="alternate" type="text/html" href="https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=313"/>
		<updated>2022-11-16T10:32:03Z</updated>

		<summary type="html">&lt;p&gt;Potter-91: /* Installing OpenMower Software */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page will guide you through the steps to install a basic system image.&lt;br /&gt;
&lt;br /&gt;
On this image you will have the ROS base system, the OpenMower installation, local configuration for your mower and some tools to help you work with the mower.&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
In order to follow this guide, you will need the following:&lt;br /&gt;
&lt;br /&gt;
#A Raspberry Pi 4 (4GB or more recommended, [[System Image#Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM)|2GB works with swap, see here]])&lt;br /&gt;
#An SD card&lt;br /&gt;
#A soldered OpenMower mainboard&lt;br /&gt;
&lt;br /&gt;
==Installing the Base System==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;&#039;&#039;&#039;There is also a YouTube video explaining the steps in this section:&#039;&#039;&#039; https://youtu.be/_bImqD-pQSA?t=562&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Flashing Ubuntu to SD Card ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first step is to install the base system. We&#039;re using Ubuntu 20.04 Server for the Raspberry Pi. This is, because this image gives us best support ROS Noetic.&lt;br /&gt;
&lt;br /&gt;
Installing the base image is easy:&lt;br /&gt;
&lt;br /&gt;
#[https://www.raspberrypi.com/software/ Get the Raspberry Pi Imager software]&lt;br /&gt;
#Select the correct operating system:  &#039;&#039;Other-general-purpose OS &amp;gt; Ubuntu &amp;gt; Ubuntu Server 20.04.4 LTS (RPI 3/4/400) 64-bit&#039;&#039;&lt;br /&gt;
#Insert your SD card into your PC and select it in the &#039;&#039;Storage&#039;&#039; part of the software&lt;br /&gt;
#Click &#039;&#039;write&#039;&#039; and wait for the process to finish&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have successfully flashed your image, remove the SD for your PC &#039;&#039;&#039;and reinsert it again.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Then replace the &amp;lt;code&amp;gt;/boot/config.txt&amp;lt;/code&amp;gt; file with the one provided here: [https://github.com/ClemensElflein/OpenMower/blob/main/configs/RaspberryPiConfig/config.txt]&lt;br /&gt;
&lt;br /&gt;
This will enable all hardware serial ports on the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can theoretically configure networking in this step as well, but I&#039;m not recommending it. This is, because the networking information file gets only copied once and if you have an error it won&#039;t work.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;We need an interactive terminal in the next step anyways.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have done this step, you can eject the SD card and plug it into your Raspberry Pi 4.&lt;br /&gt;
&lt;br /&gt;
=== Opening a Serial Terminal ===&lt;br /&gt;
[[File:SerialRedirect.png|thumb|Serial Terminal: minicom -D /dev/ttyACM0]]&lt;br /&gt;
This step is needed for the following sections. The goal is to have a serial terminal to do basic config (networking etc) easily.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The easiest way of doing so is:&lt;br /&gt;
# Flash the SerialRedirect firmware into your Pico. Get it here: https://github.com/ClemensElflein/OpenMower/tree/main/Firmware/SerialRedirect/bin&lt;br /&gt;
# Provide your mainboard with power&lt;br /&gt;
# Plug your Pico into a computer. A virtual COM port should appear&lt;br /&gt;
# Connect to the COM port (I&#039;m using minicom, see image on the right), then press enter to start the Raspberry Pi.&lt;br /&gt;
#The Pi boots and a serial terminal will appear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you can login with the default credentials:&lt;br /&gt;
&lt;br /&gt;
username: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
password: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that you will need to change the password immediately.&lt;br /&gt;
&lt;br /&gt;
=== Disable Boot Interrupt ===&lt;br /&gt;
[[File:Image.png|thumb|Commands needed to disable boot interrupt on serial input.]]&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi boot loader will interrupt the boot sequence if data is sent through the main serial port of the Raspberry Pi. Since we&#039;re connecting &amp;quot;nosiy&amp;quot; hardware to the port, this will always interrupt the boot sequence and we need to disable this feature. &lt;br /&gt;
&lt;br /&gt;
In order to do this, reboot the Pi (sudo reboot) and send anything during the count-down in the bootloader (check the YouTube video linked above, if you&#039;re not sure).&lt;br /&gt;
&lt;br /&gt;
Then enter the following commands into the bootloader prompt:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
setenv bootdelay -2&lt;br /&gt;
saveenv&lt;br /&gt;
reset&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The Pi should reboot and the count-down should be gone.&lt;br /&gt;
&lt;br /&gt;
=== Some Settings ===&lt;br /&gt;
&lt;br /&gt;
[TODO/WIP]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are some miscellaneous settings I think are a good idea for an OpenMower install:&lt;br /&gt;
&lt;br /&gt;
* Remove the unnecessary snap system: &amp;lt;code&amp;gt;sudo snap remove --purge lxd &amp;amp;&amp;amp; sudo snap remove --purge core20 &amp;amp;&amp;amp; sudo snap remove --purge snapd &amp;amp;&amp;amp; sudo apt purge --autoremove snapd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Disable unattended upgrades: &amp;lt;code&amp;gt;sudo systemctl stop --force unattended-upgrades &amp;amp;&amp;amp; sudo systemctl disable unattended-upgrades &amp;amp;&amp;amp; sudo systemctl mask unattended-upgrades&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* I like to add the following to &amp;lt;code&amp;gt;cmdline.txt&amp;lt;/code&amp;gt; in order to fsck on boot:  &amp;lt;code&amp;gt;fsck.mode=force fsck.repair=yes&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* I prefer to use a static IP (If you use the [[System_Image#Installing_a_WiFi_Hot-Spot_(optional,_but_recommended)|recommend WiFi Hot-Spot]] use &amp;lt;code&amp;gt;sudo nmtui&amp;lt;/code&amp;gt; to configure a static IP)&lt;br /&gt;
&lt;br /&gt;
* If you like to have a terminal wifi scanner/signal monitor just install &amp;lt;code&amp;gt;sudo apt install wavemon&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you like you can change the timezone: &amp;lt;code&amp;gt;sudo timedatectl set-timezone Region/Location&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;sudo dpkg-reconfigure tzdata&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you ever like to plug a keyboard into the Pi don&#039;t forget to change the keymap: &amp;lt;code&amp;gt;sudo dpkg-reconfigure keyboard-configuration&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM)===&lt;br /&gt;
Compiling the OpenMower software will need more than 2GB of RAM. In order to still do this on a Pi with &amp;lt;= 2GB of RAM, we will add a 2GB swap file to the system by entering the following commands:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Create a new 2GB swap file&lt;br /&gt;
sudo fallocate -l 2G /swapfile&lt;br /&gt;
# Change permissions, so that only root can read and write&lt;br /&gt;
sudo chmod 600 /swapfile&lt;br /&gt;
# Create swap space in the file&lt;br /&gt;
sudo mkswap /swapfile&lt;br /&gt;
# Add it to the fstab&lt;br /&gt;
echo &#039;/swapfile swap swap defaults 0 0&#039; | sudo tee -a /etc/fstab /swapfile swap swap defaults 0 0&lt;br /&gt;
# Reboot to activate&lt;br /&gt;
sudo reboot&lt;br /&gt;
&lt;br /&gt;
# Check if it&#039;s activated&lt;br /&gt;
sudo swapon --show&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Installing a WiFi Hot-Spot (optional, but recommended)===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Since we will be configuring the WiFi interface, make sure that you have connected Etherent to your Raspberry Pi for this step.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As soon as you have closed your mower&#039;s enclosure, you won&#039;t have physical access to your Raspberry Pi anymore. If for some reason it&#039;s unable to connect to your WiFi (e.g. you have changed your password), you would need to open the case to get access to the SD card or Ethernet port on the Pi to regain access.&lt;br /&gt;
&lt;br /&gt;
To prevent this, we&#039;re going to install a hot-spot software which helps you to connect to WiFi by opening a hot-spot each time the Pi cannot connect to a known WiFi connection.&lt;br /&gt;
&lt;br /&gt;
Now is the best time to do this, because we have a serial terminal anyways and can mess with the network interfaces without shutting us out of the system!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Just use the following commands for this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# We need to disable systemd-resolveds caching DNS stub resolver&lt;br /&gt;
# if you want to know why check: https://github.com/pi-hole/docker-pi-hole/#installing-on-ubuntu&lt;br /&gt;
sudo sed -r -i.orig &#039;s/#?DNSStubListener=yes/DNSStubListener=no/g&#039; /etc/systemd/resolved.conf&lt;br /&gt;
sudo systemctl restart systemd-resolved.service&lt;br /&gt;
&lt;br /&gt;
ping ntp.org&lt;br /&gt;
# This will throw an dns error:&lt;br /&gt;
#   ping: ntp.org: Temporary failure in name resolution&lt;br /&gt;
sudo sh -c &#039;rm /etc/resolv.conf &amp;amp;&amp;amp; ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf&#039;&lt;br /&gt;
sudo systemctl restart systemd-resolved.service&lt;br /&gt;
nslookup ntp.org&lt;br /&gt;
# DNS should work now&lt;br /&gt;
&lt;br /&gt;
# Install comitup using the latest version from the projects repo&lt;br /&gt;
wget https://davesteele.github.io/comitup/latest/davesteele-comitup-apt-source_latest.deb&lt;br /&gt;
sudo dpkg -i --force-all davesteele-comitup-apt-source_latest.deb&lt;br /&gt;
rm davesteele-comitup-apt-source_latest.deb&lt;br /&gt;
sudo apt update&lt;br /&gt;
sudo apt install comitup --no-install-recommends&lt;br /&gt;
&lt;br /&gt;
sudo systemctl stop comitup&lt;br /&gt;
# Now use network-manager to:&lt;br /&gt;
# - add you wifi network&lt;br /&gt;
# optional:&lt;br /&gt;
# - change your hostname&lt;br /&gt;
# - add a dhcp ethernet connection without any device assigned&lt;br /&gt;
# (if even the hotspot malfunctions you can plug in a usb ethernet adapter)&lt;br /&gt;
sudo nmtui&lt;br /&gt;
&lt;br /&gt;
# Edit comitup.conf to change the wifi name and password (I use OpenMower-&amp;lt;nn&amp;gt;)&lt;br /&gt;
sudo nano /etc/comitup.conf&lt;br /&gt;
sudo systemctl restart comitup&lt;br /&gt;
# reboot - it should work now&lt;br /&gt;
sudo reboot&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable Serial Console===&lt;br /&gt;
Now that we have setup the network and can access the Pi even if our WiFi is not in range, we need to disable that serial console so that we can use the serial port for hardware.&lt;br /&gt;
&lt;br /&gt;
To do this, enter: &amp;lt;code&amp;gt;sudo nano /boot/firmware/cmdline.txt&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and remove the &amp;lt;code&amp;gt;console=serial0,115200&amp;lt;/code&amp;gt; part of the line.&lt;br /&gt;
&lt;br /&gt;
Save the file and reboot. You should still see the bootloader output, but no serial output after that.&lt;br /&gt;
&lt;br /&gt;
==Installing Tools==&lt;br /&gt;
If you&#039;re happy with your basic Ubuntu setup, it&#039;s time to install some tools required for the OpenMower&lt;br /&gt;
&lt;br /&gt;
=== General Dependencies ===&lt;br /&gt;
Just install them with apt:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install --no-install-recommends build-essential git&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===STR2STR (optional, recommended; only needed if you&#039;re using NTRIP, so probably most of you)===&lt;br /&gt;
We need a newer version than the one available in apt, so install it from source:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install gfortran&lt;br /&gt;
git clone https://github.com/rtklibexplorer/RTKLIB&lt;br /&gt;
cd RTKLIB&lt;br /&gt;
git checkout tags/b34c&lt;br /&gt;
cd app/consapp/&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You should now be able to run str2str from anywhere.&lt;br /&gt;
&lt;br /&gt;
=== OpenOCD (optional, recommended; only needed if you want to flash Pico from Raspberry Pi)===&lt;br /&gt;
We need to get the OpenOCD version from the Raspberry Pi foundation, because the &amp;quot;original&amp;quot; one doesn&#039;t have the Pico support built in yet.&lt;br /&gt;
&lt;br /&gt;
Install it from source:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install automake autoconf build-essential libtool libftdi-dev libusb-1.0-0-dev texinfo pkg-config rpi.gpio-common&lt;br /&gt;
git clone https://github.com/raspberrypi/openocd.git --recursive --branch rp2040 --depth=1&lt;br /&gt;
cd openocd&lt;br /&gt;
./bootstrap&lt;br /&gt;
./configure --enable-ftdi --enable-sysfsgpio --enable-bcm2835gpio&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You can test if it was a success by running:&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
ubuntu@ubuntu:~$ openocd -v&lt;br /&gt;
Open On-Chip Debugger 0.11.0-g610f137-dirty (2022-06-07-00:39)&lt;br /&gt;
Licensed under GNU GPL v2&lt;br /&gt;
For bug reports, read&lt;br /&gt;
	http://openocd.org/doc/doxygen/bugs.html&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installing ROS and OpenMower==&lt;br /&gt;
We&#039;re using ROS Noetic for the OpenMower project. In this step we will install it, get the OpenMower sources, build the sources and create a basic configuration file for your mower.&lt;br /&gt;
&lt;br /&gt;
===Install ROS Noetic===&lt;br /&gt;
Since we&#039;re running Ubuntu 20.04 installing ROS is as easy as running the following commands:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Get the ROS apt repository&lt;br /&gt;
sudo sh -c &#039;echo &amp;quot;deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main&amp;quot; &amp;gt; /etc/apt/sources.list.d/ros-latest.list&#039;&lt;br /&gt;
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -&lt;br /&gt;
&lt;br /&gt;
# Install the ROS base system&lt;br /&gt;
sudo apt update&lt;br /&gt;
sudo apt install --no-install-recommends ros-noetic-ros-base&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;We only need to register the ROS installation in your &amp;lt;code&amp;gt;.bashrc&amp;lt;/code&amp;gt; file. This will enable you to call ROS specific commands from your terminal:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.bash&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Installing OpenMower Software===&lt;br /&gt;
Now we&#039;re finally able to install the OpenMower software. First, we&#039;re checking out the current version of the sources, then we&#039;re getting the dependencies and finally we&#039;re building the sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Clone the GitHub Repository:&lt;br /&gt;
git clone --recursive https://github.com/ClemensElflein/open_mower_ros.git&lt;br /&gt;
&lt;br /&gt;
# Get rosdep, only needed once&lt;br /&gt;
sudo apt install --no-install-recommends python3-rosdep&lt;br /&gt;
sudo rosdep init&lt;br /&gt;
rosdep update&lt;br /&gt;
&lt;br /&gt;
# Get the dependencies using rosdep&lt;br /&gt;
cd open_mower_ros/&lt;br /&gt;
rosdep install --from-paths src --ignore-src --simulate | sed --expression &#039;1d&#039; --expression &#039;s/apt-get install/apt-get install --no-install-recommends --yes/g&#039; | bash&lt;br /&gt;
&lt;br /&gt;
# Finally, build the sources. This will take a while! &lt;br /&gt;
catkin_make -j1 # on 2GB Pi with SWAP - this takes at least 30min&lt;br /&gt;
# OR&lt;br /&gt;
catkin_make -j2 # on 4/8GB Pi - this takes at least 20min&lt;br /&gt;
&lt;br /&gt;
# Copy the default configuration file to your home directory&lt;br /&gt;
cp ~/open_mower_ros/src/open_mower/config/mower_config.sh.example ~/mower_config.sh&lt;br /&gt;
&lt;br /&gt;
# The next step is to also source the OpenMower ROS install&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;At this point the OpenMower software is successfully installed! You will need to configure the OpenMower software and then you&#039;re finally ready to mow.&lt;br /&gt;
&lt;br /&gt;
== Some Additional Issues==&lt;br /&gt;
&lt;br /&gt;
===I&#039;m using an external WiFi dongle for better coverage, but sometimes it doesn&#039;t work===&lt;br /&gt;
It seems that the Ubuntu sometimes puts external WiFi dongles to sleep. To prevent this, we create a service which disables powersave:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Enter this to create the service&lt;br /&gt;
sudo systemctl --full --force edit wifi_powersave@.service&lt;br /&gt;
&lt;br /&gt;
# Paste the following:&lt;br /&gt;
[Unit]&lt;br /&gt;
Description=Set WiFi power save %i&lt;br /&gt;
After=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
Type=oneshot&lt;br /&gt;
RemainAfterExit=yes&lt;br /&gt;
ExecStart=/sbin/iw dev wlan1 set power_save %i&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
# Save and exit, then activate using:&lt;br /&gt;
sudo systemctl disable wifi_powersave@on.service&lt;br /&gt;
sudo systemctl enable wifi_powersave@off.service&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>
	</entry>
	<entry>
		<id>https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=312</id>
		<title>OLD Bare Metal System Image</title>
		<link rel="alternate" type="text/html" href="https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=312"/>
		<updated>2022-10-26T20:31:37Z</updated>

		<summary type="html">&lt;p&gt;Potter-91: /* Installing ROS and OpenMower */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page will guide you through the steps to install a basic system image.&lt;br /&gt;
&lt;br /&gt;
On this image you will have the ROS base system, the OpenMower installation, local configuration for your mower and some tools to help you work with the mower.&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
In order to follow this guide, you will need the following:&lt;br /&gt;
&lt;br /&gt;
#A Raspberry Pi 4 (4GB or more recommended, [[System Image#Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM)|2GB works with swap, see here]])&lt;br /&gt;
#An SD card&lt;br /&gt;
#A soldered OpenMower mainboard&lt;br /&gt;
&lt;br /&gt;
==Installing the Base System==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;&#039;&#039;&#039;There is also a YouTube video explaining the steps in this section:&#039;&#039;&#039; https://youtu.be/_bImqD-pQSA?t=562&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Flashing Ubuntu to SD Card ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first step is to install the base system. We&#039;re using Ubuntu 20.04 Server for the Raspberry Pi. This is, because this image gives us best support ROS Noetic.&lt;br /&gt;
&lt;br /&gt;
Installing the base image is easy:&lt;br /&gt;
&lt;br /&gt;
#[https://www.raspberrypi.com/software/ Get the Raspberry Pi Imager software]&lt;br /&gt;
#Select the correct operating system:  &#039;&#039;Other-general-purpose OS &amp;gt; Ubuntu &amp;gt; Ubuntu Server 20.04.4 LTS (RPI 3/4/400) 64-bit&#039;&#039;&lt;br /&gt;
#Insert your SD card into your PC and select it in the &#039;&#039;Storage&#039;&#039; part of the software&lt;br /&gt;
#Click &#039;&#039;write&#039;&#039; and wait for the process to finish&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have successfully flashed your image, remove the SD for your PC &#039;&#039;&#039;and reinsert it again.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Then replace the &amp;lt;code&amp;gt;/boot/config.txt&amp;lt;/code&amp;gt; file with the one provided here: [https://github.com/ClemensElflein/OpenMower/blob/main/configs/RaspberryPiConfig/config.txt]&lt;br /&gt;
&lt;br /&gt;
This will enable all hardware serial ports on the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can theoretically configure networking in this step as well, but I&#039;m not recommending it. This is, because the networking information file gets only copied once and if you have an error it won&#039;t work.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;We need an interactive terminal in the next step anyways.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have done this step, you can eject the SD card and plug it into your Raspberry Pi 4.&lt;br /&gt;
&lt;br /&gt;
=== Opening a Serial Terminal ===&lt;br /&gt;
[[File:SerialRedirect.png|thumb|Serial Terminal: minicom -D /dev/ttyACM0]]&lt;br /&gt;
This step is needed for the following sections. The goal is to have a serial terminal to do basic config (networking etc) easily.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The easiest way of doing so is:&lt;br /&gt;
# Flash the SerialRedirect firmware into your Pico. Get it here: https://github.com/ClemensElflein/OpenMower/tree/main/Firmware/SerialRedirect/bin&lt;br /&gt;
# Provide your mainboard with power&lt;br /&gt;
# Plug your Pico into a computer. A virtual COM port should appear&lt;br /&gt;
# Connect to the COM port (I&#039;m using minicom, see image on the right), then press enter to start the Raspberry Pi.&lt;br /&gt;
#The Pi boots and a serial terminal will appear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you can login with the default credentials:&lt;br /&gt;
&lt;br /&gt;
username: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
password: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that you will need to change the password immediately.&lt;br /&gt;
&lt;br /&gt;
=== Disable Boot Interrupt ===&lt;br /&gt;
[[File:Image.png|thumb|Commands needed to disable boot interrupt on serial input.]]&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi boot loader will interrupt the boot sequence if data is sent through the main serial port of the Raspberry Pi. Since we&#039;re connecting &amp;quot;nosiy&amp;quot; hardware to the port, this will always interrupt the boot sequence and we need to disable this feature. &lt;br /&gt;
&lt;br /&gt;
In order to do this, reboot the Pi (sudo reboot) and send anything during the count-down in the bootloader (check the YouTube video linked above, if you&#039;re not sure).&lt;br /&gt;
&lt;br /&gt;
Then enter the following commands into the bootloader prompt:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
setenv bootdelay -2&lt;br /&gt;
saveenv&lt;br /&gt;
reset&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The Pi should reboot and the count-down should be gone.&lt;br /&gt;
&lt;br /&gt;
=== Some Settings ===&lt;br /&gt;
&lt;br /&gt;
[TODO/WIP]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are some miscellaneous settings I think are a good idea for an OpenMower install:&lt;br /&gt;
&lt;br /&gt;
* Remove the unnecessary snap system: &amp;lt;code&amp;gt;sudo snap remove --purge lxd &amp;amp;&amp;amp; sudo snap remove --purge core20 &amp;amp;&amp;amp; sudo snap remove --purge snapd &amp;amp;&amp;amp; sudo apt purge --autoremove snapd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Disable unattended upgrades: &amp;lt;code&amp;gt;sudo systemctl stop --force unattended-upgrades &amp;amp;&amp;amp; sudo systemctl disable unattended-upgrades &amp;amp;&amp;amp; sudo systemctl mask unattended-upgrades&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* I like to add the following to &amp;lt;code&amp;gt;cmdline.txt&amp;lt;/code&amp;gt; in order to fsck on boot:  &amp;lt;code&amp;gt;fsck.mode=force fsck.repair=yes&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* I prefer to use a static IP (If you use the [[System_Image#Installing_a_WiFi_Hot-Spot_(optional,_but_recommended)|recommend WiFi Hot-Spot]] use &amp;lt;code&amp;gt;sudo nmtui&amp;lt;/code&amp;gt; to configure a static IP)&lt;br /&gt;
&lt;br /&gt;
* If you like to have a terminal wifi scanner/signal monitor just install &amp;lt;code&amp;gt;sudo apt install wavemon&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you like you can change the timezone: &amp;lt;code&amp;gt;sudo timedatectl set-timezone Region/Location&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;sudo dpkg-reconfigure tzdata&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you ever like to plug a keyboard into the Pi don&#039;t forget to change the keymap: &amp;lt;code&amp;gt;sudo dpkg-reconfigure keyboard-configuration&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM)===&lt;br /&gt;
Compiling the OpenMower software will need more than 2GB of RAM. In order to still do this on a Pi with &amp;lt;= 2GB of RAM, we will add a 2GB swap file to the system by entering the following commands:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Create a new 2GB swap file&lt;br /&gt;
sudo fallocate -l 2G /swapfile&lt;br /&gt;
# Change permissions, so that only root can read and write&lt;br /&gt;
sudo chmod 600 /swapfile&lt;br /&gt;
# Create swap space in the file&lt;br /&gt;
sudo mkswap /swapfile&lt;br /&gt;
# Add it to the fstab&lt;br /&gt;
echo &#039;/swapfile swap swap defaults 0 0&#039; | sudo tee -a /etc/fstab /swapfile swap swap defaults 0 0&lt;br /&gt;
# Reboot to activate&lt;br /&gt;
sudo reboot&lt;br /&gt;
&lt;br /&gt;
# Check if it&#039;s activated&lt;br /&gt;
sudo swapon --show&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Installing a WiFi Hot-Spot (optional, but recommended)===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Since we will be configuring the WiFi interface, make sure that you have connected Etherent to your Raspberry Pi for this step.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As soon as you have closed your mower&#039;s enclosure, you won&#039;t have physical access to your Raspberry Pi anymore. If for some reason it&#039;s unable to connect to your WiFi (e.g. you have changed your password), you would need to open the case to get access to the SD card or Ethernet port on the Pi to regain access.&lt;br /&gt;
&lt;br /&gt;
To prevent this, we&#039;re going to install a hot-spot software which helps you to connect to WiFi by opening a hot-spot each time the Pi cannot connect to a known WiFi connection.&lt;br /&gt;
&lt;br /&gt;
Now is the best time to do this, because we have a serial terminal anyways and can mess with the network interfaces without shutting us out of the system!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Just use the following commands for this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# We need to disable systemd-resolveds caching DNS stub resolver&lt;br /&gt;
# if you want to know why check: https://github.com/pi-hole/docker-pi-hole/#installing-on-ubuntu&lt;br /&gt;
sudo sed -r -i.orig &#039;s/#?DNSStubListener=yes/DNSStubListener=no/g&#039; /etc/systemd/resolved.conf&lt;br /&gt;
sudo systemctl restart systemd-resolved.service&lt;br /&gt;
&lt;br /&gt;
ping ntp.org&lt;br /&gt;
# This will throw an dns error:&lt;br /&gt;
#   ping: ntp.org: Temporary failure in name resolution&lt;br /&gt;
sudo sh -c &#039;rm /etc/resolv.conf &amp;amp;&amp;amp; ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf&#039;&lt;br /&gt;
sudo systemctl restart systemd-resolved.service&lt;br /&gt;
nslookup ntp.org&lt;br /&gt;
# DNS should work now&lt;br /&gt;
&lt;br /&gt;
# Install comitup using the latest version from the projects repo&lt;br /&gt;
wget https://davesteele.github.io/comitup/latest/davesteele-comitup-apt-source_latest.deb&lt;br /&gt;
sudo dpkg -i --force-all davesteele-comitup-apt-source_latest.deb&lt;br /&gt;
rm davesteele-comitup-apt-source_latest.deb&lt;br /&gt;
sudo apt update&lt;br /&gt;
sudo apt install comitup --no-install-recommends&lt;br /&gt;
&lt;br /&gt;
sudo systemctl stop comitup&lt;br /&gt;
# Now use network-manager to:&lt;br /&gt;
# - add you wifi network&lt;br /&gt;
# optional:&lt;br /&gt;
# - change your hostname&lt;br /&gt;
# - add a dhcp ethernet connection without any device assigned&lt;br /&gt;
# (if even the hotspot malfunctions you can plug in a usb ethernet adapter)&lt;br /&gt;
sudo nmtui&lt;br /&gt;
&lt;br /&gt;
# Edit comitup.conf to change the wifi name and password (I use OpenMower-&amp;lt;nn&amp;gt;)&lt;br /&gt;
sudo nano /etc/comitup.conf&lt;br /&gt;
sudo systemctl restart comitup&lt;br /&gt;
# reboot - it should work now&lt;br /&gt;
sudo reboot&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable Serial Console===&lt;br /&gt;
Now that we have setup the network and can access the Pi even if our WiFi is not in range, we need to disable that serial console so that we can use the serial port for hardware.&lt;br /&gt;
&lt;br /&gt;
To do this, enter: &amp;lt;code&amp;gt;sudo nano /boot/firmware/cmdline.txt&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and remove the &amp;lt;code&amp;gt;console=serial0,115200&amp;lt;/code&amp;gt; part of the line.&lt;br /&gt;
&lt;br /&gt;
Save the file and reboot. You should still see the bootloader output, but no serial output after that.&lt;br /&gt;
&lt;br /&gt;
==Installing Tools==&lt;br /&gt;
If you&#039;re happy with your basic Ubuntu setup, it&#039;s time to install some tools required for the OpenMower&lt;br /&gt;
&lt;br /&gt;
=== General Dependencies ===&lt;br /&gt;
Just install them with apt:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install --no-install-recommends build-essential git&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===STR2STR (optional, recommended; only needed if you&#039;re using NTRIP, so probably most of you)===&lt;br /&gt;
We need a newer version than the one available in apt, so install it from source:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install gfortran&lt;br /&gt;
git clone https://github.com/rtklibexplorer/RTKLIB&lt;br /&gt;
cd RTKLIB&lt;br /&gt;
git checkout tags/b34c&lt;br /&gt;
cd app/consapp/&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You should now be able to run str2str from anywhere.&lt;br /&gt;
&lt;br /&gt;
=== OpenOCD (optional, recommended; only needed if you want to flash Pico from Raspberry Pi)===&lt;br /&gt;
We need to get the OpenOCD version from the Raspberry Pi foundation, because the &amp;quot;original&amp;quot; one doesn&#039;t have the Pico support built in yet.&lt;br /&gt;
&lt;br /&gt;
Install it from source:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install automake autoconf build-essential libtool libftdi-dev libusb-1.0-0-dev texinfo pkg-config rpi.gpio-common&lt;br /&gt;
git clone https://github.com/raspberrypi/openocd.git --recursive --branch rp2040 --depth=1&lt;br /&gt;
cd openocd&lt;br /&gt;
./bootstrap&lt;br /&gt;
./configure --enable-ftdi --enable-sysfsgpio --enable-bcm2835gpio&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You can test if it was a success by running:&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
ubuntu@ubuntu:~$ openocd -v&lt;br /&gt;
Open On-Chip Debugger 0.11.0-g610f137-dirty (2022-06-07-00:39)&lt;br /&gt;
Licensed under GNU GPL v2&lt;br /&gt;
For bug reports, read&lt;br /&gt;
	http://openocd.org/doc/doxygen/bugs.html&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installing ROS and OpenMower==&lt;br /&gt;
We&#039;re using ROS Noetic for the OpenMower project. In this step we will install it, get the OpenMower sources, build the sources and create a basic configuration file for your mower.&lt;br /&gt;
&lt;br /&gt;
===Install ROS Noetic===&lt;br /&gt;
Since we&#039;re running Ubuntu 20.04 installing ROS is as easy as running the following commands:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Get the ROS apt repository&lt;br /&gt;
sudo sh -c &#039;echo &amp;quot;deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main&amp;quot; &amp;gt; /etc/apt/sources.list.d/ros-latest.list&#039;&lt;br /&gt;
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -&lt;br /&gt;
&lt;br /&gt;
# Install the ROS base system&lt;br /&gt;
sudo apt update&lt;br /&gt;
sudo apt install --no-install-recommends ros-noetic-ros-base&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;We only need to register the ROS installation in your &amp;lt;code&amp;gt;.bashrc&amp;lt;/code&amp;gt; file. This will enable you to call ROS specific commands from your terminal:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.bash&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Installing OpenMower Software===&lt;br /&gt;
Now we&#039;re finally able to install the OpenMower software. First, we&#039;re checking out the current version of the sources, then we&#039;re getting the dependencies and finally we&#039;re building the sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Clone the GitHub Repository:&lt;br /&gt;
git clone --recursive https://github.com/ClemensElflein/open_mower_ros.git&lt;br /&gt;
&lt;br /&gt;
# Get rosdep, only needed once&lt;br /&gt;
sudo apt install --no-install-recommends python3-rosdep&lt;br /&gt;
sudo rosdep init&lt;br /&gt;
rosdep update&lt;br /&gt;
&lt;br /&gt;
# Get the dependencies using rosdep&lt;br /&gt;
cd open_mower_ros/&lt;br /&gt;
sudo rosdep install --from-paths src --ignore-src --simulate | sed --expression &#039;1d&#039; --expression &#039;s/apt-get install/apt-get install --no-install-recommends --yes/g&#039; | bash&lt;br /&gt;
&lt;br /&gt;
# Finally, build the sources. This will take a while! &lt;br /&gt;
catkin_make -j1 # on 2GB Pi with SWAP - this takes at least 30min&lt;br /&gt;
# OR&lt;br /&gt;
catkin_make -j2 # on 4/8GB Pi - this takes at least 20min&lt;br /&gt;
&lt;br /&gt;
# Copy the default configuration file to your home directory&lt;br /&gt;
cp ~/open_mower_ros/src/open_mower/config/mower_config.sh.example ~/mower_config.sh&lt;br /&gt;
&lt;br /&gt;
# The next step is to also source the OpenMower ROS install&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;At this point the OpenMower software is successfully installed! You will need to configure the OpenMower software and then you&#039;re finally ready to mow.&lt;br /&gt;
&lt;br /&gt;
== Some Additional Issues==&lt;br /&gt;
&lt;br /&gt;
===I&#039;m using an external WiFi dongle for better coverage, but sometimes it doesn&#039;t work===&lt;br /&gt;
It seems that the Ubuntu sometimes puts external WiFi dongles to sleep. To prevent this, we create a service which disables powersave:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Enter this to create the service&lt;br /&gt;
sudo systemctl --full --force edit wifi_powersave@.service&lt;br /&gt;
&lt;br /&gt;
# Paste the following:&lt;br /&gt;
[Unit]&lt;br /&gt;
Description=Set WiFi power save %i&lt;br /&gt;
After=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
Type=oneshot&lt;br /&gt;
RemainAfterExit=yes&lt;br /&gt;
ExecStart=/sbin/iw dev wlan1 set power_save %i&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
# Save and exit, then activate using:&lt;br /&gt;
sudo systemctl disable wifi_powersave@on.service&lt;br /&gt;
sudo systemctl enable wifi_powersave@off.service&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>
	</entry>
	<entry>
		<id>https://wiki.openmower.de/index.php?title=Builder_Road_Map&amp;diff=311</id>
		<title>Builder Road Map</title>
		<link rel="alternate" type="text/html" href="https://wiki.openmower.de/index.php?title=Builder_Road_Map&amp;diff=311"/>
		<updated>2022-10-19T19:20:43Z</updated>

		<summary type="html">&lt;p&gt;Potter-91: Mainboard ibom link fix&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Note: This WIKI was only just started on 2022-04-22, but we are actively working on filling it up and making a good documentation for the new builders out there!&lt;br /&gt;
&lt;br /&gt;
==Warning==&lt;br /&gt;
Please note that this project currently is in a very early stage! So don&#039;t go buying stuff right away! You will need to order and solder your own boards, since there are no assembled boards for sale yet.&lt;br /&gt;
&lt;br /&gt;
Please make sure that you&#039;re actually allowed to build this device in your area. There may be laws / patents prohibiting you of doing so!&lt;br /&gt;
&lt;br /&gt;
Please just be responsible and if you&#039;re not sure what you&#039;re doing, please don&#039;t do anything.&lt;br /&gt;
&lt;br /&gt;
BTW the warranty of your brand new mower will obviously be void as soon as you modify it in any way, so be aware.&lt;br /&gt;
&lt;br /&gt;
== Intro ==&lt;br /&gt;
If you want to embark on building an OpenMower, we have collected an overview of the various parts and where find information and what to to below. Beware that this is not complete, but it gives you some navigation to how to go about making a project for yourself.&lt;br /&gt;
&lt;br /&gt;
Please see the image to the right for an overview that will assist you when reading the road map description below. &lt;br /&gt;
&lt;br /&gt;
You can find more information on the various parts in the page [[Building the Mower|&#039;&#039;&#039;Building the Mower&#039;&#039;&#039;]]&lt;br /&gt;
[[File:Road map.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Disclaimer&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;This material is provided as-is and free of charge. No guarantees of any kind are made that the information contained herein is exact or correct or does not violate any local regulations or cause any security risk. Any use you make of any information given here is at your own discretion and risk.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Road map ==&lt;br /&gt;
&lt;br /&gt;
===The Mower===&lt;br /&gt;
&lt;br /&gt;
====Get a mower in a store ====&lt;br /&gt;
So far only the Yard Force 500 is supported. See [[FAQ]] for more about alternative mowers.&lt;br /&gt;
&lt;br /&gt;
====Disassemble the mower and Remove the old mainboard====&lt;br /&gt;
See @c.ez&#039;s YouTube video https://www.youtube.com/watch?v=_bImqD-pQSA&lt;br /&gt;
&lt;br /&gt;
Now, it is ready for a new main board. &lt;br /&gt;
&lt;br /&gt;
=== PCBs with components ===&lt;br /&gt;
You need to build 4 PCBs; 1 for the main board and 3 for the motor controls (ESCs). You have to get the PCBs, get the parts and solder it yourself at the current stage. Due to international parts shortage, getting parts is quite a detective task, but here, we give you some help.&lt;br /&gt;
&lt;br /&gt;
The recommended process for getting parts is the following:&lt;br /&gt;
&lt;br /&gt;
# There are some parts lists (BOMs) maintained in Octopart - they will be given below. &lt;br /&gt;
# Use the Octopart site to find out where there are parts available and order them. You will very likely have to use several vendors. We propose that you start at digikey and then move on for parts that you can not get there.&lt;br /&gt;
# Order the parts.&lt;br /&gt;
# Use the relevant Gerber files for the board that you are making to order PCBs at e.g. JLCPCB. If you plan to use a hot plate or an oven for the soldering process, consider simultaneously ordering a stencil for placing solder paste on your PCBs.&lt;br /&gt;
&lt;br /&gt;
====Main board parts====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!What&lt;br /&gt;
!Where&lt;br /&gt;
!Notes&lt;br /&gt;
|-&lt;br /&gt;
| Gerber files&lt;br /&gt;
|https://github.com/ClemensElflein/OpenMower/tree/main/dist/Mainboard&lt;br /&gt;
|Get the latest zip file here.&lt;br /&gt;
|-&lt;br /&gt;
|BOM .csv file&lt;br /&gt;
|https://github.com/ClemensElflein/OpenMower/blob/main/dist/Mainboard/OpenMowerMainboard_bom_.csv&lt;br /&gt;
|With a little effort can be used to create an Octpoart list or a digikey list, if you spend some time mapping fields. The file has digikey and lcsc part numbers in it already.&lt;br /&gt;
|-&lt;br /&gt;
|BOM on Octopart&lt;br /&gt;
|https://octopart.com/bom-tool/ODFKeG8J&lt;br /&gt;
|Use this to see where parts are available&lt;br /&gt;
|-&lt;br /&gt;
|Interactive BOM&lt;br /&gt;
|https://clemenselflein.github.io/OpenMower/release/OpenMowerMainboard-ibom.html&lt;br /&gt;
|Use this file to see where parts go, very useful when you start to assemble.&lt;br /&gt;
Download the file and use it locally on you workstation. It has option to save state for how far you have gotten.&lt;br /&gt;
|}&lt;br /&gt;
=====Further parts needed=====&lt;br /&gt;
You also need&lt;br /&gt;
&lt;br /&gt;
*A Raspberry Pi 4&lt;br /&gt;
* An RTK Module&lt;br /&gt;
*A Raspberry Pi Pico&lt;br /&gt;
*A 9-axis accelerometer, WT901&lt;br /&gt;
&lt;br /&gt;
====xESC2040====&lt;br /&gt;
This version of the three motor drivers uses the RP2040 chip which should be available. The ESC can be produced single-sided for the OpenMower project (so it is less complicated than the STM32 version that is dual sided). xESC2040 has an option to mount some component on the underside to enable CAN interfacing, but, as said, this is not needed for the OpenMower. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!What&lt;br /&gt;
!Where&lt;br /&gt;
!Notes&lt;br /&gt;
|-&lt;br /&gt;
|Gerber files&lt;br /&gt;
|https://github.com/ClemensElflein/xESC/blob/main/PCB/xESC2040/GERBER/&lt;br /&gt;
|Use latest zip file here &lt;br /&gt;
|-&lt;br /&gt;
|BOM .csv file&lt;br /&gt;
|https://github.com/ClemensElflein/xESC/blob/main/PCB/xESC2040/BOM/xESC2_bom.csv &lt;br /&gt;
|With a little effort can be used to create an Octpoart list or a digikey list, if you spend some time mapping fields. The file has digikey and lcsc part numbers in it already. &lt;br /&gt;
|-&lt;br /&gt;
|BOM on Octopart&lt;br /&gt;
|https://octopart.com/bom-tool/p1aqUopq&lt;br /&gt;
|Use this to see where parts are available&lt;br /&gt;
Note: this BOM is &#039;&#039;without&#039;&#039; the CAN components for the underside (they are not needed for the OpenMower project). &lt;br /&gt;
|-&lt;br /&gt;
|BOM on Octopart&lt;br /&gt;
|https://octopart.com/bom-tool/tZ27Fd1N&lt;br /&gt;
|Use this to see where parts are available&lt;br /&gt;
Note: this BOM is &#039;&#039;with&#039;&#039; the CAN components for the underside (they are not needed for the OpenMower project). &lt;br /&gt;
|-&lt;br /&gt;
|Interactive BOM&lt;br /&gt;
|https://github.com/ClemensElflein/xESC/blob/main/PCB/xESC2040/BOM/ibom.html&lt;br /&gt;
|Use this file to see where parts go, very useful when you start to assemble.&lt;br /&gt;
Download the file and use it locally on you workstation. It has option to save state for how far you have gotten.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====x-ESC (original STM32 version)====&lt;br /&gt;
&lt;br /&gt;
This version of the three motor drivers uses the STM32 chip which is in very short supply, therefore the xESC2040 was designed and you should probably go for the xESC2040, unless you actually have access to STM32s. Also the STM32 version uses a double-sided PCB, so it is harder to solder than xESC2040.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!What&lt;br /&gt;
!Where&lt;br /&gt;
!Notes&lt;br /&gt;
|-&lt;br /&gt;
|Gerber files&lt;br /&gt;
|https://github.com/ClemensElflein/xESC/tree/main/PCB/xESC2_mini_VESC/GERBER&lt;br /&gt;
|Zip the files in this directory &lt;br /&gt;
|-&lt;br /&gt;
|BOM .csv file&lt;br /&gt;
|https://github.com/ClemensElflein/xESC/blob/main/PCB/xESC2_mini_VESC/BOM/xESC2_bom.csv &lt;br /&gt;
|With a little effort can be used to create an Octpoart list or a digikey list, if you spend some time mapping fields. The file has digikey and lcsc part numbers in it already. &lt;br /&gt;
|-&lt;br /&gt;
|BOM on Octopart&lt;br /&gt;
|https://octopart.com/bom-tool/hUY6qiSp&lt;br /&gt;
|Use this to see where parts are available&lt;br /&gt;
|-&lt;br /&gt;
|Interactive BOM&lt;br /&gt;
|https://github.com/ClemensElflein/xESC/blob/main/PCB/xESC2_mini_VESC/BOM/ibom.html&lt;br /&gt;
|Use this file to see where parts go, very useful when you start to assemble.&lt;br /&gt;
Download the file and use it locally on you workstation. It has option to save state for how far you have gotten.&lt;br /&gt;
|}&lt;br /&gt;
==== Ground plane====&lt;br /&gt;
&lt;br /&gt;
This is not really a PCB with parts. It is just a PCB that provides a conducting plane on which the GPR antenna can sit for better reception - and with a size that fits within the Yard Force 500. You may order this from e.g. JLCPCB using the Gerber files below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!What&lt;br /&gt;
!Where&lt;br /&gt;
! Notes &lt;br /&gt;
|-&lt;br /&gt;
|Gerber files &lt;br /&gt;
|https://github.com/ClemensElflein/OpenMower/tree/main/Hardware/GPSGroundPlane&lt;br /&gt;
|Zip the files in this directory&lt;br /&gt;
|}&lt;br /&gt;
===Base station with the base RTK GPS module===&lt;br /&gt;
[TODO] @c.ez : Need info.&lt;br /&gt;
&lt;br /&gt;
===Charging Station===&lt;br /&gt;
&lt;br /&gt;
=====Get a CC/CV module=====&lt;br /&gt;
This is currently needed to fix the charging station provided by Yard Force due to incompatibilities with the replaced main-board. It should be possible to fix this issue, but right now, it is necessary. See [[Building the Mower]]  for where to get it.&lt;br /&gt;
&lt;br /&gt;
====Upgrade the Charging Station====&lt;br /&gt;
[TODO] @c.ez : Need info.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__FORCETOC__&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>
	</entry>
	<entry>
		<id>https://wiki.openmower.de/index.php?title=FAQ&amp;diff=310</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.openmower.de/index.php?title=FAQ&amp;diff=310"/>
		<updated>2022-09-09T09:51:40Z</updated>

		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== GENERAL ==&lt;br /&gt;
&lt;br /&gt;
==== What is OpenMower? ====&lt;br /&gt;
OpenMower is a project that modifies an existing commercial Lawn mower robot (currently the Yard Force 500) with better steering electronics to provide, among other things, GPS navigation and optimized mowing paths. See the intro video here: https://www.youtube.com/watch?v=BSF04i3zNGw&lt;br /&gt;
&lt;br /&gt;
==== Can I buy an assembled OpenMower or a kit? ====&lt;br /&gt;
No, at present it is a DIY yourself project that will require effort and technical skill on your part. But there is a very active community, so help is available.&lt;br /&gt;
&lt;br /&gt;
==== How much does it cost? ====&lt;br /&gt;
Approx €350 for the mower + €400 for RTK GPS + €100 (yeah, semiconductor shortage..) for a Raspberry Pi + €200 for custom hardware.&lt;br /&gt;
&lt;br /&gt;
==== Who created OpenMower? ====&lt;br /&gt;
Clemens Elflein, known as @c.ez in the [https://discord.gg/jE7QNaSxW7 project&#039;s Discord] is the designer and creator of OpenMower. If you like what he is doing, please support him on [https://www.patreon.com/ClemensElflein/posts Patreon] &lt;br /&gt;
&lt;br /&gt;
==== What is the current stage of the project ====&lt;br /&gt;
The OpenMower is running in prototype at @c.ez. The mainboard and ESC work fine, just the STM32 for the ESCs are currently expensive.&lt;br /&gt;
Therefore we&#039;re working on a cheaper motor controller alternative. A group of early builders are buying parts and getting ready to “co-build” with @c.ez to test and validate the design.&lt;br /&gt;
&lt;br /&gt;
==== Where can I find more information? ====&lt;br /&gt;
The entry points for more information are:&lt;br /&gt;
&lt;br /&gt;
* [https://discord.gg/jE7QNaSxW7 The Discord for the project]&lt;br /&gt;
* [https://discord.com/channels/958476543846412329/958476543846412332 Annoncements]&lt;br /&gt;
* This FAQ&lt;br /&gt;
* [https://discord.com/channels/958476543846412329/964895268132757514 Important links to GitHub, the YouTube channel etc.]&lt;br /&gt;
&lt;br /&gt;
==== What license is OpenMower based on? ====&lt;br /&gt;
The license is “Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License”, pls. see here: https://creativecommons.org/licenses/by-nc-sa/4.0/&lt;br /&gt;
&lt;br /&gt;
== BUILDING AN OPENMOWER YOURSELF ==&lt;br /&gt;
&lt;br /&gt;
====What skills do I need to build one?====&lt;br /&gt;
&lt;br /&gt;
* Taking hardware apart and putting it together again&lt;br /&gt;
* Buying parts&lt;br /&gt;
* Soldering, in particular SMD techniques for making the main PCB&lt;br /&gt;
* Electronics, getting Linux and ROS on a Raspberry Pi, probably installing some packages etc.&lt;br /&gt;
* Debugging, patience, tech creativity, joy in participating&lt;br /&gt;
&lt;br /&gt;
====What should I do if I want to build an OpenMower?====&lt;br /&gt;
Remember, we are very early stage, so don’t expect finished build instructions, rather be prepared to figure out quite a bit of stuff yourself (with the help of the community).&lt;br /&gt;
That said, head to the #open-mower-builds in the Discord and be part of an exciting activity.&lt;br /&gt;
&lt;br /&gt;
====What can I do right now if I want to build?====&lt;br /&gt;
Start getting parts! Look at the preliminary BOM in https://wiki.openmower.de/index.php?title=Building_the_Mower and start getting the big chunks, like the YardForce 500, Raspberry Pis, GPS RTK modules etc.&lt;br /&gt;
&lt;br /&gt;
Start following the [https://discord.com/channels/958476543846412329/964897217972404304 #open-mower-builds Discord channel here]&lt;br /&gt;
&lt;br /&gt;
====Should I order a PCB for the main board right now?====&lt;br /&gt;
Not yet. @c.ez is currently awaiting a shipment of rev 0.9.1.beta of the main board. Once he has validated that, we should be able to start ordering.&lt;br /&gt;
&lt;br /&gt;
====Is there a step-by-step instruction?====&lt;br /&gt;
Not yet. @c.ez  is working on it. &lt;br /&gt;
&lt;br /&gt;
====Is there a recommended place to buy parts?====&lt;br /&gt;
Unfortunately, no. Best EU suggestions are Farnell, Mouser, Digikey.&lt;br /&gt;
&lt;br /&gt;
If anyone has better suggestions, pls. share in #open-mower-builds on the Discord and it will be included here.&lt;br /&gt;
&lt;br /&gt;
====Where do I buy Raspberry Pis?====&lt;br /&gt;
RPIs have a serious world-wide shortage at the moment. You may check https://rpilocator.com/ if they point to anywhere that has supply.&lt;br /&gt;
&lt;br /&gt;
If you find EU vendors with supply, pls. share in [https://discord.com/channels/958476543846412329/964897217972404304 #open-mower-builds] in the Discord.&lt;br /&gt;
== OPENMOWER TECH - GENERAL ==&lt;br /&gt;
&lt;br /&gt;
====Can I use a different mower than the YardForce 500?====&lt;br /&gt;
The project is designed for the YF500, so the immediate answer is no.&lt;br /&gt;
The project is solely focused on making the YF500 work at the moment.&lt;br /&gt;
However, YF500 seems to be one branding of a Chinese robot that appears under other names, too. So likely, we’ll discover that other brands (and also other models of Yard Force) can work. Also some builders in the Discord are looking into robots from other manufacturers to see if the core OpenMower tech could be applied to those. Check #mower-dissection if you want to follow or participate. But applying to other brands will likely not happen before the YF500 based OpenMower seems to run well. &lt;br /&gt;
&lt;br /&gt;
It is very likely that you can hack a solution for another mower than the YF500 &#039;&#039;&#039;if you have the appropriate hardware skills and understand the YF500 implementation in great detail&#039;&#039;&#039;. But if you want to have the support of the main project, be aware that it is focused on the YF500 for now. &lt;br /&gt;
&lt;br /&gt;
====Where can I buy the Yard Force 500?====&lt;br /&gt;
&lt;br /&gt;
* Amazon.de.&lt;br /&gt;
*Beware of myrobotcenter - they seem to have gone bankrupt.&lt;br /&gt;
&lt;br /&gt;
If you find other good vendors, pls. share in [https://discord.com/channels/958476543846412329/964897217972404304 #open-mower-builds] on the Discord and it will be included here.&lt;br /&gt;
====Is Yard Force 500 available in the US?====&lt;br /&gt;
It seems not directly. You may try to import it from Amazon in the EU.  Those that have it confirm that it operates on  100-240 V~, 50/60 Hz, 56 W.&lt;br /&gt;
&lt;br /&gt;
If you find a consistent way to obtain a YF500 or a compatible mower in the US, pls. share in #open-mower-builds on the Discord and it will be included here.&lt;br /&gt;
&lt;br /&gt;
====What is special about the OpenMower?====&lt;br /&gt;
&lt;br /&gt;
* OpenMower utilizes two GPS RTK units (one on the Mower, the other in a fixed place) to allow OpenMower to have centimeter-precise location data.&lt;br /&gt;
* That means that you can train OpenMower on your lawn edge and it can run without a boundary wire. And you can train it on several lawn segments that it can then roam between.&lt;br /&gt;
* The exact location info allows OpenMower to cut along an efficient planned path rather than move chaotically around like almost every commercial mower out there.&lt;br /&gt;
* You build it yourself and all the soft- and hardware is open source, so if you have the skills, you can mod it further.&lt;br /&gt;
&lt;br /&gt;
==== What technological platforms is OpenMower based on? ====&lt;br /&gt;
&lt;br /&gt;
* The Mower&lt;br /&gt;
** [https://www.raspberrypi.org/ Raspberry Pi SBC] version 4 running Linux and [https://www.ros.org/ ROS 1] for the robotics; mapping and navigation etc.&lt;br /&gt;
** [https://www.ardusimple.com/product/simplertk2b-basic-starter-kit-ip65/ GPS RTK module] communicating with a fixed GPS RTK module to provide cm accuracy&lt;br /&gt;
** [https://www.raspberrypi.com/products/raspberry-pi-pico/ Raspberry Pi Pico] (microcontroller) to operate sensors such as the IMU, battery voltage &amp;amp; charge current, &amp;quot;stop&amp;quot; button, lift sensor in front wheels etc...&lt;br /&gt;
* The GPS base station&lt;br /&gt;
** GPS RTK module for providing a point of reference to provide cm accuracy in conjunction with the module on the mower&lt;br /&gt;
&lt;br /&gt;
== WHAT ABOUT MOWERS THAT ARE NOT YARD FORCE 500? ==&lt;br /&gt;
&lt;br /&gt;
====ArduMower https://www.ardumower.de/&amp;lt;nowiki/&amp;gt;====&lt;br /&gt;
ArduMower is a slightly more mature but also more closed project, also using RTK GPS and no wire. You can get both an assembled mower and a full kit.&lt;br /&gt;
&lt;br /&gt;
As @c.ez# writes, it depends on your preference: &amp;quot;So basically: If you&#039;re looking to build an robotic mower as fast as possible, I&#039;d recommend you to go with the Ardumower. If you&#039;re in for the tech, I recommend you to follow this project instead (!!obviously biased opinion here!!)&amp;quot;. See his full post here: https://discord.com/channels/958476543846412329/961804411112394842/963271459357204560&lt;br /&gt;
&lt;br /&gt;
====Navimow https://navimow.segway.com/&amp;lt;nowiki/&amp;gt;====&lt;br /&gt;
Navimow is a new system that seems to be still not quite launched on the market (as per 2022-04-19). It looks to be quite full-featured and should offer a commercial out-of-the box solution with app and many features. Price point seems to be €1.300.&lt;br /&gt;
&lt;br /&gt;
==== ReP_AL mowers https://repalmakershop.com/ ====&lt;br /&gt;
ReP_AL has a mower that that you build yourself, based on a 3D print design that you can print yourself or buy from them. You buy the kit of all parts. They say &amp;quot;Fully autonomous robot lawn mower with TFT Touchscreen and Smartphone APP.  The mower project includes the mower itself a boundary wire control station, smartphone APP, TFT Touchscreen interface and an optional charging station.&amp;quot; The mover control is Arduino based and the software is open source. There is some indications that they are moving towards GPS RTK.&lt;br /&gt;
&lt;br /&gt;
====What do we know about the feasibility of doing OpenMower on other mowers?====&lt;br /&gt;
In the [https://discord.com/channels/958476543846412329/960885921174130758 #mower-dissection channel on the Discord], members are taking apart other brands/models from Yard Force 500 to assess the viability of applying the OpenMower platform to them. There is also a Google Sheet with collected notes and observations here: https://docs.google.com/spreadsheets/d/1BX0-KEs5v-VED8-RA4BLE-wRdXHtlmcKy4n9K5vJVAA/edit?usp=sharing&lt;br /&gt;
&lt;br /&gt;
Ask @tinker0436 for edit permission if you want to contribute.&lt;br /&gt;
====A note on other mowers and future direction====&lt;br /&gt;
&lt;br /&gt;
It is likely that in a later version, the OpenMower platform could be split in &amp;quot;core&amp;quot; and &amp;quot;specific mower&amp;quot; parts so that many mowers could be supported and it would be easy to hack OpenMower onto your mower. But at the current stage, the project is focused on realizing a working beta on the Yard Force 500, There are already individual builders that are experimentally trying to adapt OpenMower to their owen mower platforms.&lt;br /&gt;
&lt;br /&gt;
== About the Yard Force 500 ==&lt;br /&gt;
&lt;br /&gt;
==== Can the YF500 be made to mow more than 500 square meters? ====&lt;br /&gt;
First: The area that the producers report are highly approximate. The reason being that traditional robotic mowers cut at random, so in a given time, they eventually cover the entire lawn more or less intensively. Hence, it is all approximate. Many owners of the traditional robots cover more area than the robots are made out for, simply by having them run a lot over a week, thus with the many hours of mowing per week, covering an area larger than specified for a given mower.&lt;br /&gt;
&lt;br /&gt;
That said, it is quite likely that OpenMower on YF500 has more direct capacity than 500 square meters - since it mows systematically and covers every bit of lawn only once. We still have no reports on how many square meters the YF500 can cover on one charge, but as we start having actual OpenMowers out there, we can report on that. &lt;br /&gt;
&lt;br /&gt;
We might later set up the software to have the mower return and pick up again where it left off upon an empty battery - but that is not implemented yet. It should be doable in software, though, and thus be able to increase the area that it is possible to cover.&lt;br /&gt;
&lt;br /&gt;
Lastly, there seems to be extra physical space for more battery in the YF500 &#039;&#039;under&#039;&#039; the battery pack, but it has not been investigated yet. Be aware, that it takes knowledge to work with the batteries. You should know what you are doing, since the batteries contain a lot of power and may explode or combust if handled incorrectly.&lt;br /&gt;
&lt;br /&gt;
== OPENMOWER TECH - SPECIFICS ==&lt;br /&gt;
&lt;br /&gt;
=== RTK GPS ===&lt;br /&gt;
&lt;br /&gt;
==== Which RTK GPS modules are used in the basic OpenMower design? ====&lt;br /&gt;
These ones: https://www.ardusimple.com/product/simplertk2b-basic-starter-kit-ip65/&lt;br /&gt;
&lt;br /&gt;
==== How many RTK GPS modules are needed for OpenMower? ====&lt;br /&gt;
In the actual phase 1 design, 2 are needed, one at base and one on the mower. The one on the mower is mandatory to measure exact position. The one at base provides reference. Without the reference, the exact location of the mower can not be determined. See a good explanation of this here: https://www.ardusimple.com/rtk-explained/&lt;br /&gt;
&lt;br /&gt;
The reference may - possibly - be provided instead by publicly available servers that can provide local correction data. One of these solutions is NTRIP. Using such a source, it should be possible to not have the RTK GPS module on the base, but instead subscribe to the correction signal from the internet. Two notes regarding that: 1) The current design does not have this out of the box, so you would have to modify the ROS code yourself for this setup. And 2) if the Internet-based correction signal becomes unavailable, your mower will lose cm-precise location and cannot navigate. With the basic design with two RTK modules, that is not a problem.&lt;br /&gt;
&lt;br /&gt;
==== How do the two RTK GPS modules communicate with each other - what are the options? ====&lt;br /&gt;
The original OpenMower implementation has a separate process running which receives the RTK corrections from an NTRIP server via WiFi and redirects them to the GPS board. The IP is set to the base station in the local network, you can update it to an external service provider though.&lt;br /&gt;
&lt;br /&gt;
This has the drawback, that you constantly need to be connected to the WiFi.&lt;br /&gt;
&lt;br /&gt;
Alternatively, the ArduSimple board has a slot where you can plug an external radio as direct bridge between the robot and the base station for extended range. ArduSimple offers multiple modules for this and they will all work plug and play with the OpenMower, since the OpenMower expects corrected data and does not care how the GPS receives the corrections. If you are using this though, you might need to edit your GPS configuration (see ArduSimple manual) and disable the NTRIP receiver process in ROS.&lt;br /&gt;
&lt;br /&gt;
== Maintenance of this FAQ ==&lt;br /&gt;
This FAQ is maintained by @tinker0436 &lt;br /&gt;
&lt;br /&gt;
It is a work in progress. If you have additional questions or comments or find stuff missing, use the Discord #open-mower channel and tag a @Mod so that we get a ping. Comments and suggestions are very welcome!&lt;br /&gt;
&lt;br /&gt;
====Disclaimer====&lt;br /&gt;
This FAQ is provided as-is and free of charge. No guarantees of any kind are made that the information contained herein is exact or correct or does not violate any local regulations or cause any security risk. Any use you make of any information given here is at your own discretion and risk.&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>
	</entry>
	<entry>
		<id>https://wiki.openmower.de/index.php?title=Main_Page&amp;diff=309</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.openmower.de/index.php?title=Main_Page&amp;diff=309"/>
		<updated>2022-09-09T09:43:23Z</updated>

		<summary type="html">&lt;p&gt;Potter-91: /* How to Get Started */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The OpenMower Wiki ==&lt;br /&gt;
&lt;br /&gt;
Welcome to the OpenMower Wiki!&lt;br /&gt;
&lt;br /&gt;
This WIKI was only just started on 2022-04-22, but we&#039;ll collaborate on getting good information on the OpenMower project collected here.&lt;br /&gt;
&lt;br /&gt;
If you want to contribute to the Wiki: [https://discord.gg/jE7QNaSxW7 join the Discord], ask at the [https://discord.com/channels/958476543846412329/967345181013725194 #wiki-authors channel] for a wiki account and a wiki admin will create one.&lt;br /&gt;
&lt;br /&gt;
Also head over to the [https://discord.com/channels/958476543846412329/967345181013725194 #wiki-authors channel] if you want talk about wiki related stuff.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to Get Started ==&lt;br /&gt;
&lt;br /&gt;
One of the first steps currently is to browse around the discord and understand what the project is about. You can also have a look at Clemens&#039; second video ([https://www.youtube.com/watch?v=_bImqD-pQSA here]) of the project that details how to assemble the bot. &lt;br /&gt;
&lt;br /&gt;
First: Check the &#039;&#039;&#039;[[FAQ]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When you&#039;re ready, you can have a look at the &#039;&#039;&#039;[[Building the Mower]]&#039;&#039;&#039; section to see the Bill of Materials and steps required and check out &#039;&#039;&#039;[[Builder Road Map]]&#039;&#039;&#039; for a practical take on what to do.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;(Note this wiki is in progress and not complete yet, but we&#039;re working on it!)&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Resources==&lt;br /&gt;
&lt;br /&gt;
===[[FAQ]]===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;There is a continually evolving [[FAQ]] that is a good starting point for understanding the project and getting answers to some key questions.&amp;lt;/big&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===[[Project overview|Project overview and timeline]]===&lt;br /&gt;
&lt;br /&gt;
Current status and future goals - [[Project overview|See it here]]&lt;br /&gt;
&lt;br /&gt;
===[[Hardware|Hardware Revisions]]===&lt;br /&gt;
&lt;br /&gt;
Open Mower hardware revisions, changelog, info: [[Hardware|Here]]&lt;br /&gt;
&lt;br /&gt;
===[[System Image|Software Installation]]===&lt;br /&gt;
&lt;br /&gt;
On this page, you can find steps how to install a basic OpenMower system image.&lt;br /&gt;
&lt;br /&gt;
===[[Running OpenMower]]===&lt;br /&gt;
&lt;br /&gt;
On this page, you can find steps how to run the OpenMower software.&lt;br /&gt;
We&#039;re doing:&lt;br /&gt;
- Starting the Software&lt;br /&gt;
- Magnetometer Calibration&lt;br /&gt;
- Recording a Map&lt;br /&gt;
- Starting the Mowing Process&lt;br /&gt;
&lt;br /&gt;
===[[Mini HOWTOs]]===&lt;br /&gt;
&lt;br /&gt;
On this page, you can find small HOWTOs for various things. Set [[Mini HOWTOs|here]]&lt;br /&gt;
&lt;br /&gt;
===Where to find more information===&lt;br /&gt;
&lt;br /&gt;
The entry points for more information are:&lt;br /&gt;
&lt;br /&gt;
*[https://discord.com/channels/958476543846412329/958476543846412331 The Discord for the project]&lt;br /&gt;
*[https://discord.com/channels/958476543846412329/958476543846412332 Annoncements in the Discord]&lt;br /&gt;
*[https://youtube.com/c/ClemensElflein/videos YouTube]&lt;br /&gt;
*[https://github.com/ClemensElflein/OpenMower Open Mower Main GitHub Repo - Overall and hardware]&lt;br /&gt;
*[https://github.com/ClemensElflein/open_mower_ros Open Mower GitHub Repo for the ROS logic in the OpenMower]&lt;br /&gt;
*[https://github.com/ClemensElflein/xESC xESC Motor Controller Repo (custom part for main board)]&lt;br /&gt;
&lt;br /&gt;
==How to contribute==&lt;br /&gt;
&lt;br /&gt;
At the moment, there are different ways to contribute:&lt;br /&gt;
&lt;br /&gt;
*Building your own mower, testing the software and reporting bugs / committing fixes on the github repository&lt;br /&gt;
&lt;br /&gt;
*If you&#039;re not scared to see the inside of some mowers, please help us understand more about how they are built following instructions in the &#039;&#039;&#039;[[Mower Dissection]]&#039;&#039;&#039; page.&lt;br /&gt;
&lt;br /&gt;
*And finally, [https://www.patreon.com/ClemensElflein Patreon to support Clemens&#039; amazing work]&lt;br /&gt;
&lt;br /&gt;
==Disclaimer==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;This Wiki is provided as-is and free of charge. No guarantees of any kind are made that the information contained herein is exact or correct or does not violate any local regulations or cause any security risk. Any use you make of any information given here is at your own discretion and risk.&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>
	</entry>
	<entry>
		<id>https://wiki.openmower.de/index.php?title=Main_Page&amp;diff=308</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.openmower.de/index.php?title=Main_Page&amp;diff=308"/>
		<updated>2022-09-09T09:42:32Z</updated>

		<summary type="html">&lt;p&gt;Potter-91: /* OpenMower Wiki */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The OpenMower Wiki ==&lt;br /&gt;
&lt;br /&gt;
Welcome to the OpenMower Wiki!&lt;br /&gt;
&lt;br /&gt;
This WIKI was only just started on 2022-04-22, but we&#039;ll collaborate on getting good information on the OpenMower project collected here.&lt;br /&gt;
&lt;br /&gt;
If you want to contribute to the Wiki: [https://discord.gg/jE7QNaSxW7 join the Discord], ask at the [https://discord.com/channels/958476543846412329/967345181013725194 #wiki-authors channel] for a wiki account and a wiki admin will create one.&lt;br /&gt;
&lt;br /&gt;
Also head over to the [https://discord.com/channels/958476543846412329/967345181013725194 #wiki-authors channel] if you want talk about wiki related stuff.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to Get Started ==&lt;br /&gt;
&lt;br /&gt;
One of the first steps currently is to browse around the discord and understand what the project is about. You can also have a look at Clemens&#039; second video ([https://www.youtube.com/watch?v=_bImqD-pQSA here]) of the project that details how to assemble the bot. &lt;br /&gt;
&lt;br /&gt;
First: Check the &#039;&#039;&#039;[[FAQ]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When you&#039;re ready, you can have a look at the &#039;&#039;&#039;[[Building the Mower]]&#039;&#039;&#039; section to see the Bill of Materials and steps required and check out &#039;&#039;&#039;[[Builder Road Map]]&#039;&#039;&#039; for a practical take on what to do.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;(Note this wiki is in progress and not complete yet, but we&#039;re working on it!)&amp;lt;/big&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Resources==&lt;br /&gt;
&lt;br /&gt;
===[[FAQ]]===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;There is a continually evolving [[FAQ]] that is a good starting point for understanding the project and getting answers to some key questions.&amp;lt;/big&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===[[Project overview|Project overview and timeline]]===&lt;br /&gt;
&lt;br /&gt;
Current status and future goals - [[Project overview|See it here]]&lt;br /&gt;
&lt;br /&gt;
===[[Hardware|Hardware Revisions]]===&lt;br /&gt;
&lt;br /&gt;
Open Mower hardware revisions, changelog, info: [[Hardware|Here]]&lt;br /&gt;
&lt;br /&gt;
===[[System Image|Software Installation]]===&lt;br /&gt;
&lt;br /&gt;
On this page, you can find steps how to install a basic OpenMower system image.&lt;br /&gt;
&lt;br /&gt;
===[[Running OpenMower]]===&lt;br /&gt;
&lt;br /&gt;
On this page, you can find steps how to run the OpenMower software.&lt;br /&gt;
We&#039;re doing:&lt;br /&gt;
- Starting the Software&lt;br /&gt;
- Magnetometer Calibration&lt;br /&gt;
- Recording a Map&lt;br /&gt;
- Starting the Mowing Process&lt;br /&gt;
&lt;br /&gt;
===[[Mini HOWTOs]]===&lt;br /&gt;
&lt;br /&gt;
On this page, you can find small HOWTOs for various things. Set [[Mini HOWTOs|here]]&lt;br /&gt;
&lt;br /&gt;
===Where to find more information===&lt;br /&gt;
&lt;br /&gt;
The entry points for more information are:&lt;br /&gt;
&lt;br /&gt;
*[https://discord.com/channels/958476543846412329/958476543846412331 The Discord for the project]&lt;br /&gt;
*[https://discord.com/channels/958476543846412329/958476543846412332 Annoncements in the Discord]&lt;br /&gt;
*[https://youtube.com/c/ClemensElflein/videos YouTube]&lt;br /&gt;
*[https://github.com/ClemensElflein/OpenMower Open Mower Main GitHub Repo - Overall and hardware]&lt;br /&gt;
*[https://github.com/ClemensElflein/open_mower_ros Open Mower GitHub Repo for the ROS logic in the OpenMower]&lt;br /&gt;
*[https://github.com/ClemensElflein/xESC xESC Motor Controller Repo (custom part for main board)]&lt;br /&gt;
&lt;br /&gt;
==How to contribute==&lt;br /&gt;
&lt;br /&gt;
At the moment, there are different ways to contribute:&lt;br /&gt;
&lt;br /&gt;
*Building your own mower, testing the software and reporting bugs / committing fixes on the github repository&lt;br /&gt;
&lt;br /&gt;
*If you&#039;re not scared to see the inside of some mowers, please help us understand more about how they are built following instructions in the &#039;&#039;&#039;[[Mower Dissection]]&#039;&#039;&#039; page.&lt;br /&gt;
&lt;br /&gt;
*And finally, [https://www.patreon.com/ClemensElflein Patreon to support Clemens&#039; amazing work]&lt;br /&gt;
&lt;br /&gt;
==Disclaimer==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;This Wiki is provided as-is and free of charge. No guarantees of any kind are made that the information contained herein is exact or correct or does not violate any local regulations or cause any security risk. Any use you make of any information given here is at your own discretion and risk.&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>
	</entry>
	<entry>
		<id>https://wiki.openmower.de/index.php?title=Main_Page&amp;diff=307</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.openmower.de/index.php?title=Main_Page&amp;diff=307"/>
		<updated>2022-09-09T09:33:41Z</updated>

		<summary type="html">&lt;p&gt;Potter-91: /* How to Get Started */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== OpenMower Wiki ==&lt;br /&gt;
&lt;br /&gt;
Welcome to the OpenMower Wiki!&lt;br /&gt;
&lt;br /&gt;
This WIKI was only just started on 2022-04-22, but we&#039;ll collaborate on getting good information on the OpenMower project collected here.&lt;br /&gt;
&lt;br /&gt;
If you want to contribute to the Wiki, join the Discord, ask at the [https://discord.com/channels/958476543846412329/967345181013725194 #wiki-authors channel] for a wiki account and a wiki admin will create one.&lt;br /&gt;
&lt;br /&gt;
Head over to the [https://discord.com/channels/958476543846412329/967345181013725194 #wiki-authors channel] if you want talk about wiki related stuff.&lt;br /&gt;
&lt;br /&gt;
== How to Get Started ==&lt;br /&gt;
&lt;br /&gt;
One of the first steps currently is to browse around the discord and understand what the project is about. You can also have a look at Clemens&#039; second video ([https://www.youtube.com/watch?v=_bImqD-pQSA here]) of the project that details how to assemble the bot. &lt;br /&gt;
&lt;br /&gt;
First: Check the &#039;&#039;&#039;[[FAQ]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When you&#039;re ready, you can have a look at the &#039;&#039;&#039;[[Building the Mower]]&#039;&#039;&#039; section to see the Bill of Materials and steps required and check out &#039;&#039;&#039;[[Builder Road Map]]&#039;&#039;&#039; for a practical take on what to do.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;(Note this wiki is in progress and not complete yet, but we&#039;re working on it!)&amp;lt;/big&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
==Resources==&lt;br /&gt;
&lt;br /&gt;
===[[FAQ]]===&lt;br /&gt;
There is a continually evolving [[FAQ]] that is a good starting point for understanding the project and getting answers to some key questions. &lt;br /&gt;
&lt;br /&gt;
[[FAQ|See the FAQ here]]&lt;br /&gt;
&lt;br /&gt;
===[[Project overview|Project overview and timeline]]===&lt;br /&gt;
Current status and future goals - [[Project overview|See it here]]&lt;br /&gt;
&lt;br /&gt;
===[[Hardware|Hardware Revisions]]===&lt;br /&gt;
Open Mower hardware revisions, changelog, info: [[Hardware|Here]]&lt;br /&gt;
&lt;br /&gt;
===[[System Image|Software Installation]]===&lt;br /&gt;
On this page, you can find steps how to install a basic OpenMower system image.&lt;br /&gt;
&lt;br /&gt;
===[[Running OpenMower]]===&lt;br /&gt;
On this page, you can find steps how to run the OpenMower software.&lt;br /&gt;
We&#039;re doing:&lt;br /&gt;
- Starting the Software&lt;br /&gt;
- Magnetometer Calibration&lt;br /&gt;
- Recording a Map&lt;br /&gt;
- Starting the Mowing Process&lt;br /&gt;
&lt;br /&gt;
===[[Mini HOWTOs]]===&lt;br /&gt;
On this page, you can find small HOWTOs for various things. Set [[Mini HOWTOs|here]]&lt;br /&gt;
&lt;br /&gt;
===Where to find more information===&lt;br /&gt;
&lt;br /&gt;
The entry points for more information are:&lt;br /&gt;
&lt;br /&gt;
*[https://discord.com/channels/958476543846412329/958476543846412331 The Discord for the project]&lt;br /&gt;
*[https://discord.com/channels/958476543846412329/958476543846412332 Annoncements in the Discord]&lt;br /&gt;
*[https://www.youtube.com/c/ClemensElflein/videos YouTube]&lt;br /&gt;
*[https://github.com/ClemensElflein/OpenMower Open Mower Main GitHub Repo - Overall and hardware]&lt;br /&gt;
*[https://github.com/ClemensElflein/open_mower_ros Open Mower GitHub Repo for the ROS logic in the OpenMower]&lt;br /&gt;
*[https://github.com/ClemensElflein/xESC xESC Motor Controller Repo (custom part for main board)]&lt;br /&gt;
&lt;br /&gt;
==How to contribute==&lt;br /&gt;
&lt;br /&gt;
At the moment, there are different ways to contribute:&lt;br /&gt;
&lt;br /&gt;
*Building your own mower, testing the software and reporting bugs / committing fixes on the github repository&lt;br /&gt;
&lt;br /&gt;
*If you&#039;re not scared to see the inside of some mowers, please help us understand more about how they are built following instructions in the &#039;&#039;&#039;[[Mower Dissection]]&#039;&#039;&#039; page.&lt;br /&gt;
&lt;br /&gt;
*And finally, [https://www.patreon.com/ClemensElflein Patreon to support Clemens&#039; amazing work]&lt;br /&gt;
&lt;br /&gt;
==Disclaimer==&lt;br /&gt;
This Wiki is provided as-is and free of charge. No guarantees of any kind are made that the information contained herein is exact or correct or does not violate any local regulations or cause any security risk. Any use you make of any information given here is at your own discretion and risk.&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>
	</entry>
	<entry>
		<id>https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=301</id>
		<title>OLD Bare Metal System Image</title>
		<link rel="alternate" type="text/html" href="https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=301"/>
		<updated>2022-08-26T12:30:35Z</updated>

		<summary type="html">&lt;p&gt;Potter-91: add rpi.gpio-common dependency to OpenOCD&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page will guide you through the steps to install a basic system image.&lt;br /&gt;
&lt;br /&gt;
On this image you will have the ROS base system, the OpenMower installation, local configuration for your mower and some tools to help you work with the mower.&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
In order to follow this guide, you will need the following:&lt;br /&gt;
&lt;br /&gt;
#A Raspberry Pi 4 (4GB or more recommended, [[System Image#Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM)|2GB works with swap, see here]])&lt;br /&gt;
#An SD card&lt;br /&gt;
#A soldered OpenMower mainboard&lt;br /&gt;
&lt;br /&gt;
==Installing the Base System==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;&#039;&#039;&#039;There is also a YouTube video explaining the steps in this section:&#039;&#039;&#039; https://youtu.be/_bImqD-pQSA?t=562&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Flashing Ubuntu to SD Card ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first step is to install the base system. We&#039;re using Ubuntu 20.04 Server for the Raspberry Pi. This is, because this image gives us best support ROS Noetic.&lt;br /&gt;
&lt;br /&gt;
Installing the base image is easy:&lt;br /&gt;
&lt;br /&gt;
#[https://www.raspberrypi.com/software/ Get the Raspberry Pi Imager software]&lt;br /&gt;
#Select the correct operating system:  &#039;&#039;Other-general-purpose OS &amp;gt; Ubuntu &amp;gt; Ubuntu Server 20.04.4 LTS (RPI 3/4/400) 64-bit&#039;&#039;&lt;br /&gt;
#Insert your SD card into your PC and select it in the &#039;&#039;Storage&#039;&#039; part of the software&lt;br /&gt;
#Click &#039;&#039;write&#039;&#039; and wait for the process to finish&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have successfully flashed your image, remove the SD for your PC &#039;&#039;&#039;and reinsert it again.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Then replace the &amp;lt;code&amp;gt;/boot/config.txt&amp;lt;/code&amp;gt; file with the one provided here: [https://github.com/ClemensElflein/OpenMower/blob/main/configs/RaspberryPiConfig/config.txt]&lt;br /&gt;
&lt;br /&gt;
This will enable all hardware serial ports on the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can theoretically configure networking in this step as well, but I&#039;m not recommending it. This is, because the networking information file gets only copied once and if you have an error it won&#039;t work.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;We need an interactive terminal in the next step anyways.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have done this step, you can eject the SD card and plug it into your Raspberry Pi 4.&lt;br /&gt;
&lt;br /&gt;
=== Opening a Serial Terminal ===&lt;br /&gt;
[[File:SerialRedirect.png|thumb|Serial Terminal: minicom -D /dev/ttyACM0]]&lt;br /&gt;
This step is needed for the following sections. The goal is to have a serial terminal to do basic config (networking etc) easily.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The easiest way of doing so is:&lt;br /&gt;
# Flash the SerialRedirect firmware into your Pico. Get it here: https://github.com/ClemensElflein/OpenMower/tree/main/Firmware/SerialRedirect/bin&lt;br /&gt;
# Provide your mainboard with power&lt;br /&gt;
# Plug your Pico into a computer. A virtual COM port should appear&lt;br /&gt;
# Connect to the COM port (I&#039;m using minicom, see image on the right), then press enter to start the Raspberry Pi.&lt;br /&gt;
#The Pi boots and a serial terminal will appear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you can login with the default credentials:&lt;br /&gt;
&lt;br /&gt;
username: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
password: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that you will need to change the password immediately.&lt;br /&gt;
&lt;br /&gt;
=== Disable Boot Interrupt ===&lt;br /&gt;
[[File:Image.png|thumb|Commands needed to disable boot interrupt on serial input.]]&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi boot loader will interrupt the boot sequence if data is sent through the main serial port of the Raspberry Pi. Since we&#039;re connecting &amp;quot;nosiy&amp;quot; hardware to the port, this will always interrupt the boot sequence and we need to disable this feature. &lt;br /&gt;
&lt;br /&gt;
In order to do this, reboot the Pi (sudo reboot) and send anything during the count-down in the bootloader (check the YouTube video linked above, if you&#039;re not sure).&lt;br /&gt;
&lt;br /&gt;
Then enter the following commands into the bootloader prompt:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
setenv bootdelay -2&lt;br /&gt;
saveenv&lt;br /&gt;
reset&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The Pi should reboot and the count-down should be gone.&lt;br /&gt;
&lt;br /&gt;
=== Some Settings ===&lt;br /&gt;
&lt;br /&gt;
[TODO/WIP]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are some miscellaneous settings I think are a good idea for an OpenMower install:&lt;br /&gt;
&lt;br /&gt;
* Remove the unnecessary snap system: &amp;lt;code&amp;gt;sudo snap remove --purge lxd &amp;amp;&amp;amp; sudo snap remove --purge core20 &amp;amp;&amp;amp; sudo snap remove --purge snapd &amp;amp;&amp;amp; sudo apt purge --autoremove snapd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Disable unattended upgrades: &amp;lt;code&amp;gt;sudo systemctl stop --force unattended-upgrades &amp;amp;&amp;amp; sudo systemctl disable unattended-upgrades &amp;amp;&amp;amp; sudo systemctl mask unattended-upgrades&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* I like to add the following to &amp;lt;code&amp;gt;cmdline.txt&amp;lt;/code&amp;gt; in order to fsck on boot:  &amp;lt;code&amp;gt;fsck.mode=force fsck.repair=yes&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* I prefer to use a static IP (If you use the [[System_Image#Installing_a_WiFi_Hot-Spot_(optional,_but_recommended)|recommend WiFi Hot-Spot]] use &amp;lt;code&amp;gt;sudo nmtui&amp;lt;/code&amp;gt; to configure a static IP)&lt;br /&gt;
&lt;br /&gt;
* If you like to have a terminal wifi scanner/signal monitor just install &amp;lt;code&amp;gt;sudo apt install wavemon&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you like you can change the timezone: &amp;lt;code&amp;gt;sudo timedatectl set-timezone Region/Location&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;sudo dpkg-reconfigure tzdata&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you ever like to plug a keyboard into the Pi don&#039;t forget to change the keymap: &amp;lt;code&amp;gt;sudo dpkg-reconfigure keyboard-configuration&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM)===&lt;br /&gt;
Compiling the OpenMower software will need more than 2GB of RAM. In order to still do this on a Pi with &amp;lt;= 2GB of RAM, we will add a 2GB swap file to the system by entering the following commands:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Create a new 2GB swap file&lt;br /&gt;
sudo fallocate -l 2G /swapfile&lt;br /&gt;
# Change permissions, so that only root can read and write&lt;br /&gt;
sudo chmod 600 /swapfile&lt;br /&gt;
# Create swap space in the file&lt;br /&gt;
sudo mkswap /swapfile&lt;br /&gt;
# Add it to the fstab&lt;br /&gt;
echo &#039;/swapfile swap swap defaults 0 0&#039; | sudo tee -a /etc/fstab /swapfile swap swap defaults 0 0&lt;br /&gt;
# Reboot to activate&lt;br /&gt;
sudo reboot&lt;br /&gt;
&lt;br /&gt;
# Check if it&#039;s activated&lt;br /&gt;
sudo swapon --show&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Installing a WiFi Hot-Spot (optional, but recommended)===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Since we will be configuring the WiFi interface, make sure that you have connected Etherent to your Raspberry Pi for this step.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As soon as you have closed your mower&#039;s enclosure, you won&#039;t have physical access to your Raspberry Pi anymore. If for some reason it&#039;s unable to connect to your WiFi (e.g. you have changed your password), you would need to open the case to get access to the SD card or Ethernet port on the Pi to regain access.&lt;br /&gt;
&lt;br /&gt;
To prevent this, we&#039;re going to install a hot-spot software which helps you to connect to WiFi by opening a hot-spot each time the Pi cannot connect to a known WiFi connection.&lt;br /&gt;
&lt;br /&gt;
Now is the best time to do this, because we have a serial terminal anyways and can mess with the network interfaces without shutting us out of the system!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Just use the following commands for this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# We need to disable systemd-resolveds caching DNS stub resolver&lt;br /&gt;
# if you want to know why check: https://github.com/pi-hole/docker-pi-hole/#installing-on-ubuntu&lt;br /&gt;
sudo sed -r -i.orig &#039;s/#?DNSStubListener=yes/DNSStubListener=no/g&#039; /etc/systemd/resolved.conf&lt;br /&gt;
sudo systemctl restart systemd-resolved.service&lt;br /&gt;
&lt;br /&gt;
ping ntp.org&lt;br /&gt;
# This will throw an dns error:&lt;br /&gt;
#   ping: ntp.org: Temporary failure in name resolution&lt;br /&gt;
sudo sh -c &#039;rm /etc/resolv.conf &amp;amp;&amp;amp; ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf&#039;&lt;br /&gt;
sudo systemctl restart systemd-resolved.service&lt;br /&gt;
nslookup ntp.org&lt;br /&gt;
# DNS should work now&lt;br /&gt;
&lt;br /&gt;
# Install comitup using the latest version from the projects repo&lt;br /&gt;
wget https://davesteele.github.io/comitup/latest/davesteele-comitup-apt-source_latest.deb&lt;br /&gt;
sudo dpkg -i --force-all davesteele-comitup-apt-source_latest.deb&lt;br /&gt;
rm davesteele-comitup-apt-source_latest.deb&lt;br /&gt;
sudo apt update&lt;br /&gt;
sudo apt install comitup --no-install-recommends&lt;br /&gt;
&lt;br /&gt;
sudo systemctl stop comitup&lt;br /&gt;
# Now use network-manager to:&lt;br /&gt;
# - add you wifi network&lt;br /&gt;
# optional:&lt;br /&gt;
# - change your hostname&lt;br /&gt;
# - add a dhcp ethernet connection without any device assigned&lt;br /&gt;
# (if even the hotspot malfunctions you can plug in a usb ethernet adapter)&lt;br /&gt;
sudo nmtui&lt;br /&gt;
&lt;br /&gt;
# Edit comitup.conf to change the wifi name and password (I use OpenMower-&amp;lt;nn&amp;gt;)&lt;br /&gt;
sudo nano /etc/comitup.conf&lt;br /&gt;
sudo systemctl restart comitup&lt;br /&gt;
# reboot - it should work now&lt;br /&gt;
sudo reboot&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable Serial Console===&lt;br /&gt;
Now that we have setup the network and can access the Pi even if our WiFi is not in range, we need to disable that serial console so that we can use the serial port for hardware.&lt;br /&gt;
&lt;br /&gt;
To do this, enter: &amp;lt;code&amp;gt;sudo nano /boot/firmware/cmdline.txt&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and remove the &amp;lt;code&amp;gt;console=serial0,115200&amp;lt;/code&amp;gt; part of the line.&lt;br /&gt;
&lt;br /&gt;
Save the file and reboot. You should still see the bootloader output, but no serial output after that.&lt;br /&gt;
&lt;br /&gt;
==Installing Tools==&lt;br /&gt;
If you&#039;re happy with your basic Ubuntu setup, it&#039;s time to install some tools required for the OpenMower&lt;br /&gt;
&lt;br /&gt;
=== General Dependencies ===&lt;br /&gt;
Just install them with apt:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install build-essential git&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===STR2STR (optional, recommended; only needed if you&#039;re using NTRIP, so probably most of you)===&lt;br /&gt;
We need a newer version than the one available in apt, so install it from source:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install gfortran&lt;br /&gt;
git clone https://github.com/rtklibexplorer/RTKLIB&lt;br /&gt;
cd RTKLIB&lt;br /&gt;
git checkout tags/b34c&lt;br /&gt;
cd app/consapp/&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You should now be able to run str2str from anywhere.&lt;br /&gt;
&lt;br /&gt;
=== OpenOCD (optional, recommended; only needed if you want to flash Pico from Raspberry Pi)===&lt;br /&gt;
We need to get the OpenOCD version from the Raspberry Pi foundation, because the &amp;quot;original&amp;quot; one doesn&#039;t have the Pico support built in yet.&lt;br /&gt;
&lt;br /&gt;
Install it from source:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install automake autoconf build-essential libtool libftdi-dev libusb-1.0-0-dev texinfo pkg-config rpi.gpio-common&lt;br /&gt;
git clone https://github.com/raspberrypi/openocd.git --recursive --branch rp2040 --depth=1&lt;br /&gt;
cd openocd&lt;br /&gt;
./bootstrap&lt;br /&gt;
./configure --enable-ftdi --enable-sysfsgpio --enable-bcm2835gpio&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You can test if it was a success by running:&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
ubuntu@ubuntu:~$ openocd -v&lt;br /&gt;
Open On-Chip Debugger 0.11.0-g610f137-dirty (2022-06-07-00:39)&lt;br /&gt;
Licensed under GNU GPL v2&lt;br /&gt;
For bug reports, read&lt;br /&gt;
	http://openocd.org/doc/doxygen/bugs.html&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installing ROS and OpenMower==&lt;br /&gt;
We&#039;re using ROS Noetic for the OpenMower project. In this step we will install it, get the OpenMower sources, build the sources and create a basic configuration file for your mower.&lt;br /&gt;
&lt;br /&gt;
===Install ROS Noetic===&lt;br /&gt;
Since we&#039;re running Ubuntu 20.04 installing ROS is as easy as running the following commands:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Get the ROS apt repository&lt;br /&gt;
sudo sh -c &#039;echo &amp;quot;deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main&amp;quot; &amp;gt; /etc/apt/sources.list.d/ros-latest.list&#039;&lt;br /&gt;
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -&lt;br /&gt;
&lt;br /&gt;
# Install the ROS base system&lt;br /&gt;
sudo apt update&lt;br /&gt;
sudo apt install ros-noetic-ros-base&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;We only need to register the ROS installation in your &amp;lt;code&amp;gt;.bashrc&amp;lt;/code&amp;gt; file. This will enable you to call ROS specific commands from your terminal:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.bash&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Installing OpenMower Software===&lt;br /&gt;
Now we&#039;re finally able to install the OpenMower software. First, we&#039;re checking out the current version of the sources, then we&#039;re getting the dependencies and finally we&#039;re building the sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Clone the GitHub Repository:&lt;br /&gt;
git clone --recursive https://github.com/ClemensElflein/open_mower_ros.git&lt;br /&gt;
&lt;br /&gt;
# Get rosdep, only needed once&lt;br /&gt;
sudo apt install python3-rosdep&lt;br /&gt;
sudo rosdep init&lt;br /&gt;
rosdep update&lt;br /&gt;
&lt;br /&gt;
# Get the dependencies using rosdep&lt;br /&gt;
cd open_mower_ros/&lt;br /&gt;
rosdep install --from-paths src --ignore-packages-from-source --default-yes&lt;br /&gt;
&lt;br /&gt;
# set the default boot behavior to cli and disable unnecessary services cause some ros dependencie installs a basic desktop&lt;br /&gt;
sudo systemctl set-default multi-user&lt;br /&gt;
sudo systemctl stop --force bluetooth&lt;br /&gt;
sudo systemctl disable --now bluetooth&lt;br /&gt;
sudo systemctl mask --now bluetooth&lt;br /&gt;
&lt;br /&gt;
# Finally, build the sources. This will take a while! &lt;br /&gt;
catkin_make -j1 # on 2GB Pi with SWAP - this takes at least 30min&lt;br /&gt;
# OR&lt;br /&gt;
catkin_make -j2 # on 4/8GB Pi - this takes at least 20min&lt;br /&gt;
&lt;br /&gt;
# Copy the default configuration file to your home directory&lt;br /&gt;
cp ~/open_mower_ros/src/open_mower/config/mower_config.sh.example ~/mower_config.sh&lt;br /&gt;
&lt;br /&gt;
# The next step is to also source the OpenMower ROS install&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;At this point the OpenMower software is successfully installed! You will need to configure the OpenMower software and then you&#039;re finally ready to mow.&lt;br /&gt;
&lt;br /&gt;
== Some Additional Issues==&lt;br /&gt;
&lt;br /&gt;
===I&#039;m using an external WiFi dongle for better coverage, but sometimes it doesn&#039;t work===&lt;br /&gt;
It seems that the Ubuntu sometimes puts external WiFi dongles to sleep. To prevent this, we create a service which disables powersave:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Enter this to create the service&lt;br /&gt;
sudo systemctl --full --force edit wifi_powersave@.service&lt;br /&gt;
&lt;br /&gt;
# Paste the following:&lt;br /&gt;
[Unit]&lt;br /&gt;
Description=Set WiFi power save %i&lt;br /&gt;
After=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
Type=oneshot&lt;br /&gt;
RemainAfterExit=yes&lt;br /&gt;
ExecStart=/sbin/iw dev wlan1 set power_save %i&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
# Save and exit, then activate using:&lt;br /&gt;
sudo systemctl disable wifi_powersave@on.service&lt;br /&gt;
sudo systemctl enable wifi_powersave@off.service&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>
	</entry>
	<entry>
		<id>https://wiki.openmower.de/index.php?title=Builder_Road_Map&amp;diff=295</id>
		<title>Builder Road Map</title>
		<link rel="alternate" type="text/html" href="https://wiki.openmower.de/index.php?title=Builder_Road_Map&amp;diff=295"/>
		<updated>2022-08-16T22:38:11Z</updated>

		<summary type="html">&lt;p&gt;Potter-91: /* Further parts needed */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Note: This WIKI was only just started on 2022-04-22, but we are actively working on filling it up and making a good documentation for the new builders out there!&lt;br /&gt;
&lt;br /&gt;
==Warning==&lt;br /&gt;
Please note that this project currently is in a very early stage! So don&#039;t go buying stuff right away! You will need to order and solder your own boards, since there are no assembled boards for sale yet.&lt;br /&gt;
&lt;br /&gt;
Please make sure that you&#039;re actually allowed to build this device in your area. There may be laws / patents prohibiting you of doing so!&lt;br /&gt;
&lt;br /&gt;
Please just be responsible and if you&#039;re not sure what you&#039;re doing, please don&#039;t do anything.&lt;br /&gt;
&lt;br /&gt;
BTW the warranty of your brand new mower will obviously be void as soon as you modify it in any way, so be aware.&lt;br /&gt;
&lt;br /&gt;
== Intro ==&lt;br /&gt;
If you want to embark on building an OpenMower, we have collected an overview of the various parts and where find information and what to to below. Beware that this is not complete, but it gives you some navigation to how to go about making a project for yourself.&lt;br /&gt;
&lt;br /&gt;
Please see the image to the right for an overview that will assist you when reading the road map description below. &lt;br /&gt;
&lt;br /&gt;
You can find more information on the various parts in the page [[Building the Mower|&#039;&#039;&#039;Building the Mower&#039;&#039;&#039;]]&lt;br /&gt;
[[File:Road map.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Disclaimer&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;This material is provided as-is and free of charge. No guarantees of any kind are made that the information contained herein is exact or correct or does not violate any local regulations or cause any security risk. Any use you make of any information given here is at your own discretion and risk.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Road map ==&lt;br /&gt;
&lt;br /&gt;
===The Mower===&lt;br /&gt;
&lt;br /&gt;
====Get a mower in a store ====&lt;br /&gt;
So far only the Yard Force 500 is supported. See [[FAQ]] for more about alternative mowers.&lt;br /&gt;
&lt;br /&gt;
====Disassemble the mower and Remove the old mainboard====&lt;br /&gt;
See @c.ez&#039;s YouTube video https://www.youtube.com/watch?v=_bImqD-pQSA&lt;br /&gt;
&lt;br /&gt;
Now, it is ready for a new main board. &lt;br /&gt;
&lt;br /&gt;
=== PCBs with components ===&lt;br /&gt;
You need to build 4 PCBs; 1 for the main board and 3 for the motor controls (ESCs). You have to get the PCBs, get the parts and solder it yourself at the current stage. Due to international parts shortage, getting parts is quite a detective task, but here, we give you some help.&lt;br /&gt;
&lt;br /&gt;
The recommended process for getting parts is the following:&lt;br /&gt;
&lt;br /&gt;
# There are some parts lists (BOMs) maintained in Octopart - they will be given below. &lt;br /&gt;
# Use the Octopart site to find out where there are parts available and order them. You will very likely have to use several vendors. We propose that you start at digikey and then move on for parts that you can not get there.&lt;br /&gt;
# Order the parts.&lt;br /&gt;
# Use the relevant Gerber files for the board that you are making to order PCBs at e.g. JLCPCB. If you plan to use a hot plate or an oven for the soldering process, consider simultaneously ordering a stencil for placing solder paste on your PCBs.&lt;br /&gt;
&lt;br /&gt;
====Main board parts====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!What&lt;br /&gt;
!Where&lt;br /&gt;
!Notes&lt;br /&gt;
|-&lt;br /&gt;
| Gerber files&lt;br /&gt;
|https://github.com/ClemensElflein/OpenMower/tree/main/dist/Mainboard&lt;br /&gt;
|Get the latest zip file here.&lt;br /&gt;
|-&lt;br /&gt;
|BOM .csv file&lt;br /&gt;
|https://github.com/ClemensElflein/OpenMower/blob/main/dist/Mainboard/OpenMowerMainboard_bom_.csv&lt;br /&gt;
|With a little effort can be used to create an Octpoart list or a digikey list, if you spend some time mapping fields. The file has digikey and lcsc part numbers in it already.&lt;br /&gt;
|-&lt;br /&gt;
|BOM on Octopart&lt;br /&gt;
|https://octopart.com/bom-tool/ODFKeG8J&lt;br /&gt;
|Use this to see where parts are available&lt;br /&gt;
|-&lt;br /&gt;
|Interactive BOM&lt;br /&gt;
|https://github.com/ClemensElflein/OpenMower/blob/main/dist/Mainboard/ibom.html&lt;br /&gt;
|Use this file to see where parts go, very useful when you start to assemble.&lt;br /&gt;
Download the file and use it locally on you workstation. It has option to save state for how far you have gotten.&lt;br /&gt;
|}&lt;br /&gt;
=====Further parts needed=====&lt;br /&gt;
You also need&lt;br /&gt;
&lt;br /&gt;
*A Raspberry Pi 4&lt;br /&gt;
* An RTK Module&lt;br /&gt;
*A Raspberry Pi Pico&lt;br /&gt;
*A 9-axis accelerometer, WT901&lt;br /&gt;
&lt;br /&gt;
====xESC2040====&lt;br /&gt;
This version of the three motor drivers uses the RP2040 chip which should be available. The ESC can be produced single-sided for the OpenMower project (so it is less complicated than the STM32 version that is dual sided). xESC2040 has an option to mount some component on the underside to enable CAN interfacing, but, as said, this is not needed for the OpenMower. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!What&lt;br /&gt;
!Where&lt;br /&gt;
!Notes&lt;br /&gt;
|-&lt;br /&gt;
|Gerber files&lt;br /&gt;
|https://github.com/ClemensElflein/xESC/blob/main/PCB/xESC2040/GERBER/&lt;br /&gt;
|Use latest zip file here &lt;br /&gt;
|-&lt;br /&gt;
|BOM .csv file&lt;br /&gt;
|https://github.com/ClemensElflein/xESC/blob/main/PCB/xESC2040/BOM/xESC2_bom.csv &lt;br /&gt;
|With a little effort can be used to create an Octpoart list or a digikey list, if you spend some time mapping fields. The file has digikey and lcsc part numbers in it already. &lt;br /&gt;
|-&lt;br /&gt;
|BOM on Octopart&lt;br /&gt;
|https://octopart.com/bom-tool/p1aqUopq&lt;br /&gt;
|Use this to see where parts are available&lt;br /&gt;
Note: this BOM is &#039;&#039;without&#039;&#039; the CAN components for the underside (they are not needed for the OpenMower project). &lt;br /&gt;
|-&lt;br /&gt;
|BOM on Octopart&lt;br /&gt;
|https://octopart.com/bom-tool/tZ27Fd1N&lt;br /&gt;
|Use this to see where parts are available&lt;br /&gt;
Note: this BOM is &#039;&#039;with&#039;&#039; the CAN components for the underside (they are not needed for the OpenMower project). &lt;br /&gt;
|-&lt;br /&gt;
|Interactive BOM&lt;br /&gt;
|https://github.com/ClemensElflein/xESC/blob/main/PCB/xESC2040/BOM/ibom.html&lt;br /&gt;
|Use this file to see where parts go, very useful when you start to assemble.&lt;br /&gt;
Download the file and use it locally on you workstation. It has option to save state for how far you have gotten.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====x-ESC (original STM32 version)====&lt;br /&gt;
&lt;br /&gt;
This version of the three motor drivers uses the STM32 chip which is in very short supply, therefore the xESC2040 was designed and you should probably go for the xESC2040, unless you actually have access to STM32s. Also the STM32 version uses a double-sided PCB, so it is harder to solder than xESC2040.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!What&lt;br /&gt;
!Where&lt;br /&gt;
!Notes&lt;br /&gt;
|-&lt;br /&gt;
|Gerber files&lt;br /&gt;
|https://github.com/ClemensElflein/xESC/tree/main/PCB/xESC2_mini_VESC/GERBER&lt;br /&gt;
|Zip the files in this directory &lt;br /&gt;
|-&lt;br /&gt;
|BOM .csv file&lt;br /&gt;
|https://github.com/ClemensElflein/xESC/blob/main/PCB/xESC2_mini_VESC/BOM/xESC2_bom.csv &lt;br /&gt;
|With a little effort can be used to create an Octpoart list or a digikey list, if you spend some time mapping fields. The file has digikey and lcsc part numbers in it already. &lt;br /&gt;
|-&lt;br /&gt;
|BOM on Octopart&lt;br /&gt;
|https://octopart.com/bom-tool/hUY6qiSp&lt;br /&gt;
|Use this to see where parts are available&lt;br /&gt;
|-&lt;br /&gt;
|Interactive BOM&lt;br /&gt;
|https://github.com/ClemensElflein/xESC/blob/main/PCB/xESC2_mini_VESC/BOM/ibom.html&lt;br /&gt;
|Use this file to see where parts go, very useful when you start to assemble.&lt;br /&gt;
Download the file and use it locally on you workstation. It has option to save state for how far you have gotten.&lt;br /&gt;
|}&lt;br /&gt;
==== Ground plane====&lt;br /&gt;
&lt;br /&gt;
This is not really a PCB with parts. It is just a PCB that provides a conducting plane on which the GPR antenna can sit for better reception - and with a size that fits within the Yard Force 500. You may order this from e.g. JLCPCB using the Gerber files below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!What&lt;br /&gt;
!Where&lt;br /&gt;
! Notes &lt;br /&gt;
|-&lt;br /&gt;
|Gerber files &lt;br /&gt;
|https://github.com/ClemensElflein/OpenMower/tree/main/Hardware/GPSGroundPlane&lt;br /&gt;
|Zip the files in this directory&lt;br /&gt;
|}&lt;br /&gt;
===Base station with the base RTK GPS module===&lt;br /&gt;
[TODO] @c.ez : Need info.&lt;br /&gt;
&lt;br /&gt;
===Charging Station===&lt;br /&gt;
&lt;br /&gt;
=====Get a CC/CV module=====&lt;br /&gt;
This is currently needed to fix the charging station provided by Yard Force due to incompatibilities with the replaced main-board. It should be possible to fix this issue, but right now, it is necessary. See [[Building the Mower]]  for where to get it.&lt;br /&gt;
&lt;br /&gt;
====Upgrade the Charging Station====&lt;br /&gt;
[TODO] @c.ez : Need info.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__FORCETOC__&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>
	</entry>
	<entry>
		<id>https://wiki.openmower.de/index.php?title=Building_the_Mower&amp;diff=294</id>
		<title>Building the Mower</title>
		<link rel="alternate" type="text/html" href="https://wiki.openmower.de/index.php?title=Building_the_Mower&amp;diff=294"/>
		<updated>2022-08-16T22:36:50Z</updated>

		<summary type="html">&lt;p&gt;Potter-91: /* Bill OF Materials */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to the OpenMower Building guide!&lt;br /&gt;
&lt;br /&gt;
Note: This WIKI was only just started on 2022-04-22, but are actively working on filling it up and making a good documentation for the new builders out there!&lt;br /&gt;
&lt;br /&gt;
== Warning ==&lt;br /&gt;
Please note that this project currently is in a very early stage! So don&#039;t go buying stuff right away! You will need to order and solder your own boards, since there are no assembled boards for sale yet.&lt;br /&gt;
&lt;br /&gt;
Please make sure that you&#039;re actually allowed to build this device in your area. There may be laws / patents prohibiting you of doing so!&lt;br /&gt;
&lt;br /&gt;
Please just be responsible and if you&#039;re not sure what you&#039;re doing, please don&#039;t do anything.&lt;br /&gt;
&lt;br /&gt;
BTW the warranty of your brand new mower will obviously be void as soon as you modify it in any way, so be aware.&lt;br /&gt;
&lt;br /&gt;
== Intro ==&lt;br /&gt;
Below you can find an overview of the major parts and components in the OpenMower.&lt;br /&gt;
&lt;br /&gt;
There is a also another page with a [[Builder Road Map|&#039;&#039;&#039;Builder Road Map&#039;&#039;&#039;]] that gives guide to how to go about building your own OpenMower project.&lt;br /&gt;
&lt;br /&gt;
== Bill OF Materials ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto&amp;quot;&lt;br /&gt;
|+ Open Mower Bill of Materials&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Description &lt;br /&gt;
!Optional!! Availability !! Quantity Required !! Source Link 1 !! Alternate Source&lt;br /&gt;
|-&lt;br /&gt;
| Mower (Yardforce Classic 500) || Base building block &lt;br /&gt;
| || Off the shelf || 1 ||https://amzn.to/3NWgIxk&lt;br /&gt;
|  &#039;&#039;&#039;Note:&#039;&#039;&#039; Earlier, we had a reference to myrobotcenter. However, they have gone into reconstruction, so be aware of that vendor!&lt;br /&gt;
|-&lt;br /&gt;
| OpenMower Mainboard || The core of the new electronics. &lt;br /&gt;
| || Custom || 1 || [https://octopart.com/bom-tool/ODFKeG8J Components Octopart BOM]&lt;br /&gt;
| WIP&lt;br /&gt;
|-&lt;br /&gt;
| xESC || Motor drivers &lt;br /&gt;
| || Custom || 3 || Components Octoparts BOM:&lt;br /&gt;
- [https://octopart.com/bom-tool/p1aqUopq RP2040 &#039;&#039;without&#039;&#039; CAN]&lt;br /&gt;
&lt;br /&gt;
- [https://octopart.com/bom-tool/tZ27Fd1N RP2040 &#039;&#039;with&#039;&#039; CAN] &#039;&#039;(CAN is not required)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- [https://octopart.com/bom-tool/hUY6qiSp STM32] &lt;br /&gt;
|  WIP&lt;br /&gt;
|-&lt;br /&gt;
| Raspebrry Pi 4 || The brain of the robot. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With at least 2 GB of RAM to run the OpenMower software&lt;br /&gt;
&lt;br /&gt;
[[System_Image#Installing_OpenMower_Software|A 4GB is recommend to compile the software, see notes here]]&lt;br /&gt;
| || Off the shelf||1||https://rpilocator.com/?cat=PI4&amp;amp;instock&amp;lt;nowiki/&amp;gt;||WIP&lt;br /&gt;
|-&lt;br /&gt;
|Ardusimple RTK2B GPS||Positioning system for the bot&lt;br /&gt;
| ||Off the shelf||1|| https://www.ardusimple.com/product/simplertk2b-basic-starter-kit-ip65/&amp;lt;nowiki/&amp;gt;||https://www.ardusimple.com/product/simplertk2b-basic-starter-kit-ip65/&lt;br /&gt;
|-&lt;br /&gt;
|Raspberry Pi Pico||Microcontroller talking to peripherals, soldered to the OpenMower mainboard&lt;br /&gt;
| ||Off the shelf|| 1|| Widely available||&lt;br /&gt;
|-&lt;br /&gt;
|MPU 9250 (hard to get, end of life) or WT901&lt;br /&gt;
|9-axis accelerometer sitting on Mainboard allowing for direction through compass and dead reckoning of movement between GPS updates. &lt;br /&gt;
|&lt;br /&gt;
| Off the shelf&lt;br /&gt;
|1&lt;br /&gt;
|NO LINKS ANYMORE, since most of the delivered modules are fakes.&lt;br /&gt;
Alternative would be the WT901: &lt;br /&gt;
&lt;br /&gt;
https://amzn.to/3PQsV6O&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 3D printed brackets||To hold the GPS inside the bot&lt;br /&gt;
| ||Custom||1||https://www.printables.com/fr/model/175826-openmower-gps-mount-for-yardforce-classic-500&amp;lt;nowiki/&amp;gt;||WIP&lt;br /&gt;
|-&lt;br /&gt;
|SMA Angle Adapter&lt;br /&gt;
|Needed to connect the GPS without bending the wire too much&lt;br /&gt;
|&lt;br /&gt;
|Off the shelf&lt;br /&gt;
|1&lt;br /&gt;
|https://amzn.to/3K913b1&lt;br /&gt;
|WIP&lt;br /&gt;
|-&lt;br /&gt;
|GPS PCB&lt;br /&gt;
|A ground plane PCB to improve GPS reception&lt;br /&gt;
|&lt;br /&gt;
| Custom &lt;br /&gt;
|1&lt;br /&gt;
|WIP&lt;br /&gt;
|WIP&lt;br /&gt;
|-&lt;br /&gt;
|USB Angle Adapter&lt;br /&gt;
|If you want to use the Classic 500&#039;s USB port&lt;br /&gt;
|YES&lt;br /&gt;
|Off the shelf&lt;br /&gt;
|1&lt;br /&gt;
|https://amzn.to/3ukNAIj&lt;br /&gt;
| WIP&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;7&amp;quot; | Docking Station&lt;br /&gt;
|-&lt;br /&gt;
|CC/CV Step Down module&lt;br /&gt;
|As charger for the docking station&lt;br /&gt;
|&lt;br /&gt;
|Off the shelf&lt;br /&gt;
|1&lt;br /&gt;
|https://amzn.to/3NUdRVL&lt;br /&gt;
| WIP&lt;br /&gt;
|-&lt;br /&gt;
|Docking Station Adapter PCB&lt;br /&gt;
|A PCB to hold the module in place.&lt;br /&gt;
|&lt;br /&gt;
|Custom&lt;br /&gt;
|1&lt;br /&gt;
|WIP&lt;br /&gt;
|WIP&lt;br /&gt;
|-&lt;br /&gt;
|Raspebrry Pi&lt;br /&gt;
&#039;&#039;(required if NTRIP is not available)&#039;&#039;&lt;br /&gt;
|Used to send RTK correction data from the base station.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Can be any model with Ethernet and USB&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|Off the shelf&lt;br /&gt;
|1&lt;br /&gt;
|https://rpilocator.com/?cat=PI4&amp;amp;instock&amp;lt;nowiki/&amp;gt;&lt;br /&gt;
|WIP&lt;br /&gt;
|-&lt;br /&gt;
|Ardusimple RTK2B GPS&lt;br /&gt;
&#039;&#039;(required if NTRIP is not available)&#039;&#039;&lt;br /&gt;
|Positioning system for the docking station&lt;br /&gt;
|&lt;br /&gt;
|Off the shelf&lt;br /&gt;
|1&lt;br /&gt;
|https://www.ardusimple.com/product/simplertk2b-basic-starter-kit-ip65/&lt;br /&gt;
|https://www.ardusimple.com/product/simplertk2b-basic-starter-kit-ip65/&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Building the bot ==&lt;br /&gt;
&lt;br /&gt;
Once you have gathered up all of the parts, components, tools, and have a set of PCB&#039;s, it&#039;s time to start building the OpenMower Robot. &lt;br /&gt;
&lt;br /&gt;
First thing first, watch all of Clemen&#039;s Youtube video&#039;s, and then watch them again. They contain a Treasure Trove of information and should be used as a reference. https://youtu.be/_bImqD-pQSA&lt;br /&gt;
&lt;br /&gt;
Get Organized: Before you start assembling and soldering the PCB&#039;s, it&#039;s recommended to organize all of your parts. One method is to print off the iBOM.html file, tape it to a piece of cardboard, and then put double sided tape next to each line item. Only take out the parts/components you need for (1) xESC at a time, or the parts for the Mainboard, then place them on the double sided tape. Here are a couple of examples:&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:MainBoard-Parts-on-iBOM-wiki.jpg&lt;br /&gt;
File:XESC-Parts-on-iBOM-wiki.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
Now you want to apply solder paste to your PCB, BUT, before you apply solder paste to your PCB&#039;s with a stencil, make sure to wipe down both the PCB and the stencil with isopropanol alcohol to clean the surface, this helps more than you would think. Once the IPA has evaporated, align your stencil on top of the PCB, and use masking tape or painters tape on one side to act as a hinge, so after you apply the solder paste, you can carefully remove the stencil. Please reference Clemen&#039;s Youtube video for soldering:  https://youtu.be/Y16kbAK3vaU&lt;br /&gt;
&lt;br /&gt;
Here is an example photo of a PCB after applying the solder paste:&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:SolderPaste-Example.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
Make sure to inspect your entire PCB and the alignment of all components before soldering with a hot-plate / oven / hot-air. See the photo below for an example of all xESC (STM32 version) components placed on the top side of the PCB, being inspected before soldering.&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Solder Paste Inspection.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;Here is a photo showing top and bottom of (3) completed xESC boards. (STM32 version)&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:3-xESCs-complete STM32-Version.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
Here is a collection of photos of the OpenMower MainBoard from various Discord Users: (c.ez, vamatis, bhammy187)&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Test-5V-on-MainBoard.jpg&lt;br /&gt;
File:Vamatis-mainboard-diode-direction-wiki.jpg&lt;br /&gt;
File:Full-power-to-MainBoard.jpg&lt;br /&gt;
File:MB-R11 R12-wiki.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setup and test==&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>
	</entry>
	<entry>
		<id>https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=293</id>
		<title>OLD Bare Metal System Image</title>
		<link rel="alternate" type="text/html" href="https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=293"/>
		<updated>2022-08-14T16:16:16Z</updated>

		<summary type="html">&lt;p&gt;Potter-91: add --no-install-recommends to comitup install&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page will guide you through the steps to install a basic system image.&lt;br /&gt;
&lt;br /&gt;
On this image you will have the ROS base system, the OpenMower installation, local configuration for your mower and some tools to help you work with the mower.&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
In order to follow this guide, you will need the following:&lt;br /&gt;
&lt;br /&gt;
#A Raspberry Pi 4 (4GB or more recommended, [[System Image#Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM)|2GB works with swap, see here]])&lt;br /&gt;
#An SD card&lt;br /&gt;
#A soldered OpenMower mainboard&lt;br /&gt;
&lt;br /&gt;
==Installing the Base System==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;&#039;&#039;&#039;There is also a YouTube video explaining the steps in this section:&#039;&#039;&#039; https://youtu.be/_bImqD-pQSA?t=562&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Flashing Ubuntu to SD Card ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first step is to install the base system. We&#039;re using Ubuntu 20.04 Server for the Raspberry Pi. This is, because this image gives us best support ROS Noetic.&lt;br /&gt;
&lt;br /&gt;
Installing the base image is easy:&lt;br /&gt;
&lt;br /&gt;
#[https://www.raspberrypi.com/software/ Get the Raspberry Pi Imager software]&lt;br /&gt;
#Select the correct operating system:  &#039;&#039;Other-general-purpose OS &amp;gt; Ubuntu &amp;gt; Ubuntu Server 20.04.4 LTS (RPI 3/4/400) 64-bit&#039;&#039;&lt;br /&gt;
#Insert your SD card into your PC and select it in the &#039;&#039;Storage&#039;&#039; part of the software&lt;br /&gt;
#Click &#039;&#039;write&#039;&#039; and wait for the process to finish&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have successfully flashed your image, remove the SD for your PC &#039;&#039;&#039;and reinsert it again.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Then replace the &amp;lt;code&amp;gt;/boot/config.txt&amp;lt;/code&amp;gt; file with the one provided here: [https://github.com/ClemensElflein/OpenMower/blob/main/configs/RaspberryPiConfig/config.txt]&lt;br /&gt;
&lt;br /&gt;
This will enable all hardware serial ports on the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can theoretically configure networking in this step as well, but I&#039;m not recommending it. This is, because the networking information file gets only copied once and if you have an error it won&#039;t work.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;We need an interactive terminal in the next step anyways.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have done this step, you can eject the SD card and plug it into your Raspberry Pi 4.&lt;br /&gt;
&lt;br /&gt;
=== Opening a Serial Terminal ===&lt;br /&gt;
[[File:SerialRedirect.png|thumb|Serial Terminal: minicom -D /dev/ttyACM0]]&lt;br /&gt;
This step is needed for the following sections. The goal is to have a serial terminal to do basic config (networking etc) easily.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The easiest way of doing so is:&lt;br /&gt;
# Flash the SerialRedirect firmware into your Pico. Get it here: https://github.com/ClemensElflein/OpenMower/tree/main/Firmware/SerialRedirect/bin&lt;br /&gt;
# Provide your mainboard with power&lt;br /&gt;
# Plug your Pico into a computer. A virtual COM port should appear&lt;br /&gt;
# Connect to the COM port (I&#039;m using minicom, see image on the right), then press enter to start the Raspberry Pi.&lt;br /&gt;
#The Pi boots and a serial terminal will appear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you can login with the default credentials:&lt;br /&gt;
&lt;br /&gt;
username: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
password: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that you will need to change the password immediately.&lt;br /&gt;
&lt;br /&gt;
=== Disable Boot Interrupt ===&lt;br /&gt;
[[File:Image.png|thumb|Commands needed to disable boot interrupt on serial input.]]&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi boot loader will interrupt the boot sequence if data is sent through the main serial port of the Raspberry Pi. Since we&#039;re connecting &amp;quot;nosiy&amp;quot; hardware to the port, this will always interrupt the boot sequence and we need to disable this feature. &lt;br /&gt;
&lt;br /&gt;
In order to do this, reboot the Pi (sudo reboot) and send anything during the count-down in the bootloader (check the YouTube video linked above, if you&#039;re not sure).&lt;br /&gt;
&lt;br /&gt;
Then enter the following commands into the bootloader prompt:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
setenv bootdelay -2&lt;br /&gt;
saveenv&lt;br /&gt;
reset&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The Pi should reboot and the count-down should be gone.&lt;br /&gt;
&lt;br /&gt;
=== Some Settings ===&lt;br /&gt;
&lt;br /&gt;
[TODO/WIP]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are some miscellaneous settings I think are a good idea for an OpenMower install:&lt;br /&gt;
&lt;br /&gt;
* Remove the unnecessary snap system: &amp;lt;code&amp;gt;sudo snap remove --purge lxd &amp;amp;&amp;amp; sudo snap remove --purge core20 &amp;amp;&amp;amp; sudo snap remove --purge snapd &amp;amp;&amp;amp; sudo apt purge --autoremove snapd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Disable unattended upgrades: &amp;lt;code&amp;gt;sudo systemctl stop --force unattended-upgrades &amp;amp;&amp;amp; sudo systemctl disable unattended-upgrades &amp;amp;&amp;amp; sudo systemctl mask unattended-upgrades&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* I like to add the following to &amp;lt;code&amp;gt;cmdline.txt&amp;lt;/code&amp;gt; in order to fsck on boot:  &amp;lt;code&amp;gt;fsck.mode=force fsck.repair=yes&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* I prefer to use a static IP (If you use the [[System_Image#Installing_a_WiFi_Hot-Spot_(optional,_but_recommended)|recommend WiFi Hot-Spot]] use &amp;lt;code&amp;gt;sudo nmtui&amp;lt;/code&amp;gt; to configure a static IP)&lt;br /&gt;
&lt;br /&gt;
* If you like to have a terminal wifi scanner/signal monitor just install &amp;lt;code&amp;gt;sudo apt install wavemon&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you like you can change the timezone: &amp;lt;code&amp;gt;sudo timedatectl set-timezone Region/Location&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;sudo dpkg-reconfigure tzdata&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you ever like to plug a keyboard into the Pi don&#039;t forget to change the keymap: &amp;lt;code&amp;gt;sudo dpkg-reconfigure keyboard-configuration&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM)===&lt;br /&gt;
Compiling the OpenMower software will need more than 2GB of RAM. In order to still do this on a Pi with &amp;lt;= 2GB of RAM, we will add a 2GB swap file to the system by entering the following commands:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Create a new 2GB swap file&lt;br /&gt;
sudo fallocate -l 2G /swapfile&lt;br /&gt;
# Change permissions, so that only root can read and write&lt;br /&gt;
sudo chmod 600 /swapfile&lt;br /&gt;
# Create swap space in the file&lt;br /&gt;
sudo mkswap /swapfile&lt;br /&gt;
# Add it to the fstab&lt;br /&gt;
echo &#039;/swapfile swap swap defaults 0 0&#039; | sudo tee -a /etc/fstab /swapfile swap swap defaults 0 0&lt;br /&gt;
# Reboot to activate&lt;br /&gt;
sudo reboot&lt;br /&gt;
&lt;br /&gt;
# Check if it&#039;s activated&lt;br /&gt;
sudo swapon --show&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Installing a WiFi Hot-Spot (optional, but recommended)===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Since we will be configuring the WiFi interface, make sure that you have connected Etherent to your Raspberry Pi for this step.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As soon as you have closed your mower&#039;s enclosure, you won&#039;t have physical access to your Raspberry Pi anymore. If for some reason it&#039;s unable to connect to your WiFi (e.g. you have changed your password), you would need to open the case to get access to the SD card or Ethernet port on the Pi to regain access.&lt;br /&gt;
&lt;br /&gt;
To prevent this, we&#039;re going to install a hot-spot software which helps you to connect to WiFi by opening a hot-spot each time the Pi cannot connect to a known WiFi connection.&lt;br /&gt;
&lt;br /&gt;
Now is the best time to do this, because we have a serial terminal anyways and can mess with the network interfaces without shutting us out of the system!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Just use the following commands for this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# We need to disable systemd-resolveds caching DNS stub resolver&lt;br /&gt;
# if you want to know why check: https://github.com/pi-hole/docker-pi-hole/#installing-on-ubuntu&lt;br /&gt;
sudo sed -r -i.orig &#039;s/#?DNSStubListener=yes/DNSStubListener=no/g&#039; /etc/systemd/resolved.conf&lt;br /&gt;
sudo systemctl restart systemd-resolved.service&lt;br /&gt;
&lt;br /&gt;
ping ntp.org&lt;br /&gt;
# This will throw an dns error:&lt;br /&gt;
#   ping: ntp.org: Temporary failure in name resolution&lt;br /&gt;
sudo sh -c &#039;rm /etc/resolv.conf &amp;amp;&amp;amp; ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf&#039;&lt;br /&gt;
sudo systemctl restart systemd-resolved.service&lt;br /&gt;
nslookup ntp.org&lt;br /&gt;
# DNS should work now&lt;br /&gt;
&lt;br /&gt;
# Install comitup using the latest version from the projects repo&lt;br /&gt;
wget https://davesteele.github.io/comitup/latest/davesteele-comitup-apt-source_latest.deb&lt;br /&gt;
sudo dpkg -i --force-all davesteele-comitup-apt-source_latest.deb&lt;br /&gt;
rm davesteele-comitup-apt-source_latest.deb&lt;br /&gt;
sudo apt update&lt;br /&gt;
sudo apt install comitup --no-install-recommends&lt;br /&gt;
&lt;br /&gt;
sudo systemctl stop comitup&lt;br /&gt;
# Now use network-manager to:&lt;br /&gt;
# - add you wifi network&lt;br /&gt;
# optional:&lt;br /&gt;
# - change your hostname&lt;br /&gt;
# - add a dhcp ethernet connection without any device assigned&lt;br /&gt;
# (if even the hotspot malfunctions you can plug in a usb ethernet adapter)&lt;br /&gt;
sudo nmtui&lt;br /&gt;
&lt;br /&gt;
# Edit comitup.conf to change the wifi name and password (I use OpenMower-&amp;lt;nn&amp;gt;)&lt;br /&gt;
sudo nano /etc/comitup.conf&lt;br /&gt;
sudo systemctl restart comitup&lt;br /&gt;
# reboot - it should work now&lt;br /&gt;
sudo reboot&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable Serial Console===&lt;br /&gt;
Now that we have setup the network and can access the Pi even if our WiFi is not in range, we need to disable that serial console so that we can use the serial port for hardware.&lt;br /&gt;
&lt;br /&gt;
To do this, enter: &amp;lt;code&amp;gt;sudo nano /boot/firmware/cmdline.txt&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and remove the &amp;lt;code&amp;gt;console=serial0,115200&amp;lt;/code&amp;gt; part of the line.&lt;br /&gt;
&lt;br /&gt;
Save the file and reboot. You should still see the bootloader output, but no serial output after that.&lt;br /&gt;
&lt;br /&gt;
==Installing Tools==&lt;br /&gt;
If you&#039;re happy with your basic Ubuntu setup, it&#039;s time to install some tools required for the OpenMower&lt;br /&gt;
&lt;br /&gt;
=== General Dependencies ===&lt;br /&gt;
Just install them with apt:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install build-essential git&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===STR2STR (optional, recommended; only needed if you&#039;re using NTRIP, so probably most of you)===&lt;br /&gt;
We need a newer version than the one available in apt, so install it from source:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install gfortran&lt;br /&gt;
git clone https://github.com/rtklibexplorer/RTKLIB&lt;br /&gt;
cd RTKLIB&lt;br /&gt;
git checkout tags/b34c&lt;br /&gt;
cd app/consapp/&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You should now be able to run str2str from anywhere.&lt;br /&gt;
&lt;br /&gt;
=== OpenOCD (optional, recommended; only needed if you want to flash Pico from Raspberry Pi)===&lt;br /&gt;
We need to get the OpenOCD version from the Raspberry Pi foundation, because the &amp;quot;original&amp;quot; one doesn&#039;t have the Pico support built in yet.&lt;br /&gt;
&lt;br /&gt;
Install it from source:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install automake autoconf build-essential texinfo libtool libftdi-dev libusb-1.0-0-dev pkg-config&lt;br /&gt;
git clone https://github.com/raspberrypi/openocd.git --recursive --branch rp2040 --depth=1&lt;br /&gt;
cd openocd&lt;br /&gt;
./bootstrap&lt;br /&gt;
./configure --enable-ftdi --enable-sysfsgpio --enable-bcm2835gpio&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You can test if it was a success by running:&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
ubuntu@ubuntu:~$ openocd -v&lt;br /&gt;
Open On-Chip Debugger 0.11.0-g610f137-dirty (2022-06-07-00:39)&lt;br /&gt;
Licensed under GNU GPL v2&lt;br /&gt;
For bug reports, read&lt;br /&gt;
	http://openocd.org/doc/doxygen/bugs.html&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installing ROS and OpenMower==&lt;br /&gt;
We&#039;re using ROS Noetic for the OpenMower project. In this step we will install it, get the OpenMower sources, build the sources and create a basic configuration file for your mower.&lt;br /&gt;
&lt;br /&gt;
===Install ROS Noetic===&lt;br /&gt;
Since we&#039;re running Ubuntu 20.04 installing ROS is as easy as running the following commands:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Get the ROS apt repository&lt;br /&gt;
sudo sh -c &#039;echo &amp;quot;deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main&amp;quot; &amp;gt; /etc/apt/sources.list.d/ros-latest.list&#039;&lt;br /&gt;
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -&lt;br /&gt;
&lt;br /&gt;
# Install the ROS base system&lt;br /&gt;
sudo apt update&lt;br /&gt;
sudo apt install ros-noetic-ros-base&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;We only need to register the ROS installation in your &amp;lt;code&amp;gt;.bashrc&amp;lt;/code&amp;gt; file. This will enable you to call ROS specific commands from your terminal:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.bash&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Installing OpenMower Software===&lt;br /&gt;
Now we&#039;re finally able to install the OpenMower software. First, we&#039;re checking out the current version of the sources, then we&#039;re getting the dependencies and finally we&#039;re building the sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Clone the GitHub Repository:&lt;br /&gt;
git clone --recursive https://github.com/ClemensElflein/open_mower_ros.git&lt;br /&gt;
&lt;br /&gt;
# Get rosdep, only needed once&lt;br /&gt;
sudo apt install python3-rosdep&lt;br /&gt;
sudo rosdep init&lt;br /&gt;
rosdep update&lt;br /&gt;
&lt;br /&gt;
# Get the dependencies using rosdep&lt;br /&gt;
cd open_mower_ros/&lt;br /&gt;
rosdep install --from-paths src --ignore-packages-from-source --default-yes&lt;br /&gt;
&lt;br /&gt;
# set the default boot behavior to cli and disable unnecessary services cause some ros dependencie installs a basic desktop&lt;br /&gt;
sudo systemctl set-default multi-user&lt;br /&gt;
sudo systemctl stop --force bluetooth&lt;br /&gt;
sudo systemctl disable --now bluetooth&lt;br /&gt;
sudo systemctl mask --now bluetooth&lt;br /&gt;
&lt;br /&gt;
# Finally, build the sources. This will take a while! &lt;br /&gt;
catkin_make -j1 # on 2GB Pi with SWAP - this takes at least 30min&lt;br /&gt;
# OR&lt;br /&gt;
catkin_make -j2 # on 4/8GB Pi - this takes at least 20min&lt;br /&gt;
&lt;br /&gt;
# Copy the default configuration file to your home directory&lt;br /&gt;
cp ~/open_mower_ros/src/open_mower/config/mower_config.sh.example ~/mower_config.sh&lt;br /&gt;
&lt;br /&gt;
# The next step is to also source the OpenMower ROS install&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;At this point the OpenMower software is successfully installed! You will need to configure the OpenMower software and then you&#039;re finally ready to mow.&lt;br /&gt;
&lt;br /&gt;
== Some Additional Issues==&lt;br /&gt;
&lt;br /&gt;
===I&#039;m using an external WiFi dongle for better coverage, but sometimes it doesn&#039;t work===&lt;br /&gt;
It seems that the Ubuntu sometimes puts external WiFi dongles to sleep. To prevent this, we create a service which disables powersave:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Enter this to create the service&lt;br /&gt;
sudo systemctl --full --force edit wifi_powersave@.service&lt;br /&gt;
&lt;br /&gt;
# Paste the following:&lt;br /&gt;
[Unit]&lt;br /&gt;
Description=Set WiFi power save %i&lt;br /&gt;
After=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
Type=oneshot&lt;br /&gt;
RemainAfterExit=yes&lt;br /&gt;
ExecStart=/sbin/iw dev wlan1 set power_save %i&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
# Save and exit, then activate using:&lt;br /&gt;
sudo systemctl disable wifi_powersave@on.service&lt;br /&gt;
sudo systemctl enable wifi_powersave@off.service&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>
	</entry>
	<entry>
		<id>https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=292</id>
		<title>OLD Bare Metal System Image</title>
		<link rel="alternate" type="text/html" href="https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=292"/>
		<updated>2022-08-14T16:12:06Z</updated>

		<summary type="html">&lt;p&gt;Potter-91: /* Installing a WiFi Hot-Spot (optional, but recommended) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page will guide you through the steps to install a basic system image.&lt;br /&gt;
&lt;br /&gt;
On this image you will have the ROS base system, the OpenMower installation, local configuration for your mower and some tools to help you work with the mower.&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
In order to follow this guide, you will need the following:&lt;br /&gt;
&lt;br /&gt;
#A Raspberry Pi 4 (4GB or more recommended, [[System Image#Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM)|2GB works with swap, see here]])&lt;br /&gt;
#An SD card&lt;br /&gt;
#A soldered OpenMower mainboard&lt;br /&gt;
&lt;br /&gt;
==Installing the Base System==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;&#039;&#039;&#039;There is also a YouTube video explaining the steps in this section:&#039;&#039;&#039; https://youtu.be/_bImqD-pQSA?t=562&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Flashing Ubuntu to SD Card ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first step is to install the base system. We&#039;re using Ubuntu 20.04 Server for the Raspberry Pi. This is, because this image gives us best support ROS Noetic.&lt;br /&gt;
&lt;br /&gt;
Installing the base image is easy:&lt;br /&gt;
&lt;br /&gt;
#[https://www.raspberrypi.com/software/ Get the Raspberry Pi Imager software]&lt;br /&gt;
#Select the correct operating system:  &#039;&#039;Other-general-purpose OS &amp;gt; Ubuntu &amp;gt; Ubuntu Server 20.04.4 LTS (RPI 3/4/400) 64-bit&#039;&#039;&lt;br /&gt;
#Insert your SD card into your PC and select it in the &#039;&#039;Storage&#039;&#039; part of the software&lt;br /&gt;
#Click &#039;&#039;write&#039;&#039; and wait for the process to finish&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have successfully flashed your image, remove the SD for your PC &#039;&#039;&#039;and reinsert it again.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Then replace the &amp;lt;code&amp;gt;/boot/config.txt&amp;lt;/code&amp;gt; file with the one provided here: [https://github.com/ClemensElflein/OpenMower/blob/main/configs/RaspberryPiConfig/config.txt]&lt;br /&gt;
&lt;br /&gt;
This will enable all hardware serial ports on the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can theoretically configure networking in this step as well, but I&#039;m not recommending it. This is, because the networking information file gets only copied once and if you have an error it won&#039;t work.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;We need an interactive terminal in the next step anyways.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have done this step, you can eject the SD card and plug it into your Raspberry Pi 4.&lt;br /&gt;
&lt;br /&gt;
=== Opening a Serial Terminal ===&lt;br /&gt;
[[File:SerialRedirect.png|thumb|Serial Terminal: minicom -D /dev/ttyACM0]]&lt;br /&gt;
This step is needed for the following sections. The goal is to have a serial terminal to do basic config (networking etc) easily.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The easiest way of doing so is:&lt;br /&gt;
# Flash the SerialRedirect firmware into your Pico. Get it here: https://github.com/ClemensElflein/OpenMower/tree/main/Firmware/SerialRedirect/bin&lt;br /&gt;
# Provide your mainboard with power&lt;br /&gt;
# Plug your Pico into a computer. A virtual COM port should appear&lt;br /&gt;
# Connect to the COM port (I&#039;m using minicom, see image on the right), then press enter to start the Raspberry Pi.&lt;br /&gt;
#The Pi boots and a serial terminal will appear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you can login with the default credentials:&lt;br /&gt;
&lt;br /&gt;
username: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
password: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that you will need to change the password immediately.&lt;br /&gt;
&lt;br /&gt;
=== Disable Boot Interrupt ===&lt;br /&gt;
[[File:Image.png|thumb|Commands needed to disable boot interrupt on serial input.]]&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi boot loader will interrupt the boot sequence if data is sent through the main serial port of the Raspberry Pi. Since we&#039;re connecting &amp;quot;nosiy&amp;quot; hardware to the port, this will always interrupt the boot sequence and we need to disable this feature. &lt;br /&gt;
&lt;br /&gt;
In order to do this, reboot the Pi (sudo reboot) and send anything during the count-down in the bootloader (check the YouTube video linked above, if you&#039;re not sure).&lt;br /&gt;
&lt;br /&gt;
Then enter the following commands into the bootloader prompt:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
setenv bootdelay -2&lt;br /&gt;
saveenv&lt;br /&gt;
reset&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The Pi should reboot and the count-down should be gone.&lt;br /&gt;
&lt;br /&gt;
=== Some Settings ===&lt;br /&gt;
&lt;br /&gt;
[TODO/WIP]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are some miscellaneous settings I think are a good idea for an OpenMower install:&lt;br /&gt;
&lt;br /&gt;
* Remove the unnecessary snap system: &amp;lt;code&amp;gt;sudo snap remove --purge lxd &amp;amp;&amp;amp; sudo snap remove --purge core20 &amp;amp;&amp;amp; sudo snap remove --purge snapd &amp;amp;&amp;amp; sudo apt purge --autoremove snapd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Disable unattended upgrades: &amp;lt;code&amp;gt;sudo systemctl stop --force unattended-upgrades &amp;amp;&amp;amp; sudo systemctl disable unattended-upgrades &amp;amp;&amp;amp; sudo systemctl mask unattended-upgrades&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* I like to add the following to &amp;lt;code&amp;gt;cmdline.txt&amp;lt;/code&amp;gt; in order to fsck on boot:  &amp;lt;code&amp;gt;fsck.mode=force fsck.repair=yes&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* I prefer to use a static IP (If you use the [[System_Image#Installing_a_WiFi_Hot-Spot_(optional,_but_recommended)|recommend WiFi Hot-Spot]] use &amp;lt;code&amp;gt;sudo nmtui&amp;lt;/code&amp;gt; to configure a static IP)&lt;br /&gt;
&lt;br /&gt;
* If you like to have a terminal wifi scanner/signal monitor just install &amp;lt;code&amp;gt;sudo apt install wavemon&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you like you can change the timezone: &amp;lt;code&amp;gt;sudo timedatectl set-timezone Region/Location&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;sudo dpkg-reconfigure tzdata&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you ever like to plug a keyboard into the Pi don&#039;t forget to change the keymap: &amp;lt;code&amp;gt;sudo dpkg-reconfigure keyboard-configuration&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM)===&lt;br /&gt;
Compiling the OpenMower software will need more than 2GB of RAM. In order to still do this on a Pi with &amp;lt;= 2GB of RAM, we will add a 2GB swap file to the system by entering the following commands:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Create a new 2GB swap file&lt;br /&gt;
sudo fallocate -l 2G /swapfile&lt;br /&gt;
# Change permissions, so that only root can read and write&lt;br /&gt;
sudo chmod 600 /swapfile&lt;br /&gt;
# Create swap space in the file&lt;br /&gt;
sudo mkswap /swapfile&lt;br /&gt;
# Add it to the fstab&lt;br /&gt;
echo &#039;/swapfile swap swap defaults 0 0&#039; | sudo tee -a /etc/fstab /swapfile swap swap defaults 0 0&lt;br /&gt;
# Reboot to activate&lt;br /&gt;
sudo reboot&lt;br /&gt;
&lt;br /&gt;
# Check if it&#039;s activated&lt;br /&gt;
sudo swapon --show&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Installing a WiFi Hot-Spot (optional, but recommended)===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Since we will be configuring the WiFi interface, make sure that you have connected Etherent to your Raspberry Pi for this step.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As soon as you have closed your mower&#039;s enclosure, you won&#039;t have physical access to your Raspberry Pi anymore. If for some reason it&#039;s unable to connect to your WiFi (e.g. you have changed your password), you would need to open the case to get access to the SD card or Ethernet port on the Pi to regain access.&lt;br /&gt;
&lt;br /&gt;
To prevent this, we&#039;re going to install a hot-spot software which helps you to connect to WiFi by opening a hot-spot each time the Pi cannot connect to a known WiFi connection.&lt;br /&gt;
&lt;br /&gt;
Now is the best time to do this, because we have a serial terminal anyways and can mess with the network interfaces without shutting us out of the system!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Just use the following commands for this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# We need to disable systemd-resolveds caching DNS stub resolver&lt;br /&gt;
# if you want to know why check: https://github.com/pi-hole/docker-pi-hole/#installing-on-ubuntu&lt;br /&gt;
sudo sed -r -i.orig &#039;s/#?DNSStubListener=yes/DNSStubListener=no/g&#039; /etc/systemd/resolved.conf&lt;br /&gt;
sudo systemctl restart systemd-resolved.service&lt;br /&gt;
&lt;br /&gt;
ping ntp.org&lt;br /&gt;
# This will throw an dns error:&lt;br /&gt;
#   ping: ntp.org: Temporary failure in name resolution&lt;br /&gt;
sudo sh -c &#039;rm /etc/resolv.conf &amp;amp;&amp;amp; ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf&#039;&lt;br /&gt;
sudo systemctl restart systemd-resolved.service&lt;br /&gt;
nslookup ntp.org&lt;br /&gt;
# DNS should work now&lt;br /&gt;
&lt;br /&gt;
# Install comitup using the latest version from the projects repo&lt;br /&gt;
wget https://davesteele.github.io/comitup/latest/davesteele-comitup-apt-source_latest.deb&lt;br /&gt;
sudo dpkg -i --force-all davesteele-comitup-apt-source_latest.deb&lt;br /&gt;
rm davesteele-comitup-apt-source_latest.deb&lt;br /&gt;
sudo apt update&lt;br /&gt;
sudo apt install comitup&lt;br /&gt;
&lt;br /&gt;
sudo systemctl stop comitup&lt;br /&gt;
# Now use network-manager to:&lt;br /&gt;
# - add you wifi network&lt;br /&gt;
# optional:&lt;br /&gt;
# - change your hostname&lt;br /&gt;
# - add a dhcp ethernet connection without any device assigned&lt;br /&gt;
# (if even the hotspot malfunctions you can plug in a usb ethernet adapter)&lt;br /&gt;
sudo nmtui&lt;br /&gt;
&lt;br /&gt;
# Edit comitup.conf to change the wifi name and password (I use OpenMower-&amp;lt;nn&amp;gt;)&lt;br /&gt;
sudo nano /etc/comitup.conf&lt;br /&gt;
sudo systemctl restart comitup&lt;br /&gt;
# reboot - it should work now&lt;br /&gt;
sudo reboot&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable Serial Console===&lt;br /&gt;
Now that we have setup the network and can access the Pi even if our WiFi is not in range, we need to disable that serial console so that we can use the serial port for hardware.&lt;br /&gt;
&lt;br /&gt;
To do this, enter: &amp;lt;code&amp;gt;sudo nano /boot/firmware/cmdline.txt&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and remove the &amp;lt;code&amp;gt;console=serial0,115200&amp;lt;/code&amp;gt; part of the line.&lt;br /&gt;
&lt;br /&gt;
Save the file and reboot. You should still see the bootloader output, but no serial output after that.&lt;br /&gt;
&lt;br /&gt;
==Installing Tools==&lt;br /&gt;
If you&#039;re happy with your basic Ubuntu setup, it&#039;s time to install some tools required for the OpenMower&lt;br /&gt;
&lt;br /&gt;
=== General Dependencies ===&lt;br /&gt;
Just install them with apt:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install build-essential git&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===STR2STR (optional, recommended; only needed if you&#039;re using NTRIP, so probably most of you)===&lt;br /&gt;
We need a newer version than the one available in apt, so install it from source:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install gfortran&lt;br /&gt;
git clone https://github.com/rtklibexplorer/RTKLIB&lt;br /&gt;
cd RTKLIB&lt;br /&gt;
git checkout tags/b34c&lt;br /&gt;
cd app/consapp/&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You should now be able to run str2str from anywhere.&lt;br /&gt;
&lt;br /&gt;
=== OpenOCD (optional, recommended; only needed if you want to flash Pico from Raspberry Pi)===&lt;br /&gt;
We need to get the OpenOCD version from the Raspberry Pi foundation, because the &amp;quot;original&amp;quot; one doesn&#039;t have the Pico support built in yet.&lt;br /&gt;
&lt;br /&gt;
Install it from source:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install automake autoconf build-essential texinfo libtool libftdi-dev libusb-1.0-0-dev pkg-config&lt;br /&gt;
git clone https://github.com/raspberrypi/openocd.git --recursive --branch rp2040 --depth=1&lt;br /&gt;
cd openocd&lt;br /&gt;
./bootstrap&lt;br /&gt;
./configure --enable-ftdi --enable-sysfsgpio --enable-bcm2835gpio&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You can test if it was a success by running:&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
ubuntu@ubuntu:~$ openocd -v&lt;br /&gt;
Open On-Chip Debugger 0.11.0-g610f137-dirty (2022-06-07-00:39)&lt;br /&gt;
Licensed under GNU GPL v2&lt;br /&gt;
For bug reports, read&lt;br /&gt;
	http://openocd.org/doc/doxygen/bugs.html&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installing ROS and OpenMower==&lt;br /&gt;
We&#039;re using ROS Noetic for the OpenMower project. In this step we will install it, get the OpenMower sources, build the sources and create a basic configuration file for your mower.&lt;br /&gt;
&lt;br /&gt;
===Install ROS Noetic===&lt;br /&gt;
Since we&#039;re running Ubuntu 20.04 installing ROS is as easy as running the following commands:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Get the ROS apt repository&lt;br /&gt;
sudo sh -c &#039;echo &amp;quot;deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main&amp;quot; &amp;gt; /etc/apt/sources.list.d/ros-latest.list&#039;&lt;br /&gt;
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -&lt;br /&gt;
&lt;br /&gt;
# Install the ROS base system&lt;br /&gt;
sudo apt update&lt;br /&gt;
sudo apt install ros-noetic-ros-base&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;We only need to register the ROS installation in your &amp;lt;code&amp;gt;.bashrc&amp;lt;/code&amp;gt; file. This will enable you to call ROS specific commands from your terminal:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.bash&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Installing OpenMower Software===&lt;br /&gt;
Now we&#039;re finally able to install the OpenMower software. First, we&#039;re checking out the current version of the sources, then we&#039;re getting the dependencies and finally we&#039;re building the sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Clone the GitHub Repository:&lt;br /&gt;
git clone --recursive https://github.com/ClemensElflein/open_mower_ros.git&lt;br /&gt;
&lt;br /&gt;
# Get rosdep, only needed once&lt;br /&gt;
sudo apt install python3-rosdep&lt;br /&gt;
sudo rosdep init&lt;br /&gt;
rosdep update&lt;br /&gt;
&lt;br /&gt;
# Get the dependencies using rosdep&lt;br /&gt;
cd open_mower_ros/&lt;br /&gt;
rosdep install --from-paths src --ignore-packages-from-source --default-yes&lt;br /&gt;
&lt;br /&gt;
# set the default boot behavior to cli and disable unnecessary services cause some ros dependencie installs a basic desktop&lt;br /&gt;
sudo systemctl set-default multi-user&lt;br /&gt;
sudo systemctl stop --force bluetooth&lt;br /&gt;
sudo systemctl disable --now bluetooth&lt;br /&gt;
sudo systemctl mask --now bluetooth&lt;br /&gt;
&lt;br /&gt;
# Finally, build the sources. This will take a while! &lt;br /&gt;
catkin_make -j1 # on 2GB Pi with SWAP - this takes at least 30min&lt;br /&gt;
# OR&lt;br /&gt;
catkin_make -j2 # on 4/8GB Pi - this takes at least 20min&lt;br /&gt;
&lt;br /&gt;
# Copy the default configuration file to your home directory&lt;br /&gt;
cp ~/open_mower_ros/src/open_mower/config/mower_config.sh.example ~/mower_config.sh&lt;br /&gt;
&lt;br /&gt;
# The next step is to also source the OpenMower ROS install&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;At this point the OpenMower software is successfully installed! You will need to configure the OpenMower software and then you&#039;re finally ready to mow.&lt;br /&gt;
&lt;br /&gt;
== Some Additional Issues==&lt;br /&gt;
&lt;br /&gt;
===I&#039;m using an external WiFi dongle for better coverage, but sometimes it doesn&#039;t work===&lt;br /&gt;
It seems that the Ubuntu sometimes puts external WiFi dongles to sleep. To prevent this, we create a service which disables powersave:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Enter this to create the service&lt;br /&gt;
sudo systemctl --full --force edit wifi_powersave@.service&lt;br /&gt;
&lt;br /&gt;
# Paste the following:&lt;br /&gt;
[Unit]&lt;br /&gt;
Description=Set WiFi power save %i&lt;br /&gt;
After=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
Type=oneshot&lt;br /&gt;
RemainAfterExit=yes&lt;br /&gt;
ExecStart=/sbin/iw dev wlan1 set power_save %i&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
# Save and exit, then activate using:&lt;br /&gt;
sudo systemctl disable wifi_powersave@on.service&lt;br /&gt;
sudo systemctl enable wifi_powersave@off.service&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>
	</entry>
	<entry>
		<id>https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=291</id>
		<title>OLD Bare Metal System Image</title>
		<link rel="alternate" type="text/html" href="https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=291"/>
		<updated>2022-08-14T15:58:00Z</updated>

		<summary type="html">&lt;p&gt;Potter-91: /* Installing OpenMower Software */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page will guide you through the steps to install a basic system image.&lt;br /&gt;
&lt;br /&gt;
On this image you will have the ROS base system, the OpenMower installation, local configuration for your mower and some tools to help you work with the mower.&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
In order to follow this guide, you will need the following:&lt;br /&gt;
&lt;br /&gt;
#A Raspberry Pi 4 (4GB or more recommended, [[System Image#Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM)|2GB works with swap, see here]])&lt;br /&gt;
#An SD card&lt;br /&gt;
#A soldered OpenMower mainboard&lt;br /&gt;
&lt;br /&gt;
==Installing the Base System==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;&#039;&#039;&#039;There is also a YouTube video explaining the steps in this section:&#039;&#039;&#039; https://youtu.be/_bImqD-pQSA?t=562&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Flashing Ubuntu to SD Card ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first step is to install the base system. We&#039;re using Ubuntu 20.04 Server for the Raspberry Pi. This is, because this image gives us best support ROS Noetic.&lt;br /&gt;
&lt;br /&gt;
Installing the base image is easy:&lt;br /&gt;
&lt;br /&gt;
#[https://www.raspberrypi.com/software/ Get the Raspberry Pi Imager software]&lt;br /&gt;
#Select the correct operating system:  &#039;&#039;Other-general-purpose OS &amp;gt; Ubuntu &amp;gt; Ubuntu Server 20.04.4 LTS (RPI 3/4/400) 64-bit&#039;&#039;&lt;br /&gt;
#Insert your SD card into your PC and select it in the &#039;&#039;Storage&#039;&#039; part of the software&lt;br /&gt;
#Click &#039;&#039;write&#039;&#039; and wait for the process to finish&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have successfully flashed your image, remove the SD for your PC &#039;&#039;&#039;and reinsert it again.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Then replace the &amp;lt;code&amp;gt;/boot/config.txt&amp;lt;/code&amp;gt; file with the one provided here: [https://github.com/ClemensElflein/OpenMower/blob/main/configs/RaspberryPiConfig/config.txt]&lt;br /&gt;
&lt;br /&gt;
This will enable all hardware serial ports on the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can theoretically configure networking in this step as well, but I&#039;m not recommending it. This is, because the networking information file gets only copied once and if you have an error it won&#039;t work.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;We need an interactive terminal in the next step anyways.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have done this step, you can eject the SD card and plug it into your Raspberry Pi 4.&lt;br /&gt;
&lt;br /&gt;
=== Opening a Serial Terminal ===&lt;br /&gt;
[[File:SerialRedirect.png|thumb|Serial Terminal: minicom -D /dev/ttyACM0]]&lt;br /&gt;
This step is needed for the following sections. The goal is to have a serial terminal to do basic config (networking etc) easily.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The easiest way of doing so is:&lt;br /&gt;
# Flash the SerialRedirect firmware into your Pico. Get it here: https://github.com/ClemensElflein/OpenMower/tree/main/Firmware/SerialRedirect/bin&lt;br /&gt;
# Provide your mainboard with power&lt;br /&gt;
# Plug your Pico into a computer. A virtual COM port should appear&lt;br /&gt;
# Connect to the COM port (I&#039;m using minicom, see image on the right), then press enter to start the Raspberry Pi.&lt;br /&gt;
#The Pi boots and a serial terminal will appear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you can login with the default credentials:&lt;br /&gt;
&lt;br /&gt;
username: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
password: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that you will need to change the password immediately.&lt;br /&gt;
&lt;br /&gt;
=== Disable Boot Interrupt ===&lt;br /&gt;
[[File:Image.png|thumb|Commands needed to disable boot interrupt on serial input.]]&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi boot loader will interrupt the boot sequence if data is sent through the main serial port of the Raspberry Pi. Since we&#039;re connecting &amp;quot;nosiy&amp;quot; hardware to the port, this will always interrupt the boot sequence and we need to disable this feature. &lt;br /&gt;
&lt;br /&gt;
In order to do this, reboot the Pi (sudo reboot) and send anything during the count-down in the bootloader (check the YouTube video linked above, if you&#039;re not sure).&lt;br /&gt;
&lt;br /&gt;
Then enter the following commands into the bootloader prompt:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
setenv bootdelay -2&lt;br /&gt;
saveenv&lt;br /&gt;
reset&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The Pi should reboot and the count-down should be gone.&lt;br /&gt;
&lt;br /&gt;
=== Some Settings ===&lt;br /&gt;
&lt;br /&gt;
[TODO/WIP]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are some miscellaneous settings I think are a good idea for an OpenMower install:&lt;br /&gt;
&lt;br /&gt;
* Remove the unnecessary snap system: &amp;lt;code&amp;gt;sudo snap remove --purge lxd &amp;amp;&amp;amp; sudo snap remove --purge core20 &amp;amp;&amp;amp; sudo snap remove --purge snapd &amp;amp;&amp;amp; sudo apt purge --autoremove snapd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Disable unattended upgrades: &amp;lt;code&amp;gt;sudo systemctl stop --force unattended-upgrades &amp;amp;&amp;amp; sudo systemctl disable unattended-upgrades &amp;amp;&amp;amp; sudo systemctl mask unattended-upgrades&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* I like to add the following to &amp;lt;code&amp;gt;cmdline.txt&amp;lt;/code&amp;gt; in order to fsck on boot:  &amp;lt;code&amp;gt;fsck.mode=force fsck.repair=yes&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* I prefer to use a static IP (If you use the [[System_Image#Installing_a_WiFi_Hot-Spot_(optional,_but_recommended)|recommend WiFi Hot-Spot]] use &amp;lt;code&amp;gt;sudo nmtui&amp;lt;/code&amp;gt; to configure a static IP)&lt;br /&gt;
&lt;br /&gt;
* If you like to have a terminal wifi scanner/signal monitor just install &amp;lt;code&amp;gt;sudo apt install wavemon&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you like you can change the timezone: &amp;lt;code&amp;gt;sudo timedatectl set-timezone Region/Location&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;sudo dpkg-reconfigure tzdata&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you ever like to plug a keyboard into the Pi don&#039;t forget to change the keymap: &amp;lt;code&amp;gt;sudo dpkg-reconfigure keyboard-configuration&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM)===&lt;br /&gt;
Compiling the OpenMower software will need more than 2GB of RAM. In order to still do this on a Pi with &amp;lt;= 2GB of RAM, we will add a 2GB swap file to the system by entering the following commands:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Create a new 2GB swap file&lt;br /&gt;
sudo fallocate -l 2G /swapfile&lt;br /&gt;
# Change permissions, so that only root can read and write&lt;br /&gt;
sudo chmod 600 /swapfile&lt;br /&gt;
# Create swap space in the file&lt;br /&gt;
sudo mkswap /swapfile&lt;br /&gt;
# Add it to the fstab&lt;br /&gt;
echo &#039;/swapfile swap swap defaults 0 0&#039; | sudo tee -a /etc/fstab /swapfile swap swap defaults 0 0&lt;br /&gt;
# Reboot to activate&lt;br /&gt;
sudo reboot&lt;br /&gt;
&lt;br /&gt;
# Check if it&#039;s activated&lt;br /&gt;
sudo swapon --show&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Installing a WiFi Hot-Spot (optional, but recommended)===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Since we will be configuring the WiFi interface, make sure that you have connected Etherent to your Raspberry Pi for this step.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As soon as you have closed your mower&#039;s enclosure, you won&#039;t have physical access to your Raspberry Pi anymore. If for some reason it&#039;s unable to connect to your WiFi (e.g. you have changed your password), you would need to open the case to get access to the SD card or Ethernet port on the Pi to regain access.&lt;br /&gt;
&lt;br /&gt;
To prevent this, we&#039;re going to install a hot-spot software which helps you to connect to WiFi by opening a hot-spot each time the Pi cannot connect to a known WiFi connection.&lt;br /&gt;
&lt;br /&gt;
Now is the best time to do this, because we have a serial terminal anyways and can mess with the network interfaces without shutting us out of the system!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Just use the following commands for this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# If dpkg throws an error like&lt;br /&gt;
#   dpkg: error processing package ... (--install):&lt;br /&gt;
#   dependency problems - leaving unconfigured&lt;br /&gt;
# you need some dependencies, correct them by running:&lt;br /&gt;
sudo apt install -f&lt;br /&gt;
&lt;br /&gt;
# We need to disable systemd-resolveds caching DNS stub resolver&lt;br /&gt;
# if you want to know why check: https://github.com/pi-hole/docker-pi-hole/#installing-on-ubuntu&lt;br /&gt;
sudo sed -r -i.orig &#039;s/#?DNSStubListener=yes/DNSStubListener=no/g&#039; /etc/systemd/resolved.conf&lt;br /&gt;
sudo systemctl restart systemd-resolved.service&lt;br /&gt;
&lt;br /&gt;
ping ntp.org&lt;br /&gt;
# This will throw an dns error:&lt;br /&gt;
#   ping: ntp.org: Temporary failure in name resolution&lt;br /&gt;
sudo sh -c &#039;rm /etc/resolv.conf &amp;amp;&amp;amp; ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf&#039;&lt;br /&gt;
sudo systemctl restart systemd-resolved.service&lt;br /&gt;
nslookup ntp.org&lt;br /&gt;
# DNS should work now&lt;br /&gt;
&lt;br /&gt;
# Install comitup using the latest version from the projects repo&lt;br /&gt;
wget https://davesteele.github.io/comitup/latest/davesteele-comitup-apt-source_latest.deb&lt;br /&gt;
sudo dpkg -i --force-all davesteele-comitup-apt-source_latest.deb&lt;br /&gt;
rm davesteele-comitup-apt-source_latest.deb&lt;br /&gt;
sudo apt update&lt;br /&gt;
sudo apt install comitup&lt;br /&gt;
&lt;br /&gt;
sudo systemctl stop comitup&lt;br /&gt;
# Now use network-manager to:&lt;br /&gt;
# - add you wifi network&lt;br /&gt;
# optional:&lt;br /&gt;
# - change your hostname&lt;br /&gt;
# - add a dhcp ethernet connection without any device assigned&lt;br /&gt;
# (if even the hotspot malfunctions you can plug in a usb ethernet adapter)&lt;br /&gt;
sudo nmtui&lt;br /&gt;
&lt;br /&gt;
# Edit comitup.conf to change the wifi name and password (I use OpenMower-&amp;lt;nn&amp;gt;)&lt;br /&gt;
sudo nano /etc/comitup.conf&lt;br /&gt;
sudo systemctl restart comitup&lt;br /&gt;
# reboot - it should work now&lt;br /&gt;
sudo reboot&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable Serial Console===&lt;br /&gt;
Now that we have setup the network and can access the Pi even if our WiFi is not in range, we need to disable that serial console so that we can use the serial port for hardware.&lt;br /&gt;
&lt;br /&gt;
To do this, enter: &amp;lt;code&amp;gt;sudo nano /boot/firmware/cmdline.txt&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and remove the &amp;lt;code&amp;gt;console=serial0,115200&amp;lt;/code&amp;gt; part of the line.&lt;br /&gt;
&lt;br /&gt;
Save the file and reboot. You should still see the bootloader output, but no serial output after that.&lt;br /&gt;
&lt;br /&gt;
==Installing Tools==&lt;br /&gt;
If you&#039;re happy with your basic Ubuntu setup, it&#039;s time to install some tools required for the OpenMower&lt;br /&gt;
&lt;br /&gt;
=== General Dependencies ===&lt;br /&gt;
Just install them with apt:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install build-essential git&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===STR2STR (optional, recommended; only needed if you&#039;re using NTRIP, so probably most of you)===&lt;br /&gt;
We need a newer version than the one available in apt, so install it from source:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install gfortran&lt;br /&gt;
git clone https://github.com/rtklibexplorer/RTKLIB&lt;br /&gt;
cd RTKLIB&lt;br /&gt;
git checkout tags/b34c&lt;br /&gt;
cd app/consapp/&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You should now be able to run str2str from anywhere.&lt;br /&gt;
&lt;br /&gt;
=== OpenOCD (optional, recommended; only needed if you want to flash Pico from Raspberry Pi)===&lt;br /&gt;
We need to get the OpenOCD version from the Raspberry Pi foundation, because the &amp;quot;original&amp;quot; one doesn&#039;t have the Pico support built in yet.&lt;br /&gt;
&lt;br /&gt;
Install it from source:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install automake autoconf build-essential texinfo libtool libftdi-dev libusb-1.0-0-dev pkg-config&lt;br /&gt;
git clone https://github.com/raspberrypi/openocd.git --recursive --branch rp2040 --depth=1&lt;br /&gt;
cd openocd&lt;br /&gt;
./bootstrap&lt;br /&gt;
./configure --enable-ftdi --enable-sysfsgpio --enable-bcm2835gpio&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You can test if it was a success by running:&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
ubuntu@ubuntu:~$ openocd -v&lt;br /&gt;
Open On-Chip Debugger 0.11.0-g610f137-dirty (2022-06-07-00:39)&lt;br /&gt;
Licensed under GNU GPL v2&lt;br /&gt;
For bug reports, read&lt;br /&gt;
	http://openocd.org/doc/doxygen/bugs.html&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installing ROS and OpenMower==&lt;br /&gt;
We&#039;re using ROS Noetic for the OpenMower project. In this step we will install it, get the OpenMower sources, build the sources and create a basic configuration file for your mower.&lt;br /&gt;
&lt;br /&gt;
===Install ROS Noetic===&lt;br /&gt;
Since we&#039;re running Ubuntu 20.04 installing ROS is as easy as running the following commands:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Get the ROS apt repository&lt;br /&gt;
sudo sh -c &#039;echo &amp;quot;deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main&amp;quot; &amp;gt; /etc/apt/sources.list.d/ros-latest.list&#039;&lt;br /&gt;
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -&lt;br /&gt;
&lt;br /&gt;
# Install the ROS base system&lt;br /&gt;
sudo apt update&lt;br /&gt;
sudo apt install ros-noetic-ros-base&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;We only need to register the ROS installation in your &amp;lt;code&amp;gt;.bashrc&amp;lt;/code&amp;gt; file. This will enable you to call ROS specific commands from your terminal:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.bash&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Installing OpenMower Software===&lt;br /&gt;
Now we&#039;re finally able to install the OpenMower software. First, we&#039;re checking out the current version of the sources, then we&#039;re getting the dependencies and finally we&#039;re building the sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Clone the GitHub Repository:&lt;br /&gt;
git clone --recursive https://github.com/ClemensElflein/open_mower_ros.git&lt;br /&gt;
&lt;br /&gt;
# Get rosdep, only needed once&lt;br /&gt;
sudo apt install python3-rosdep&lt;br /&gt;
sudo rosdep init&lt;br /&gt;
rosdep update&lt;br /&gt;
&lt;br /&gt;
# Get the dependencies using rosdep&lt;br /&gt;
cd open_mower_ros/&lt;br /&gt;
rosdep install --from-paths src --ignore-packages-from-source --default-yes&lt;br /&gt;
&lt;br /&gt;
# set the default boot behavior to cli and disable unnecessary services cause some ros dependencie installs a basic desktop&lt;br /&gt;
sudo systemctl set-default multi-user&lt;br /&gt;
sudo systemctl stop --force bluetooth&lt;br /&gt;
sudo systemctl disable --now bluetooth&lt;br /&gt;
sudo systemctl mask --now bluetooth&lt;br /&gt;
&lt;br /&gt;
# Finally, build the sources. This will take a while! &lt;br /&gt;
catkin_make -j1 # on 2GB Pi with SWAP - this takes at least 30min&lt;br /&gt;
# OR&lt;br /&gt;
catkin_make -j2 # on 4/8GB Pi - this takes at least 20min&lt;br /&gt;
&lt;br /&gt;
# Copy the default configuration file to your home directory&lt;br /&gt;
cp ~/open_mower_ros/src/open_mower/config/mower_config.sh.example ~/mower_config.sh&lt;br /&gt;
&lt;br /&gt;
# The next step is to also source the OpenMower ROS install&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;At this point the OpenMower software is successfully installed! You will need to configure the OpenMower software and then you&#039;re finally ready to mow.&lt;br /&gt;
&lt;br /&gt;
== Some Additional Issues==&lt;br /&gt;
&lt;br /&gt;
===I&#039;m using an external WiFi dongle for better coverage, but sometimes it doesn&#039;t work===&lt;br /&gt;
It seems that the Ubuntu sometimes puts external WiFi dongles to sleep. To prevent this, we create a service which disables powersave:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Enter this to create the service&lt;br /&gt;
sudo systemctl --full --force edit wifi_powersave@.service&lt;br /&gt;
&lt;br /&gt;
# Paste the following:&lt;br /&gt;
[Unit]&lt;br /&gt;
Description=Set WiFi power save %i&lt;br /&gt;
After=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
Type=oneshot&lt;br /&gt;
RemainAfterExit=yes&lt;br /&gt;
ExecStart=/sbin/iw dev wlan1 set power_save %i&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
# Save and exit, then activate using:&lt;br /&gt;
sudo systemctl disable wifi_powersave@on.service&lt;br /&gt;
sudo systemctl enable wifi_powersave@off.service&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>
	</entry>
	<entry>
		<id>https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=290</id>
		<title>OLD Bare Metal System Image</title>
		<link rel="alternate" type="text/html" href="https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=290"/>
		<updated>2022-08-14T13:05:19Z</updated>

		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page will guide you through the steps to install a basic system image.&lt;br /&gt;
&lt;br /&gt;
On this image you will have the ROS base system, the OpenMower installation, local configuration for your mower and some tools to help you work with the mower.&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
In order to follow this guide, you will need the following:&lt;br /&gt;
&lt;br /&gt;
#A Raspberry Pi 4 (4GB or more recommended, [[System Image#Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM)|2GB works with swap, see here]])&lt;br /&gt;
#An SD card&lt;br /&gt;
#A soldered OpenMower mainboard&lt;br /&gt;
&lt;br /&gt;
==Installing the Base System==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;&#039;&#039;&#039;There is also a YouTube video explaining the steps in this section:&#039;&#039;&#039; https://youtu.be/_bImqD-pQSA?t=562&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Flashing Ubuntu to SD Card ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first step is to install the base system. We&#039;re using Ubuntu 20.04 Server for the Raspberry Pi. This is, because this image gives us best support ROS Noetic.&lt;br /&gt;
&lt;br /&gt;
Installing the base image is easy:&lt;br /&gt;
&lt;br /&gt;
#[https://www.raspberrypi.com/software/ Get the Raspberry Pi Imager software]&lt;br /&gt;
#Select the correct operating system:  &#039;&#039;Other-general-purpose OS &amp;gt; Ubuntu &amp;gt; Ubuntu Server 20.04.4 LTS (RPI 3/4/400) 64-bit&#039;&#039;&lt;br /&gt;
#Insert your SD card into your PC and select it in the &#039;&#039;Storage&#039;&#039; part of the software&lt;br /&gt;
#Click &#039;&#039;write&#039;&#039; and wait for the process to finish&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have successfully flashed your image, remove the SD for your PC &#039;&#039;&#039;and reinsert it again.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Then replace the &amp;lt;code&amp;gt;/boot/config.txt&amp;lt;/code&amp;gt; file with the one provided here: [https://github.com/ClemensElflein/OpenMower/blob/main/configs/RaspberryPiConfig/config.txt]&lt;br /&gt;
&lt;br /&gt;
This will enable all hardware serial ports on the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can theoretically configure networking in this step as well, but I&#039;m not recommending it. This is, because the networking information file gets only copied once and if you have an error it won&#039;t work.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;We need an interactive terminal in the next step anyways.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have done this step, you can eject the SD card and plug it into your Raspberry Pi 4.&lt;br /&gt;
&lt;br /&gt;
=== Opening a Serial Terminal ===&lt;br /&gt;
[[File:SerialRedirect.png|thumb|Serial Terminal: minicom -D /dev/ttyACM0]]&lt;br /&gt;
This step is needed for the following sections. The goal is to have a serial terminal to do basic config (networking etc) easily.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The easiest way of doing so is:&lt;br /&gt;
# Flash the SerialRedirect firmware into your Pico. Get it here: https://github.com/ClemensElflein/OpenMower/tree/main/Firmware/SerialRedirect/bin&lt;br /&gt;
# Provide your mainboard with power&lt;br /&gt;
# Plug your Pico into a computer. A virtual COM port should appear&lt;br /&gt;
# Connect to the COM port (I&#039;m using minicom, see image on the right), then press enter to start the Raspberry Pi.&lt;br /&gt;
#The Pi boots and a serial terminal will appear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you can login with the default credentials:&lt;br /&gt;
&lt;br /&gt;
username: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
password: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that you will need to change the password immediately.&lt;br /&gt;
&lt;br /&gt;
=== Disable Boot Interrupt ===&lt;br /&gt;
[[File:Image.png|thumb|Commands needed to disable boot interrupt on serial input.]]&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi boot loader will interrupt the boot sequence if data is sent through the main serial port of the Raspberry Pi. Since we&#039;re connecting &amp;quot;nosiy&amp;quot; hardware to the port, this will always interrupt the boot sequence and we need to disable this feature. &lt;br /&gt;
&lt;br /&gt;
In order to do this, reboot the Pi (sudo reboot) and send anything during the count-down in the bootloader (check the YouTube video linked above, if you&#039;re not sure).&lt;br /&gt;
&lt;br /&gt;
Then enter the following commands into the bootloader prompt:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
setenv bootdelay -2&lt;br /&gt;
saveenv&lt;br /&gt;
reset&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The Pi should reboot and the count-down should be gone.&lt;br /&gt;
&lt;br /&gt;
=== Some Settings ===&lt;br /&gt;
&lt;br /&gt;
[TODO/WIP]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are some miscellaneous settings I think are a good idea for an OpenMower install:&lt;br /&gt;
&lt;br /&gt;
* Remove the unnecessary snap system: &amp;lt;code&amp;gt;sudo snap remove --purge lxd &amp;amp;&amp;amp; sudo snap remove --purge core20 &amp;amp;&amp;amp; sudo snap remove --purge snapd &amp;amp;&amp;amp; sudo apt purge --autoremove snapd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Disable unattended upgrades: &amp;lt;code&amp;gt;sudo systemctl stop --force unattended-upgrades &amp;amp;&amp;amp; sudo systemctl disable unattended-upgrades &amp;amp;&amp;amp; sudo systemctl mask unattended-upgrades&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* I like to add the following to &amp;lt;code&amp;gt;cmdline.txt&amp;lt;/code&amp;gt; in order to fsck on boot:  &amp;lt;code&amp;gt;fsck.mode=force fsck.repair=yes&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* I prefer to use a static IP (If you use the [[System_Image#Installing_a_WiFi_Hot-Spot_(optional,_but_recommended)|recommend WiFi Hot-Spot]] use &amp;lt;code&amp;gt;sudo nmtui&amp;lt;/code&amp;gt; to configure a static IP)&lt;br /&gt;
&lt;br /&gt;
* If you like to have a terminal wifi scanner/signal monitor just install &amp;lt;code&amp;gt;sudo apt install wavemon&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you like you can change the timezone: &amp;lt;code&amp;gt;sudo timedatectl set-timezone Region/Location&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;sudo dpkg-reconfigure tzdata&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you ever like to plug a keyboard into the Pi don&#039;t forget to change the keymap: &amp;lt;code&amp;gt;sudo dpkg-reconfigure keyboard-configuration&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM)===&lt;br /&gt;
Compiling the OpenMower software will need more than 2GB of RAM. In order to still do this on a Pi with &amp;lt;= 2GB of RAM, we will add a 2GB swap file to the system by entering the following commands:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Create a new 2GB swap file&lt;br /&gt;
sudo fallocate -l 2G /swapfile&lt;br /&gt;
# Change permissions, so that only root can read and write&lt;br /&gt;
sudo chmod 600 /swapfile&lt;br /&gt;
# Create swap space in the file&lt;br /&gt;
sudo mkswap /swapfile&lt;br /&gt;
# Add it to the fstab&lt;br /&gt;
echo &#039;/swapfile swap swap defaults 0 0&#039; | sudo tee -a /etc/fstab /swapfile swap swap defaults 0 0&lt;br /&gt;
# Reboot to activate&lt;br /&gt;
sudo reboot&lt;br /&gt;
&lt;br /&gt;
# Check if it&#039;s activated&lt;br /&gt;
sudo swapon --show&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Installing a WiFi Hot-Spot (optional, but recommended)===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Since we will be configuring the WiFi interface, make sure that you have connected Etherent to your Raspberry Pi for this step.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As soon as you have closed your mower&#039;s enclosure, you won&#039;t have physical access to your Raspberry Pi anymore. If for some reason it&#039;s unable to connect to your WiFi (e.g. you have changed your password), you would need to open the case to get access to the SD card or Ethernet port on the Pi to regain access.&lt;br /&gt;
&lt;br /&gt;
To prevent this, we&#039;re going to install a hot-spot software which helps you to connect to WiFi by opening a hot-spot each time the Pi cannot connect to a known WiFi connection.&lt;br /&gt;
&lt;br /&gt;
Now is the best time to do this, because we have a serial terminal anyways and can mess with the network interfaces without shutting us out of the system!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Just use the following commands for this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# If dpkg throws an error like&lt;br /&gt;
#   dpkg: error processing package ... (--install):&lt;br /&gt;
#   dependency problems - leaving unconfigured&lt;br /&gt;
# you need some dependencies, correct them by running:&lt;br /&gt;
sudo apt install -f&lt;br /&gt;
&lt;br /&gt;
# We need to disable systemd-resolveds caching DNS stub resolver&lt;br /&gt;
# if you want to know why check: https://github.com/pi-hole/docker-pi-hole/#installing-on-ubuntu&lt;br /&gt;
sudo sed -r -i.orig &#039;s/#?DNSStubListener=yes/DNSStubListener=no/g&#039; /etc/systemd/resolved.conf&lt;br /&gt;
sudo systemctl restart systemd-resolved.service&lt;br /&gt;
&lt;br /&gt;
ping ntp.org&lt;br /&gt;
# This will throw an dns error:&lt;br /&gt;
#   ping: ntp.org: Temporary failure in name resolution&lt;br /&gt;
sudo sh -c &#039;rm /etc/resolv.conf &amp;amp;&amp;amp; ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf&#039;&lt;br /&gt;
sudo systemctl restart systemd-resolved.service&lt;br /&gt;
nslookup ntp.org&lt;br /&gt;
# DNS should work now&lt;br /&gt;
&lt;br /&gt;
# Install comitup using the latest version from the projects repo&lt;br /&gt;
wget https://davesteele.github.io/comitup/latest/davesteele-comitup-apt-source_latest.deb&lt;br /&gt;
sudo dpkg -i --force-all davesteele-comitup-apt-source_latest.deb&lt;br /&gt;
rm davesteele-comitup-apt-source_latest.deb&lt;br /&gt;
sudo apt update&lt;br /&gt;
sudo apt install comitup&lt;br /&gt;
&lt;br /&gt;
sudo systemctl stop comitup&lt;br /&gt;
# Now use network-manager to:&lt;br /&gt;
# - add you wifi network&lt;br /&gt;
# optional:&lt;br /&gt;
# - change your hostname&lt;br /&gt;
# - add a dhcp ethernet connection without any device assigned&lt;br /&gt;
# (if even the hotspot malfunctions you can plug in a usb ethernet adapter)&lt;br /&gt;
sudo nmtui&lt;br /&gt;
&lt;br /&gt;
# Edit comitup.conf to change the wifi name and password (I use OpenMower-&amp;lt;nn&amp;gt;)&lt;br /&gt;
sudo nano /etc/comitup.conf&lt;br /&gt;
sudo systemctl restart comitup&lt;br /&gt;
# reboot - it should work now&lt;br /&gt;
sudo reboot&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable Serial Console===&lt;br /&gt;
Now that we have setup the network and can access the Pi even if our WiFi is not in range, we need to disable that serial console so that we can use the serial port for hardware.&lt;br /&gt;
&lt;br /&gt;
To do this, enter: &amp;lt;code&amp;gt;sudo nano /boot/firmware/cmdline.txt&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and remove the &amp;lt;code&amp;gt;console=serial0,115200&amp;lt;/code&amp;gt; part of the line.&lt;br /&gt;
&lt;br /&gt;
Save the file and reboot. You should still see the bootloader output, but no serial output after that.&lt;br /&gt;
&lt;br /&gt;
==Installing Tools==&lt;br /&gt;
If you&#039;re happy with your basic Ubuntu setup, it&#039;s time to install some tools required for the OpenMower&lt;br /&gt;
&lt;br /&gt;
=== General Dependencies ===&lt;br /&gt;
Just install them with apt:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install build-essential git&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===STR2STR (optional, recommended; only needed if you&#039;re using NTRIP, so probably most of you)===&lt;br /&gt;
We need a newer version than the one available in apt, so install it from source:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install gfortran&lt;br /&gt;
git clone https://github.com/rtklibexplorer/RTKLIB&lt;br /&gt;
cd RTKLIB&lt;br /&gt;
git checkout tags/b34c&lt;br /&gt;
cd app/consapp/&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You should now be able to run str2str from anywhere.&lt;br /&gt;
&lt;br /&gt;
=== OpenOCD (optional, recommended; only needed if you want to flash Pico from Raspberry Pi)===&lt;br /&gt;
We need to get the OpenOCD version from the Raspberry Pi foundation, because the &amp;quot;original&amp;quot; one doesn&#039;t have the Pico support built in yet.&lt;br /&gt;
&lt;br /&gt;
Install it from source:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install automake autoconf build-essential texinfo libtool libftdi-dev libusb-1.0-0-dev pkg-config&lt;br /&gt;
git clone https://github.com/raspberrypi/openocd.git --recursive --branch rp2040 --depth=1&lt;br /&gt;
cd openocd&lt;br /&gt;
./bootstrap&lt;br /&gt;
./configure --enable-ftdi --enable-sysfsgpio --enable-bcm2835gpio&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You can test if it was a success by running:&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
ubuntu@ubuntu:~$ openocd -v&lt;br /&gt;
Open On-Chip Debugger 0.11.0-g610f137-dirty (2022-06-07-00:39)&lt;br /&gt;
Licensed under GNU GPL v2&lt;br /&gt;
For bug reports, read&lt;br /&gt;
	http://openocd.org/doc/doxygen/bugs.html&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installing ROS and OpenMower==&lt;br /&gt;
We&#039;re using ROS Noetic for the OpenMower project. In this step we will install it, get the OpenMower sources, build the sources and create a basic configuration file for your mower.&lt;br /&gt;
&lt;br /&gt;
===Install ROS Noetic===&lt;br /&gt;
Since we&#039;re running Ubuntu 20.04 installing ROS is as easy as running the following commands:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Get the ROS apt repository&lt;br /&gt;
sudo sh -c &#039;echo &amp;quot;deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main&amp;quot; &amp;gt; /etc/apt/sources.list.d/ros-latest.list&#039;&lt;br /&gt;
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -&lt;br /&gt;
&lt;br /&gt;
# Install the ROS base system&lt;br /&gt;
sudo apt update&lt;br /&gt;
sudo apt install ros-noetic-ros-base&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;We only need to register the ROS installation in your &amp;lt;code&amp;gt;.bashrc&amp;lt;/code&amp;gt; file. This will enable you to call ROS specific commands from your terminal:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.bash&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Installing OpenMower Software===&lt;br /&gt;
Now we&#039;re finally able to install the OpenMower software. First, we&#039;re checking out the current version of the sources, then we&#039;re getting the dependencies and finally we&#039;re building the sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Clone the GitHub Repository:&lt;br /&gt;
git clone --recursive https://github.com/ClemensElflein/open_mower_ros.git&lt;br /&gt;
&lt;br /&gt;
# Get rosdep, only needed once&lt;br /&gt;
sudo apt install python3-rosdep&lt;br /&gt;
sudo rosdep init&lt;br /&gt;
rosdep update&lt;br /&gt;
&lt;br /&gt;
# Get the dependencies using rosdep&lt;br /&gt;
cd open_mower_ros/&lt;br /&gt;
rosdep install --from-paths src --ignore-packages-from-source --default-yes&lt;br /&gt;
&lt;br /&gt;
# set the default boot behavior to cli and disable unnecessary services cause some ros dependencie installs a basic desktop&lt;br /&gt;
sudo systemctl set-default multi-user&lt;br /&gt;
sudo systemctl stop --force bluetooth&lt;br /&gt;
sudo systemctl disable --now bluetooth&lt;br /&gt;
sudo systemctl mask --now bluetooth&lt;br /&gt;
&lt;br /&gt;
# Finally, build the sources. This will take a while! &lt;br /&gt;
catkin_make -j1 # on 2GB Pi with SWAP - this takes at least 30min&lt;br /&gt;
# OR&lt;br /&gt;
catkin_make -j2 # on 4/8GB Pi - this takes at least 20min&lt;br /&gt;
&lt;br /&gt;
# Copy the default configuration file to your home directory&lt;br /&gt;
cp open_mower_ros/src/open_mower/config/mower_config.sh.example ~/mower_config.sh&lt;br /&gt;
&lt;br /&gt;
# The next step is to also source the OpenMower ROS install&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;At this point the OpenMower software is successfully installed! You will need to configure the OpenMower software and then you&#039;re finally ready to mow.&lt;br /&gt;
&lt;br /&gt;
== Some Additional Issues==&lt;br /&gt;
&lt;br /&gt;
===I&#039;m using an external WiFi dongle for better coverage, but sometimes it doesn&#039;t work===&lt;br /&gt;
It seems that the Ubuntu sometimes puts external WiFi dongles to sleep. To prevent this, we create a service which disables powersave:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Enter this to create the service&lt;br /&gt;
sudo systemctl --full --force edit wifi_powersave@.service&lt;br /&gt;
&lt;br /&gt;
# Paste the following:&lt;br /&gt;
[Unit]&lt;br /&gt;
Description=Set WiFi power save %i&lt;br /&gt;
After=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
Type=oneshot&lt;br /&gt;
RemainAfterExit=yes&lt;br /&gt;
ExecStart=/sbin/iw dev wlan1 set power_save %i&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
# Save and exit, then activate using:&lt;br /&gt;
sudo systemctl disable wifi_powersave@on.service&lt;br /&gt;
sudo systemctl enable wifi_powersave@off.service&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>
	</entry>
	<entry>
		<id>https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=289</id>
		<title>OLD Bare Metal System Image</title>
		<link rel="alternate" type="text/html" href="https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=289"/>
		<updated>2022-08-12T20:17:18Z</updated>

		<summary type="html">&lt;p&gt;Potter-91: WiFi Hot-Spot - switch to comitup repo install method&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page will guide you through the steps to install a basic system image.&lt;br /&gt;
&lt;br /&gt;
On this image you will have the ROS base system, the OpenMower installation, local configuration for your mower and some tools to help you work with the mower.&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
In order to follow this guide, you will need the following:&lt;br /&gt;
&lt;br /&gt;
#A Raspberry Pi 4 (4GB or more recommended, [[System Image#Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM)|2GB works with swap, see here]])&lt;br /&gt;
#An SD card&lt;br /&gt;
#A soldered OpenMower mainboard&lt;br /&gt;
&lt;br /&gt;
==Installing the Base System==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;&#039;&#039;&#039;There is also a YouTube video explaining the steps in this section:&#039;&#039;&#039; https://youtu.be/_bImqD-pQSA?t=562&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Flashing Ubuntu to SD Card ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first step is to install the base system. We&#039;re using Ubuntu 20.04 Server for the Raspberry Pi. This is, because this image gives us best support ROS Noetic.&lt;br /&gt;
&lt;br /&gt;
Installing the base image is easy:&lt;br /&gt;
&lt;br /&gt;
#[https://www.raspberrypi.com/software/ Get the Raspberry Pi Imager software]&lt;br /&gt;
#Select the correct operating system:  &#039;&#039;Other-general-purpose OS &amp;gt; Ubuntu &amp;gt; Ubuntu Server 20.04.4 LTS (RPI 3/4/400) 64-bit&#039;&#039;&lt;br /&gt;
#Insert your SD card into your PC and select it in the &#039;&#039;Storage&#039;&#039; part of the software&lt;br /&gt;
#Click &#039;&#039;write&#039;&#039; and wait for the process to finish&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have successfully flashed your image, remove the SD for your PC &#039;&#039;&#039;and reinsert it again.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Then replace the &amp;lt;code&amp;gt;/boot/config.txt&amp;lt;/code&amp;gt; file with the one provided here: [https://github.com/ClemensElflein/OpenMower/blob/main/configs/RaspberryPiConfig/config.txt]&lt;br /&gt;
&lt;br /&gt;
This will enable all hardware serial ports on the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can theoretically configure networking in this step as well, but I&#039;m not recommending it. This is, because the networking information file gets only copied once and if you have an error it won&#039;t work.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;We need an interactive terminal in the next step anyways.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have done this step, you can eject the SD card and plug it into your Raspberry Pi 4.&lt;br /&gt;
&lt;br /&gt;
=== Opening a Serial Terminal ===&lt;br /&gt;
[[File:SerialRedirect.png|thumb|Serial Terminal: minicom -D /dev/ttyACM0]]&lt;br /&gt;
This step is needed for the following sections. The goal is to have a serial terminal to do basic config (networking etc) easily.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The easiest way of doing so is:&lt;br /&gt;
# Flash the SerialRedirect firmware into your Pico. Get it here: https://github.com/ClemensElflein/OpenMower/tree/main/Firmware/SerialRedirect/bin&lt;br /&gt;
# Provide your mainboard with power&lt;br /&gt;
# Plug your Pico into a computer. A virtual COM port should appear&lt;br /&gt;
# Connect to the COM port (I&#039;m using minicom, see image on the right), then press enter to start the Raspberry Pi.&lt;br /&gt;
#The Pi boots and a serial terminal will appear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you can login with the default credentials:&lt;br /&gt;
&lt;br /&gt;
username: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
password: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that you will need to change the password immediately.&lt;br /&gt;
&lt;br /&gt;
=== Disable Boot Interrupt ===&lt;br /&gt;
[[File:Image.png|thumb|Commands needed to disable boot interrupt on serial input.]]&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi boot loader will interrupt the boot sequence if data is sent through the main serial port of the Raspberry Pi. Since we&#039;re connecting &amp;quot;nosiy&amp;quot; hardware to the port, this will always interrupt the boot sequence and we need to disable this feature. &lt;br /&gt;
&lt;br /&gt;
In order to do this, reboot the Pi (sudo reboot) and send anything during the count-down in the bootloader (check the YouTube video linked above, if you&#039;re not sure).&lt;br /&gt;
&lt;br /&gt;
Then enter the following commands into the bootloader prompt:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
setenv bootdelay -2&lt;br /&gt;
saveenv&lt;br /&gt;
reset&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The Pi should reboot and the count-down should be gone.&lt;br /&gt;
&lt;br /&gt;
=== Some Settings ===&lt;br /&gt;
&lt;br /&gt;
[TODO/WIP]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are some miscellaneous settings I think are a good idea for an OpenMower install:&lt;br /&gt;
&lt;br /&gt;
* Remove the unnecessary snap system: &amp;lt;code&amp;gt;sudo snap remove --purge lxd &amp;amp;&amp;amp; sudo snap remove --purge core20 &amp;amp;&amp;amp; sudo snap remove --purge snapd &amp;amp;&amp;amp; sudo apt purge --autoremove snapd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Disable unattended upgrades: &amp;lt;code&amp;gt;sudo systemctl stop --force unattended-upgrades &amp;amp;&amp;amp; sudo systemctl disable unattended-upgrades &amp;amp;&amp;amp; sudo systemctl mask unattended-upgrades&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* I like to add the following to &amp;lt;code&amp;gt;cmdline.txt&amp;lt;/code&amp;gt; in order to fsck on boot:  &amp;lt;code&amp;gt;fsck.mode=force fsck.repair=yes&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* I prefer to use a static IP (If you use the [[System_Image#Installing_a_WiFi_Hot-Spot_(optional,_but_recommended)|recommend WiFi Hot-Spot]] use &amp;lt;code&amp;gt;sudo nmtui&amp;lt;/code&amp;gt; to configure a static IP)&lt;br /&gt;
&lt;br /&gt;
* If you like to have a terminal wifi scanner/signal monitor just install &amp;lt;code&amp;gt;sudo apt install wavemon&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you like you can change the timezone: &amp;lt;code&amp;gt;sudo timedatectl set-timezone Region/Location&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;sudo dpkg-reconfigure tzdata&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you ever like to plug a keyboard into the Pi don&#039;t forget to change the keymap: &amp;lt;code&amp;gt;sudo dpkg-reconfigure keyboard-configuration&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM)===&lt;br /&gt;
Compiling the OpenMower software will need more than 2GB of RAM. In order to still do this on a Pi with &amp;lt;= 2GB of RAM, we will add a 2GB swap file to the system by entering the following commands:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Create a new 2GB swap file&lt;br /&gt;
sudo fallocate -l 2G /swapfile&lt;br /&gt;
# Change permissions, so that only root can read and write&lt;br /&gt;
sudo chmod 600 /swapfile&lt;br /&gt;
# Create swap space in the file&lt;br /&gt;
sudo mkswap /swapfile&lt;br /&gt;
# Add it to the fstab&lt;br /&gt;
echo &#039;/swapfile swap swap defaults 0 0&#039; | sudo tee -a /etc/fstab /swapfile swap swap defaults 0 0&lt;br /&gt;
# Reboot to activate&lt;br /&gt;
sudo reboot&lt;br /&gt;
&lt;br /&gt;
# Check if it&#039;s activated&lt;br /&gt;
sudo swapon --show&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Installing a WiFi Hot-Spot (optional, but recommended)===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Since we will be configuring the WiFi interface, make sure that you have connected Etherent to your Raspberry Pi for this step.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As soon as you have closed your mower&#039;s enclosure, you won&#039;t have physical access to your Raspberry Pi anymore. If for some reason it&#039;s unable to connect to your WiFi (e.g. you have changed your password), you would need to open the case to get access to the SD card or Ethernet port on the Pi to regain access.&lt;br /&gt;
&lt;br /&gt;
To prevent this, we&#039;re going to install a hot-spot software which helps you to connect to WiFi by opening a hot-spot each time the Pi cannot connect to a known WiFi connection.&lt;br /&gt;
&lt;br /&gt;
Now is the best time to do this, because we have a serial terminal anyways and can mess with the network interfaces without shutting us out of the system!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Just use the following commands for this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# If dpkg throws an error like&lt;br /&gt;
#   dpkg: error processing package ... (--install):&lt;br /&gt;
#   dependency problems - leaving unconfigured&lt;br /&gt;
# you need some dependencies, correct them by running:&lt;br /&gt;
sudo apt install -f&lt;br /&gt;
&lt;br /&gt;
# We need to disable systemd-resolveds caching DNS stub resolver&lt;br /&gt;
# if you want to know why check: https://github.com/pi-hole/docker-pi-hole/#installing-on-ubuntu&lt;br /&gt;
sudo sed -r -i.orig &#039;s/#?DNSStubListener=yes/DNSStubListener=no/g&#039; /etc/systemd/resolved.conf&lt;br /&gt;
sudo systemctl restart systemd-resolved.service&lt;br /&gt;
&lt;br /&gt;
ping ntp.org&lt;br /&gt;
# This will throw an dns error:&lt;br /&gt;
#   ping: ntp.org: Temporary failure in name resolution&lt;br /&gt;
sudo sh -c &#039;rm /etc/resolv.conf &amp;amp;&amp;amp; ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf&#039;&lt;br /&gt;
sudo systemctl restart systemd-resolved.service&lt;br /&gt;
nslookup ntp.org&lt;br /&gt;
# DNS should work now&lt;br /&gt;
&lt;br /&gt;
# Install comitup using the latest version from the projects repo&lt;br /&gt;
wget https://davesteele.github.io/comitup/latest/davesteele-comitup-apt-source_latest.deb&lt;br /&gt;
sudo dpkg -i --force-all davesteele-comitup-apt-source_latest.deb&lt;br /&gt;
rm davesteele-comitup-apt-source_latest.deb&lt;br /&gt;
sudo apt update&lt;br /&gt;
sudo apt install comitup&lt;br /&gt;
&lt;br /&gt;
sudo systemctl stop comitup&lt;br /&gt;
# Now use network-manager to:&lt;br /&gt;
# - add you wifi network&lt;br /&gt;
# optional:&lt;br /&gt;
# - change your hostname&lt;br /&gt;
# - add a dhcp ethernet connection without any device assigned&lt;br /&gt;
# (if even the hotspot malfunctions you can plug in a usb ethernet adapter)&lt;br /&gt;
sudo nmtui&lt;br /&gt;
&lt;br /&gt;
# Edit comitup.conf to change the wifi name and password (I use OpenMower-&amp;lt;nn&amp;gt;)&lt;br /&gt;
sudo nano /etc/comitup.conf&lt;br /&gt;
sudo systemctl restart comitup&lt;br /&gt;
# reboot - it should work now&lt;br /&gt;
sudo reboot&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable Serial Console===&lt;br /&gt;
Now that we have setup the network and can access the Pi even if our WiFi is not in range, we need to disable that serial console so that we can use the serial port for hardware.&lt;br /&gt;
&lt;br /&gt;
To do this, enter: &amp;lt;code&amp;gt;sudo nano /boot/firmware/cmdline.txt&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and remove the &amp;lt;code&amp;gt;console=serial0,115200&amp;lt;/code&amp;gt; part of the line.&lt;br /&gt;
&lt;br /&gt;
Save the file and reboot. You should still see the bootloader output, but no serial output after that.&lt;br /&gt;
&lt;br /&gt;
==Installing Tools==&lt;br /&gt;
If you&#039;re happy with your basic Ubuntu setup, it&#039;s time to install some tools required for the OpenMower&lt;br /&gt;
&lt;br /&gt;
=== General Dependencies ===&lt;br /&gt;
Just install them with apt:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install build-essential git&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===STR2STR (optional, recommended; only needed if you&#039;re using NTRIP, so probably most of you)===&lt;br /&gt;
We need a newer version than the one available in apt, so install it from source:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install gfortran&lt;br /&gt;
git clone https://github.com/rtklibexplorer/RTKLIB&lt;br /&gt;
cd RTKLIB&lt;br /&gt;
git checkout tags/b34c&lt;br /&gt;
cd app/consapp/&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You should now be able to run str2str from anywhere.&lt;br /&gt;
&lt;br /&gt;
=== OpenOCD (optional, recommended; only needed if you want to flash Pico from Raspberry Pi)===&lt;br /&gt;
We need to get the OpenOCD version from the Raspberry Pi foundation, because the &amp;quot;original&amp;quot; one doesn&#039;t have the Pico support built in yet.&lt;br /&gt;
&lt;br /&gt;
Install it from source:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install automake autoconf build-essential texinfo libtool libftdi-dev libusb-1.0-0-dev pkg-config&lt;br /&gt;
git clone https://github.com/raspberrypi/openocd.git --recursive --branch rp2040 --depth=1&lt;br /&gt;
cd openocd&lt;br /&gt;
./bootstrap&lt;br /&gt;
./configure --enable-ftdi --enable-sysfsgpio --enable-bcm2835gpio&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You can test if it was a success by running:&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
ubuntu@ubuntu:~$ openocd -v&lt;br /&gt;
Open On-Chip Debugger 0.11.0-g610f137-dirty (2022-06-07-00:39)&lt;br /&gt;
Licensed under GNU GPL v2&lt;br /&gt;
For bug reports, read&lt;br /&gt;
	http://openocd.org/doc/doxygen/bugs.html&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installing ROS and OpenMower==&lt;br /&gt;
We&#039;re using ROS Noetic for the OpenMower project. In this step we will install it, get the OpenMower sources, build the sources and create a basic configuration file for your mower.&lt;br /&gt;
&lt;br /&gt;
===Install ROS Noetic===&lt;br /&gt;
Since we&#039;re running Ubuntu 20.04 installing ROS is as easy as running the following commands:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Get the ROS apt repository&lt;br /&gt;
sudo sh -c &#039;echo &amp;quot;deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main&amp;quot; &amp;gt; /etc/apt/sources.list.d/ros-latest.list&#039;&lt;br /&gt;
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -&lt;br /&gt;
&lt;br /&gt;
# Install the ROS base system&lt;br /&gt;
sudo apt update&lt;br /&gt;
sudo apt install ros-noetic-ros-base&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;We only need to register the ROS installation in your &amp;lt;code&amp;gt;.bashrc&amp;lt;/code&amp;gt; file. This will enable you to call ROS specific commands from your terminal:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.bash&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Installing OpenMower Software===&lt;br /&gt;
Now we&#039;re finally able to install the OpenMower software. First, we&#039;re checking out the current version of the sources, then we&#039;re getting the dependencies and finally we&#039;re building the sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Clone the GitHub Repository:&lt;br /&gt;
git clone --recursive https://github.com/ClemensElflein/open_mower_ros.git&lt;br /&gt;
&lt;br /&gt;
# Get rosdep, only needed once&lt;br /&gt;
sudo apt install python3-rosdep&lt;br /&gt;
sudo rosdep init&lt;br /&gt;
rosdep update&lt;br /&gt;
&lt;br /&gt;
# Get the dependencies using rosdep&lt;br /&gt;
cd open_mower_ros/&lt;br /&gt;
rosdep install --from-paths src --ignore-src --default-yes&lt;br /&gt;
&lt;br /&gt;
# set the default boot behavior to cli and disable unnecessary services cause some ros dependencie installs a basic desktop&lt;br /&gt;
sudo systemctl set-default multi-user&lt;br /&gt;
sudo systemctl stop --force bluetooth&lt;br /&gt;
sudo systemctl disable --now bluetooth&lt;br /&gt;
sudo systemctl mask --now bluetooth&lt;br /&gt;
&lt;br /&gt;
# Finally, build the sources. This will take a while! &lt;br /&gt;
catkin_make -j1 # on 2GB Pi with SWAP - this takes at least 30min&lt;br /&gt;
# OR&lt;br /&gt;
catkin_make -j2 # on 4/8GB Pi - this takes at least 20min&lt;br /&gt;
&lt;br /&gt;
# Copy the default configuration file to your home directory&lt;br /&gt;
cp open_mower_ros/src/open_mower/config/mower_config.sh.example ~/mower_config.sh&lt;br /&gt;
&lt;br /&gt;
# The next step is to also source the OpenMower ROS install&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;At this point the OpenMower software is successfully installed! You will need to configure the OpenMower software and then you&#039;re finally ready to mow.&lt;br /&gt;
&lt;br /&gt;
== Some Additional Issues==&lt;br /&gt;
&lt;br /&gt;
===I&#039;m using an external WiFi dongle for better coverage, but sometimes it doesn&#039;t work===&lt;br /&gt;
It seems that the Ubuntu sometimes puts external WiFi dongles to sleep. To prevent this, we create a service which disables powersave:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Enter this to create the service&lt;br /&gt;
sudo systemctl --full --force edit wifi_powersave@.service&lt;br /&gt;
&lt;br /&gt;
# Paste the following:&lt;br /&gt;
[Unit]&lt;br /&gt;
Description=Set WiFi power save %i&lt;br /&gt;
After=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
Type=oneshot&lt;br /&gt;
RemainAfterExit=yes&lt;br /&gt;
ExecStart=/sbin/iw dev wlan1 set power_save %i&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
# Save and exit, then activate using:&lt;br /&gt;
sudo systemctl disable wifi_powersave@on.service&lt;br /&gt;
sudo systemctl enable wifi_powersave@off.service&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>
	</entry>
	<entry>
		<id>https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=288</id>
		<title>OLD Bare Metal System Image</title>
		<link rel="alternate" type="text/html" href="https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=288"/>
		<updated>2022-08-12T10:35:57Z</updated>

		<summary type="html">&lt;p&gt;Potter-91: /* Installing a WiFi Hot-Spot (optional, but recommended) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page will guide you through the steps to install a basic system image.&lt;br /&gt;
&lt;br /&gt;
On this image you will have the ROS base system, the OpenMower installation, local configuration for your mower and some tools to help you work with the mower.&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
In order to follow this guide, you will need the following:&lt;br /&gt;
&lt;br /&gt;
#A Raspberry Pi 4 (4GB or more recommended, [[System Image#Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM)|2GB works with swap, see here]])&lt;br /&gt;
#An SD card&lt;br /&gt;
#A soldered OpenMower mainboard&lt;br /&gt;
&lt;br /&gt;
==Installing the Base System==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;&#039;&#039;&#039;There is also a YouTube video explaining the steps in this section:&#039;&#039;&#039; https://youtu.be/_bImqD-pQSA?t=562&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Flashing Ubuntu to SD Card ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first step is to install the base system. We&#039;re using Ubuntu 20.04 Server for the Raspberry Pi. This is, because this image gives us best support ROS Noetic.&lt;br /&gt;
&lt;br /&gt;
Installing the base image is easy:&lt;br /&gt;
&lt;br /&gt;
#[https://www.raspberrypi.com/software/ Get the Raspberry Pi Imager software]&lt;br /&gt;
#Select the correct operating system:  &#039;&#039;Other-general-purpose OS &amp;gt; Ubuntu &amp;gt; Ubuntu Server 20.04.4 LTS (RPI 3/4/400) 64-bit&#039;&#039;&lt;br /&gt;
#Insert your SD card into your PC and select it in the &#039;&#039;Storage&#039;&#039; part of the software&lt;br /&gt;
#Click &#039;&#039;write&#039;&#039; and wait for the process to finish&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have successfully flashed your image, remove the SD for your PC &#039;&#039;&#039;and reinsert it again.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Then replace the &amp;lt;code&amp;gt;/boot/config.txt&amp;lt;/code&amp;gt; file with the one provided here: [https://github.com/ClemensElflein/OpenMower/blob/main/configs/RaspberryPiConfig/config.txt]&lt;br /&gt;
&lt;br /&gt;
This will enable all hardware serial ports on the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can theoretically configure networking in this step as well, but I&#039;m not recommending it. This is, because the networking information file gets only copied once and if you have an error it won&#039;t work.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;We need an interactive terminal in the next step anyways.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have done this step, you can eject the SD card and plug it into your Raspberry Pi 4.&lt;br /&gt;
&lt;br /&gt;
=== Opening a Serial Terminal ===&lt;br /&gt;
[[File:SerialRedirect.png|thumb|Serial Terminal: minicom -D /dev/ttyACM0]]&lt;br /&gt;
This step is needed for the following sections. The goal is to have a serial terminal to do basic config (networking etc) easily.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The easiest way of doing so is:&lt;br /&gt;
# Flash the SerialRedirect firmware into your Pico. Get it here: https://github.com/ClemensElflein/OpenMower/tree/main/Firmware/SerialRedirect/bin&lt;br /&gt;
# Provide your mainboard with power&lt;br /&gt;
# Plug your Pico into a computer. A virtual COM port should appear&lt;br /&gt;
# Connect to the COM port (I&#039;m using minicom, see image on the right), then press enter to start the Raspberry Pi.&lt;br /&gt;
#The Pi boots and a serial terminal will appear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you can login with the default credentials:&lt;br /&gt;
&lt;br /&gt;
username: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
password: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that you will need to change the password immediately.&lt;br /&gt;
&lt;br /&gt;
=== Disable Boot Interrupt ===&lt;br /&gt;
[[File:Image.png|thumb|Commands needed to disable boot interrupt on serial input.]]&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi boot loader will interrupt the boot sequence if data is sent through the main serial port of the Raspberry Pi. Since we&#039;re connecting &amp;quot;nosiy&amp;quot; hardware to the port, this will always interrupt the boot sequence and we need to disable this feature. &lt;br /&gt;
&lt;br /&gt;
In order to do this, reboot the Pi (sudo reboot) and send anything during the count-down in the bootloader (check the YouTube video linked above, if you&#039;re not sure).&lt;br /&gt;
&lt;br /&gt;
Then enter the following commands into the bootloader prompt:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
setenv bootdelay -2&lt;br /&gt;
saveenv&lt;br /&gt;
reset&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The Pi should reboot and the count-down should be gone.&lt;br /&gt;
&lt;br /&gt;
=== Some Settings ===&lt;br /&gt;
&lt;br /&gt;
[TODO/WIP]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are some miscellaneous settings I think are a good idea for an OpenMower install:&lt;br /&gt;
&lt;br /&gt;
* Remove the unnecessary snap system: &amp;lt;code&amp;gt;sudo snap remove --purge lxd &amp;amp;&amp;amp; sudo snap remove --purge core20 &amp;amp;&amp;amp; sudo snap remove --purge snapd &amp;amp;&amp;amp; sudo apt purge --autoremove snapd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Disable unattended upgrades: &amp;lt;code&amp;gt;sudo systemctl stop --force unattended-upgrades &amp;amp;&amp;amp; sudo systemctl disable unattended-upgrades &amp;amp;&amp;amp; sudo systemctl mask unattended-upgrades&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* I like to add the following to &amp;lt;code&amp;gt;cmdline.txt&amp;lt;/code&amp;gt; in order to fsck on boot:  &amp;lt;code&amp;gt;fsck.mode=force fsck.repair=yes&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* I prefer to use a static IP (If you use the [[System_Image#Installing_a_WiFi_Hot-Spot_(optional,_but_recommended)|recommend WiFi Hot-Spot]] use &amp;lt;code&amp;gt;sudo nmtui&amp;lt;/code&amp;gt; to configure a static IP)&lt;br /&gt;
&lt;br /&gt;
* If you like to have a terminal wifi scanner/signal monitor just install &amp;lt;code&amp;gt;sudo apt install wavemon&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you like you can change the timezone: &amp;lt;code&amp;gt;sudo timedatectl set-timezone Region/Location&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;sudo dpkg-reconfigure tzdata&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you ever like to plug a keyboard into the Pi don&#039;t forget to change the keymap: &amp;lt;code&amp;gt;sudo dpkg-reconfigure keyboard-configuration&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM)===&lt;br /&gt;
Compiling the OpenMower software will need more than 2GB of RAM. In order to still do this on a Pi with &amp;lt;= 2GB of RAM, we will add a 2GB swap file to the system by entering the following commands:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Create a new 2GB swap file&lt;br /&gt;
sudo fallocate -l 2G /swapfile&lt;br /&gt;
# Change permissions, so that only root can read and write&lt;br /&gt;
sudo chmod 600 /swapfile&lt;br /&gt;
# Create swap space in the file&lt;br /&gt;
sudo mkswap /swapfile&lt;br /&gt;
# Add it to the fstab&lt;br /&gt;
echo &#039;/swapfile swap swap defaults 0 0&#039; | sudo tee -a /etc/fstab /swapfile swap swap defaults 0 0&lt;br /&gt;
# Reboot to activate&lt;br /&gt;
sudo reboot&lt;br /&gt;
&lt;br /&gt;
# Check if it&#039;s activated&lt;br /&gt;
sudo swapon --show&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Installing a WiFi Hot-Spot (optional, but recommended)===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Since we will be configuring the WiFi interface, make sure that you have connected Etherent to your Raspberry Pi for this step.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As soon as you have closed your mower&#039;s enclosure, you won&#039;t have physical access to your Raspberry Pi anymore. If for some reason it&#039;s unable to connect to your WiFi (e.g. you have changed your password), you would need to open the case to get access to the SD card or Ethernet port on the Pi to regain access.&lt;br /&gt;
&lt;br /&gt;
To prevent this, we&#039;re going to install a hot-spot software which helps you to connect to WiFi by opening a hot-spot each time the Pi cannot connect to a known WiFi connection.&lt;br /&gt;
&lt;br /&gt;
Now is the best time to do this, because we have a serial terminal anyways and can mess with the network interfaces without shutting us out of the system!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Just use the following commands for this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# If dpkg throws an error like&lt;br /&gt;
#   dpkg: error processing package ... (--install):&lt;br /&gt;
#   dependency problems - leaving unconfigured&lt;br /&gt;
# you need some dependencies, correct them by running:&lt;br /&gt;
sudo apt install -f&lt;br /&gt;
&lt;br /&gt;
# We need to get a patched version of the network manager for this. Check here if there is a newer version available:&lt;br /&gt;
# https://davesteele.github.io/comitup/latest/python3-networkmanager_latest.html&lt;br /&gt;
wget https://davesteele.github.io/comitup/deb/python3-networkmanager_2.2-1dss02_all.deb&lt;br /&gt;
sudo dpkg -i python3-networkmanager_2.2-1dss02_all.deb&lt;br /&gt;
rm python3-networkmanager_2.2-1dss02_all.deb&lt;br /&gt;
# we need to disable systemd-resolveds caching DNS stub resolver&lt;br /&gt;
# if you want to know why check: https://github.com/pi-hole/docker-pi-hole/#installing-on-ubuntu&lt;br /&gt;
sudo sed -r -i.orig &#039;s/#?DNSStubListener=yes/DNSStubListener=no/g&#039; /etc/systemd/resolved.conf&lt;br /&gt;
sudo systemctl restart systemd-resolved.service&lt;br /&gt;
&lt;br /&gt;
ping ntp.org&lt;br /&gt;
# this will throw an dns error:&lt;br /&gt;
#   ping: ntp.org: Temporary failure in name resolution&lt;br /&gt;
sudo sh -c &#039;rm /etc/resolv.conf &amp;amp;&amp;amp; ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf&#039;&lt;br /&gt;
sudo systemctl restart systemd-resolved.service&lt;br /&gt;
nslookup ntp.org&lt;br /&gt;
# DNS should work now&lt;br /&gt;
&lt;br /&gt;
# Install comitup using latest version from the website. Check here if there is a newer version available:&lt;br /&gt;
# https://davesteele.github.io/comitup/latest/comitup_latest.html&lt;br /&gt;
wget https://davesteele.github.io/comitup/deb/comitup_1.38-1_all.deb&lt;br /&gt;
sudo dpkg -i comitup_1.38-1_all.deb&lt;br /&gt;
rm comitup_1.38-1_all.deb&lt;br /&gt;
&lt;br /&gt;
sudo systemctl stop comitup&lt;br /&gt;
# Now use network-manager to:&lt;br /&gt;
# - add you wifi network&lt;br /&gt;
# optional:&lt;br /&gt;
# - change your hostname&lt;br /&gt;
# - add a dhcp ethernet connection without any device assigned&lt;br /&gt;
# (if even the hotspot malfunctions you can plug in a usb ethernet adapter)&lt;br /&gt;
sudo nmtui&lt;br /&gt;
&lt;br /&gt;
# Edit comitup.conf to change the wifi name and password (I use OpenMower-&amp;lt;nn&amp;gt;)&lt;br /&gt;
sudo nano /etc/comitup.conf&lt;br /&gt;
sudo systemctl restart comitup&lt;br /&gt;
# reboot - it should work now&lt;br /&gt;
sudo reboot&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable Serial Console===&lt;br /&gt;
Now that we have setup the network and can access the Pi even if our WiFi is not in range, we need to disable that serial console so that we can use the serial port for hardware.&lt;br /&gt;
&lt;br /&gt;
To do this, enter: &amp;lt;code&amp;gt;sudo nano /boot/firmware/cmdline.txt&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and remove the &amp;lt;code&amp;gt;console=serial0,115200&amp;lt;/code&amp;gt; part of the line.&lt;br /&gt;
&lt;br /&gt;
Save the file and reboot. You should still see the bootloader output, but no serial output after that.&lt;br /&gt;
&lt;br /&gt;
==Installing Tools==&lt;br /&gt;
If you&#039;re happy with your basic Ubuntu setup, it&#039;s time to install some tools required for the OpenMower&lt;br /&gt;
&lt;br /&gt;
=== General Dependencies ===&lt;br /&gt;
Just install them with apt:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install build-essential git&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===STR2STR (optional, recommended; only needed if you&#039;re using NTRIP, so probably most of you)===&lt;br /&gt;
We need a newer version than the one available in apt, so install it from source:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install gfortran&lt;br /&gt;
git clone https://github.com/rtklibexplorer/RTKLIB&lt;br /&gt;
cd RTKLIB&lt;br /&gt;
git checkout tags/b34c&lt;br /&gt;
cd app/consapp/&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You should now be able to run str2str from anywhere.&lt;br /&gt;
&lt;br /&gt;
=== OpenOCD (optional, recommended; only needed if you want to flash Pico from Raspberry Pi)===&lt;br /&gt;
We need to get the OpenOCD version from the Raspberry Pi foundation, because the &amp;quot;original&amp;quot; one doesn&#039;t have the Pico support built in yet.&lt;br /&gt;
&lt;br /&gt;
Install it from source:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install automake autoconf build-essential texinfo libtool libftdi-dev libusb-1.0-0-dev pkg-config&lt;br /&gt;
git clone https://github.com/raspberrypi/openocd.git --recursive --branch rp2040 --depth=1&lt;br /&gt;
cd openocd&lt;br /&gt;
./bootstrap&lt;br /&gt;
./configure --enable-ftdi --enable-sysfsgpio --enable-bcm2835gpio&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You can test if it was a success by running:&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
ubuntu@ubuntu:~$ openocd -v&lt;br /&gt;
Open On-Chip Debugger 0.11.0-g610f137-dirty (2022-06-07-00:39)&lt;br /&gt;
Licensed under GNU GPL v2&lt;br /&gt;
For bug reports, read&lt;br /&gt;
	http://openocd.org/doc/doxygen/bugs.html&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installing ROS and OpenMower==&lt;br /&gt;
We&#039;re using ROS Noetic for the OpenMower project. In this step we will install it, get the OpenMower sources, build the sources and create a basic configuration file for your mower.&lt;br /&gt;
&lt;br /&gt;
===Install ROS Noetic===&lt;br /&gt;
Since we&#039;re running Ubuntu 20.04 installing ROS is as easy as running the following commands:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Get the ROS apt repository&lt;br /&gt;
sudo sh -c &#039;echo &amp;quot;deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main&amp;quot; &amp;gt; /etc/apt/sources.list.d/ros-latest.list&#039;&lt;br /&gt;
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -&lt;br /&gt;
&lt;br /&gt;
# Install the ROS base system&lt;br /&gt;
sudo apt update&lt;br /&gt;
sudo apt install ros-noetic-ros-base&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;We only need to register the ROS installation in your &amp;lt;code&amp;gt;.bashrc&amp;lt;/code&amp;gt; file. This will enable you to call ROS specific commands from your terminal:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.bash&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Installing OpenMower Software===&lt;br /&gt;
Now we&#039;re finally able to install the OpenMower software. First, we&#039;re checking out the current version of the sources, then we&#039;re getting the dependencies and finally we&#039;re building the sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Clone the GitHub Repository:&lt;br /&gt;
git clone --recursive https://github.com/ClemensElflein/open_mower_ros.git&lt;br /&gt;
&lt;br /&gt;
# Get rosdep, only needed once&lt;br /&gt;
sudo apt install python3-rosdep&lt;br /&gt;
sudo rosdep init&lt;br /&gt;
rosdep update&lt;br /&gt;
&lt;br /&gt;
# Get the dependencies using rosdep&lt;br /&gt;
cd open_mower_ros/&lt;br /&gt;
rosdep install --from-paths src --ignore-src --default-yes&lt;br /&gt;
&lt;br /&gt;
# set the default boot behavior to cli and disable unnecessary services cause some ros dependencie installs a basic desktop&lt;br /&gt;
sudo systemctl set-default multi-user&lt;br /&gt;
sudo systemctl stop --force bluetooth&lt;br /&gt;
sudo systemctl disable --now bluetooth&lt;br /&gt;
sudo systemctl mask --now bluetooth&lt;br /&gt;
&lt;br /&gt;
# Finally, build the sources. This will take a while! &lt;br /&gt;
catkin_make -j1 # on 2GB Pi with SWAP - this takes at least 30min&lt;br /&gt;
# OR&lt;br /&gt;
catkin_make -j2 # on 4/8GB Pi - this takes at least 20min&lt;br /&gt;
&lt;br /&gt;
# Copy the default configuration file to your home directory&lt;br /&gt;
cp open_mower_ros/src/open_mower/config/mower_config.sh.example ~/mower_config.sh&lt;br /&gt;
&lt;br /&gt;
# The next step is to also source the OpenMower ROS install&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;At this point the OpenMower software is successfully installed! You will need to configure the OpenMower software and then you&#039;re finally ready to mow.&lt;br /&gt;
&lt;br /&gt;
== Some Additional Issues==&lt;br /&gt;
&lt;br /&gt;
===I&#039;m using an external WiFi dongle for better coverage, but sometimes it doesn&#039;t work===&lt;br /&gt;
It seems that the Ubuntu sometimes puts external WiFi dongles to sleep. To prevent this, we create a service which disables powersave:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Enter this to create the service&lt;br /&gt;
sudo systemctl --full --force edit wifi_powersave@.service&lt;br /&gt;
&lt;br /&gt;
# Paste the following:&lt;br /&gt;
[Unit]&lt;br /&gt;
Description=Set WiFi power save %i&lt;br /&gt;
After=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
Type=oneshot&lt;br /&gt;
RemainAfterExit=yes&lt;br /&gt;
ExecStart=/sbin/iw dev wlan1 set power_save %i&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
# Save and exit, then activate using:&lt;br /&gt;
sudo systemctl disable wifi_powersave@on.service&lt;br /&gt;
sudo systemctl enable wifi_powersave@off.service&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>
	</entry>
	<entry>
		<id>https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=287</id>
		<title>OLD Bare Metal System Image</title>
		<link rel="alternate" type="text/html" href="https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=287"/>
		<updated>2022-08-12T08:40:47Z</updated>

		<summary type="html">&lt;p&gt;Potter-91: /* Installing a WiFi Hot-Spot (optional, but recommended) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page will guide you through the steps to install a basic system image.&lt;br /&gt;
&lt;br /&gt;
On this image you will have the ROS base system, the OpenMower installation, local configuration for your mower and some tools to help you work with the mower.&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
In order to follow this guide, you will need the following:&lt;br /&gt;
&lt;br /&gt;
#A Raspberry Pi 4 (4GB or more recommended, [[System Image#Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM)|2GB works with swap, see here]])&lt;br /&gt;
#An SD card&lt;br /&gt;
#A soldered OpenMower mainboard&lt;br /&gt;
&lt;br /&gt;
==Installing the Base System==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;&#039;&#039;&#039;There is also a YouTube video explaining the steps in this section:&#039;&#039;&#039; https://youtu.be/_bImqD-pQSA?t=562&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Flashing Ubuntu to SD Card ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first step is to install the base system. We&#039;re using Ubuntu 20.04 Server for the Raspberry Pi. This is, because this image gives us best support ROS Noetic.&lt;br /&gt;
&lt;br /&gt;
Installing the base image is easy:&lt;br /&gt;
&lt;br /&gt;
#[https://www.raspberrypi.com/software/ Get the Raspberry Pi Imager software]&lt;br /&gt;
#Select the correct operating system:  &#039;&#039;Other-general-purpose OS &amp;gt; Ubuntu &amp;gt; Ubuntu Server 20.04.4 LTS (RPI 3/4/400) 64-bit&#039;&#039;&lt;br /&gt;
#Insert your SD card into your PC and select it in the &#039;&#039;Storage&#039;&#039; part of the software&lt;br /&gt;
#Click &#039;&#039;write&#039;&#039; and wait for the process to finish&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have successfully flashed your image, remove the SD for your PC &#039;&#039;&#039;and reinsert it again.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Then replace the &amp;lt;code&amp;gt;/boot/config.txt&amp;lt;/code&amp;gt; file with the one provided here: [https://github.com/ClemensElflein/OpenMower/blob/main/configs/RaspberryPiConfig/config.txt]&lt;br /&gt;
&lt;br /&gt;
This will enable all hardware serial ports on the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can theoretically configure networking in this step as well, but I&#039;m not recommending it. This is, because the networking information file gets only copied once and if you have an error it won&#039;t work.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;We need an interactive terminal in the next step anyways.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have done this step, you can eject the SD card and plug it into your Raspberry Pi 4.&lt;br /&gt;
&lt;br /&gt;
=== Opening a Serial Terminal ===&lt;br /&gt;
[[File:SerialRedirect.png|thumb|Serial Terminal: minicom -D /dev/ttyACM0]]&lt;br /&gt;
This step is needed for the following sections. The goal is to have a serial terminal to do basic config (networking etc) easily.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The easiest way of doing so is:&lt;br /&gt;
# Flash the SerialRedirect firmware into your Pico. Get it here: https://github.com/ClemensElflein/OpenMower/tree/main/Firmware/SerialRedirect/bin&lt;br /&gt;
# Provide your mainboard with power&lt;br /&gt;
# Plug your Pico into a computer. A virtual COM port should appear&lt;br /&gt;
# Connect to the COM port (I&#039;m using minicom, see image on the right), then press enter to start the Raspberry Pi.&lt;br /&gt;
#The Pi boots and a serial terminal will appear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you can login with the default credentials:&lt;br /&gt;
&lt;br /&gt;
username: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
password: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that you will need to change the password immediately.&lt;br /&gt;
&lt;br /&gt;
=== Disable Boot Interrupt ===&lt;br /&gt;
[[File:Image.png|thumb|Commands needed to disable boot interrupt on serial input.]]&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi boot loader will interrupt the boot sequence if data is sent through the main serial port of the Raspberry Pi. Since we&#039;re connecting &amp;quot;nosiy&amp;quot; hardware to the port, this will always interrupt the boot sequence and we need to disable this feature. &lt;br /&gt;
&lt;br /&gt;
In order to do this, reboot the Pi (sudo reboot) and send anything during the count-down in the bootloader (check the YouTube video linked above, if you&#039;re not sure).&lt;br /&gt;
&lt;br /&gt;
Then enter the following commands into the bootloader prompt:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
setenv bootdelay -2&lt;br /&gt;
saveenv&lt;br /&gt;
reset&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The Pi should reboot and the count-down should be gone.&lt;br /&gt;
&lt;br /&gt;
=== Some Settings ===&lt;br /&gt;
&lt;br /&gt;
[TODO/WIP]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are some miscellaneous settings I think are a good idea for an OpenMower install:&lt;br /&gt;
&lt;br /&gt;
* Remove the unnecessary snap system: &amp;lt;code&amp;gt;sudo snap remove --purge lxd &amp;amp;&amp;amp; sudo snap remove --purge core20 &amp;amp;&amp;amp; sudo snap remove --purge snapd &amp;amp;&amp;amp; sudo apt purge --autoremove snapd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Disable unattended upgrades: &amp;lt;code&amp;gt;sudo systemctl stop --force unattended-upgrades &amp;amp;&amp;amp; sudo systemctl disable unattended-upgrades &amp;amp;&amp;amp; sudo systemctl mask unattended-upgrades&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* I like to add the following to &amp;lt;code&amp;gt;cmdline.txt&amp;lt;/code&amp;gt; in order to fsck on boot:  &amp;lt;code&amp;gt;fsck.mode=force fsck.repair=yes&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* I prefer to use a static IP (If you use the [[System_Image#Installing_a_WiFi_Hot-Spot_(optional,_but_recommended)|recommend WiFi Hot-Spot]] use &amp;lt;code&amp;gt;sudo nmtui&amp;lt;/code&amp;gt; to configure a static IP)&lt;br /&gt;
&lt;br /&gt;
* If you like to have a terminal wifi scanner/signal monitor just install &amp;lt;code&amp;gt;sudo apt install wavemon&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you like you can change the timezone: &amp;lt;code&amp;gt;sudo timedatectl set-timezone Region/Location&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;sudo dpkg-reconfigure tzdata&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you ever like to plug a keyboard into the Pi don&#039;t forget to change the keymap: &amp;lt;code&amp;gt;sudo dpkg-reconfigure keyboard-configuration&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM)===&lt;br /&gt;
Compiling the OpenMower software will need more than 2GB of RAM. In order to still do this on a Pi with &amp;lt;= 2GB of RAM, we will add a 2GB swap file to the system by entering the following commands:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Create a new 2GB swap file&lt;br /&gt;
sudo fallocate -l 2G /swapfile&lt;br /&gt;
# Change permissions, so that only root can read and write&lt;br /&gt;
sudo chmod 600 /swapfile&lt;br /&gt;
# Create swap space in the file&lt;br /&gt;
sudo mkswap /swapfile&lt;br /&gt;
# Add it to the fstab&lt;br /&gt;
echo &#039;/swapfile swap swap defaults 0 0&#039; | sudo tee -a /etc/fstab /swapfile swap swap defaults 0 0&lt;br /&gt;
# Reboot to activate&lt;br /&gt;
sudo reboot&lt;br /&gt;
&lt;br /&gt;
# Check if it&#039;s activated&lt;br /&gt;
sudo swapon --show&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Installing a WiFi Hot-Spot (optional, but recommended)===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Since we will be configuring the WiFi interface, make sure that you have connected Etherent to your Raspberry Pi for this step.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As soon as you have closed your mower&#039;s enclosure, you won&#039;t have physical access to your Raspberry Pi anymore. If for some reason it&#039;s unable to connect to your WiFi (e.g. you have changed your password), you would need to open the case to get access to the SD card or Ethernet port on the Pi to regain access.&lt;br /&gt;
&lt;br /&gt;
To prevent this, we&#039;re going to install a hot-spot software which helps you to connect to WiFi by opening a hot-spot each time the Pi cannot connect to a known WiFi connection.&lt;br /&gt;
&lt;br /&gt;
Now is the best time to do this, because we have a serial terminal anyways and can mess with the network interfaces without shutting us out of the system!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Just use the following commands for this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# If dpkg throws an error like&lt;br /&gt;
#   dpkg: error processing package ... (--install):&lt;br /&gt;
#   dependency problems - leaving unconfigured&lt;br /&gt;
# you need some dependencies, correct them by running:&lt;br /&gt;
sudo apt install -f&lt;br /&gt;
&lt;br /&gt;
# We need to get a patched version of the network manager for this. Check here if there is a newer version available:&lt;br /&gt;
# https://davesteele.github.io/comitup/latest/python3-networkmanager_latest.html&lt;br /&gt;
wget https://davesteele.github.io/comitup/deb/python3-networkmanager_2.2-1dss02_all.deb&lt;br /&gt;
sudo dpkg -i python3-networkmanager_2.2-1dss02_all.deb&lt;br /&gt;
rm python3-networkmanager_2.2-1dss02_all.deb&lt;br /&gt;
# we need to disable systemd-resolveds caching DNS stub resolver&lt;br /&gt;
# if you want to know why check: https://github.com/pi-hole/docker-pi-hole/#installing-on-ubuntu&lt;br /&gt;
sudo sed -r -i.orig &#039;s/#?DNSStubListener=yes/DNSStubListener=no/g&#039; /etc/systemd/resolved.conf&lt;br /&gt;
sudo systemctl restart systemd-resolved.service&lt;br /&gt;
&lt;br /&gt;
nslookup ntp.org&lt;br /&gt;
# this will throw an dns error:&lt;br /&gt;
#   ;; connection timed out; no servers could be reached&lt;br /&gt;
sudo sh -c &#039;rm /etc/resolv.conf &amp;amp;&amp;amp; ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf&#039;&lt;br /&gt;
sudo systemctl restart systemd-resolved.service&lt;br /&gt;
nslookup ntp.org&lt;br /&gt;
# DNS should work now&lt;br /&gt;
&lt;br /&gt;
# Install comitup using latest version from the website. Check here if there is a newer version available:&lt;br /&gt;
# https://davesteele.github.io/comitup/latest/comitup_latest.html&lt;br /&gt;
wget https://davesteele.github.io/comitup/deb/comitup_1.38-1_all.deb&lt;br /&gt;
sudo dpkg -i comitup_1.38-1_all.deb&lt;br /&gt;
rm comitup_1.38-1_all.deb&lt;br /&gt;
&lt;br /&gt;
sudo systemctl stop comitup&lt;br /&gt;
# Now use network-manager to:&lt;br /&gt;
# - add you wifi network&lt;br /&gt;
# optional:&lt;br /&gt;
# - change your hostname&lt;br /&gt;
# - add a dhcp ethernet connection without any device assigned&lt;br /&gt;
# (if even the hotspot malfunctions you can plug in a usb ethernet adapter)&lt;br /&gt;
sudo nmtui&lt;br /&gt;
&lt;br /&gt;
# Edit comitup.conf to change the wifi name and password (I use OpenMower-&amp;lt;nn&amp;gt;)&lt;br /&gt;
sudo nano /etc/comitup.conf&lt;br /&gt;
sudo systemctl restart comitup&lt;br /&gt;
# reboot - it should work now&lt;br /&gt;
sudo reboot&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable Serial Console===&lt;br /&gt;
Now that we have setup the network and can access the Pi even if our WiFi is not in range, we need to disable that serial console so that we can use the serial port for hardware.&lt;br /&gt;
&lt;br /&gt;
To do this, enter: &amp;lt;code&amp;gt;sudo nano /boot/firmware/cmdline.txt&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and remove the &amp;lt;code&amp;gt;console=serial0,115200&amp;lt;/code&amp;gt; part of the line.&lt;br /&gt;
&lt;br /&gt;
Save the file and reboot. You should still see the bootloader output, but no serial output after that.&lt;br /&gt;
&lt;br /&gt;
==Installing Tools==&lt;br /&gt;
If you&#039;re happy with your basic Ubuntu setup, it&#039;s time to install some tools required for the OpenMower&lt;br /&gt;
&lt;br /&gt;
=== General Dependencies ===&lt;br /&gt;
Just install them with apt:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install build-essential git&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===STR2STR (optional, recommended; only needed if you&#039;re using NTRIP, so probably most of you)===&lt;br /&gt;
We need a newer version than the one available in apt, so install it from source:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install gfortran&lt;br /&gt;
git clone https://github.com/rtklibexplorer/RTKLIB&lt;br /&gt;
cd RTKLIB&lt;br /&gt;
git checkout tags/b34c&lt;br /&gt;
cd app/consapp/&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You should now be able to run str2str from anywhere.&lt;br /&gt;
&lt;br /&gt;
=== OpenOCD (optional, recommended; only needed if you want to flash Pico from Raspberry Pi)===&lt;br /&gt;
We need to get the OpenOCD version from the Raspberry Pi foundation, because the &amp;quot;original&amp;quot; one doesn&#039;t have the Pico support built in yet.&lt;br /&gt;
&lt;br /&gt;
Install it from source:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install automake autoconf build-essential texinfo libtool libftdi-dev libusb-1.0-0-dev pkg-config&lt;br /&gt;
git clone https://github.com/raspberrypi/openocd.git --recursive --branch rp2040 --depth=1&lt;br /&gt;
cd openocd&lt;br /&gt;
./bootstrap&lt;br /&gt;
./configure --enable-ftdi --enable-sysfsgpio --enable-bcm2835gpio&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You can test if it was a success by running:&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
ubuntu@ubuntu:~$ openocd -v&lt;br /&gt;
Open On-Chip Debugger 0.11.0-g610f137-dirty (2022-06-07-00:39)&lt;br /&gt;
Licensed under GNU GPL v2&lt;br /&gt;
For bug reports, read&lt;br /&gt;
	http://openocd.org/doc/doxygen/bugs.html&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installing ROS and OpenMower==&lt;br /&gt;
We&#039;re using ROS Noetic for the OpenMower project. In this step we will install it, get the OpenMower sources, build the sources and create a basic configuration file for your mower.&lt;br /&gt;
&lt;br /&gt;
===Install ROS Noetic===&lt;br /&gt;
Since we&#039;re running Ubuntu 20.04 installing ROS is as easy as running the following commands:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Get the ROS apt repository&lt;br /&gt;
sudo sh -c &#039;echo &amp;quot;deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main&amp;quot; &amp;gt; /etc/apt/sources.list.d/ros-latest.list&#039;&lt;br /&gt;
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -&lt;br /&gt;
&lt;br /&gt;
# Install the ROS base system&lt;br /&gt;
sudo apt update&lt;br /&gt;
sudo apt install ros-noetic-ros-base&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;We only need to register the ROS installation in your &amp;lt;code&amp;gt;.bashrc&amp;lt;/code&amp;gt; file. This will enable you to call ROS specific commands from your terminal:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.bash&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Installing OpenMower Software===&lt;br /&gt;
Now we&#039;re finally able to install the OpenMower software. First, we&#039;re checking out the current version of the sources, then we&#039;re getting the dependencies and finally we&#039;re building the sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Clone the GitHub Repository:&lt;br /&gt;
git clone --recursive https://github.com/ClemensElflein/open_mower_ros.git&lt;br /&gt;
&lt;br /&gt;
# Get rosdep, only needed once&lt;br /&gt;
sudo apt install python3-rosdep&lt;br /&gt;
sudo rosdep init&lt;br /&gt;
rosdep update&lt;br /&gt;
&lt;br /&gt;
# Get the dependencies using rosdep&lt;br /&gt;
cd open_mower_ros/&lt;br /&gt;
rosdep install --from-paths src --ignore-src --default-yes&lt;br /&gt;
&lt;br /&gt;
# set the default boot behavior to cli and disable unnecessary services cause some ros dependencie installs a basic desktop&lt;br /&gt;
sudo systemctl set-default multi-user&lt;br /&gt;
sudo systemctl stop --force bluetooth&lt;br /&gt;
sudo systemctl disable --now bluetooth&lt;br /&gt;
sudo systemctl mask --now bluetooth&lt;br /&gt;
&lt;br /&gt;
# Finally, build the sources. This will take a while! &lt;br /&gt;
catkin_make -j1 # on 2GB Pi with SWAP - this takes at least 30min&lt;br /&gt;
# OR&lt;br /&gt;
catkin_make -j2 # on 4/8GB Pi - this takes at least 20min&lt;br /&gt;
&lt;br /&gt;
# Copy the default configuration file to your home directory&lt;br /&gt;
cp open_mower_ros/src/open_mower/config/mower_config.sh.example ~/mower_config.sh&lt;br /&gt;
&lt;br /&gt;
# The next step is to also source the OpenMower ROS install&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;At this point the OpenMower software is successfully installed! You will need to configure the OpenMower software and then you&#039;re finally ready to mow.&lt;br /&gt;
&lt;br /&gt;
== Some Additional Issues==&lt;br /&gt;
&lt;br /&gt;
===I&#039;m using an external WiFi dongle for better coverage, but sometimes it doesn&#039;t work===&lt;br /&gt;
It seems that the Ubuntu sometimes puts external WiFi dongles to sleep. To prevent this, we create a service which disables powersave:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Enter this to create the service&lt;br /&gt;
sudo systemctl --full --force edit wifi_powersave@.service&lt;br /&gt;
&lt;br /&gt;
# Paste the following:&lt;br /&gt;
[Unit]&lt;br /&gt;
Description=Set WiFi power save %i&lt;br /&gt;
After=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
Type=oneshot&lt;br /&gt;
RemainAfterExit=yes&lt;br /&gt;
ExecStart=/sbin/iw dev wlan1 set power_save %i&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
# Save and exit, then activate using:&lt;br /&gt;
sudo systemctl disable wifi_powersave@on.service&lt;br /&gt;
sudo systemctl enable wifi_powersave@off.service&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>
	</entry>
	<entry>
		<id>https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=286</id>
		<title>OLD Bare Metal System Image</title>
		<link rel="alternate" type="text/html" href="https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=286"/>
		<updated>2022-08-12T08:38:36Z</updated>

		<summary type="html">&lt;p&gt;Potter-91: /* Installing a WiFi Hot-Spot (optional, but recommended) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page will guide you through the steps to install a basic system image.&lt;br /&gt;
&lt;br /&gt;
On this image you will have the ROS base system, the OpenMower installation, local configuration for your mower and some tools to help you work with the mower.&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
In order to follow this guide, you will need the following:&lt;br /&gt;
&lt;br /&gt;
#A Raspberry Pi 4 (4GB or more recommended, [[System Image#Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM)|2GB works with swap, see here]])&lt;br /&gt;
#An SD card&lt;br /&gt;
#A soldered OpenMower mainboard&lt;br /&gt;
&lt;br /&gt;
==Installing the Base System==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;&#039;&#039;&#039;There is also a YouTube video explaining the steps in this section:&#039;&#039;&#039; https://youtu.be/_bImqD-pQSA?t=562&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Flashing Ubuntu to SD Card ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first step is to install the base system. We&#039;re using Ubuntu 20.04 Server for the Raspberry Pi. This is, because this image gives us best support ROS Noetic.&lt;br /&gt;
&lt;br /&gt;
Installing the base image is easy:&lt;br /&gt;
&lt;br /&gt;
#[https://www.raspberrypi.com/software/ Get the Raspberry Pi Imager software]&lt;br /&gt;
#Select the correct operating system:  &#039;&#039;Other-general-purpose OS &amp;gt; Ubuntu &amp;gt; Ubuntu Server 20.04.4 LTS (RPI 3/4/400) 64-bit&#039;&#039;&lt;br /&gt;
#Insert your SD card into your PC and select it in the &#039;&#039;Storage&#039;&#039; part of the software&lt;br /&gt;
#Click &#039;&#039;write&#039;&#039; and wait for the process to finish&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have successfully flashed your image, remove the SD for your PC &#039;&#039;&#039;and reinsert it again.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Then replace the &amp;lt;code&amp;gt;/boot/config.txt&amp;lt;/code&amp;gt; file with the one provided here: [https://github.com/ClemensElflein/OpenMower/blob/main/configs/RaspberryPiConfig/config.txt]&lt;br /&gt;
&lt;br /&gt;
This will enable all hardware serial ports on the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can theoretically configure networking in this step as well, but I&#039;m not recommending it. This is, because the networking information file gets only copied once and if you have an error it won&#039;t work.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;We need an interactive terminal in the next step anyways.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have done this step, you can eject the SD card and plug it into your Raspberry Pi 4.&lt;br /&gt;
&lt;br /&gt;
=== Opening a Serial Terminal ===&lt;br /&gt;
[[File:SerialRedirect.png|thumb|Serial Terminal: minicom -D /dev/ttyACM0]]&lt;br /&gt;
This step is needed for the following sections. The goal is to have a serial terminal to do basic config (networking etc) easily.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The easiest way of doing so is:&lt;br /&gt;
# Flash the SerialRedirect firmware into your Pico. Get it here: https://github.com/ClemensElflein/OpenMower/tree/main/Firmware/SerialRedirect/bin&lt;br /&gt;
# Provide your mainboard with power&lt;br /&gt;
# Plug your Pico into a computer. A virtual COM port should appear&lt;br /&gt;
# Connect to the COM port (I&#039;m using minicom, see image on the right), then press enter to start the Raspberry Pi.&lt;br /&gt;
#The Pi boots and a serial terminal will appear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you can login with the default credentials:&lt;br /&gt;
&lt;br /&gt;
username: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
password: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that you will need to change the password immediately.&lt;br /&gt;
&lt;br /&gt;
=== Disable Boot Interrupt ===&lt;br /&gt;
[[File:Image.png|thumb|Commands needed to disable boot interrupt on serial input.]]&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi boot loader will interrupt the boot sequence if data is sent through the main serial port of the Raspberry Pi. Since we&#039;re connecting &amp;quot;nosiy&amp;quot; hardware to the port, this will always interrupt the boot sequence and we need to disable this feature. &lt;br /&gt;
&lt;br /&gt;
In order to do this, reboot the Pi (sudo reboot) and send anything during the count-down in the bootloader (check the YouTube video linked above, if you&#039;re not sure).&lt;br /&gt;
&lt;br /&gt;
Then enter the following commands into the bootloader prompt:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
setenv bootdelay -2&lt;br /&gt;
saveenv&lt;br /&gt;
reset&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The Pi should reboot and the count-down should be gone.&lt;br /&gt;
&lt;br /&gt;
=== Some Settings ===&lt;br /&gt;
&lt;br /&gt;
[TODO/WIP]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are some miscellaneous settings I think are a good idea for an OpenMower install:&lt;br /&gt;
&lt;br /&gt;
* Remove the unnecessary snap system: &amp;lt;code&amp;gt;sudo snap remove --purge lxd &amp;amp;&amp;amp; sudo snap remove --purge core20 &amp;amp;&amp;amp; sudo snap remove --purge snapd &amp;amp;&amp;amp; sudo apt purge --autoremove snapd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Disable unattended upgrades: &amp;lt;code&amp;gt;sudo systemctl stop --force unattended-upgrades &amp;amp;&amp;amp; sudo systemctl disable unattended-upgrades &amp;amp;&amp;amp; sudo systemctl mask unattended-upgrades&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* I like to add the following to &amp;lt;code&amp;gt;cmdline.txt&amp;lt;/code&amp;gt; in order to fsck on boot:  &amp;lt;code&amp;gt;fsck.mode=force fsck.repair=yes&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* I prefer to use a static IP (If you use the [[System_Image#Installing_a_WiFi_Hot-Spot_(optional,_but_recommended)|recommend WiFi Hot-Spot]] use &amp;lt;code&amp;gt;sudo nmtui&amp;lt;/code&amp;gt; to configure a static IP)&lt;br /&gt;
&lt;br /&gt;
* If you like to have a terminal wifi scanner/signal monitor just install &amp;lt;code&amp;gt;sudo apt install wavemon&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you like you can change the timezone: &amp;lt;code&amp;gt;sudo timedatectl set-timezone Region/Location&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;sudo dpkg-reconfigure tzdata&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you ever like to plug a keyboard into the Pi don&#039;t forget to change the keymap: &amp;lt;code&amp;gt;sudo dpkg-reconfigure keyboard-configuration&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM)===&lt;br /&gt;
Compiling the OpenMower software will need more than 2GB of RAM. In order to still do this on a Pi with &amp;lt;= 2GB of RAM, we will add a 2GB swap file to the system by entering the following commands:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Create a new 2GB swap file&lt;br /&gt;
sudo fallocate -l 2G /swapfile&lt;br /&gt;
# Change permissions, so that only root can read and write&lt;br /&gt;
sudo chmod 600 /swapfile&lt;br /&gt;
# Create swap space in the file&lt;br /&gt;
sudo mkswap /swapfile&lt;br /&gt;
# Add it to the fstab&lt;br /&gt;
echo &#039;/swapfile swap swap defaults 0 0&#039; | sudo tee -a /etc/fstab /swapfile swap swap defaults 0 0&lt;br /&gt;
# Reboot to activate&lt;br /&gt;
sudo reboot&lt;br /&gt;
&lt;br /&gt;
# Check if it&#039;s activated&lt;br /&gt;
sudo swapon --show&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Installing a WiFi Hot-Spot (optional, but recommended)===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Since we will be configuring the WiFi interface, make sure that you have connected Etherent to your Raspberry Pi for this step.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As soon as you have closed your mower&#039;s enclosure, you won&#039;t have physical access to your Raspberry Pi anymore. If for some reason it&#039;s unable to connect to your WiFi (e.g. you have changed your password), you would need to open the case to get access to the SD card or Ethernet port on the Pi to regain access.&lt;br /&gt;
&lt;br /&gt;
To prevent this, we&#039;re going to install a hot-spot software which helps you to connect to WiFi by opening a hot-spot each time the Pi cannot connect to a known WiFi connection.&lt;br /&gt;
&lt;br /&gt;
Now is the best time to do this, because we have a serial terminal anyways and can mess with the network interfaces without shutting us out of the system!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Just use the following commands for this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# If dpkg throws an error like&lt;br /&gt;
#   dpkg: error processing package ... (--install):&lt;br /&gt;
#   dependency problems - leaving unconfigured&lt;br /&gt;
# you need some dependencies, correct them by running:&lt;br /&gt;
sudo apt install -f&lt;br /&gt;
&lt;br /&gt;
# We need to get a patched version of the network manager for this. Check here if there is a newer version:&lt;br /&gt;
# https://davesteele.github.io/comitup/latest/python3-networkmanager_latest.html&lt;br /&gt;
wget https://davesteele.github.io/comitup/deb/python3-networkmanager_2.2-1dss02_all.deb&lt;br /&gt;
sudo dpkg -i python3-networkmanager_2.2-1dss02_all.deb&lt;br /&gt;
rm python3-networkmanager_2.2-1dss02_all.deb&lt;br /&gt;
# we need to disable systemd-resolveds caching DNS stub resolver&lt;br /&gt;
# if you want to know why check: https://github.com/pi-hole/docker-pi-hole/#installing-on-ubuntu&lt;br /&gt;
sudo sed -r -i.orig &#039;s/#?DNSStubListener=yes/DNSStubListener=no/g&#039; /etc/systemd/resolved.conf&lt;br /&gt;
sudo systemctl restart systemd-resolved.service&lt;br /&gt;
&lt;br /&gt;
nslookup ntp.org&lt;br /&gt;
# this will throw an dns error:&lt;br /&gt;
#   ;; connection timed out; no servers could be reached&lt;br /&gt;
sudo sh -c &#039;rm /etc/resolv.conf &amp;amp;&amp;amp; ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf&#039;&lt;br /&gt;
sudo systemctl restart systemd-resolved.service&lt;br /&gt;
nslookup ntp.org&lt;br /&gt;
# DNS should work now&lt;br /&gt;
&lt;br /&gt;
# Install comitup using latest version from the website. Check here if there is a newer version:&lt;br /&gt;
# https://davesteele.github.io/comitup/latest/comitup_latest.html&lt;br /&gt;
wget https://davesteele.github.io/comitup/deb/comitup_1.38-1_all.deb&lt;br /&gt;
sudo dpkg -i comitup_1.38-1_all.deb&lt;br /&gt;
rm comitup_1.38-1_all.deb&lt;br /&gt;
&lt;br /&gt;
sudo systemctl stop comitup&lt;br /&gt;
# Now use network-manager to:&lt;br /&gt;
# - add you wifi network&lt;br /&gt;
# optional:&lt;br /&gt;
# - change your hostname&lt;br /&gt;
# - add a dhcp ethernet connection without any device assigned&lt;br /&gt;
# (if even the hotspot malfunctions you can plug in a usb ethernet adapter)&lt;br /&gt;
sudo nmtui&lt;br /&gt;
&lt;br /&gt;
# Edit comitup.conf to change the wifi name and password (I use OpenMower-&amp;lt;nn&amp;gt;)&lt;br /&gt;
sudo nano /etc/comitup.conf&lt;br /&gt;
sudo systemctl restart comitup&lt;br /&gt;
# reboot - it should work now&lt;br /&gt;
sudo reboot&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable Serial Console===&lt;br /&gt;
Now that we have setup the network and can access the Pi even if our WiFi is not in range, we need to disable that serial console so that we can use the serial port for hardware.&lt;br /&gt;
&lt;br /&gt;
To do this, enter: &amp;lt;code&amp;gt;sudo nano /boot/firmware/cmdline.txt&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and remove the &amp;lt;code&amp;gt;console=serial0,115200&amp;lt;/code&amp;gt; part of the line.&lt;br /&gt;
&lt;br /&gt;
Save the file and reboot. You should still see the bootloader output, but no serial output after that.&lt;br /&gt;
&lt;br /&gt;
==Installing Tools==&lt;br /&gt;
If you&#039;re happy with your basic Ubuntu setup, it&#039;s time to install some tools required for the OpenMower&lt;br /&gt;
&lt;br /&gt;
=== General Dependencies ===&lt;br /&gt;
Just install them with apt:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install build-essential git&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===STR2STR (optional, recommended; only needed if you&#039;re using NTRIP, so probably most of you)===&lt;br /&gt;
We need a newer version than the one available in apt, so install it from source:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install gfortran&lt;br /&gt;
git clone https://github.com/rtklibexplorer/RTKLIB&lt;br /&gt;
cd RTKLIB&lt;br /&gt;
git checkout tags/b34c&lt;br /&gt;
cd app/consapp/&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You should now be able to run str2str from anywhere.&lt;br /&gt;
&lt;br /&gt;
=== OpenOCD (optional, recommended; only needed if you want to flash Pico from Raspberry Pi)===&lt;br /&gt;
We need to get the OpenOCD version from the Raspberry Pi foundation, because the &amp;quot;original&amp;quot; one doesn&#039;t have the Pico support built in yet.&lt;br /&gt;
&lt;br /&gt;
Install it from source:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install automake autoconf build-essential texinfo libtool libftdi-dev libusb-1.0-0-dev pkg-config&lt;br /&gt;
git clone https://github.com/raspberrypi/openocd.git --recursive --branch rp2040 --depth=1&lt;br /&gt;
cd openocd&lt;br /&gt;
./bootstrap&lt;br /&gt;
./configure --enable-ftdi --enable-sysfsgpio --enable-bcm2835gpio&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You can test if it was a success by running:&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
ubuntu@ubuntu:~$ openocd -v&lt;br /&gt;
Open On-Chip Debugger 0.11.0-g610f137-dirty (2022-06-07-00:39)&lt;br /&gt;
Licensed under GNU GPL v2&lt;br /&gt;
For bug reports, read&lt;br /&gt;
	http://openocd.org/doc/doxygen/bugs.html&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installing ROS and OpenMower==&lt;br /&gt;
We&#039;re using ROS Noetic for the OpenMower project. In this step we will install it, get the OpenMower sources, build the sources and create a basic configuration file for your mower.&lt;br /&gt;
&lt;br /&gt;
===Install ROS Noetic===&lt;br /&gt;
Since we&#039;re running Ubuntu 20.04 installing ROS is as easy as running the following commands:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Get the ROS apt repository&lt;br /&gt;
sudo sh -c &#039;echo &amp;quot;deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main&amp;quot; &amp;gt; /etc/apt/sources.list.d/ros-latest.list&#039;&lt;br /&gt;
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -&lt;br /&gt;
&lt;br /&gt;
# Install the ROS base system&lt;br /&gt;
sudo apt update&lt;br /&gt;
sudo apt install ros-noetic-ros-base&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;We only need to register the ROS installation in your &amp;lt;code&amp;gt;.bashrc&amp;lt;/code&amp;gt; file. This will enable you to call ROS specific commands from your terminal:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.bash&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Installing OpenMower Software===&lt;br /&gt;
Now we&#039;re finally able to install the OpenMower software. First, we&#039;re checking out the current version of the sources, then we&#039;re getting the dependencies and finally we&#039;re building the sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Clone the GitHub Repository:&lt;br /&gt;
git clone --recursive https://github.com/ClemensElflein/open_mower_ros.git&lt;br /&gt;
&lt;br /&gt;
# Get rosdep, only needed once&lt;br /&gt;
sudo apt install python3-rosdep&lt;br /&gt;
sudo rosdep init&lt;br /&gt;
rosdep update&lt;br /&gt;
&lt;br /&gt;
# Get the dependencies using rosdep&lt;br /&gt;
cd open_mower_ros/&lt;br /&gt;
rosdep install --from-paths src --ignore-src --default-yes&lt;br /&gt;
&lt;br /&gt;
# set the default boot behavior to cli and disable unnecessary services cause some ros dependencie installs a basic desktop&lt;br /&gt;
sudo systemctl set-default multi-user&lt;br /&gt;
sudo systemctl stop --force bluetooth&lt;br /&gt;
sudo systemctl disable --now bluetooth&lt;br /&gt;
sudo systemctl mask --now bluetooth&lt;br /&gt;
&lt;br /&gt;
# Finally, build the sources. This will take a while! &lt;br /&gt;
catkin_make -j1 # on 2GB Pi with SWAP - this takes at least 30min&lt;br /&gt;
# OR&lt;br /&gt;
catkin_make -j2 # on 4/8GB Pi - this takes at least 20min&lt;br /&gt;
&lt;br /&gt;
# Copy the default configuration file to your home directory&lt;br /&gt;
cp open_mower_ros/src/open_mower/config/mower_config.sh.example ~/mower_config.sh&lt;br /&gt;
&lt;br /&gt;
# The next step is to also source the OpenMower ROS install&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;At this point the OpenMower software is successfully installed! You will need to configure the OpenMower software and then you&#039;re finally ready to mow.&lt;br /&gt;
&lt;br /&gt;
== Some Additional Issues==&lt;br /&gt;
&lt;br /&gt;
===I&#039;m using an external WiFi dongle for better coverage, but sometimes it doesn&#039;t work===&lt;br /&gt;
It seems that the Ubuntu sometimes puts external WiFi dongles to sleep. To prevent this, we create a service which disables powersave:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Enter this to create the service&lt;br /&gt;
sudo systemctl --full --force edit wifi_powersave@.service&lt;br /&gt;
&lt;br /&gt;
# Paste the following:&lt;br /&gt;
[Unit]&lt;br /&gt;
Description=Set WiFi power save %i&lt;br /&gt;
After=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
Type=oneshot&lt;br /&gt;
RemainAfterExit=yes&lt;br /&gt;
ExecStart=/sbin/iw dev wlan1 set power_save %i&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
# Save and exit, then activate using:&lt;br /&gt;
sudo systemctl disable wifi_powersave@on.service&lt;br /&gt;
sudo systemctl enable wifi_powersave@off.service&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>
	</entry>
	<entry>
		<id>https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=285</id>
		<title>OLD Bare Metal System Image</title>
		<link rel="alternate" type="text/html" href="https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=285"/>
		<updated>2022-08-12T00:03:39Z</updated>

		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page will guide you through the steps to install a basic system image.&lt;br /&gt;
&lt;br /&gt;
On this image you will have the ROS base system, the OpenMower installation, local configuration for your mower and some tools to help you work with the mower.&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
In order to follow this guide, you will need the following:&lt;br /&gt;
&lt;br /&gt;
#A Raspberry Pi 4 (4GB or more recommended, [[System Image#Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM)|2GB works with swap, see here]])&lt;br /&gt;
#An SD card&lt;br /&gt;
#A soldered OpenMower mainboard&lt;br /&gt;
&lt;br /&gt;
==Installing the Base System==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;&#039;&#039;&#039;There is also a YouTube video explaining the steps in this section:&#039;&#039;&#039; https://youtu.be/_bImqD-pQSA?t=562&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Flashing Ubuntu to SD Card ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first step is to install the base system. We&#039;re using Ubuntu 20.04 Server for the Raspberry Pi. This is, because this image gives us best support ROS Noetic.&lt;br /&gt;
&lt;br /&gt;
Installing the base image is easy:&lt;br /&gt;
&lt;br /&gt;
#[https://www.raspberrypi.com/software/ Get the Raspberry Pi Imager software]&lt;br /&gt;
#Select the correct operating system:  &#039;&#039;Other-general-purpose OS &amp;gt; Ubuntu &amp;gt; Ubuntu Server 20.04.4 LTS (RPI 3/4/400) 64-bit&#039;&#039;&lt;br /&gt;
#Insert your SD card into your PC and select it in the &#039;&#039;Storage&#039;&#039; part of the software&lt;br /&gt;
#Click &#039;&#039;write&#039;&#039; and wait for the process to finish&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have successfully flashed your image, remove the SD for your PC &#039;&#039;&#039;and reinsert it again.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Then replace the &amp;lt;code&amp;gt;/boot/config.txt&amp;lt;/code&amp;gt; file with the one provided here: [https://github.com/ClemensElflein/OpenMower/blob/main/configs/RaspberryPiConfig/config.txt]&lt;br /&gt;
&lt;br /&gt;
This will enable all hardware serial ports on the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can theoretically configure networking in this step as well, but I&#039;m not recommending it. This is, because the networking information file gets only copied once and if you have an error it won&#039;t work.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;We need an interactive terminal in the next step anyways.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have done this step, you can eject the SD card and plug it into your Raspberry Pi 4.&lt;br /&gt;
&lt;br /&gt;
=== Opening a Serial Terminal ===&lt;br /&gt;
[[File:SerialRedirect.png|thumb|Serial Terminal: minicom -D /dev/ttyACM0]]&lt;br /&gt;
This step is needed for the following sections. The goal is to have a serial terminal to do basic config (networking etc) easily.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The easiest way of doing so is:&lt;br /&gt;
# Flash the SerialRedirect firmware into your Pico. Get it here: https://github.com/ClemensElflein/OpenMower/tree/main/Firmware/SerialRedirect/bin&lt;br /&gt;
# Provide your mainboard with power&lt;br /&gt;
# Plug your Pico into a computer. A virtual COM port should appear&lt;br /&gt;
# Connect to the COM port (I&#039;m using minicom, see image on the right), then press enter to start the Raspberry Pi.&lt;br /&gt;
#The Pi boots and a serial terminal will appear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you can login with the default credentials:&lt;br /&gt;
&lt;br /&gt;
username: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
password: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that you will need to change the password immediately.&lt;br /&gt;
&lt;br /&gt;
=== Disable Boot Interrupt ===&lt;br /&gt;
[[File:Image.png|thumb|Commands needed to disable boot interrupt on serial input.]]&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi boot loader will interrupt the boot sequence if data is sent through the main serial port of the Raspberry Pi. Since we&#039;re connecting &amp;quot;nosiy&amp;quot; hardware to the port, this will always interrupt the boot sequence and we need to disable this feature. &lt;br /&gt;
&lt;br /&gt;
In order to do this, reboot the Pi (sudo reboot) and send anything during the count-down in the bootloader (check the YouTube video linked above, if you&#039;re not sure).&lt;br /&gt;
&lt;br /&gt;
Then enter the following commands into the bootloader prompt:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
setenv bootdelay -2&lt;br /&gt;
saveenv&lt;br /&gt;
reset&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The Pi should reboot and the count-down should be gone.&lt;br /&gt;
&lt;br /&gt;
=== Some Settings ===&lt;br /&gt;
&lt;br /&gt;
[TODO/WIP]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are some miscellaneous settings I think are a good idea for an OpenMower install:&lt;br /&gt;
&lt;br /&gt;
* Remove the unnecessary snap system: &amp;lt;code&amp;gt;sudo snap remove --purge lxd &amp;amp;&amp;amp; sudo snap remove --purge core20 &amp;amp;&amp;amp; sudo snap remove --purge snapd &amp;amp;&amp;amp; sudo apt purge --autoremove snapd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Disable unattended upgrades: &amp;lt;code&amp;gt;sudo systemctl stop --force unattended-upgrades &amp;amp;&amp;amp; sudo systemctl disable unattended-upgrades &amp;amp;&amp;amp; sudo systemctl mask unattended-upgrades&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* I like to add the following to &amp;lt;code&amp;gt;cmdline.txt&amp;lt;/code&amp;gt; in order to fsck on boot:  &amp;lt;code&amp;gt;fsck.mode=force fsck.repair=yes&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* I prefer to use a static IP (If you use the [[System_Image#Installing_a_WiFi_Hot-Spot_(optional,_but_recommended)|recommend WiFi Hot-Spot]] use &amp;lt;code&amp;gt;sudo nmtui&amp;lt;/code&amp;gt; to configure a static IP)&lt;br /&gt;
&lt;br /&gt;
* If you like to have a terminal wifi scanner/signal monitor just install &amp;lt;code&amp;gt;sudo apt install wavemon&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you like you can change the timezone: &amp;lt;code&amp;gt;sudo timedatectl set-timezone Region/Location&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;sudo dpkg-reconfigure tzdata&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you ever like to plug a keyboard into the Pi don&#039;t forget to change the keymap: &amp;lt;code&amp;gt;sudo dpkg-reconfigure keyboard-configuration&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM)===&lt;br /&gt;
Compiling the OpenMower software will need more than 2GB of RAM. In order to still do this on a Pi with &amp;lt;= 2GB of RAM, we will add a 2GB swap file to the system by entering the following commands:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Create a new 2GB swap file&lt;br /&gt;
sudo fallocate -l 2G /swapfile&lt;br /&gt;
# Change permissions, so that only root can read and write&lt;br /&gt;
sudo chmod 600 /swapfile&lt;br /&gt;
# Create swap space in the file&lt;br /&gt;
sudo mkswap /swapfile&lt;br /&gt;
# Add it to the fstab&lt;br /&gt;
echo &#039;/swapfile swap swap defaults 0 0&#039; | sudo tee -a /etc/fstab /swapfile swap swap defaults 0 0&lt;br /&gt;
# Reboot to activate&lt;br /&gt;
sudo reboot&lt;br /&gt;
&lt;br /&gt;
# Check if it&#039;s activated&lt;br /&gt;
sudo swapon --show&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Installing a WiFi Hot-Spot (optional, but recommended)===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Since we will be configuring the WiFi interface, make sure that you have connected Etherent to your Raspberry Pi for this step.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As soon as you have closed your mower&#039;s enclosure, you won&#039;t have physical access to your Raspberry Pi anymore. If for some reason it&#039;s unable to connect to your WiFi (e.g. you have changed your password), you would need to open the case to get access to the SD card or Ethernet port on the Pi to regain access.&lt;br /&gt;
&lt;br /&gt;
To prevent this, we&#039;re going to install a hot-spot software which helps you to connect to WiFi by opening a hot-spot each time the Pi cannot connect to a known WiFi connection.&lt;br /&gt;
&lt;br /&gt;
Now is the best time to do this, because we have a serial terminal anyways and can mess with the network interfaces without shutting us out of the system!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Just use the following commands for this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# If dpkg throws an error like&lt;br /&gt;
#   dpkg: error processing package ... (--install):&lt;br /&gt;
#   dependency problems - leaving unconfigured&lt;br /&gt;
# you need some dependencies, correct them by running:&lt;br /&gt;
sudo apt install -f&lt;br /&gt;
&lt;br /&gt;
# We need to get a patched version of the network manager for this&lt;br /&gt;
wget https://davesteele.github.io/comitup/deb/python3-networkmanager_2.2-1dss02_all.deb&lt;br /&gt;
sudo dpkg -i python3-networkmanager_2.2-1dss02_all.deb&lt;br /&gt;
rm python3-networkmanager_2.2-1dss02_all.deb&lt;br /&gt;
# we need to disable systemd-resolveds caching DNS stub resolver&lt;br /&gt;
# if you want to know why check: https://github.com/pi-hole/docker-pi-hole/#installing-on-ubuntu&lt;br /&gt;
sudo sed -r -i.orig &#039;s/#?DNSStubListener=yes/DNSStubListener=no/g&#039; /etc/systemd/resolved.conf&lt;br /&gt;
sudo systemctl restart systemd-resolved.service&lt;br /&gt;
&lt;br /&gt;
nslookup ntp.org&lt;br /&gt;
# this will throw an dns error:&lt;br /&gt;
#   ;; connection timed out; no servers could be reached&lt;br /&gt;
sudo sh -c &#039;rm /etc/resolv.conf &amp;amp;&amp;amp; ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf&#039;&lt;br /&gt;
sudo systemctl restart systemd-resolved.service&lt;br /&gt;
nslookup ntp.org&lt;br /&gt;
# DNS should work now&lt;br /&gt;
&lt;br /&gt;
# Install comitup using latest version from the website&lt;br /&gt;
wget https://davesteele.github.io/comitup/deb/comitup_1.38-1_all.deb&lt;br /&gt;
sudo dpkg -i comitup_1.38-1_all.deb&lt;br /&gt;
rm comitup_1.38-1_all.deb&lt;br /&gt;
&lt;br /&gt;
sudo systemctl stop comitup&lt;br /&gt;
# Now use network-manager to:&lt;br /&gt;
# - add you wifi network&lt;br /&gt;
# optional:&lt;br /&gt;
# - change your hostname&lt;br /&gt;
# - add a dhcp ethernet connection without any device assigned&lt;br /&gt;
# (if even the hotspot malfunctions you can plug in a usb ethernet adapter)&lt;br /&gt;
sudo nmtui&lt;br /&gt;
&lt;br /&gt;
# Edit comitup.conf to change the wifi name and password (I use OpenMower-&amp;lt;nn&amp;gt;)&lt;br /&gt;
sudo nano /etc/comitup.conf&lt;br /&gt;
sudo systemctl restart comitup&lt;br /&gt;
# reboot - it should work now&lt;br /&gt;
sudo reboot&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable Serial Console===&lt;br /&gt;
Now that we have setup the network and can access the Pi even if our WiFi is not in range, we need to disable that serial console so that we can use the serial port for hardware.&lt;br /&gt;
&lt;br /&gt;
To do this, enter: &amp;lt;code&amp;gt;sudo nano /boot/firmware/cmdline.txt&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and remove the &amp;lt;code&amp;gt;console=serial0,115200&amp;lt;/code&amp;gt; part of the line.&lt;br /&gt;
&lt;br /&gt;
Save the file and reboot. You should still see the bootloader output, but no serial output after that.&lt;br /&gt;
&lt;br /&gt;
==Installing Tools==&lt;br /&gt;
If you&#039;re happy with your basic Ubuntu setup, it&#039;s time to install some tools required for the OpenMower&lt;br /&gt;
&lt;br /&gt;
=== General Dependencies ===&lt;br /&gt;
Just install them with apt:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install build-essential git&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===STR2STR (optional, recommended; only needed if you&#039;re using NTRIP, so probably most of you)===&lt;br /&gt;
We need a newer version than the one available in apt, so install it from source:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install gfortran&lt;br /&gt;
git clone https://github.com/rtklibexplorer/RTKLIB&lt;br /&gt;
cd RTKLIB&lt;br /&gt;
git checkout tags/b34c&lt;br /&gt;
cd app/consapp/&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You should now be able to run str2str from anywhere.&lt;br /&gt;
&lt;br /&gt;
=== OpenOCD (optional, recommended; only needed if you want to flash Pico from Raspberry Pi)===&lt;br /&gt;
We need to get the OpenOCD version from the Raspberry Pi foundation, because the &amp;quot;original&amp;quot; one doesn&#039;t have the Pico support built in yet.&lt;br /&gt;
&lt;br /&gt;
Install it from source:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install automake autoconf build-essential texinfo libtool libftdi-dev libusb-1.0-0-dev pkg-config&lt;br /&gt;
git clone https://github.com/raspberrypi/openocd.git --recursive --branch rp2040 --depth=1&lt;br /&gt;
cd openocd&lt;br /&gt;
./bootstrap&lt;br /&gt;
./configure --enable-ftdi --enable-sysfsgpio --enable-bcm2835gpio&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You can test if it was a success by running:&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
ubuntu@ubuntu:~$ openocd -v&lt;br /&gt;
Open On-Chip Debugger 0.11.0-g610f137-dirty (2022-06-07-00:39)&lt;br /&gt;
Licensed under GNU GPL v2&lt;br /&gt;
For bug reports, read&lt;br /&gt;
	http://openocd.org/doc/doxygen/bugs.html&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installing ROS and OpenMower==&lt;br /&gt;
We&#039;re using ROS Noetic for the OpenMower project. In this step we will install it, get the OpenMower sources, build the sources and create a basic configuration file for your mower.&lt;br /&gt;
&lt;br /&gt;
===Install ROS Noetic===&lt;br /&gt;
Since we&#039;re running Ubuntu 20.04 installing ROS is as easy as running the following commands:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Get the ROS apt repository&lt;br /&gt;
sudo sh -c &#039;echo &amp;quot;deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main&amp;quot; &amp;gt; /etc/apt/sources.list.d/ros-latest.list&#039;&lt;br /&gt;
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -&lt;br /&gt;
&lt;br /&gt;
# Install the ROS base system&lt;br /&gt;
sudo apt update&lt;br /&gt;
sudo apt install ros-noetic-ros-base&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;We only need to register the ROS installation in your &amp;lt;code&amp;gt;.bashrc&amp;lt;/code&amp;gt; file. This will enable you to call ROS specific commands from your terminal:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.bash&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Installing OpenMower Software===&lt;br /&gt;
Now we&#039;re finally able to install the OpenMower software. First, we&#039;re checking out the current version of the sources, then we&#039;re getting the dependencies and finally we&#039;re building the sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Clone the GitHub Repository:&lt;br /&gt;
git clone --recursive https://github.com/ClemensElflein/open_mower_ros.git&lt;br /&gt;
&lt;br /&gt;
# Get rosdep, only needed once&lt;br /&gt;
sudo apt install python3-rosdep&lt;br /&gt;
sudo rosdep init&lt;br /&gt;
rosdep update&lt;br /&gt;
&lt;br /&gt;
# Get the dependencies using rosdep&lt;br /&gt;
cd open_mower_ros/&lt;br /&gt;
rosdep install --from-paths src --ignore-src --default-yes&lt;br /&gt;
&lt;br /&gt;
# set the default boot behavior to cli and disable unnecessary services cause some ros dependencie installs a basic desktop&lt;br /&gt;
sudo systemctl set-default multi-user&lt;br /&gt;
sudo systemctl stop --force bluetooth&lt;br /&gt;
sudo systemctl disable --now bluetooth&lt;br /&gt;
sudo systemctl mask --now bluetooth&lt;br /&gt;
&lt;br /&gt;
# Finally, build the sources. This will take a while! &lt;br /&gt;
catkin_make -j1 # on 2GB Pi with SWAP - this takes at least 30min&lt;br /&gt;
# OR&lt;br /&gt;
catkin_make -j2 # on 4/8GB Pi - this takes at least 20min&lt;br /&gt;
&lt;br /&gt;
# Copy the default configuration file to your home directory&lt;br /&gt;
cp open_mower_ros/src/open_mower/config/mower_config.sh.example ~/mower_config.sh&lt;br /&gt;
&lt;br /&gt;
# The next step is to also source the OpenMower ROS install&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;At this point the OpenMower software is successfully installed! You will need to configure the OpenMower software and then you&#039;re finally ready to mow.&lt;br /&gt;
&lt;br /&gt;
== Some Additional Issues==&lt;br /&gt;
&lt;br /&gt;
===I&#039;m using an external WiFi dongle for better coverage, but sometimes it doesn&#039;t work===&lt;br /&gt;
It seems that the Ubuntu sometimes puts external WiFi dongles to sleep. To prevent this, we create a service which disables powersave:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Enter this to create the service&lt;br /&gt;
sudo systemctl --full --force edit wifi_powersave@.service&lt;br /&gt;
&lt;br /&gt;
# Paste the following:&lt;br /&gt;
[Unit]&lt;br /&gt;
Description=Set WiFi power save %i&lt;br /&gt;
After=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
Type=oneshot&lt;br /&gt;
RemainAfterExit=yes&lt;br /&gt;
ExecStart=/sbin/iw dev wlan1 set power_save %i&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
# Save and exit, then activate using:&lt;br /&gt;
sudo systemctl disable wifi_powersave@on.service&lt;br /&gt;
sudo systemctl enable wifi_powersave@off.service&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>
	</entry>
	<entry>
		<id>https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=284</id>
		<title>OLD Bare Metal System Image</title>
		<link rel="alternate" type="text/html" href="https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=284"/>
		<updated>2022-08-11T23:38:15Z</updated>

		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page will guide you through the steps to install a basic system image.&lt;br /&gt;
&lt;br /&gt;
On this image you will have the ROS base system, the OpenMower installation, local configuration for your mower and some tools to help you work with the mower.&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
In order to follow this guide, you will need the following:&lt;br /&gt;
&lt;br /&gt;
#A Raspberry Pi 4 (4GB or more recommended, [[System Image#Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM)|2GB works with swap, see here]])&lt;br /&gt;
#An SD card&lt;br /&gt;
#A soldered OpenMower mainboard&lt;br /&gt;
&lt;br /&gt;
==Installing the Base System==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;&#039;&#039;&#039;There is also a YouTube video explaining the steps in this section:&#039;&#039;&#039; https://youtu.be/_bImqD-pQSA?t=562&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Flashing Ubuntu to SD Card ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first step is to install the base system. We&#039;re using Ubuntu 20.04 Server for the Raspberry Pi. This is, because this image gives us best support ROS Noetic.&lt;br /&gt;
&lt;br /&gt;
Installing the base image is easy:&lt;br /&gt;
&lt;br /&gt;
#[https://www.raspberrypi.com/software/ Get the Raspberry Pi Imager software]&lt;br /&gt;
#Select the correct operating system:  &#039;&#039;Other-general-purpose OS &amp;gt; Ubuntu &amp;gt; Ubuntu Server 20.04.4 LTS (RPI 3/4/400) 64-bit&#039;&#039;&lt;br /&gt;
#Insert your SD card into your PC and select it in the &#039;&#039;Storage&#039;&#039; part of the software&lt;br /&gt;
#Click &#039;&#039;write&#039;&#039; and wait for the process to finish&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have successfully flashed your image, remove the SD for your PC &#039;&#039;&#039;and reinsert it again.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Then replace the &amp;lt;code&amp;gt;/boot/config.txt&amp;lt;/code&amp;gt; file with the one provided here: [https://github.com/ClemensElflein/OpenMower/blob/main/configs/RaspberryPiConfig/config.txt]&lt;br /&gt;
&lt;br /&gt;
This will enable all hardware serial ports on the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can theoretically configure networking in this step as well, but I&#039;m not recommending it. This is, because the networking information file gets only copied once and if you have an error it won&#039;t work.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;We need an interactive terminal in the next step anyways.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have done this step, you can eject the SD card and plug it into your Raspberry Pi 4.&lt;br /&gt;
&lt;br /&gt;
=== Opening a Serial Terminal ===&lt;br /&gt;
[[File:SerialRedirect.png|thumb|Serial Terminal: minicom -D /dev/ttyACM0]]&lt;br /&gt;
This step is needed for the following sections. The goal is to have a serial terminal to do basic config (networking etc) easily.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The easiest way of doing so is:&lt;br /&gt;
# Flash the SerialRedirect firmware into your Pico. Get it here: https://github.com/ClemensElflein/OpenMower/tree/main/Firmware/SerialRedirect/bin&lt;br /&gt;
# Provide your mainboard with power&lt;br /&gt;
# Plug your Pico into a computer. A virtual COM port should appear&lt;br /&gt;
# Connect to the COM port (I&#039;m using minicom, see image on the right), then press enter to start the Raspberry Pi.&lt;br /&gt;
#The Pi boots and a serial terminal will appear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you can login with the default credentials:&lt;br /&gt;
&lt;br /&gt;
username: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
password: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that you will need to change the password immediately.&lt;br /&gt;
&lt;br /&gt;
=== Disable Boot Interrupt ===&lt;br /&gt;
[[File:Image.png|thumb|Commands needed to disable boot interrupt on serial input.]]&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi boot loader will interrupt the boot sequence if data is sent through the main serial port of the Raspberry Pi. Since we&#039;re connecting &amp;quot;nosiy&amp;quot; hardware to the port, this will always interrupt the boot sequence and we need to disable this feature. &lt;br /&gt;
&lt;br /&gt;
In order to do this, reboot the Pi (sudo reboot) and send anything during the count-down in the bootloader (check the YouTube video linked above, if you&#039;re not sure).&lt;br /&gt;
&lt;br /&gt;
Then enter the following commands into the bootloader prompt:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
setenv bootdelay -2&lt;br /&gt;
saveenv&lt;br /&gt;
reset&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The Pi should reboot and the count-down should be gone.&lt;br /&gt;
&lt;br /&gt;
=== Some Settings ===&lt;br /&gt;
&lt;br /&gt;
[TODO/WIP]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are some miscellaneous settings I think are a good idea for an OpenMower install:&lt;br /&gt;
&lt;br /&gt;
* Remove the unnecessary snap system: &amp;lt;code&amp;gt;sudo snap remove --purge lxd &amp;amp;&amp;amp; sudo snap remove --purge core20 &amp;amp;&amp;amp; sudo snap remove --purge snapd &amp;amp;&amp;amp; sudo apt purge --autoremove snapd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Disable unattended upgrades: &amp;lt;code&amp;gt;sudo systemctl stop --force unattended-upgrades &amp;amp;&amp;amp; sudo systemctl disable unattended-upgrades &amp;amp;&amp;amp; sudo systemctl mask unattended-upgrades&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* I like to add the following to &amp;lt;code&amp;gt;cmdline.txt&amp;lt;/code&amp;gt; in order to fsck on boot:  &amp;lt;code&amp;gt;fsck.mode=force fsck.repair=yes&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* I prefer to use a static IP (If you use the [[System_Image#Installing_a_WiFi_Hot-Spot_(optional,_but_recommended)|recommend WiFi Hot-Spot]] use &amp;lt;code&amp;gt;sudo nmtui&amp;lt;/code&amp;gt; to configure a static IP)&lt;br /&gt;
&lt;br /&gt;
* If you like to have a terminal wifi scanner/signal monitor just install &amp;lt;code&amp;gt;sudo apt install wavemon&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you like you can change the timezone: &amp;lt;code&amp;gt;sudo timedatectl set-timezone Region/Location&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;sudo dpkg-reconfigure tzdata&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you ever like to plug a keyboard into the Pi don&#039;t forget to change the keymap: &amp;lt;code&amp;gt;sudo dpkg-reconfigure keyboard-configuration&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM)===&lt;br /&gt;
Compiling the OpenMower software will need more than 2GB of RAM. In order to still do this on a Pi with &amp;lt;= 2GB of RAM, we will add a 2GB swap file to the system by entering the following commands:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Create a new 2GB swap file&lt;br /&gt;
sudo fallocate -l 2G /swapfile&lt;br /&gt;
# Change permissions, so that only root can read and write&lt;br /&gt;
sudo chmod 600 /swapfile&lt;br /&gt;
# Create swap space in the file&lt;br /&gt;
sudo mkswap /swapfile&lt;br /&gt;
# Add it to the fstab&lt;br /&gt;
echo &#039;/swapfile swap swap defaults 0 0&#039; | sudo tee -a /etc/fstab /swapfile swap swap defaults 0 0&lt;br /&gt;
# Reboot to activate&lt;br /&gt;
sudo reboot&lt;br /&gt;
&lt;br /&gt;
# Check if it&#039;s activated&lt;br /&gt;
sudo swapon --show&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Installing a WiFi Hot-Spot (optional, but recommended)===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Since we will be configuring the WiFi interface, make sure that you have connected Etherent to your Raspberry Pi for this step.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As soon as you have closed your mower&#039;s enclosure, you won&#039;t have physical access to your Raspberry Pi anymore. If for some reason it&#039;s unable to connect to your WiFi (e.g. you have changed your password), you would need to open the case to get access to the SD card or Ethernet port on the Pi to regain access.&lt;br /&gt;
&lt;br /&gt;
To prevent this, we&#039;re going to install a hot-spot software which helps you to connect to WiFi by opening a hot-spot each time the Pi cannot connect to a known WiFi connection.&lt;br /&gt;
&lt;br /&gt;
Now is the best time to do this, because we have a serial terminal anyways and can mess with the network interfaces without shutting us out of the system!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Just use the following commands for this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# If dpkg throws an error like&lt;br /&gt;
#   dpkg: error processing package ... (--install):&lt;br /&gt;
#   dependency problems - leaving unconfigured&lt;br /&gt;
# you need some dependencies, correct them by running:&lt;br /&gt;
sudo apt install -f&lt;br /&gt;
&lt;br /&gt;
# We need to get a patched version of the network manager for this&lt;br /&gt;
wget https://davesteele.github.io/comitup/deb/python3-networkmanager_2.2-1dss02_all.deb&lt;br /&gt;
sudo dpkg -i python3-networkmanager_2.2-1dss02_all.deb&lt;br /&gt;
rm python3-networkmanager_2.2-1dss02_all.deb&lt;br /&gt;
# we need to disable systemd-resolveds caching DNS stub resolver&lt;br /&gt;
# if you want to know why check: https://github.com/pi-hole/docker-pi-hole/#installing-on-ubuntu&lt;br /&gt;
sudo sed -r -i.orig &#039;s/#?DNSStubListener=yes/DNSStubListener=no/g&#039; /etc/systemd/resolved.conf&lt;br /&gt;
sudo systemctl restart systemd-resolved.service&lt;br /&gt;
&lt;br /&gt;
nslookup ntp.org&lt;br /&gt;
# this will throw an dns error:&lt;br /&gt;
#   ;; connection timed out; no servers could be reached&lt;br /&gt;
sudo sh -c &#039;rm /etc/resolv.conf &amp;amp;&amp;amp; ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf&#039;&lt;br /&gt;
sudo systemctl restart systemd-resolved.service&lt;br /&gt;
nslookup ntp.org&lt;br /&gt;
# DNS should work now&lt;br /&gt;
&lt;br /&gt;
# Install comitup using latest version from the website&lt;br /&gt;
wget https://davesteele.github.io/comitup/deb/comitup_1.38-1_all.deb&lt;br /&gt;
sudo dpkg -i comitup_1.38-1_all.deb&lt;br /&gt;
rm comitup_1.38-1_all.deb&lt;br /&gt;
&lt;br /&gt;
sudo systemctl stop comitup&lt;br /&gt;
# Now use network-manager to:&lt;br /&gt;
# - add you wifi network&lt;br /&gt;
# optional:&lt;br /&gt;
# - change your hostname&lt;br /&gt;
# - add a dhcp ethernet connection without any device assigned&lt;br /&gt;
# (if even the hotspot malfunctions you can plug in a usb ethernet adapter)&lt;br /&gt;
sudo nmtui&lt;br /&gt;
&lt;br /&gt;
# Edit comitup.conf to change the wifi name and password (I use OpenMower-&amp;lt;nn&amp;gt;)&lt;br /&gt;
sudo nano /etc/comitup.conf&lt;br /&gt;
sudo systemctl restart comitup&lt;br /&gt;
# reboot - it should work now&lt;br /&gt;
sudo reboot&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable Serial Console===&lt;br /&gt;
Now that we have setup the network and can access the Pi even if our WiFi is not in range, we need to disable that serial console so that we can use the serial port for hardware.&lt;br /&gt;
&lt;br /&gt;
To do this, enter: &amp;lt;code&amp;gt;sudo nano /boot/firmware/cmdline.txt&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and remove the &amp;lt;code&amp;gt;console=serial0,115200&amp;lt;/code&amp;gt; part of the line.&lt;br /&gt;
&lt;br /&gt;
Save the file and reboot. You should still see the bootloader output, but no serial output after that.&lt;br /&gt;
&lt;br /&gt;
==Installing Tools==&lt;br /&gt;
If you&#039;re happy with your basic Ubuntu setup, it&#039;s time to install some tools required for the OpenMower&lt;br /&gt;
&lt;br /&gt;
=== General Dependencies ===&lt;br /&gt;
Just install them with apt:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install build-essential git&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===STR2STR (optional, recommended; only needed if you&#039;re using NTRIP, so probably most of you)===&lt;br /&gt;
We need a newer version than the one available in apt, so install it from source:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install gfortran&lt;br /&gt;
git clone https://github.com/rtklibexplorer/RTKLIB&lt;br /&gt;
cd RTKLIB&lt;br /&gt;
git checkout tags/b34c&lt;br /&gt;
cd app/consapp/&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You should now be able to run str2str from anywhere.&lt;br /&gt;
&lt;br /&gt;
=== OpenOCD (optional, recommended; only needed if you want to flash Pico from Raspberry Pi)===&lt;br /&gt;
We need to get the OpenOCD version from the Raspberry Pi foundation, because the &amp;quot;original&amp;quot; one doesn&#039;t have the Pico support built in yet.&lt;br /&gt;
&lt;br /&gt;
Install it from source:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install automake autoconf build-essential texinfo libtool libftdi-dev libusb-1.0-0-dev pkg-config&lt;br /&gt;
git clone https://github.com/raspberrypi/openocd.git --recursive --branch rp2040 --depth=1&lt;br /&gt;
cd openocd&lt;br /&gt;
./bootstrap&lt;br /&gt;
./configure --enable-ftdi --enable-sysfsgpio --enable-bcm2835gpio&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You can test if it was a success by running:&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
ubuntu@ubuntu:~$ openocd -v&lt;br /&gt;
Open On-Chip Debugger 0.11.0-g610f137-dirty (2022-06-07-00:39)&lt;br /&gt;
Licensed under GNU GPL v2&lt;br /&gt;
For bug reports, read&lt;br /&gt;
	http://openocd.org/doc/doxygen/bugs.html&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installing ROS and OpenMower==&lt;br /&gt;
We&#039;re using ROS Noetic for the OpenMower project. In this step we will install it, get the OpenMower sources, build the sources and create a basic configuration file for your mower.&lt;br /&gt;
&lt;br /&gt;
===Install ROS Noetic===&lt;br /&gt;
Since we&#039;re running Ubuntu 20.04 installing ROS is as easy as running the following commands:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Get the ROS apt repository&lt;br /&gt;
sudo sh -c &#039;echo &amp;quot;deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main&amp;quot; &amp;gt; /etc/apt/sources.list.d/ros-latest.list&#039;&lt;br /&gt;
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -&lt;br /&gt;
&lt;br /&gt;
# Install the ROS base system&lt;br /&gt;
sudo apt update&lt;br /&gt;
sudo apt install ros-noetic-ros-base&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;We only need to register the ROS installation in your &amp;lt;code&amp;gt;.bashrc&amp;lt;/code&amp;gt; file. This will enable you to call ROS specific commands from your terminal:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.bash&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Installing OpenMower Software===&lt;br /&gt;
Now we&#039;re finally able to install the OpenMower software. First, we&#039;re checking out the current version of the sources, then we&#039;re getting the dependencies and finally we&#039;re building the sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Clone the GitHub Repository:&lt;br /&gt;
git clone --recursive https://github.com/ClemensElflein/open_mower_ros.git&lt;br /&gt;
&lt;br /&gt;
# Get rosdep, only needed once&lt;br /&gt;
sudo apt install python3-rosdep&lt;br /&gt;
sudo rosdep init&lt;br /&gt;
rosdep update&lt;br /&gt;
&lt;br /&gt;
# Get the dependencies using rosdep&lt;br /&gt;
cd open_mower_ros/&lt;br /&gt;
rosdep install --from-paths src --ignore-src --default-yes&lt;br /&gt;
&lt;br /&gt;
# set the default boot behavior to cli and disable unnecessary services cause some ros dependencie installs a basic desktop&lt;br /&gt;
sudo systemctl set-default multi-user&lt;br /&gt;
sudo systemctl stop --force bluetooth&lt;br /&gt;
sudo systemctl disable --now bluetooth&lt;br /&gt;
sudo systemctl mask --now bluetooth&lt;br /&gt;
&lt;br /&gt;
# Finally, build the sources. This will take a while! &lt;br /&gt;
catkin_make -j1 # on 2GB Pi with SWAP - this takes at least &lt;br /&gt;
# OR&lt;br /&gt;
catkin_make -j2 # on 4/8GB Pi - this takes at least 20min&lt;br /&gt;
&lt;br /&gt;
# Copy the default configuration file to your home directory&lt;br /&gt;
cp open_mower_ros/src/open_mower/config/mower_config.sh.example ~/mower_config.sh&lt;br /&gt;
&lt;br /&gt;
# The next step is to also source the OpenMower ROS install&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;At this point the OpenMower software is successfully installed! You will need to configure the OpenMower software and then you&#039;re finally ready to mow.&lt;br /&gt;
&lt;br /&gt;
== Some Additional Issues==&lt;br /&gt;
&lt;br /&gt;
===I&#039;m using an external WiFi dongle for better coverage, but sometimes it doesn&#039;t work===&lt;br /&gt;
It seems that the Ubuntu sometimes puts external WiFi dongles to sleep. To prevent this, we create a service which disables powersave:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Enter this to create the service&lt;br /&gt;
sudo systemctl --full --force edit wifi_powersave@.service&lt;br /&gt;
&lt;br /&gt;
# Paste the following:&lt;br /&gt;
[Unit]&lt;br /&gt;
Description=Set WiFi power save %i&lt;br /&gt;
After=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
Type=oneshot&lt;br /&gt;
RemainAfterExit=yes&lt;br /&gt;
ExecStart=/sbin/iw dev wlan1 set power_save %i&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
# Save and exit, then activate using:&lt;br /&gt;
sudo systemctl disable wifi_powersave@on.service&lt;br /&gt;
sudo systemctl enable wifi_powersave@off.service&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>
	</entry>
	<entry>
		<id>https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=283</id>
		<title>OLD Bare Metal System Image</title>
		<link rel="alternate" type="text/html" href="https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=283"/>
		<updated>2022-08-11T23:35:49Z</updated>

		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page will guide you through the steps to install a basic system image.&lt;br /&gt;
&lt;br /&gt;
On this image you will have the ROS base system, the OpenMower installation, local configuration for your mower and some tools to help you work with the mower.&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
In order to follow this guide, you will need the following:&lt;br /&gt;
&lt;br /&gt;
#A Raspberry Pi 4 (4GB or more recommended, [[System Image#Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM)|2GB works with swap, see here]])&lt;br /&gt;
#An SD card&lt;br /&gt;
#A soldered OpenMower mainboard&lt;br /&gt;
&lt;br /&gt;
==Installing the Base System==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;&#039;&#039;&#039;There is also a YouTube video explaining the steps in this section:&#039;&#039;&#039; https://youtu.be/_bImqD-pQSA?t=562&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Flashing Ubuntu to SD Card ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first step is to install the base system. We&#039;re using Ubuntu 20.04 Server for the Raspberry Pi. This is, because this image gives us best support ROS Noetic.&lt;br /&gt;
&lt;br /&gt;
Installing the base image is easy:&lt;br /&gt;
&lt;br /&gt;
#[https://www.raspberrypi.com/software/ Get the Raspberry Pi Imager software]&lt;br /&gt;
#Select the correct operating system:  &#039;&#039;Other-general-purpose OS &amp;gt; Ubuntu &amp;gt; Ubuntu Server 20.04.4 LTS (RPI 3/4/400) 64-bit&#039;&#039;&lt;br /&gt;
#Insert your SD card into your PC and select it in the &#039;&#039;Storage&#039;&#039; part of the software&lt;br /&gt;
#Click &#039;&#039;write&#039;&#039; and wait for the process to finish&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have successfully flashed your image, remove the SD for your PC &#039;&#039;&#039;and reinsert it again.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Then replace the &amp;lt;code&amp;gt;/boot/config.txt&amp;lt;/code&amp;gt; file with the one provided here: [https://github.com/ClemensElflein/OpenMower/blob/main/configs/RaspberryPiConfig/config.txt]&lt;br /&gt;
&lt;br /&gt;
This will enable all hardware serial ports on the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can theoretically configure networking in this step as well, but I&#039;m not recommending it. This is, because the networking information file gets only copied once and if you have an error it won&#039;t work.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;We need an interactive terminal in the next step anyways.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have done this step, you can eject the SD card and plug it into your Raspberry Pi 4.&lt;br /&gt;
&lt;br /&gt;
=== Opening a Serial Terminal ===&lt;br /&gt;
[[File:SerialRedirect.png|thumb|Serial Terminal: minicom -D /dev/ttyACM0]]&lt;br /&gt;
This step is needed for the following sections. The goal is to have a serial terminal to do basic config (networking etc) easily.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The easiest way of doing so is:&lt;br /&gt;
# Flash the SerialRedirect firmware into your Pico. Get it here: https://github.com/ClemensElflein/OpenMower/tree/main/Firmware/SerialRedirect/bin&lt;br /&gt;
# Provide your mainboard with power&lt;br /&gt;
# Plug your Pico into a computer. A virtual COM port should appear&lt;br /&gt;
# Connect to the COM port (I&#039;m using minicom, see image on the right), then press enter to start the Raspberry Pi.&lt;br /&gt;
#The Pi boots and a serial terminal will appear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you can login with the default credentials:&lt;br /&gt;
&lt;br /&gt;
username: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
password: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that you will need to change the password immediately.&lt;br /&gt;
&lt;br /&gt;
=== Disable Boot Interrupt ===&lt;br /&gt;
[[File:Image.png|thumb|Commands needed to disable boot interrupt on serial input.]]&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi boot loader will interrupt the boot sequence if data is sent through the main serial port of the Raspberry Pi. Since we&#039;re connecting &amp;quot;nosiy&amp;quot; hardware to the port, this will always interrupt the boot sequence and we need to disable this feature. &lt;br /&gt;
&lt;br /&gt;
In order to do this, reboot the Pi (sudo reboot) and send anything during the count-down in the bootloader (check the YouTube video linked above, if you&#039;re not sure).&lt;br /&gt;
&lt;br /&gt;
Then enter the following commands into the bootloader prompt:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
setenv bootdelay -2&lt;br /&gt;
saveenv&lt;br /&gt;
reset&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The Pi should reboot and the count-down should be gone.&lt;br /&gt;
&lt;br /&gt;
=== Some Settings ===&lt;br /&gt;
&lt;br /&gt;
[TODO/WIP]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are some miscellaneous settings I think are a good idea for an OpenMower install:&lt;br /&gt;
&lt;br /&gt;
* Remove the unnecessary snap system: &amp;lt;code&amp;gt;sudo snap remove --purge lxd &amp;amp;&amp;amp; sudo snap remove --purge core20 &amp;amp;&amp;amp; sudo snap remove --purge snapd &amp;amp;&amp;amp; sudo apt purge --autoremove snapd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Disable unattended upgrades: &amp;lt;code&amp;gt;sudo systemctl stop --force unattended-upgrades &amp;amp;&amp;amp; sudo systemctl disable unattended-upgrades &amp;amp;&amp;amp; sudo systemctl mask unattended-upgrades&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* I like to add the following to &amp;lt;code&amp;gt;cmdline.txt&amp;lt;/code&amp;gt; in order to fsck on boot:  &amp;lt;code&amp;gt;fsck.mode=force fsck.repair=yes&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* I prefer to use a static IP (If you use the [[System_Image#Installing_a_WiFi_Hot-Spot_(optional,_but_recommended)|recommend WiFi Hot-Spot]] use &amp;lt;code&amp;gt;sudo nmtui&amp;lt;/code&amp;gt; to configure a static IP)&lt;br /&gt;
&lt;br /&gt;
* If you like to have a terminal wifi scanner/signal monitor just install &amp;lt;code&amp;gt;sudo apt install wavemon&amp;lt;code/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you like you can change the timezone: &amp;lt;code&amp;gt;sudo timedatectl set-timezone Region/Location&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;sudo dpkg-reconfigure tzdata&amp;lt;/code&amp;gt;&lt;br /&gt;
*If you ever like to plug a keyboard into the Pi don&#039;t forget to change the keymap: &amp;lt;code&amp;gt;sudo dpkg-reconfigure keyboard-configuration&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM)===&lt;br /&gt;
Compiling the OpenMower software will need more than 2GB of RAM. In order to still do this on a Pi with &amp;lt;= 2GB of RAM, we will add a 2GB swap file to the system by entering the following commands:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Create a new 2GB swap file&lt;br /&gt;
sudo fallocate -l 2G /swapfile&lt;br /&gt;
# Change permissions, so that only root can read and write&lt;br /&gt;
sudo chmod 600 /swapfile&lt;br /&gt;
# Create swap space in the file&lt;br /&gt;
sudo mkswap /swapfile&lt;br /&gt;
# Add it to the fstab&lt;br /&gt;
echo &#039;/swapfile swap swap defaults 0 0&#039; | sudo tee -a /etc/fstab /swapfile swap swap defaults 0 0&lt;br /&gt;
# Reboot to activate&lt;br /&gt;
sudo reboot&lt;br /&gt;
&lt;br /&gt;
# Check if it&#039;s activated&lt;br /&gt;
sudo swapon --show&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Installing a WiFi Hot-Spot (optional, but recommended)===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Since we will be configuring the WiFi interface, make sure that you have connected Etherent to your Raspberry Pi for this step.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As soon as you have closed your mower&#039;s enclosure, you won&#039;t have physical access to your Raspberry Pi anymore. If for some reason it&#039;s unable to connect to your WiFi (e.g. you have changed your password), you would need to open the case to get access to the SD card or Ethernet port on the Pi to regain access.&lt;br /&gt;
&lt;br /&gt;
To prevent this, we&#039;re going to install a hot-spot software which helps you to connect to WiFi by opening a hot-spot each time the Pi cannot connect to a known WiFi connection.&lt;br /&gt;
&lt;br /&gt;
Now is the best time to do this, because we have a serial terminal anyways and can mess with the network interfaces without shutting us out of the system!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Just use the following commands for this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# If dpkg throws an error like&lt;br /&gt;
#   dpkg: error processing package ... (--install):&lt;br /&gt;
#   dependency problems - leaving unconfigured&lt;br /&gt;
# you need some dependencies, correct them by running:&lt;br /&gt;
sudo apt install -f&lt;br /&gt;
&lt;br /&gt;
# We need to get a patched version of the network manager for this&lt;br /&gt;
wget https://davesteele.github.io/comitup/deb/python3-networkmanager_2.2-1dss02_all.deb&lt;br /&gt;
sudo dpkg -i python3-networkmanager_2.2-1dss02_all.deb&lt;br /&gt;
rm python3-networkmanager_2.2-1dss02_all.deb&lt;br /&gt;
# we need to disable systemd-resolveds caching DNS stub resolver&lt;br /&gt;
# if you want to know why check: https://github.com/pi-hole/docker-pi-hole/#installing-on-ubuntu&lt;br /&gt;
sudo sed -r -i.orig &#039;s/#?DNSStubListener=yes/DNSStubListener=no/g&#039; /etc/systemd/resolved.conf&lt;br /&gt;
sudo systemctl restart systemd-resolved.service&lt;br /&gt;
&lt;br /&gt;
nslookup ntp.org&lt;br /&gt;
# this will throw an dns error:&lt;br /&gt;
#   ;; connection timed out; no servers could be reached&lt;br /&gt;
sudo sh -c &#039;rm /etc/resolv.conf &amp;amp;&amp;amp; ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf&#039;&lt;br /&gt;
sudo systemctl restart systemd-resolved.service&lt;br /&gt;
nslookup ntp.org&lt;br /&gt;
# DNS should work now&lt;br /&gt;
&lt;br /&gt;
# Install comitup using latest version from the website&lt;br /&gt;
wget https://davesteele.github.io/comitup/deb/comitup_1.38-1_all.deb&lt;br /&gt;
sudo dpkg -i comitup_1.38-1_all.deb&lt;br /&gt;
rm comitup_1.38-1_all.deb&lt;br /&gt;
&lt;br /&gt;
sudo systemctl stop comitup&lt;br /&gt;
# Now use network-manager to:&lt;br /&gt;
# - add you wifi network&lt;br /&gt;
# optional:&lt;br /&gt;
# - change your hostname&lt;br /&gt;
# - add a dhcp ethernet connection without any device assigned&lt;br /&gt;
# (if even the hotspot malfunctions you can plug in a usb ethernet adapter)&lt;br /&gt;
sudo nmtui&lt;br /&gt;
&lt;br /&gt;
# Edit comitup.conf to change the wifi name and password (I use OpenMower-&amp;lt;nn&amp;gt;)&lt;br /&gt;
sudo nano /etc/comitup.conf&lt;br /&gt;
sudo systemctl restart comitup&lt;br /&gt;
# reboot - it should work now&lt;br /&gt;
sudo reboot&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable Serial Console===&lt;br /&gt;
Now that we have setup the network and can access the Pi even if our WiFi is not in range, we need to disable that serial console so that we can use the serial port for hardware.&lt;br /&gt;
&lt;br /&gt;
To do this, enter: &amp;lt;code&amp;gt;sudo nano /boot/firmware/cmdline.txt&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and remove the &amp;lt;code&amp;gt;console=serial0,115200&amp;lt;/code&amp;gt; part of the line.&lt;br /&gt;
&lt;br /&gt;
Save the file and reboot. You should still see the bootloader output, but no serial output after that.&lt;br /&gt;
&lt;br /&gt;
==Installing Tools==&lt;br /&gt;
If you&#039;re happy with your basic Ubuntu setup, it&#039;s time to install some tools required for the OpenMower&lt;br /&gt;
&lt;br /&gt;
=== General Dependencies ===&lt;br /&gt;
Just install them with apt:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install build-essential git&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===STR2STR (optional, recommended; only needed if you&#039;re using NTRIP, so probably most of you)===&lt;br /&gt;
We need a newer version than the one available in apt, so install it from source:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install gfortran&lt;br /&gt;
git clone https://github.com/rtklibexplorer/RTKLIB&lt;br /&gt;
cd RTKLIB&lt;br /&gt;
git checkout tags/b34c&lt;br /&gt;
cd app/consapp/&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You should now be able to run str2str from anywhere.&lt;br /&gt;
&lt;br /&gt;
=== OpenOCD (optional, recommended; only needed if you want to flash Pico from Raspberry Pi)===&lt;br /&gt;
We need to get the OpenOCD version from the Raspberry Pi foundation, because the &amp;quot;original&amp;quot; one doesn&#039;t have the Pico support built in yet.&lt;br /&gt;
&lt;br /&gt;
Install it from source:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install automake autoconf build-essential texinfo libtool libftdi-dev libusb-1.0-0-dev pkg-config&lt;br /&gt;
git clone https://github.com/raspberrypi/openocd.git --recursive --branch rp2040 --depth=1&lt;br /&gt;
cd openocd&lt;br /&gt;
./bootstrap&lt;br /&gt;
./configure --enable-ftdi --enable-sysfsgpio --enable-bcm2835gpio&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You can test if it was a success by running:&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
ubuntu@ubuntu:~$ openocd -v&lt;br /&gt;
Open On-Chip Debugger 0.11.0-g610f137-dirty (2022-06-07-00:39)&lt;br /&gt;
Licensed under GNU GPL v2&lt;br /&gt;
For bug reports, read&lt;br /&gt;
	http://openocd.org/doc/doxygen/bugs.html&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installing ROS and OpenMower==&lt;br /&gt;
We&#039;re using ROS Noetic for the OpenMower project. In this step we will install it, get the OpenMower sources, build the sources and create a basic configuration file for your mower.&lt;br /&gt;
&lt;br /&gt;
===Install ROS Noetic===&lt;br /&gt;
Since we&#039;re running Ubuntu 20.04 installing ROS is as easy as running the following commands:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Get the ROS apt repository&lt;br /&gt;
sudo sh -c &#039;echo &amp;quot;deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main&amp;quot; &amp;gt; /etc/apt/sources.list.d/ros-latest.list&#039;&lt;br /&gt;
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -&lt;br /&gt;
&lt;br /&gt;
# Install the ROS base system&lt;br /&gt;
sudo apt update&lt;br /&gt;
sudo apt install ros-noetic-ros-base&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;We only need to register the ROS installation in your &amp;lt;code&amp;gt;.bashrc&amp;lt;/code&amp;gt; file. This will enable you to call ROS specific commands from your terminal:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.bash&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Installing OpenMower Software===&lt;br /&gt;
Now we&#039;re finally able to install the OpenMower software. First, we&#039;re checking out the current version of the sources, then we&#039;re getting the dependencies and finally we&#039;re building the sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Clone the GitHub Repository:&lt;br /&gt;
git clone --recursive https://github.com/ClemensElflein/open_mower_ros.git&lt;br /&gt;
&lt;br /&gt;
# Get rosdep, only needed once&lt;br /&gt;
sudo apt install python3-rosdep&lt;br /&gt;
sudo rosdep init&lt;br /&gt;
rosdep update&lt;br /&gt;
&lt;br /&gt;
# Get the dependencies using rosdep&lt;br /&gt;
cd open_mower_ros/&lt;br /&gt;
rosdep install --from-paths src --ignore-src --default-yes&lt;br /&gt;
&lt;br /&gt;
# set the default boot behavior to cli and disable unnecessary services cause some ros dependencie installs a basic desktop&lt;br /&gt;
sudo systemctl set-default multi-user&lt;br /&gt;
sudo systemctl stop --force bluetooth&lt;br /&gt;
sudo systemctl disable --now bluetooth&lt;br /&gt;
sudo systemctl mask --now bluetooth&lt;br /&gt;
&lt;br /&gt;
# Finally, build the sources. This will take a while! &lt;br /&gt;
catkin_make -j1 # on 2GB Pi with SWAP - this takes at least &lt;br /&gt;
# OR&lt;br /&gt;
catkin_make -j2 # on 4/8GB Pi - this takes at least 20min&lt;br /&gt;
&lt;br /&gt;
# Copy the default configuration file to your home directory&lt;br /&gt;
cp open_mower_ros/src/open_mower/config/mower_config.sh.example ~/mower_config.sh&lt;br /&gt;
&lt;br /&gt;
# The next step is to also source the OpenMower ROS install&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;At this point the OpenMower software is successfully installed! You will need to configure the OpenMower software and then you&#039;re finally ready to mow.&lt;br /&gt;
&lt;br /&gt;
== Some Additional Issues==&lt;br /&gt;
&lt;br /&gt;
===I&#039;m using an external WiFi dongle for better coverage, but sometimes it doesn&#039;t work===&lt;br /&gt;
It seems that the Ubuntu sometimes puts external WiFi dongles to sleep. To prevent this, we create a service which disables powersave:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Enter this to create the service&lt;br /&gt;
sudo systemctl --full --force edit wifi_powersave@.service&lt;br /&gt;
&lt;br /&gt;
# Paste the following:&lt;br /&gt;
[Unit]&lt;br /&gt;
Description=Set WiFi power save %i&lt;br /&gt;
After=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
Type=oneshot&lt;br /&gt;
RemainAfterExit=yes&lt;br /&gt;
ExecStart=/sbin/iw dev wlan1 set power_save %i&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
# Save and exit, then activate using:&lt;br /&gt;
sudo systemctl disable wifi_powersave@on.service&lt;br /&gt;
sudo systemctl enable wifi_powersave@off.service&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>
	</entry>
	<entry>
		<id>https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=282</id>
		<title>OLD Bare Metal System Image</title>
		<link rel="alternate" type="text/html" href="https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=282"/>
		<updated>2022-08-11T23:22:56Z</updated>

		<summary type="html">&lt;p&gt;Potter-91: /* Installing OpenMower Software */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page will guide you through the steps to install a basic system image.&lt;br /&gt;
&lt;br /&gt;
On this image you will have the ROS base system, the OpenMower installation, local configuration for your mower and some tools to help you work with the mower.&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
In order to follow this guide, you will need the following:&lt;br /&gt;
&lt;br /&gt;
#A Raspberry Pi 4 (4GB or more recommended, [[System Image#Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM)|2GB works with swap, see here]])&lt;br /&gt;
#An SD card&lt;br /&gt;
#A soldered OpenMower mainboard&lt;br /&gt;
&lt;br /&gt;
==Installing the Base System==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;&#039;&#039;&#039;There is also a YouTube video explaining the steps in this section:&#039;&#039;&#039; https://youtu.be/_bImqD-pQSA?t=562&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Flashing Ubuntu to SD Card ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first step is to install the base system. We&#039;re using Ubuntu 20.04 Server for the Raspberry Pi. This is, because this image gives us best support ROS Noetic.&lt;br /&gt;
&lt;br /&gt;
Installing the base image is easy:&lt;br /&gt;
&lt;br /&gt;
#[https://www.raspberrypi.com/software/ Get the Raspberry Pi Imager software]&lt;br /&gt;
#Select the correct operating system:  &#039;&#039;Other-general-purpose OS &amp;gt; Ubuntu &amp;gt; Ubuntu Server 20.04.4 LTS (RPI 3/4/400) 64-bit&#039;&#039;&lt;br /&gt;
#Insert your SD card into your PC and select it in the &#039;&#039;Storage&#039;&#039; part of the software&lt;br /&gt;
#Click &#039;&#039;write&#039;&#039; and wait for the process to finish&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have successfully flashed your image, remove the SD for your PC &#039;&#039;&#039;and reinsert it again.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Then replace the &amp;lt;code&amp;gt;/boot/config.txt&amp;lt;/code&amp;gt; file with the one provided here: [https://github.com/ClemensElflein/OpenMower/blob/main/configs/RaspberryPiConfig/config.txt]&lt;br /&gt;
&lt;br /&gt;
This will enable all hardware serial ports on the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can theoretically configure networking in this step as well, but I&#039;m not recommending it. This is, because the networking information file gets only copied once and if you have an error it won&#039;t work.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;We need an interactive terminal in the next step anyways.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have done this step, you can eject the SD card and plug it into your Raspberry Pi 4.&lt;br /&gt;
&lt;br /&gt;
=== Opening a Serial Terminal ===&lt;br /&gt;
[[File:SerialRedirect.png|thumb|Serial Terminal: minicom -D /dev/ttyACM0]]&lt;br /&gt;
This step is needed for the following sections. The goal is to have a serial terminal to do basic config (networking etc) easily.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The easiest way of doing so is:&lt;br /&gt;
# Flash the SerialRedirect firmware into your Pico. Get it here: https://github.com/ClemensElflein/OpenMower/tree/main/Firmware/SerialRedirect/bin&lt;br /&gt;
# Provide your mainboard with power&lt;br /&gt;
# Plug your Pico into a computer. A virtual COM port should appear&lt;br /&gt;
# Connect to the COM port (I&#039;m using minicom, see image on the right), then press enter to start the Raspberry Pi.&lt;br /&gt;
#The Pi boots and a serial terminal will appear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you can login with the default credentials:&lt;br /&gt;
&lt;br /&gt;
username: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
password: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that you will need to change the password immediately.&lt;br /&gt;
&lt;br /&gt;
=== Disable Boot Interrupt ===&lt;br /&gt;
[[File:Image.png|thumb|Commands needed to disable boot interrupt on serial input.]]&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi boot loader will interrupt the boot sequence if data is sent through the main serial port of the Raspberry Pi. Since we&#039;re connecting &amp;quot;nosiy&amp;quot; hardware to the port, this will always interrupt the boot sequence and we need to disable this feature. &lt;br /&gt;
&lt;br /&gt;
In order to do this, reboot the Pi (sudo reboot) and send anything during the count-down in the bootloader (check the YouTube video linked above, if you&#039;re not sure).&lt;br /&gt;
&lt;br /&gt;
Then enter the following commands into the bootloader prompt:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
setenv bootdelay -2&lt;br /&gt;
saveenv&lt;br /&gt;
reset&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The Pi should reboot and the count-down should be gone.&lt;br /&gt;
&lt;br /&gt;
=== Some Settings ===&lt;br /&gt;
&lt;br /&gt;
[TODO/WIP]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are some miscellaneous settings I think are a good idea for an OpenMower install:&lt;br /&gt;
&lt;br /&gt;
* Remove the unnecessary snap system: &amp;lt;code&amp;gt;sudo snap remove --purge lxd &amp;amp;&amp;amp; sudo snap remove --purge core20 &amp;amp;&amp;amp; sudo snap remove --purge snapd &amp;amp;&amp;amp; sudo apt purge --autoremove snapd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Disable unattended upgrades: &amp;lt;code&amp;gt;sudo systemctl stop --force unattended-upgrades &amp;amp;&amp;amp; sudo systemctl disable unattended-upgrades &amp;amp;&amp;amp; sudo systemctl mask unattended-upgrades&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* I like to add the following to &amp;lt;code&amp;gt;cmdline.txt&amp;lt;/code&amp;gt; in order to fsck on boot:  &amp;lt;code&amp;gt;fsck.mode=force fsck.repair=yes&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* I prefer to use a static IP (If you use the [[System_Image#Installing_a_WiFi_Hot-Spot_(optional,_but_recommended)|recommend WiFi Hot-Spot]] use &amp;lt;code&amp;gt;sudo nmtui&amp;lt;/code&amp;gt; to configure a static IP)&lt;br /&gt;
&lt;br /&gt;
* If you like you can change the timezone: &amp;lt;code&amp;gt;sudo timedatectl set-timezone Region/Location&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;sudo dpkg-reconfigure tzdata&amp;lt;/code&amp;gt;&lt;br /&gt;
*If you ever like to plug a keyboard into the Pi don&#039;t forget to change the keymap: &amp;lt;code&amp;gt;sudo dpkg-reconfigure keyboard-configuration&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM)===&lt;br /&gt;
Compiling the OpenMower software will need more than 2GB of RAM. In order to still do this on a Pi with &amp;lt;= 2GB of RAM, we will add a 2GB swap file to the system by entering the following commands:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Create a new 2GB swap file&lt;br /&gt;
sudo fallocate -l 2G /swapfile&lt;br /&gt;
# Change permissions, so that only root can read and write&lt;br /&gt;
sudo chmod 600 /swapfile&lt;br /&gt;
# Create swap space in the file&lt;br /&gt;
sudo mkswap /swapfile&lt;br /&gt;
# Add it to the fstab&lt;br /&gt;
echo &#039;/swapfile swap swap defaults 0 0&#039; | sudo tee -a /etc/fstab /swapfile swap swap defaults 0 0&lt;br /&gt;
# Reboot to activate&lt;br /&gt;
sudo reboot&lt;br /&gt;
&lt;br /&gt;
# Check if it&#039;s activated&lt;br /&gt;
sudo swapon --show&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Installing a WiFi Hot-Spot (optional, but recommended)===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Since we will be configuring the WiFi interface, make sure that you have connected Etherent to your Raspberry Pi for this step.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As soon as you have closed your mower&#039;s enclosure, you won&#039;t have physical access to your Raspberry Pi anymore. If for some reason it&#039;s unable to connect to your WiFi (e.g. you have changed your password), you would need to open the case to get access to the SD card or Ethernet port on the Pi to regain access.&lt;br /&gt;
&lt;br /&gt;
To prevent this, we&#039;re going to install a hot-spot software which helps you to connect to WiFi by opening a hot-spot each time the Pi cannot connect to a known WiFi connection.&lt;br /&gt;
&lt;br /&gt;
Now is the best time to do this, because we have a serial terminal anyways and can mess with the network interfaces without shutting us out of the system!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Just use the following commands for this:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# If dpkg throws an error like&lt;br /&gt;
#   dpkg: error processing package ... (--install):&lt;br /&gt;
#   dependency problems - leaving unconfigured&lt;br /&gt;
# you need some dependencies, correct them by running:&lt;br /&gt;
sudo apt install -f&lt;br /&gt;
&lt;br /&gt;
# We need to get a patched version of the network manager for this&lt;br /&gt;
wget https://davesteele.github.io/comitup/deb/python3-networkmanager_2.2-1dss02_all.deb&lt;br /&gt;
sudo dpkg -i python3-networkmanager_2.2-1dss02_all.deb&lt;br /&gt;
rm python3-networkmanager_2.2-1dss02_all.deb&lt;br /&gt;
# we need to disable systemd-resolveds caching DNS stub resolver&lt;br /&gt;
# if you want to know why check: https://github.com/pi-hole/docker-pi-hole/#installing-on-ubuntu&lt;br /&gt;
sudo sed -r -i.orig &#039;s/#?DNSStubListener=yes/DNSStubListener=no/g&#039; /etc/systemd/resolved.conf&lt;br /&gt;
sudo systemctl restart systemd-resolved.service&lt;br /&gt;
&lt;br /&gt;
nslookup ntp.org&lt;br /&gt;
# this will throw an dns error:&lt;br /&gt;
#   ;; connection timed out; no servers could be reached&lt;br /&gt;
sudo sh -c &#039;rm /etc/resolv.conf &amp;amp;&amp;amp; ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf&#039;&lt;br /&gt;
sudo systemctl restart systemd-resolved.service&lt;br /&gt;
nslookup ntp.org&lt;br /&gt;
# DNS should work now&lt;br /&gt;
&lt;br /&gt;
# Install comitup using latest version from the website&lt;br /&gt;
wget https://davesteele.github.io/comitup/deb/comitup_1.38-1_all.deb&lt;br /&gt;
sudo dpkg -i comitup_1.38-1_all.deb&lt;br /&gt;
rm comitup_1.38-1_all.deb&lt;br /&gt;
&lt;br /&gt;
sudo systemctl stop comitup&lt;br /&gt;
# Now use network-manager to:&lt;br /&gt;
# - add you wifi network&lt;br /&gt;
# optional:&lt;br /&gt;
# - change your hostname&lt;br /&gt;
# - add a dhcp ethernet connection without any device assigned&lt;br /&gt;
# (if even the hotspot malfunctions you can plug in a usb ethernet adapter)&lt;br /&gt;
sudo nmtui&lt;br /&gt;
&lt;br /&gt;
# Edit comitup.conf to change the wifi name and password (I use OpenMower-&amp;lt;nn&amp;gt;)&lt;br /&gt;
sudo nano /etc/comitup.conf&lt;br /&gt;
sudo systemctl restart comitup&lt;br /&gt;
# reboot - it should work now&lt;br /&gt;
sudo reboot&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable Serial Console===&lt;br /&gt;
Now that we have setup the network and can access the Pi even if our WiFi is not in range, we need to disable that serial console so that we can use the serial port for hardware.&lt;br /&gt;
&lt;br /&gt;
To do this, enter: &amp;lt;code&amp;gt;sudo nano /boot/firmware/cmdline.txt&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and remove the &amp;lt;code&amp;gt;console=serial0,115200&amp;lt;/code&amp;gt; part of the line.&lt;br /&gt;
&lt;br /&gt;
Save the file and reboot. You should still see the bootloader output, but no serial output after that.&lt;br /&gt;
&lt;br /&gt;
==Installing Tools==&lt;br /&gt;
If you&#039;re happy with your basic Ubuntu setup, it&#039;s time to install some tools required for the OpenMower&lt;br /&gt;
&lt;br /&gt;
=== General Dependencies ===&lt;br /&gt;
Just install them with apt:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install build-essential git&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===STR2STR (optional, recommended; only needed if you&#039;re using NTRIP, so probably most of you)===&lt;br /&gt;
We need a newer version than the one available in apt, so install it from source:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install gfortran&lt;br /&gt;
git clone https://github.com/rtklibexplorer/RTKLIB&lt;br /&gt;
cd RTKLIB&lt;br /&gt;
git checkout tags/b34c&lt;br /&gt;
cd app/consapp/&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You should now be able to run str2str from anywhere.&lt;br /&gt;
&lt;br /&gt;
=== OpenOCD (optional, recommended; only needed if you want to flash Pico from Raspberry Pi)===&lt;br /&gt;
We need to get the OpenOCD version from the Raspberry Pi foundation, because the &amp;quot;original&amp;quot; one doesn&#039;t have the Pico support built in yet.&lt;br /&gt;
&lt;br /&gt;
Install it from source:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install automake autoconf build-essential texinfo libtool libftdi-dev libusb-1.0-0-dev pkg-config&lt;br /&gt;
git clone https://github.com/raspberrypi/openocd.git --recursive --branch rp2040 --depth=1&lt;br /&gt;
cd openocd&lt;br /&gt;
./bootstrap&lt;br /&gt;
./configure --enable-ftdi --enable-sysfsgpio --enable-bcm2835gpio&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You can test if it was a success by running:&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
ubuntu@ubuntu:~$ openocd -v&lt;br /&gt;
Open On-Chip Debugger 0.11.0-g610f137-dirty (2022-06-07-00:39)&lt;br /&gt;
Licensed under GNU GPL v2&lt;br /&gt;
For bug reports, read&lt;br /&gt;
	http://openocd.org/doc/doxygen/bugs.html&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installing ROS and OpenMower==&lt;br /&gt;
We&#039;re using ROS Noetic for the OpenMower project. In this step we will install it, get the OpenMower sources, build the sources and create a basic configuration file for your mower.&lt;br /&gt;
&lt;br /&gt;
===Install ROS Noetic===&lt;br /&gt;
Since we&#039;re running Ubuntu 20.04 installing ROS is as easy as running the following commands:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Get the ROS apt repository&lt;br /&gt;
sudo sh -c &#039;echo &amp;quot;deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main&amp;quot; &amp;gt; /etc/apt/sources.list.d/ros-latest.list&#039;&lt;br /&gt;
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -&lt;br /&gt;
&lt;br /&gt;
# Install the ROS base system&lt;br /&gt;
sudo apt update&lt;br /&gt;
sudo apt install ros-noetic-ros-base&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;We only need to register the ROS installation in your &amp;lt;code&amp;gt;.bashrc&amp;lt;/code&amp;gt; file. This will enable you to call ROS specific commands from your terminal:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.bash&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Installing OpenMower Software===&lt;br /&gt;
Now we&#039;re finally able to install the OpenMower software. First, we&#039;re checking out the current version of the sources, then we&#039;re getting the dependencies and finally we&#039;re building the sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Clone the GitHub Repository:&lt;br /&gt;
git clone --recursive https://github.com/ClemensElflein/open_mower_ros.git&lt;br /&gt;
&lt;br /&gt;
# Get rosdep, only needed once&lt;br /&gt;
sudo apt install python3-rosdep&lt;br /&gt;
sudo rosdep init&lt;br /&gt;
rosdep update&lt;br /&gt;
&lt;br /&gt;
# Get the dependencies using rosdep&lt;br /&gt;
cd open_mower_ros/&lt;br /&gt;
rosdep install --from-paths src --ignore-src --default-yes&lt;br /&gt;
&lt;br /&gt;
# set the default boot behavior to cli and disable unnecessary services cause some ros dependencie installs a basic desktop&lt;br /&gt;
sudo systemctl set-default multi-user&lt;br /&gt;
sudo systemctl stop --force bluetooth&lt;br /&gt;
sudo systemctl disable --now bluetooth&lt;br /&gt;
sudo systemctl mask --now bluetooth&lt;br /&gt;
&lt;br /&gt;
# Finally, build the sources. This will take a while! &lt;br /&gt;
catkin_make -j1 # on 2GB Pi with SWAP - this takes at least &lt;br /&gt;
# OR&lt;br /&gt;
catkin_make -j2 # on 4/8GB Pi - this takes at least 20min&lt;br /&gt;
&lt;br /&gt;
# Copy the default configuration file to your home directory&lt;br /&gt;
cp open_mower_ros/src/open_mower/config/mower_config.sh.example ~/mower_config.sh&lt;br /&gt;
&lt;br /&gt;
# The next step is to also source the OpenMower ROS install&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;At this point the OpenMower software is successfully installed! You will need to configure the OpenMower software and then you&#039;re finally ready to mow.&lt;br /&gt;
&lt;br /&gt;
== Some Additional Issues==&lt;br /&gt;
&lt;br /&gt;
===I&#039;m using an external WiFi dongle for better coverage, but sometimes it doesn&#039;t work===&lt;br /&gt;
It seems that the Ubuntu sometimes puts external WiFi dongles to sleep. To prevent this, we create a service which disables powersave:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Enter this to create the service&lt;br /&gt;
sudo systemctl --full --force edit wifi_powersave@.service&lt;br /&gt;
&lt;br /&gt;
# Paste the following:&lt;br /&gt;
[Unit]&lt;br /&gt;
Description=Set WiFi power save %i&lt;br /&gt;
After=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
Type=oneshot&lt;br /&gt;
RemainAfterExit=yes&lt;br /&gt;
ExecStart=/sbin/iw dev wlan1 set power_save %i&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
# Save and exit, then activate using:&lt;br /&gt;
sudo systemctl disable wifi_powersave@on.service&lt;br /&gt;
sudo systemctl enable wifi_powersave@off.service&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>
	</entry>
	<entry>
		<id>https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=281</id>
		<title>OLD Bare Metal System Image</title>
		<link rel="alternate" type="text/html" href="https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=281"/>
		<updated>2022-08-11T19:16:49Z</updated>

		<summary type="html">&lt;p&gt;Potter-91: /* Some Settings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page will guide you through the steps to install a basic system image.&lt;br /&gt;
&lt;br /&gt;
On this image you will have the ROS base system, the OpenMower installation, local configuration for your mower and some tools to help you work with the mower.&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
In order to follow this guide, you will need the following:&lt;br /&gt;
&lt;br /&gt;
#A Raspberry Pi 4 (4GB or more recommended, [[System Image#Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM)|2GB works with swap, see here]])&lt;br /&gt;
#An SD card&lt;br /&gt;
#A soldered OpenMower mainboard&lt;br /&gt;
&lt;br /&gt;
==Installing the Base System==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;&#039;&#039;&#039;There is also a YouTube video explaining the steps in this section:&#039;&#039;&#039; https://youtu.be/_bImqD-pQSA?t=562&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Flashing Ubuntu to SD Card ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first step is to install the base system. We&#039;re using Ubuntu 20.04 Server for the Raspberry Pi. This is, because this image gives us best support ROS Noetic.&lt;br /&gt;
&lt;br /&gt;
Installing the base image is easy:&lt;br /&gt;
&lt;br /&gt;
#[https://www.raspberrypi.com/software/ Get the Raspberry Pi Imager software]&lt;br /&gt;
#Select the correct operating system:  &#039;&#039;Other-general-purpose OS &amp;gt; Ubuntu &amp;gt; Ubuntu Server 20.04.4 LTS (RPI 3/4/400) 64-bit&#039;&#039;&lt;br /&gt;
#Insert your SD card into your PC and select it in the &#039;&#039;Storage&#039;&#039; part of the software&lt;br /&gt;
#Click &#039;&#039;write&#039;&#039; and wait for the process to finish&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have successfully flashed your image, remove the SD for your PC &#039;&#039;&#039;and reinsert it again.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Then replace the &amp;lt;code&amp;gt;/boot/config.txt&amp;lt;/code&amp;gt; file with the one provided here: [https://github.com/ClemensElflein/OpenMower/blob/main/configs/RaspberryPiConfig/config.txt]&lt;br /&gt;
&lt;br /&gt;
This will enable all hardware serial ports on the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can theoretically configure networking in this step as well, but I&#039;m not recommending it. This is, because the networking information file gets only copied once and if you have an error it won&#039;t work.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;We need an interactive terminal in the next step anyways.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have done this step, you can eject the SD card and plug it into your Raspberry Pi 4.&lt;br /&gt;
&lt;br /&gt;
=== Opening a Serial Terminal ===&lt;br /&gt;
[[File:SerialRedirect.png|thumb|Serial Terminal: minicom -D /dev/ttyACM0]]&lt;br /&gt;
This step is needed for the following sections. The goal is to have a serial terminal to do basic config (networking etc) easily.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The easiest way of doing so is:&lt;br /&gt;
# Flash the SerialRedirect firmware into your Pico. Get it here: https://github.com/ClemensElflein/OpenMower/tree/main/Firmware/SerialRedirect/bin&lt;br /&gt;
# Provide your mainboard with power&lt;br /&gt;
# Plug your Pico into a computer. A virtual COM port should appear&lt;br /&gt;
# Connect to the COM port (I&#039;m using minicom, see image on the right), then press enter to start the Raspberry Pi.&lt;br /&gt;
#The Pi boots and a serial terminal will appear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you can login with the default credentials:&lt;br /&gt;
&lt;br /&gt;
username: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
password: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that you will need to change the password immediately.&lt;br /&gt;
&lt;br /&gt;
=== Disable Boot Interrupt ===&lt;br /&gt;
[[File:Image.png|thumb|Commands needed to disable boot interrupt on serial input.]]&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi boot loader will interrupt the boot sequence if data is sent through the main serial port of the Raspberry Pi. Since we&#039;re connecting &amp;quot;nosiy&amp;quot; hardware to the port, this will always interrupt the boot sequence and we need to disable this feature. &lt;br /&gt;
&lt;br /&gt;
In order to do this, reboot the Pi (sudo reboot) and send anything during the count-down in the bootloader (check the YouTube video linked above, if you&#039;re not sure).&lt;br /&gt;
&lt;br /&gt;
Then enter the following commands into the bootloader prompt:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
setenv bootdelay -2&lt;br /&gt;
saveenv&lt;br /&gt;
reset&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The Pi should reboot and the count-down should be gone.&lt;br /&gt;
&lt;br /&gt;
=== Some Settings ===&lt;br /&gt;
&lt;br /&gt;
[TODO/WIP]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are some miscellaneous settings I think are a good idea for an OpenMower install:&lt;br /&gt;
&lt;br /&gt;
* Remove the unnecessary snap system: &amp;lt;code&amp;gt;sudo snap remove --purge lxd &amp;amp;&amp;amp; sudo snap remove --purge core20 &amp;amp;&amp;amp; sudo snap remove --purge snapd &amp;amp;&amp;amp; sudo apt purge --autoremove snapd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Disable unattended upgrades: &amp;lt;code&amp;gt;sudo systemctl stop --force unattended-upgrades &amp;amp;&amp;amp; sudo systemctl disable unattended-upgrades &amp;amp;&amp;amp; sudo systemctl mask unattended-upgrades&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* I like to add the following to &amp;lt;code&amp;gt;cmdline.txt&amp;lt;/code&amp;gt; in order to fsck on boot:  &amp;lt;code&amp;gt;fsck.mode=force fsck.repair=yes&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* I prefer to use a static IP (If you use the [[System_Image#Installing_a_WiFi_Hot-Spot_(optional,_but_recommended)|recommend WiFi Hot-Spot]] use &amp;lt;code&amp;gt;sudo nmtui&amp;lt;/code&amp;gt; to configure a static IP)&lt;br /&gt;
&lt;br /&gt;
* If you like you can change the timezone: &amp;lt;code&amp;gt;sudo timedatectl set-timezone Region/Location&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;sudo dpkg-reconfigure tzdata&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM)===&lt;br /&gt;
Compiling the OpenMower software will need more than 2GB of RAM. In order to still do this on a Pi with &amp;lt;= 2GB of RAM, we will add a 2GB swap file to the system by entering the following commands:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Create a new 2GB swap file&lt;br /&gt;
sudo fallocate -l 2G /swapfile&lt;br /&gt;
# Change permissions, so that only root can read and write&lt;br /&gt;
sudo chmod 600 /swapfile&lt;br /&gt;
# Create swap space in the file&lt;br /&gt;
sudo mkswap /swapfile&lt;br /&gt;
# Add it to the fstab&lt;br /&gt;
echo &#039;/swapfile swap swap defaults 0 0&#039; | sudo tee -a /etc/fstab /swapfile swap swap defaults 0 0&lt;br /&gt;
# Reboot to activate&lt;br /&gt;
sudo reboot&lt;br /&gt;
&lt;br /&gt;
# Check if it&#039;s activated&lt;br /&gt;
sudo swapon --show&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Installing a WiFi Hot-Spot (optional, but recommended)===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Since we will be configuring the WiFi interface, make sure that you have connected Etherent to your Raspberry Pi for this step.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As soon as you have closed your mower&#039;s enclosure, you won&#039;t have physical access to your Raspberry Pi anymore. If for some reason it&#039;s unable to connect to your WiFi (e.g. you have changed your password), you would need to open the case to get access to the SD card or Ethernet port on the Pi to regain access.&lt;br /&gt;
&lt;br /&gt;
To prevent this, we&#039;re going to install a hot-spot software which helps you to connect to WiFi by opening a hot-spot each time the Pi cannot connect to a known WiFi connection.&lt;br /&gt;
&lt;br /&gt;
Now is the best time to do this, because we have a serial terminal anyways and can mess with the network interfaces without shutting us out of the system!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Just use the following commands for this:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# If dpkg throws an error like&lt;br /&gt;
#   dpkg: error processing package ... (--install):&lt;br /&gt;
#   dependency problems - leaving unconfigured&lt;br /&gt;
# you need some dependencies, correct them by running:&lt;br /&gt;
sudo apt install -f&lt;br /&gt;
&lt;br /&gt;
# We need to get a patched version of the network manager for this&lt;br /&gt;
wget https://davesteele.github.io/comitup/deb/python3-networkmanager_2.2-1dss02_all.deb&lt;br /&gt;
sudo dpkg -i python3-networkmanager_2.2-1dss02_all.deb&lt;br /&gt;
rm python3-networkmanager_2.2-1dss02_all.deb&lt;br /&gt;
# we need to disable systemd-resolveds caching DNS stub resolver&lt;br /&gt;
# if you want to know why check: https://github.com/pi-hole/docker-pi-hole/#installing-on-ubuntu&lt;br /&gt;
sudo sed -r -i.orig &#039;s/#?DNSStubListener=yes/DNSStubListener=no/g&#039; /etc/systemd/resolved.conf&lt;br /&gt;
sudo systemctl restart systemd-resolved.service&lt;br /&gt;
&lt;br /&gt;
nslookup ntp.org&lt;br /&gt;
# this will throw an dns error:&lt;br /&gt;
#   ;; connection timed out; no servers could be reached&lt;br /&gt;
sudo sh -c &#039;rm /etc/resolv.conf &amp;amp;&amp;amp; ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf&#039;&lt;br /&gt;
sudo systemctl restart systemd-resolved.service&lt;br /&gt;
nslookup ntp.org&lt;br /&gt;
# DNS should work now&lt;br /&gt;
&lt;br /&gt;
# Install comitup using latest version from the website&lt;br /&gt;
wget https://davesteele.github.io/comitup/deb/comitup_1.38-1_all.deb&lt;br /&gt;
sudo dpkg -i comitup_1.38-1_all.deb&lt;br /&gt;
rm comitup_1.38-1_all.deb&lt;br /&gt;
&lt;br /&gt;
sudo systemctl stop comitup&lt;br /&gt;
# Now use network-manager to:&lt;br /&gt;
# - add you wifi network&lt;br /&gt;
# optional:&lt;br /&gt;
# - change your hostname&lt;br /&gt;
# - add a dhcp ethernet connection without any device assigned&lt;br /&gt;
# (if even the hotspot malfunctions you can plug in a usb ethernet adapter)&lt;br /&gt;
sudo nmtui&lt;br /&gt;
&lt;br /&gt;
# Edit comitup.conf to change the wifi name and password (I use OpenMower-&amp;lt;nn&amp;gt;)&lt;br /&gt;
sudo nano /etc/comitup.conf&lt;br /&gt;
sudo systemctl restart comitup&lt;br /&gt;
# reboot - it should work now&lt;br /&gt;
sudo reboot&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable Serial Console===&lt;br /&gt;
Now that we have setup the network and can access the Pi even if our WiFi is not in range, we need to disable that serial console so that we can use the serial port for hardware.&lt;br /&gt;
&lt;br /&gt;
To do this, enter: &amp;lt;code&amp;gt;sudo nano /boot/firmware/cmdline.txt&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and remove the &amp;lt;code&amp;gt;console=serial0,115200&amp;lt;/code&amp;gt; part of the line.&lt;br /&gt;
&lt;br /&gt;
Save the file and reboot. You should still see the bootloader output, but no serial output after that.&lt;br /&gt;
&lt;br /&gt;
==Installing Tools==&lt;br /&gt;
If you&#039;re happy with your basic Ubuntu setup, it&#039;s time to install some tools required for the OpenMower&lt;br /&gt;
&lt;br /&gt;
=== General Dependencies ===&lt;br /&gt;
Just install them with apt:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install build-essential git&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===STR2STR (optional, recommended; only needed if you&#039;re using NTRIP, so probably most of you)===&lt;br /&gt;
We need a newer version than the one available in apt, so install it from source:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install gfortran&lt;br /&gt;
git clone https://github.com/rtklibexplorer/RTKLIB&lt;br /&gt;
cd RTKLIB&lt;br /&gt;
git checkout tags/b34c&lt;br /&gt;
cd app/consapp/&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You should now be able to run str2str from anywhere.&lt;br /&gt;
&lt;br /&gt;
=== OpenOCD (optional, recommended; only needed if you want to flash Pico from Raspberry Pi)===&lt;br /&gt;
We need to get the OpenOCD version from the Raspberry Pi foundation, because the &amp;quot;original&amp;quot; one doesn&#039;t have the Pico support built in yet.&lt;br /&gt;
&lt;br /&gt;
Install it from source:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install automake autoconf build-essential texinfo libtool libftdi-dev libusb-1.0-0-dev pkg-config&lt;br /&gt;
git clone https://github.com/raspberrypi/openocd.git --recursive --branch rp2040 --depth=1&lt;br /&gt;
cd openocd&lt;br /&gt;
./bootstrap&lt;br /&gt;
./configure --enable-ftdi --enable-sysfsgpio --enable-bcm2835gpio&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You can test if it was a success by running:&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
ubuntu@ubuntu:~$ openocd -v&lt;br /&gt;
Open On-Chip Debugger 0.11.0-g610f137-dirty (2022-06-07-00:39)&lt;br /&gt;
Licensed under GNU GPL v2&lt;br /&gt;
For bug reports, read&lt;br /&gt;
	http://openocd.org/doc/doxygen/bugs.html&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installing ROS and OpenMower==&lt;br /&gt;
We&#039;re using ROS Noetic for the OpenMower project. In this step we will install it, get the OpenMower sources, build the sources and create a basic configuration file for your mower.&lt;br /&gt;
&lt;br /&gt;
===Install ROS Noetic===&lt;br /&gt;
Since we&#039;re running Ubuntu 20.04 installing ROS is as easy as running the following commands:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Get the ROS apt repository&lt;br /&gt;
sudo sh -c &#039;echo &amp;quot;deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main&amp;quot; &amp;gt; /etc/apt/sources.list.d/ros-latest.list&#039;&lt;br /&gt;
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -&lt;br /&gt;
&lt;br /&gt;
# Install the ROS base system&lt;br /&gt;
sudo apt update&lt;br /&gt;
sudo apt install ros-noetic-ros-base&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;We only need to register the ROS installation in your &amp;lt;code&amp;gt;.bashrc&amp;lt;/code&amp;gt; file. This will enable you to call ROS specific commands from your terminal:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.bash&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Installing OpenMower Software===&lt;br /&gt;
Now we&#039;re finally able to install the OpenMower software. First, we&#039;re checking out the current version of the sources, then we&#039;re getting the dependencies and finally we&#039;re building the sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Clone the GitHub Repository:&lt;br /&gt;
git clone --recursive https://github.com/ClemensElflein/open_mower_ros.git&lt;br /&gt;
&lt;br /&gt;
# Get rosdep, only needed once&lt;br /&gt;
sudo apt install python3-rosdep&lt;br /&gt;
sudo rosdep init&lt;br /&gt;
rosdep update&lt;br /&gt;
&lt;br /&gt;
# Get the dependencies using rosdep&lt;br /&gt;
cd open_mower_ros/&lt;br /&gt;
rosdep install --from-paths src --ignore-src --default-yes&lt;br /&gt;
&lt;br /&gt;
# Finally, build the sources. This will take a while! &lt;br /&gt;
catkin_make -j1 # this takes at least &lt;br /&gt;
# OR&lt;br /&gt;
catkin_make -j4 # only on 8GB Pis! - this takes at least 20min&lt;br /&gt;
&lt;br /&gt;
# Copy the default configuration file to your home directory&lt;br /&gt;
cp open_mower_ros/src/open_mower/config/mower_config.sh.example ~/mower_config.sh&lt;br /&gt;
&lt;br /&gt;
# The next step is to also source the OpenMower ROS install&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;At this point the OpenMower software is successfully installed! You will need to configure the OpenMower software and then you&#039;re finally ready to mow.&lt;br /&gt;
&lt;br /&gt;
==Some Additional Issues==&lt;br /&gt;
&lt;br /&gt;
===I&#039;m using an external WiFi dongle for better coverage, but sometimes it doesn&#039;t work===&lt;br /&gt;
It seems that the Ubuntu sometimes puts external WiFi dongles to sleep. To prevent this, we create a service which disables powersave:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Enter this to create the service&lt;br /&gt;
sudo systemctl --full --force edit wifi_powersave@.service&lt;br /&gt;
&lt;br /&gt;
# Paste the following:&lt;br /&gt;
[Unit]&lt;br /&gt;
Description=Set WiFi power save %i&lt;br /&gt;
After=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
Type=oneshot&lt;br /&gt;
RemainAfterExit=yes&lt;br /&gt;
ExecStart=/sbin/iw dev wlan1 set power_save %i&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
# Save and exit, then activate using:&lt;br /&gt;
sudo systemctl disable wifi_powersave@on.service&lt;br /&gt;
sudo systemctl enable wifi_powersave@off.service&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>
	</entry>
	<entry>
		<id>https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=280</id>
		<title>OLD Bare Metal System Image</title>
		<link rel="alternate" type="text/html" href="https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=280"/>
		<updated>2022-08-11T18:50:09Z</updated>

		<summary type="html">&lt;p&gt;Potter-91: /* Some Settings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page will guide you through the steps to install a basic system image.&lt;br /&gt;
&lt;br /&gt;
On this image you will have the ROS base system, the OpenMower installation, local configuration for your mower and some tools to help you work with the mower.&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
In order to follow this guide, you will need the following:&lt;br /&gt;
&lt;br /&gt;
#A Raspberry Pi 4 (4GB or more recommended, [[System Image#Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM)|2GB works with swap, see here]])&lt;br /&gt;
#An SD card&lt;br /&gt;
#A soldered OpenMower mainboard&lt;br /&gt;
&lt;br /&gt;
==Installing the Base System==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;&#039;&#039;&#039;There is also a YouTube video explaining the steps in this section:&#039;&#039;&#039; https://youtu.be/_bImqD-pQSA?t=562&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Flashing Ubuntu to SD Card ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first step is to install the base system. We&#039;re using Ubuntu 20.04 Server for the Raspberry Pi. This is, because this image gives us best support ROS Noetic.&lt;br /&gt;
&lt;br /&gt;
Installing the base image is easy:&lt;br /&gt;
&lt;br /&gt;
#[https://www.raspberrypi.com/software/ Get the Raspberry Pi Imager software]&lt;br /&gt;
#Select the correct operating system:  &#039;&#039;Other-general-purpose OS &amp;gt; Ubuntu &amp;gt; Ubuntu Server 20.04.4 LTS (RPI 3/4/400) 64-bit&#039;&#039;&lt;br /&gt;
#Insert your SD card into your PC and select it in the &#039;&#039;Storage&#039;&#039; part of the software&lt;br /&gt;
#Click &#039;&#039;write&#039;&#039; and wait for the process to finish&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have successfully flashed your image, remove the SD for your PC &#039;&#039;&#039;and reinsert it again.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Then replace the &amp;lt;code&amp;gt;/boot/config.txt&amp;lt;/code&amp;gt; file with the one provided here: [https://github.com/ClemensElflein/OpenMower/blob/main/configs/RaspberryPiConfig/config.txt]&lt;br /&gt;
&lt;br /&gt;
This will enable all hardware serial ports on the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can theoretically configure networking in this step as well, but I&#039;m not recommending it. This is, because the networking information file gets only copied once and if you have an error it won&#039;t work.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;We need an interactive terminal in the next step anyways.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have done this step, you can eject the SD card and plug it into your Raspberry Pi 4.&lt;br /&gt;
&lt;br /&gt;
=== Opening a Serial Terminal ===&lt;br /&gt;
[[File:SerialRedirect.png|thumb|Serial Terminal: minicom -D /dev/ttyACM0]]&lt;br /&gt;
This step is needed for the following sections. The goal is to have a serial terminal to do basic config (networking etc) easily.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The easiest way of doing so is:&lt;br /&gt;
# Flash the SerialRedirect firmware into your Pico. Get it here: https://github.com/ClemensElflein/OpenMower/tree/main/Firmware/SerialRedirect/bin&lt;br /&gt;
# Provide your mainboard with power&lt;br /&gt;
# Plug your Pico into a computer. A virtual COM port should appear&lt;br /&gt;
# Connect to the COM port (I&#039;m using minicom, see image on the right), then press enter to start the Raspberry Pi.&lt;br /&gt;
#The Pi boots and a serial terminal will appear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you can login with the default credentials:&lt;br /&gt;
&lt;br /&gt;
username: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
password: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that you will need to change the password immediately.&lt;br /&gt;
&lt;br /&gt;
=== Disable Boot Interrupt ===&lt;br /&gt;
[[File:Image.png|thumb|Commands needed to disable boot interrupt on serial input.]]&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi boot loader will interrupt the boot sequence if data is sent through the main serial port of the Raspberry Pi. Since we&#039;re connecting &amp;quot;nosiy&amp;quot; hardware to the port, this will always interrupt the boot sequence and we need to disable this feature. &lt;br /&gt;
&lt;br /&gt;
In order to do this, reboot the Pi (sudo reboot) and send anything during the count-down in the bootloader (check the YouTube video linked above, if you&#039;re not sure).&lt;br /&gt;
&lt;br /&gt;
Then enter the following commands into the bootloader prompt:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
setenv bootdelay -2&lt;br /&gt;
saveenv&lt;br /&gt;
reset&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The Pi should reboot and the count-down should be gone.&lt;br /&gt;
&lt;br /&gt;
=== Some Settings ===&lt;br /&gt;
Here are some miscellaneous settings I think are a good idea for an OpenMower install.&lt;br /&gt;
&lt;br /&gt;
[TODO]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- Disable unattended upgrades: &amp;lt;code&amp;gt;sudo systemctl stop --force unattended-upgrades &amp;amp;&amp;amp; sudo systemctl disable unattended-upgrades &amp;amp;&amp;amp; sudo systemctl mask unattended-upgrades&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- I like to add the following to &amp;lt;code&amp;gt;cmdline.txt&amp;lt;/code&amp;gt; in order to fsck on boot:  &amp;lt;code&amp;gt;fsck.mode=force fsck.repair=yes&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- I prefer to use a static IP (If you use the [[System_Image#Installing_a_WiFi_Hot-Spot_(optional,_but_recommended)|recommend WiFi Hot-Spot]] use &amp;lt;code&amp;gt;sudo nmtui&amp;lt;/code&amp;gt; to configure a static IP)&lt;br /&gt;
&lt;br /&gt;
- If you like you can change the timezone: &amp;lt;code&amp;gt;sudo timedatectl set-timezone Region/Location&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;sudo dpkg-reconfigure tzdata&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM)===&lt;br /&gt;
Compiling the OpenMower software will need more than 2GB of RAM. In order to still do this on a Pi with &amp;lt;= 2GB of RAM, we will add a 2GB swap file to the system by entering the following commands:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Create a new 2GB swap file&lt;br /&gt;
sudo fallocate -l 2G /swapfile&lt;br /&gt;
# Change permissions, so that only root can read and write&lt;br /&gt;
sudo chmod 600 /swapfile&lt;br /&gt;
# Create swap space in the file&lt;br /&gt;
sudo mkswap /swapfile&lt;br /&gt;
# Add it to the fstab&lt;br /&gt;
echo &#039;/swapfile swap swap defaults 0 0&#039; | sudo tee -a /etc/fstab /swapfile swap swap defaults 0 0&lt;br /&gt;
# Reboot to activate&lt;br /&gt;
sudo reboot&lt;br /&gt;
&lt;br /&gt;
# Check if it&#039;s activated&lt;br /&gt;
sudo swapon --show&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Installing a WiFi Hot-Spot (optional, but recommended)===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Since we will be configuring the WiFi interface, make sure that you have connected Etherent to your Raspberry Pi for this step.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As soon as you have closed your mower&#039;s enclosure, you won&#039;t have physical access to your Raspberry Pi anymore. If for some reason it&#039;s unable to connect to your WiFi (e.g. you have changed your password), you would need to open the case to get access to the SD card or Ethernet port on the Pi to regain access.&lt;br /&gt;
&lt;br /&gt;
To prevent this, we&#039;re going to install a hot-spot software which helps you to connect to WiFi by opening a hot-spot each time the Pi cannot connect to a known WiFi connection.&lt;br /&gt;
&lt;br /&gt;
Now is the best time to do this, because we have a serial terminal anyways and can mess with the network interfaces without shutting us out of the system!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Just use the following commands for this:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# If dpkg throws an error like&lt;br /&gt;
#   dpkg: error processing package ... (--install):&lt;br /&gt;
#   dependency problems - leaving unconfigured&lt;br /&gt;
# you need some dependencies, correct them by running:&lt;br /&gt;
sudo apt install -f&lt;br /&gt;
&lt;br /&gt;
# We need to get a patched version of the network manager for this&lt;br /&gt;
wget https://davesteele.github.io/comitup/deb/python3-networkmanager_2.2-1dss02_all.deb&lt;br /&gt;
sudo dpkg -i python3-networkmanager_2.2-1dss02_all.deb&lt;br /&gt;
rm python3-networkmanager_2.2-1dss02_all.deb&lt;br /&gt;
# we need to disable systemd-resolveds caching DNS stub resolver&lt;br /&gt;
# if you want to know why check: https://github.com/pi-hole/docker-pi-hole/#installing-on-ubuntu&lt;br /&gt;
sudo sed -r -i.orig &#039;s/#?DNSStubListener=yes/DNSStubListener=no/g&#039; /etc/systemd/resolved.conf&lt;br /&gt;
sudo systemctl restart systemd-resolved.service&lt;br /&gt;
&lt;br /&gt;
nslookup ntp.org&lt;br /&gt;
# this will throw an dns error:&lt;br /&gt;
#   ;; connection timed out; no servers could be reached&lt;br /&gt;
sudo sh -c &#039;rm /etc/resolv.conf &amp;amp;&amp;amp; ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf&#039;&lt;br /&gt;
sudo systemctl restart systemd-resolved.service&lt;br /&gt;
nslookup ntp.org&lt;br /&gt;
# DNS should work now&lt;br /&gt;
&lt;br /&gt;
# Install comitup using latest version from the website&lt;br /&gt;
wget https://davesteele.github.io/comitup/deb/comitup_1.38-1_all.deb&lt;br /&gt;
sudo dpkg -i comitup_1.38-1_all.deb&lt;br /&gt;
rm comitup_1.38-1_all.deb&lt;br /&gt;
&lt;br /&gt;
sudo systemctl stop comitup&lt;br /&gt;
# Now use network-manager to:&lt;br /&gt;
# - add you wifi network&lt;br /&gt;
# optional:&lt;br /&gt;
# - change your hostname&lt;br /&gt;
# - add a dhcp ethernet connection without any device assigned&lt;br /&gt;
# (if even the hotspot malfunctions you can plug in a usb ethernet adapter)&lt;br /&gt;
sudo nmtui&lt;br /&gt;
&lt;br /&gt;
# Edit comitup.conf to change the wifi name and password (I use OpenMower-&amp;lt;nn&amp;gt;)&lt;br /&gt;
sudo nano /etc/comitup.conf&lt;br /&gt;
sudo systemctl restart comitup&lt;br /&gt;
# reboot - it should work now&lt;br /&gt;
sudo reboot&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable Serial Console===&lt;br /&gt;
Now that we have setup the network and can access the Pi even if our WiFi is not in range, we need to disable that serial console so that we can use the serial port for hardware.&lt;br /&gt;
&lt;br /&gt;
To do this, enter: &amp;lt;code&amp;gt;sudo nano /boot/firmware/cmdline.txt&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and remove the &amp;lt;code&amp;gt;console=serial0,115200&amp;lt;/code&amp;gt; part of the line.&lt;br /&gt;
&lt;br /&gt;
Save the file and reboot. You should still see the bootloader output, but no serial output after that.&lt;br /&gt;
&lt;br /&gt;
==Installing Tools==&lt;br /&gt;
If you&#039;re happy with your basic Ubuntu setup, it&#039;s time to install some tools required for the OpenMower&lt;br /&gt;
&lt;br /&gt;
=== General Dependencies ===&lt;br /&gt;
Just install them with apt:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install build-essential git&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===STR2STR (optional, recommended; only needed if you&#039;re using NTRIP, so probably most of you)===&lt;br /&gt;
We need a newer version than the one available in apt, so install it from source:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install gfortran&lt;br /&gt;
git clone https://github.com/rtklibexplorer/RTKLIB&lt;br /&gt;
cd RTKLIB&lt;br /&gt;
git checkout tags/b34c&lt;br /&gt;
cd app/consapp/&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You should now be able to run str2str from anywhere.&lt;br /&gt;
&lt;br /&gt;
=== OpenOCD (optional, recommended; only needed if you want to flash Pico from Raspberry Pi)===&lt;br /&gt;
We need to get the OpenOCD version from the Raspberry Pi foundation, because the &amp;quot;original&amp;quot; one doesn&#039;t have the Pico support built in yet.&lt;br /&gt;
&lt;br /&gt;
Install it from source:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install automake autoconf build-essential texinfo libtool libftdi-dev libusb-1.0-0-dev pkg-config&lt;br /&gt;
git clone https://github.com/raspberrypi/openocd.git --recursive --branch rp2040 --depth=1&lt;br /&gt;
cd openocd&lt;br /&gt;
./bootstrap&lt;br /&gt;
./configure --enable-ftdi --enable-sysfsgpio --enable-bcm2835gpio&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You can test if it was a success by running:&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
ubuntu@ubuntu:~$ openocd -v&lt;br /&gt;
Open On-Chip Debugger 0.11.0-g610f137-dirty (2022-06-07-00:39)&lt;br /&gt;
Licensed under GNU GPL v2&lt;br /&gt;
For bug reports, read&lt;br /&gt;
	http://openocd.org/doc/doxygen/bugs.html&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installing ROS and OpenMower==&lt;br /&gt;
We&#039;re using ROS Noetic for the OpenMower project. In this step we will install it, get the OpenMower sources, build the sources and create a basic configuration file for your mower.&lt;br /&gt;
&lt;br /&gt;
===Install ROS Noetic===&lt;br /&gt;
Since we&#039;re running Ubuntu 20.04 installing ROS is as easy as running the following commands:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Get the ROS apt repository&lt;br /&gt;
sudo sh -c &#039;echo &amp;quot;deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main&amp;quot; &amp;gt; /etc/apt/sources.list.d/ros-latest.list&#039;&lt;br /&gt;
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -&lt;br /&gt;
&lt;br /&gt;
# Install the ROS base system&lt;br /&gt;
sudo apt update&lt;br /&gt;
sudo apt install ros-noetic-ros-base&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;We only need to register the ROS installation in your &amp;lt;code&amp;gt;.bashrc&amp;lt;/code&amp;gt; file. This will enable you to call ROS specific commands from your terminal:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.bash&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Installing OpenMower Software===&lt;br /&gt;
Now we&#039;re finally able to install the OpenMower software. First, we&#039;re checking out the current version of the sources, then we&#039;re getting the dependencies and finally we&#039;re building the sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Clone the GitHub Repository:&lt;br /&gt;
git clone --recursive https://github.com/ClemensElflein/open_mower_ros.git&lt;br /&gt;
&lt;br /&gt;
# Get rosdep, only needed once&lt;br /&gt;
sudo apt install python3-rosdep&lt;br /&gt;
sudo rosdep init&lt;br /&gt;
rosdep update&lt;br /&gt;
&lt;br /&gt;
# Get the dependencies using rosdep&lt;br /&gt;
cd open_mower_ros/&lt;br /&gt;
rosdep install --from-paths src --ignore-src --default-yes&lt;br /&gt;
&lt;br /&gt;
# Finally, build the sources. This will take a while! &lt;br /&gt;
catkin_make -j1 # this takes at least &lt;br /&gt;
# OR&lt;br /&gt;
catkin_make -j4 # only on 8GB Pis! - this takes at least 20min&lt;br /&gt;
&lt;br /&gt;
# Copy the default configuration file to your home directory&lt;br /&gt;
cp open_mower_ros/src/open_mower/config/mower_config.sh.example ~/mower_config.sh&lt;br /&gt;
&lt;br /&gt;
# The next step is to also source the OpenMower ROS install&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;At this point the OpenMower software is successfully installed! You will need to configure the OpenMower software and then you&#039;re finally ready to mow.&lt;br /&gt;
&lt;br /&gt;
==Some Additional Issues==&lt;br /&gt;
&lt;br /&gt;
===I&#039;m using an external WiFi dongle for better coverage, but sometimes it doesn&#039;t work===&lt;br /&gt;
It seems that the Ubuntu sometimes puts external WiFi dongles to sleep. To prevent this, we create a service which disables powersave:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Enter this to create the service&lt;br /&gt;
sudo systemctl --full --force edit wifi_powersave@.service&lt;br /&gt;
&lt;br /&gt;
# Paste the following:&lt;br /&gt;
[Unit]&lt;br /&gt;
Description=Set WiFi power save %i&lt;br /&gt;
After=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
Type=oneshot&lt;br /&gt;
RemainAfterExit=yes&lt;br /&gt;
ExecStart=/sbin/iw dev wlan1 set power_save %i&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
# Save and exit, then activate using:&lt;br /&gt;
sudo systemctl disable wifi_powersave@on.service&lt;br /&gt;
sudo systemctl enable wifi_powersave@off.service&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>
	</entry>
	<entry>
		<id>https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=279</id>
		<title>OLD Bare Metal System Image</title>
		<link rel="alternate" type="text/html" href="https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=279"/>
		<updated>2022-08-11T15:25:58Z</updated>

		<summary type="html">&lt;p&gt;Potter-91: /* Installing OpenMower Software */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page will guide you through the steps to install a basic system image.&lt;br /&gt;
&lt;br /&gt;
On this image you will have the ROS base system, the OpenMower installation, local configuration for your mower and some tools to help you work with the mower.&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
In order to follow this guide, you will need the following:&lt;br /&gt;
&lt;br /&gt;
#A Raspberry Pi 4 (4GB or more recommended, [[System Image#Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM)|2GB works with swap, see here]])&lt;br /&gt;
#An SD card&lt;br /&gt;
#A soldered OpenMower mainboard&lt;br /&gt;
&lt;br /&gt;
==Installing the Base System==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;&#039;&#039;&#039;There is also a YouTube video explaining the steps in this section:&#039;&#039;&#039; https://youtu.be/_bImqD-pQSA?t=562&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Flashing Ubuntu to SD Card ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first step is to install the base system. We&#039;re using Ubuntu 20.04 Server for the Raspberry Pi. This is, because this image gives us best support ROS Noetic.&lt;br /&gt;
&lt;br /&gt;
Installing the base image is easy:&lt;br /&gt;
&lt;br /&gt;
#[https://www.raspberrypi.com/software/ Get the Raspberry Pi Imager software]&lt;br /&gt;
#Select the correct operating system:  &#039;&#039;Other-general-purpose OS &amp;gt; Ubuntu &amp;gt; Ubuntu Server 20.04.4 LTS (RPI 3/4/400) 64-bit&#039;&#039;&lt;br /&gt;
#Insert your SD card into your PC and select it in the &#039;&#039;Storage&#039;&#039; part of the software&lt;br /&gt;
#Click &#039;&#039;write&#039;&#039; and wait for the process to finish&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have successfully flashed your image, remove the SD for your PC &#039;&#039;&#039;and reinsert it again.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Then replace the &amp;lt;code&amp;gt;/boot/config.txt&amp;lt;/code&amp;gt; file with the one provided here: [https://github.com/ClemensElflein/OpenMower/blob/main/configs/RaspberryPiConfig/config.txt]&lt;br /&gt;
&lt;br /&gt;
This will enable all hardware serial ports on the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can theoretically configure networking in this step as well, but I&#039;m not recommending it. This is, because the networking information file gets only copied once and if you have an error it won&#039;t work.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;We need an interactive terminal in the next step anyways.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have done this step, you can eject the SD card and plug it into your Raspberry Pi 4.&lt;br /&gt;
&lt;br /&gt;
=== Opening a Serial Terminal ===&lt;br /&gt;
[[File:SerialRedirect.png|thumb|Serial Terminal: minicom -D /dev/ttyACM0]]&lt;br /&gt;
This step is needed for the following sections. The goal is to have a serial terminal to do basic config (networking etc) easily.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The easiest way of doing so is:&lt;br /&gt;
# Flash the SerialRedirect firmware into your Pico. Get it here: https://github.com/ClemensElflein/OpenMower/tree/main/Firmware/SerialRedirect/bin&lt;br /&gt;
# Provide your mainboard with power&lt;br /&gt;
# Plug your Pico into a computer. A virtual COM port should appear&lt;br /&gt;
# Connect to the COM port (I&#039;m using minicom, see image on the right), then press enter to start the Raspberry Pi.&lt;br /&gt;
#The Pi boots and a serial terminal will appear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you can login with the default credentials:&lt;br /&gt;
&lt;br /&gt;
username: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
password: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that you will need to change the password immediately.&lt;br /&gt;
&lt;br /&gt;
=== Disable Boot Interrupt ===&lt;br /&gt;
[[File:Image.png|thumb|Commands needed to disable boot interrupt on serial input.]]&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi boot loader will interrupt the boot sequence if data is sent through the main serial port of the Raspberry Pi. Since we&#039;re connecting &amp;quot;nosiy&amp;quot; hardware to the port, this will always interrupt the boot sequence and we need to disable this feature. &lt;br /&gt;
&lt;br /&gt;
In order to do this, reboot the Pi (sudo reboot) and send anything during the count-down in the bootloader (check the YouTube video linked above, if you&#039;re not sure).&lt;br /&gt;
&lt;br /&gt;
Then enter the following commands into the bootloader prompt:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
setenv bootdelay -2&lt;br /&gt;
saveenv&lt;br /&gt;
reset&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The Pi should reboot and the count-down should be gone.&lt;br /&gt;
&lt;br /&gt;
=== Some Settings ===&lt;br /&gt;
Here are some miscellaneous settings I think are a good idea for an OpenMower install.&lt;br /&gt;
&lt;br /&gt;
[TODO]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- Disable unattended upgrades:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl stop --force unattended-upgrades &amp;amp;&amp;amp; sudo systemctl disable unattended-upgrades &amp;amp;&amp;amp; sudo systemctl mask unattended-upgrades&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- I like to add the following to &amp;lt;code&amp;gt;cmdline.txt&amp;lt;/code&amp;gt; in order to fsck on boot:  &amp;lt;code&amp;gt;fsck.mode=force fsck.repair=yes&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- I prefer to use a static IP&lt;br /&gt;
&lt;br /&gt;
=== Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM) ===&lt;br /&gt;
Compiling the OpenMower software will need more than 2GB of RAM. In order to still do this on a Pi with &amp;lt;= 2GB of RAM, we will add a 2GB swap file to the system by entering the following commands:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Create a new 2GB swap file&lt;br /&gt;
sudo fallocate -l 2G /swapfile&lt;br /&gt;
# Change permissions, so that only root can read and write&lt;br /&gt;
sudo chmod 600 /swapfile&lt;br /&gt;
# Create swap space in the file&lt;br /&gt;
sudo mkswap /swapfile&lt;br /&gt;
# Add it to the fstab&lt;br /&gt;
echo &#039;/swapfile swap swap defaults 0 0&#039; | sudo tee -a /etc/fstab /swapfile swap swap defaults 0 0&lt;br /&gt;
# Reboot to activate&lt;br /&gt;
sudo reboot&lt;br /&gt;
&lt;br /&gt;
# Check if it&#039;s activated&lt;br /&gt;
sudo swapon --show&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing a WiFi Hot-Spot (optional, but recommended) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Since we will be configuring the WiFi interface, make sure that you have connected Etherent to your Raspberry Pi for this step.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As soon as you have closed your mower&#039;s enclosure, you won&#039;t have physical access to your Raspberry Pi anymore. If for some reason it&#039;s unable to connect to your WiFi (e.g. you have changed your password), you would need to open the case to get access to the SD card or Ethernet port on the Pi to regain access.&lt;br /&gt;
&lt;br /&gt;
To prevent this, we&#039;re going to install a hot-spot software which helps you to connect to WiFi by opening a hot-spot each time the Pi cannot connect to a known WiFi connection.&lt;br /&gt;
&lt;br /&gt;
Now is the best time to do this, because we have a serial terminal anyways and can mess with the network interfaces without shutting us out of the system!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Just use the following commands for this:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# If dpkg throws an error like&lt;br /&gt;
#   dpkg: error processing package ... (--install):&lt;br /&gt;
#   dependency problems - leaving unconfigured&lt;br /&gt;
# you need some dependencies, correct them by running:&lt;br /&gt;
sudo apt install -f&lt;br /&gt;
&lt;br /&gt;
# We need to get a patched version of the network manager for this&lt;br /&gt;
wget https://davesteele.github.io/comitup/deb/python3-networkmanager_2.2-1dss02_all.deb&lt;br /&gt;
sudo dpkg -i python3-networkmanager_2.2-1dss02_all.deb&lt;br /&gt;
rm python3-networkmanager_2.2-1dss02_all.deb&lt;br /&gt;
# we need to disable systemd-resolveds caching DNS stub resolver&lt;br /&gt;
# if you want to know why check: https://github.com/pi-hole/docker-pi-hole/#installing-on-ubuntu&lt;br /&gt;
sudo sed -r -i.orig &#039;s/#?DNSStubListener=yes/DNSStubListener=no/g&#039; /etc/systemd/resolved.conf&lt;br /&gt;
sudo systemctl restart systemd-resolved.service&lt;br /&gt;
&lt;br /&gt;
nslookup ntp.org&lt;br /&gt;
# this will throw an dns error:&lt;br /&gt;
#   ;; connection timed out; no servers could be reached&lt;br /&gt;
sudo sh -c &#039;rm /etc/resolv.conf &amp;amp;&amp;amp; ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf&#039;&lt;br /&gt;
sudo systemctl restart systemd-resolved.service&lt;br /&gt;
nslookup ntp.org&lt;br /&gt;
# DNS should work now&lt;br /&gt;
&lt;br /&gt;
# Install comitup using latest version from the website&lt;br /&gt;
wget https://davesteele.github.io/comitup/deb/comitup_1.38-1_all.deb&lt;br /&gt;
sudo dpkg -i comitup_1.38-1_all.deb&lt;br /&gt;
rm comitup_1.38-1_all.deb&lt;br /&gt;
&lt;br /&gt;
sudo systemctl stop comitup&lt;br /&gt;
# Now use network-manager to:&lt;br /&gt;
# - add you wifi network&lt;br /&gt;
# optional:&lt;br /&gt;
# - change your hostname&lt;br /&gt;
# - add a dhcp ethernet connection without any device assigned&lt;br /&gt;
# (if even the hotspot malfunctions you can plug in a usb ethernet adapter)&lt;br /&gt;
sudo nmtui&lt;br /&gt;
&lt;br /&gt;
# Edit comitup.conf to change the wifi name and password (I use OpenMower-&amp;lt;nn&amp;gt;)&lt;br /&gt;
sudo nano /etc/comitup.conf&lt;br /&gt;
sudo systemctl restart comitup&lt;br /&gt;
# reboot - it should work now&lt;br /&gt;
sudo reboot&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable Serial Console ===&lt;br /&gt;
Now that we have setup the network and can access the Pi even if our WiFi is not in range, we need to disable that serial console so that we can use the serial port for hardware.&lt;br /&gt;
&lt;br /&gt;
To do this, enter: &amp;lt;code&amp;gt;sudo nano /boot/firmware/cmdline.txt&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and remove the &amp;lt;code&amp;gt;console=serial0,115200&amp;lt;/code&amp;gt; part of the line.&lt;br /&gt;
&lt;br /&gt;
Save the file and reboot. You should still see the bootloader output, but no serial output after that.&lt;br /&gt;
&lt;br /&gt;
== Installing Tools ==&lt;br /&gt;
If you&#039;re happy with your basic Ubuntu setup, it&#039;s time to install some tools required for the OpenMower&lt;br /&gt;
&lt;br /&gt;
=== General Dependencies ===&lt;br /&gt;
Just install them with apt:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install build-essential git&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STR2STR (optional, recommended; only needed if you&#039;re using NTRIP, so probably most of you) ===&lt;br /&gt;
We need a newer version than the one available in apt, so install it from source:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install gfortran&lt;br /&gt;
git clone https://github.com/rtklibexplorer/RTKLIB&lt;br /&gt;
cd RTKLIB&lt;br /&gt;
git checkout tags/b34c&lt;br /&gt;
cd app/consapp/&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You should now be able to run str2str from anywhere.&lt;br /&gt;
&lt;br /&gt;
=== OpenOCD (optional, recommended; only needed if you want to flash Pico from Raspberry Pi) ===&lt;br /&gt;
We need to get the OpenOCD version from the Raspberry Pi foundation, because the &amp;quot;original&amp;quot; one doesn&#039;t have the Pico support built in yet.&lt;br /&gt;
&lt;br /&gt;
Install it from source:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install automake autoconf build-essential texinfo libtool libftdi-dev libusb-1.0-0-dev pkg-config&lt;br /&gt;
git clone https://github.com/raspberrypi/openocd.git --recursive --branch rp2040 --depth=1&lt;br /&gt;
cd openocd&lt;br /&gt;
./bootstrap&lt;br /&gt;
./configure --enable-ftdi --enable-sysfsgpio --enable-bcm2835gpio&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You can test if it was a success by running:&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
ubuntu@ubuntu:~$ openocd -v&lt;br /&gt;
Open On-Chip Debugger 0.11.0-g610f137-dirty (2022-06-07-00:39)&lt;br /&gt;
Licensed under GNU GPL v2&lt;br /&gt;
For bug reports, read&lt;br /&gt;
	http://openocd.org/doc/doxygen/bugs.html&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing ROS and OpenMower ==&lt;br /&gt;
We&#039;re using ROS Noetic for the OpenMower project. In this step we will install it, get the OpenMower sources, build the sources and create a basic configuration file for your mower.&lt;br /&gt;
&lt;br /&gt;
=== Install ROS Noetic ===&lt;br /&gt;
Since we&#039;re running Ubuntu 20.04 installing ROS is as easy as running the following commands:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Get the ROS apt repository&lt;br /&gt;
sudo sh -c &#039;echo &amp;quot;deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main&amp;quot; &amp;gt; /etc/apt/sources.list.d/ros-latest.list&#039;&lt;br /&gt;
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -&lt;br /&gt;
&lt;br /&gt;
# Install the ROS base system&lt;br /&gt;
sudo apt update&lt;br /&gt;
sudo apt install ros-noetic-ros-base&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;We only need to register the ROS installation in your &amp;lt;code&amp;gt;.bashrc&amp;lt;/code&amp;gt; file. This will enable you to call ROS specific commands from your terminal:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.bash&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing OpenMower Software ===&lt;br /&gt;
Now we&#039;re finally able to install the OpenMower software. First, we&#039;re checking out the current version of the sources, then we&#039;re getting the dependencies and finally we&#039;re building the sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Clone the GitHub Repository:&lt;br /&gt;
git clone --recursive https://github.com/ClemensElflein/open_mower_ros.git&lt;br /&gt;
&lt;br /&gt;
# Get rosdep, only needed once&lt;br /&gt;
sudo apt install python3-rosdep&lt;br /&gt;
sudo rosdep init&lt;br /&gt;
rosdep update&lt;br /&gt;
&lt;br /&gt;
# Get the dependencies using rosdep&lt;br /&gt;
cd open_mower_ros/&lt;br /&gt;
rosdep install --from-paths src --ignore-src --default-yes&lt;br /&gt;
&lt;br /&gt;
# Finally, build the sources. This will take a while! &lt;br /&gt;
catkin_make -j1 # this takes at least &lt;br /&gt;
# OR&lt;br /&gt;
catkin_make -j4 # only on 8GB Pis! - this takes at least 20min&lt;br /&gt;
&lt;br /&gt;
# Copy the default configuration file to your home directory&lt;br /&gt;
cp open_mower_ros/src/open_mower/config/mower_config.sh.example ~/mower_config.sh&lt;br /&gt;
&lt;br /&gt;
# The next step is to also source the OpenMower ROS install&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;At this point the OpenMower software is successfully installed! You will need to configure the OpenMower software and then you&#039;re finally ready to mow.&lt;br /&gt;
&lt;br /&gt;
== Some Additional Issues ==&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m using an external WiFi dongle for better coverage, but sometimes it doesn&#039;t work ===&lt;br /&gt;
It seems that the Ubuntu sometimes puts external WiFi dongles to sleep. To prevent this, we create a service which disables powersave:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Enter this to create the service&lt;br /&gt;
sudo systemctl --full --force edit wifi_powersave@.service&lt;br /&gt;
&lt;br /&gt;
# Paste the following:&lt;br /&gt;
[Unit]&lt;br /&gt;
Description=Set WiFi power save %i&lt;br /&gt;
After=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
Type=oneshot&lt;br /&gt;
RemainAfterExit=yes&lt;br /&gt;
ExecStart=/sbin/iw dev wlan1 set power_save %i&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
# Save and exit, then activate using:&lt;br /&gt;
sudo systemctl disable wifi_powersave@on.service&lt;br /&gt;
sudo systemctl enable wifi_powersave@off.service&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>
	</entry>
	<entry>
		<id>https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=278</id>
		<title>OLD Bare Metal System Image</title>
		<link rel="alternate" type="text/html" href="https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=278"/>
		<updated>2022-08-11T14:45:51Z</updated>

		<summary type="html">&lt;p&gt;Potter-91: /* Installing OpenMower Software */  - add Pi 8GB min compilation time note&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page will guide you through the steps to install a basic system image.&lt;br /&gt;
&lt;br /&gt;
On this image you will have the ROS base system, the OpenMower installation, local configuration for your mower and some tools to help you work with the mower.&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
In order to follow this guide, you will need the following:&lt;br /&gt;
&lt;br /&gt;
#A Raspberry Pi 4 (4GB or more recommended, [[System Image#Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM)|2GB works with swap, see here]])&lt;br /&gt;
#An SD card&lt;br /&gt;
#A soldered OpenMower mainboard&lt;br /&gt;
&lt;br /&gt;
==Installing the Base System==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;&#039;&#039;&#039;There is also a YouTube video explaining the steps in this section:&#039;&#039;&#039; https://youtu.be/_bImqD-pQSA?t=562&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Flashing Ubuntu to SD Card ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first step is to install the base system. We&#039;re using Ubuntu 20.04 Server for the Raspberry Pi. This is, because this image gives us best support ROS Noetic.&lt;br /&gt;
&lt;br /&gt;
Installing the base image is easy:&lt;br /&gt;
&lt;br /&gt;
#[https://www.raspberrypi.com/software/ Get the Raspberry Pi Imager software]&lt;br /&gt;
#Select the correct operating system:  &#039;&#039;Other-general-purpose OS &amp;gt; Ubuntu &amp;gt; Ubuntu Server 20.04.4 LTS (RPI 3/4/400) 64-bit&#039;&#039;&lt;br /&gt;
#Insert your SD card into your PC and select it in the &#039;&#039;Storage&#039;&#039; part of the software&lt;br /&gt;
#Click &#039;&#039;write&#039;&#039; and wait for the process to finish&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have successfully flashed your image, remove the SD for your PC &#039;&#039;&#039;and reinsert it again.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Then replace the &amp;lt;code&amp;gt;/boot/config.txt&amp;lt;/code&amp;gt; file with the one provided here: [https://github.com/ClemensElflein/OpenMower/blob/main/configs/RaspberryPiConfig/config.txt]&lt;br /&gt;
&lt;br /&gt;
This will enable all hardware serial ports on the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can theoretically configure networking in this step as well, but I&#039;m not recommending it. This is, because the networking information file gets only copied once and if you have an error it won&#039;t work.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;We need an interactive terminal in the next step anyways.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have done this step, you can eject the SD card and plug it into your Raspberry Pi 4.&lt;br /&gt;
&lt;br /&gt;
=== Opening a Serial Terminal ===&lt;br /&gt;
[[File:SerialRedirect.png|thumb|Serial Terminal: minicom -D /dev/ttyACM0]]&lt;br /&gt;
This step is needed for the following sections. The goal is to have a serial terminal to do basic config (networking etc) easily.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The easiest way of doing so is:&lt;br /&gt;
# Flash the SerialRedirect firmware into your Pico. Get it here: https://github.com/ClemensElflein/OpenMower/tree/main/Firmware/SerialRedirect/bin&lt;br /&gt;
# Provide your mainboard with power&lt;br /&gt;
# Plug your Pico into a computer. A virtual COM port should appear&lt;br /&gt;
# Connect to the COM port (I&#039;m using minicom, see image on the right), then press enter to start the Raspberry Pi.&lt;br /&gt;
#The Pi boots and a serial terminal will appear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you can login with the default credentials:&lt;br /&gt;
&lt;br /&gt;
username: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
password: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that you will need to change the password immediately.&lt;br /&gt;
&lt;br /&gt;
=== Disable Boot Interrupt ===&lt;br /&gt;
[[File:Image.png|thumb|Commands needed to disable boot interrupt on serial input.]]&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi boot loader will interrupt the boot sequence if data is sent through the main serial port of the Raspberry Pi. Since we&#039;re connecting &amp;quot;nosiy&amp;quot; hardware to the port, this will always interrupt the boot sequence and we need to disable this feature. &lt;br /&gt;
&lt;br /&gt;
In order to do this, reboot the Pi (sudo reboot) and send anything during the count-down in the bootloader (check the YouTube video linked above, if you&#039;re not sure).&lt;br /&gt;
&lt;br /&gt;
Then enter the following commands into the bootloader prompt:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
setenv bootdelay -2&lt;br /&gt;
saveenv&lt;br /&gt;
reset&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The Pi should reboot and the count-down should be gone.&lt;br /&gt;
&lt;br /&gt;
=== Some Settings ===&lt;br /&gt;
Here are some miscellaneous settings I think are a good idea for an OpenMower install.&lt;br /&gt;
&lt;br /&gt;
[TODO]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- Disable unattended upgrades:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl stop --force unattended-upgrades &amp;amp;&amp;amp; sudo systemctl disable unattended-upgrades &amp;amp;&amp;amp; sudo systemctl mask unattended-upgrades&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- I like to add the following to &amp;lt;code&amp;gt;cmdline.txt&amp;lt;/code&amp;gt; in order to fsck on boot:  &amp;lt;code&amp;gt;fsck.mode=force fsck.repair=yes&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- I prefer to use a static IP&lt;br /&gt;
&lt;br /&gt;
=== Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM) ===&lt;br /&gt;
Compiling the OpenMower software will need more than 2GB of RAM. In order to still do this on a Pi with &amp;lt;= 2GB of RAM, we will add a 2GB swap file to the system by entering the following commands:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Create a new 2GB swap file&lt;br /&gt;
sudo fallocate -l 2G /swapfile&lt;br /&gt;
# Change permissions, so that only root can read and write&lt;br /&gt;
sudo chmod 600 /swapfile&lt;br /&gt;
# Create swap space in the file&lt;br /&gt;
sudo mkswap /swapfile&lt;br /&gt;
# Add it to the fstab&lt;br /&gt;
echo &#039;/swapfile swap swap defaults 0 0&#039; | sudo tee -a /etc/fstab /swapfile swap swap defaults 0 0&lt;br /&gt;
# Reboot to activate&lt;br /&gt;
sudo reboot&lt;br /&gt;
&lt;br /&gt;
# Check if it&#039;s activated&lt;br /&gt;
sudo swapon --show&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing a WiFi Hot-Spot (optional, but recommended) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Since we will be configuring the WiFi interface, make sure that you have connected Etherent to your Raspberry Pi for this step.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As soon as you have closed your mower&#039;s enclosure, you won&#039;t have physical access to your Raspberry Pi anymore. If for some reason it&#039;s unable to connect to your WiFi (e.g. you have changed your password), you would need to open the case to get access to the SD card or Ethernet port on the Pi to regain access.&lt;br /&gt;
&lt;br /&gt;
To prevent this, we&#039;re going to install a hot-spot software which helps you to connect to WiFi by opening a hot-spot each time the Pi cannot connect to a known WiFi connection.&lt;br /&gt;
&lt;br /&gt;
Now is the best time to do this, because we have a serial terminal anyways and can mess with the network interfaces without shutting us out of the system!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Just use the following commands for this:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# If dpkg throws an error like&lt;br /&gt;
#   dpkg: error processing package ... (--install):&lt;br /&gt;
#   dependency problems - leaving unconfigured&lt;br /&gt;
# you need some dependencies, correct them by running:&lt;br /&gt;
sudo apt install -f&lt;br /&gt;
&lt;br /&gt;
# We need to get a patched version of the network manager for this&lt;br /&gt;
wget https://davesteele.github.io/comitup/deb/python3-networkmanager_2.2-1dss02_all.deb&lt;br /&gt;
sudo dpkg -i python3-networkmanager_2.2-1dss02_all.deb&lt;br /&gt;
rm python3-networkmanager_2.2-1dss02_all.deb&lt;br /&gt;
# we need to disable systemd-resolveds caching DNS stub resolver&lt;br /&gt;
# if you want to know why check: https://github.com/pi-hole/docker-pi-hole/#installing-on-ubuntu&lt;br /&gt;
sudo sed -r -i.orig &#039;s/#?DNSStubListener=yes/DNSStubListener=no/g&#039; /etc/systemd/resolved.conf&lt;br /&gt;
sudo systemctl restart systemd-resolved.service&lt;br /&gt;
&lt;br /&gt;
nslookup ntp.org&lt;br /&gt;
# this will throw an dns error:&lt;br /&gt;
#   ;; connection timed out; no servers could be reached&lt;br /&gt;
sudo sh -c &#039;rm /etc/resolv.conf &amp;amp;&amp;amp; ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf&#039;&lt;br /&gt;
sudo systemctl restart systemd-resolved.service&lt;br /&gt;
nslookup ntp.org&lt;br /&gt;
# DNS should work now&lt;br /&gt;
&lt;br /&gt;
# Install comitup using latest version from the website&lt;br /&gt;
wget https://davesteele.github.io/comitup/deb/comitup_1.38-1_all.deb&lt;br /&gt;
sudo dpkg -i comitup_1.38-1_all.deb&lt;br /&gt;
rm comitup_1.38-1_all.deb&lt;br /&gt;
&lt;br /&gt;
sudo systemctl stop comitup&lt;br /&gt;
# Now use network-manager to:&lt;br /&gt;
# - add you wifi network&lt;br /&gt;
# optional:&lt;br /&gt;
# - change your hostname&lt;br /&gt;
# - add a dhcp ethernet connection without any device assigned&lt;br /&gt;
# (if even the hotspot malfunctions you can plug in a usb ethernet adapter)&lt;br /&gt;
sudo nmtui&lt;br /&gt;
&lt;br /&gt;
# Edit comitup.conf to change the wifi name and password (I use OpenMower-&amp;lt;nn&amp;gt;)&lt;br /&gt;
sudo nano /etc/comitup.conf&lt;br /&gt;
sudo systemctl restart comitup&lt;br /&gt;
# reboot - it should work now&lt;br /&gt;
sudo reboot&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable Serial Console ===&lt;br /&gt;
Now that we have setup the network and can access the Pi even if our WiFi is not in range, we need to disable that serial console so that we can use the serial port for hardware.&lt;br /&gt;
&lt;br /&gt;
To do this, enter: &amp;lt;code&amp;gt;sudo nano /boot/firmware/cmdline.txt&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and remove the &amp;lt;code&amp;gt;console=serial0,115200&amp;lt;/code&amp;gt; part of the line.&lt;br /&gt;
&lt;br /&gt;
Save the file and reboot. You should still see the bootloader output, but no serial output after that.&lt;br /&gt;
&lt;br /&gt;
== Installing Tools ==&lt;br /&gt;
If you&#039;re happy with your basic Ubuntu setup, it&#039;s time to install some tools required for the OpenMower&lt;br /&gt;
&lt;br /&gt;
=== General Dependencies ===&lt;br /&gt;
Just install them with apt:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install build-essential git&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STR2STR (optional, recommended; only needed if you&#039;re using NTRIP, so probably most of you) ===&lt;br /&gt;
We need a newer version than the one available in apt, so install it from source:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install gfortran&lt;br /&gt;
git clone https://github.com/rtklibexplorer/RTKLIB&lt;br /&gt;
cd RTKLIB&lt;br /&gt;
git checkout tags/b34c&lt;br /&gt;
cd app/consapp/&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You should now be able to run str2str from anywhere.&lt;br /&gt;
&lt;br /&gt;
=== OpenOCD (optional, recommended; only needed if you want to flash Pico from Raspberry Pi) ===&lt;br /&gt;
We need to get the OpenOCD version from the Raspberry Pi foundation, because the &amp;quot;original&amp;quot; one doesn&#039;t have the Pico support built in yet.&lt;br /&gt;
&lt;br /&gt;
Install it from source:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install automake autoconf build-essential texinfo libtool libftdi-dev libusb-1.0-0-dev pkg-config&lt;br /&gt;
git clone https://github.com/raspberrypi/openocd.git --recursive --branch rp2040 --depth=1&lt;br /&gt;
cd openocd&lt;br /&gt;
./bootstrap&lt;br /&gt;
./configure --enable-ftdi --enable-sysfsgpio --enable-bcm2835gpio&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You can test if it was a success by running:&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
ubuntu@ubuntu:~$ openocd -v&lt;br /&gt;
Open On-Chip Debugger 0.11.0-g610f137-dirty (2022-06-07-00:39)&lt;br /&gt;
Licensed under GNU GPL v2&lt;br /&gt;
For bug reports, read&lt;br /&gt;
	http://openocd.org/doc/doxygen/bugs.html&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing ROS and OpenMower ==&lt;br /&gt;
We&#039;re using ROS Noetic for the OpenMower project. In this step we will install it, get the OpenMower sources, build the sources and create a basic configuration file for your mower.&lt;br /&gt;
&lt;br /&gt;
=== Install ROS Noetic ===&lt;br /&gt;
Since we&#039;re running Ubuntu 20.04 installing ROS is as easy as running the following commands:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Get the ROS apt repository&lt;br /&gt;
sudo sh -c &#039;echo &amp;quot;deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main&amp;quot; &amp;gt; /etc/apt/sources.list.d/ros-latest.list&#039;&lt;br /&gt;
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -&lt;br /&gt;
&lt;br /&gt;
# Install the ROS base system&lt;br /&gt;
sudo apt update&lt;br /&gt;
sudo apt install ros-noetic-ros-base&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;We only need to register the ROS installation in your &amp;lt;code&amp;gt;.bashrc&amp;lt;/code&amp;gt; file. This will enable you to call ROS specific commands from your terminal:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.bash&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing OpenMower Software ===&lt;br /&gt;
Now we&#039;re finally able to install the OpenMower software. First, we&#039;re checking out the current version of the sources, then we&#039;re getting the dependencies and finally we&#039;re building the sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Clone the GitHub Repository:&lt;br /&gt;
git clone --recursive https://github.com/ClemensElflein/open_mower_ros.git&lt;br /&gt;
&lt;br /&gt;
# Get rosdep, only needed once&lt;br /&gt;
sudo apt install python3-rosdep&lt;br /&gt;
sudo rosdep init&lt;br /&gt;
rosdep update&lt;br /&gt;
&lt;br /&gt;
# Get the dependencies using rosdep&lt;br /&gt;
cd open_mower_ros/&lt;br /&gt;
rosdep install --from-paths src --ignore-src --default-yes&lt;br /&gt;
&lt;br /&gt;
# Finally, build the sources. This will take a while! &lt;br /&gt;
catkin_make -j1 # this takes at least &lt;br /&gt;
# OR&lt;br /&gt;
catkin_make -j$(nproc) # only on 8GB Pis! - this takes at least 20min&lt;br /&gt;
&lt;br /&gt;
# Copy the default configuration file to your home directory&lt;br /&gt;
cp open_mower_ros/src/open_mower/config/mower_config.sh.example ~/mower_config.sh&lt;br /&gt;
&lt;br /&gt;
# The next step is to also source the OpenMower ROS install&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;At this point the OpenMower software is successfully installed! You will need to configure the OpenMower software and then you&#039;re finally ready to mow.&lt;br /&gt;
&lt;br /&gt;
== Some Additional Issues ==&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m using an external WiFi dongle for better coverage, but sometimes it doesn&#039;t work ===&lt;br /&gt;
It seems that the Ubuntu sometimes puts external WiFi dongles to sleep. To prevent this, we create a service which disables powersave:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Enter this to create the service&lt;br /&gt;
sudo systemctl --full --force edit wifi_powersave@.service&lt;br /&gt;
&lt;br /&gt;
# Paste the following:&lt;br /&gt;
[Unit]&lt;br /&gt;
Description=Set WiFi power save %i&lt;br /&gt;
After=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
Type=oneshot&lt;br /&gt;
RemainAfterExit=yes&lt;br /&gt;
ExecStart=/sbin/iw dev wlan1 set power_save %i&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
# Save and exit, then activate using:&lt;br /&gt;
sudo systemctl disable wifi_powersave@on.service&lt;br /&gt;
sudo systemctl enable wifi_powersave@off.service&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>
	</entry>
	<entry>
		<id>https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=277</id>
		<title>OLD Bare Metal System Image</title>
		<link rel="alternate" type="text/html" href="https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=277"/>
		<updated>2022-08-09T22:51:36Z</updated>

		<summary type="html">&lt;p&gt;Potter-91: /* Installing a WiFi Hot-Spot (optional, but recommended) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page will guide you through the steps to install a basic system image.&lt;br /&gt;
&lt;br /&gt;
On this image you will have the ROS base system, the OpenMower installation, local configuration for your mower and some tools to help you work with the mower.&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
In order to follow this guide, you will need the following:&lt;br /&gt;
&lt;br /&gt;
#A Raspberry Pi 4 (4GB or more recommended, [[System Image#Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM)|2GB works with swap, see here]])&lt;br /&gt;
#An SD card&lt;br /&gt;
#A soldered OpenMower mainboard&lt;br /&gt;
&lt;br /&gt;
==Installing the Base System==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;&#039;&#039;&#039;There is also a YouTube video explaining the steps in this section:&#039;&#039;&#039; https://youtu.be/_bImqD-pQSA?t=562&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Flashing Ubuntu to SD Card ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first step is to install the base system. We&#039;re using Ubuntu 20.04 Server for the Raspberry Pi. This is, because this image gives us best support ROS Noetic.&lt;br /&gt;
&lt;br /&gt;
Installing the base image is easy:&lt;br /&gt;
&lt;br /&gt;
#[https://www.raspberrypi.com/software/ Get the Raspberry Pi Imager software]&lt;br /&gt;
#Select the correct operating system:  &#039;&#039;Other-general-purpose OS &amp;gt; Ubuntu &amp;gt; Ubuntu Server 20.04.4 LTS (RPI 3/4/400) 64-bit&#039;&#039;&lt;br /&gt;
#Insert your SD card into your PC and select it in the &#039;&#039;Storage&#039;&#039; part of the software&lt;br /&gt;
#Click &#039;&#039;write&#039;&#039; and wait for the process to finish&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have successfully flashed your image, remove the SD for your PC &#039;&#039;&#039;and reinsert it again.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Then replace the &amp;lt;code&amp;gt;/boot/config.txt&amp;lt;/code&amp;gt; file with the one provided here: [https://github.com/ClemensElflein/OpenMower/blob/main/configs/RaspberryPiConfig/config.txt]&lt;br /&gt;
&lt;br /&gt;
This will enable all hardware serial ports on the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can theoretically configure networking in this step as well, but I&#039;m not recommending it. This is, because the networking information file gets only copied once and if you have an error it won&#039;t work.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;We need an interactive terminal in the next step anyways.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have done this step, you can eject the SD card and plug it into your Raspberry Pi 4.&lt;br /&gt;
&lt;br /&gt;
=== Opening a Serial Terminal ===&lt;br /&gt;
[[File:SerialRedirect.png|thumb|Serial Terminal: minicom -D /dev/ttyACM0]]&lt;br /&gt;
This step is needed for the following sections. The goal is to have a serial terminal to do basic config (networking etc) easily.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The easiest way of doing so is:&lt;br /&gt;
# Flash the SerialRedirect firmware into your Pico. Get it here: https://github.com/ClemensElflein/OpenMower/tree/main/Firmware/SerialRedirect/bin&lt;br /&gt;
# Provide your mainboard with power&lt;br /&gt;
# Plug your Pico into a computer. A virtual COM port should appear&lt;br /&gt;
# Connect to the COM port (I&#039;m using minicom, see image on the right), then press enter to start the Raspberry Pi.&lt;br /&gt;
#The Pi boots and a serial terminal will appear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you can login with the default credentials:&lt;br /&gt;
&lt;br /&gt;
username: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
password: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that you will need to change the password immediately.&lt;br /&gt;
&lt;br /&gt;
=== Disable Boot Interrupt ===&lt;br /&gt;
[[File:Image.png|thumb|Commands needed to disable boot interrupt on serial input.]]&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi boot loader will interrupt the boot sequence if data is sent through the main serial port of the Raspberry Pi. Since we&#039;re connecting &amp;quot;nosiy&amp;quot; hardware to the port, this will always interrupt the boot sequence and we need to disable this feature. &lt;br /&gt;
&lt;br /&gt;
In order to do this, reboot the Pi (sudo reboot) and send anything during the count-down in the bootloader (check the YouTube video linked above, if you&#039;re not sure).&lt;br /&gt;
&lt;br /&gt;
Then enter the following commands into the bootloader prompt:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
setenv bootdelay -2&lt;br /&gt;
saveenv&lt;br /&gt;
reset&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The Pi should reboot and the count-down should be gone.&lt;br /&gt;
&lt;br /&gt;
=== Some Settings ===&lt;br /&gt;
Here are some miscellaneous settings I think are a good idea for an OpenMower install.&lt;br /&gt;
&lt;br /&gt;
[TODO]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- Disable unattended upgrades:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl stop --force unattended-upgrades &amp;amp;&amp;amp; sudo systemctl disable unattended-upgrades &amp;amp;&amp;amp; sudo systemctl mask unattended-upgrades&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- I like to add the following to &amp;lt;code&amp;gt;cmdline.txt&amp;lt;/code&amp;gt; in order to fsck on boot:  &amp;lt;code&amp;gt;fsck.mode=force fsck.repair=yes&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- I prefer to use a static IP&lt;br /&gt;
&lt;br /&gt;
=== Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM) ===&lt;br /&gt;
Compiling the OpenMower software will need more than 2GB of RAM. In order to still do this on a Pi with &amp;lt;= 2GB of RAM, we will add a 2GB swap file to the system by entering the following commands:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Create a new 2GB swap file&lt;br /&gt;
sudo fallocate -l 2G /swapfile&lt;br /&gt;
# Change permissions, so that only root can read and write&lt;br /&gt;
sudo chmod 600 /swapfile&lt;br /&gt;
# Create swap space in the file&lt;br /&gt;
sudo mkswap /swapfile&lt;br /&gt;
# Add it to the fstab&lt;br /&gt;
echo &#039;/swapfile swap swap defaults 0 0&#039; | sudo tee -a /etc/fstab /swapfile swap swap defaults 0 0&lt;br /&gt;
# Reboot to activate&lt;br /&gt;
sudo reboot&lt;br /&gt;
&lt;br /&gt;
# Check if it&#039;s activated&lt;br /&gt;
sudo swapon --show&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing a WiFi Hot-Spot (optional, but recommended) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Since we will be configuring the WiFi interface, make sure that you have connected Etherent to your Raspberry Pi for this step.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As soon as you have closed your mower&#039;s enclosure, you won&#039;t have physical access to your Raspberry Pi anymore. If for some reason it&#039;s unable to connect to your WiFi (e.g. you have changed your password), you would need to open the case to get access to the SD card or Ethernet port on the Pi to regain access.&lt;br /&gt;
&lt;br /&gt;
To prevent this, we&#039;re going to install a hot-spot software which helps you to connect to WiFi by opening a hot-spot each time the Pi cannot connect to a known WiFi connection.&lt;br /&gt;
&lt;br /&gt;
Now is the best time to do this, because we have a serial terminal anyways and can mess with the network interfaces without shutting us out of the system!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Just use the following commands for this:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# If dpkg throws an error like&lt;br /&gt;
#   dpkg: error processing package ... (--install):&lt;br /&gt;
#   dependency problems - leaving unconfigured&lt;br /&gt;
# you need some dependencies, correct them by running:&lt;br /&gt;
sudo apt install -f&lt;br /&gt;
&lt;br /&gt;
# We need to get a patched version of the network manager for this&lt;br /&gt;
wget https://davesteele.github.io/comitup/deb/python3-networkmanager_2.2-1dss02_all.deb&lt;br /&gt;
sudo dpkg -i python3-networkmanager_2.2-1dss02_all.deb&lt;br /&gt;
rm python3-networkmanager_2.2-1dss02_all.deb&lt;br /&gt;
# we need to disable systemd-resolveds caching DNS stub resolver&lt;br /&gt;
# if you want to know why check: https://github.com/pi-hole/docker-pi-hole/#installing-on-ubuntu&lt;br /&gt;
sudo sed -r -i.orig &#039;s/#?DNSStubListener=yes/DNSStubListener=no/g&#039; /etc/systemd/resolved.conf&lt;br /&gt;
sudo systemctl restart systemd-resolved.service&lt;br /&gt;
&lt;br /&gt;
nslookup ntp.org&lt;br /&gt;
# this will throw an dns error:&lt;br /&gt;
#   ;; connection timed out; no servers could be reached&lt;br /&gt;
sudo sh -c &#039;rm /etc/resolv.conf &amp;amp;&amp;amp; ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf&#039;&lt;br /&gt;
sudo systemctl restart systemd-resolved.service&lt;br /&gt;
nslookup ntp.org&lt;br /&gt;
# DNS should work now&lt;br /&gt;
&lt;br /&gt;
# Install comitup using latest version from the website&lt;br /&gt;
wget https://davesteele.github.io/comitup/deb/comitup_1.38-1_all.deb&lt;br /&gt;
sudo dpkg -i comitup_1.38-1_all.deb&lt;br /&gt;
rm comitup_1.38-1_all.deb&lt;br /&gt;
&lt;br /&gt;
sudo systemctl stop comitup&lt;br /&gt;
# Now use network-manager to:&lt;br /&gt;
# - add you wifi network&lt;br /&gt;
# optional:&lt;br /&gt;
# - change your hostname&lt;br /&gt;
# - add a dhcp ethernet connection without any device assigned&lt;br /&gt;
# (if even the hotspot malfunctions you can plug in a usb ethernet adapter)&lt;br /&gt;
sudo nmtui&lt;br /&gt;
&lt;br /&gt;
# Edit comitup.conf to change the wifi name and password (I use OpenMower-&amp;lt;nn&amp;gt;)&lt;br /&gt;
sudo nano /etc/comitup.conf&lt;br /&gt;
sudo systemctl restart comitup&lt;br /&gt;
# reboot - it should work now&lt;br /&gt;
sudo reboot&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable Serial Console ===&lt;br /&gt;
Now that we have setup the network and can access the Pi even if our WiFi is not in range, we need to disable that serial console so that we can use the serial port for hardware.&lt;br /&gt;
&lt;br /&gt;
To do this, enter: &amp;lt;code&amp;gt;sudo nano /boot/firmware/cmdline.txt&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and remove the &amp;lt;code&amp;gt;console=serial0,115200&amp;lt;/code&amp;gt; part of the line.&lt;br /&gt;
&lt;br /&gt;
Save the file and reboot. You should still see the bootloader output, but no serial output after that.&lt;br /&gt;
&lt;br /&gt;
== Installing Tools ==&lt;br /&gt;
If you&#039;re happy with your basic Ubuntu setup, it&#039;s time to install some tools required for the OpenMower&lt;br /&gt;
&lt;br /&gt;
=== General Dependencies ===&lt;br /&gt;
Just install them with apt:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install build-essential git&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STR2STR (optional, recommended; only needed if you&#039;re using NTRIP, so probably most of you) ===&lt;br /&gt;
We need a newer version than the one available in apt, so install it from source:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install gfortran&lt;br /&gt;
git clone https://github.com/rtklibexplorer/RTKLIB&lt;br /&gt;
cd RTKLIB&lt;br /&gt;
git checkout tags/b34c&lt;br /&gt;
cd app/consapp/&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You should now be able to run str2str from anywhere.&lt;br /&gt;
&lt;br /&gt;
=== OpenOCD (optional, recommended; only needed if you want to flash Pico from Raspberry Pi) ===&lt;br /&gt;
We need to get the OpenOCD version from the Raspberry Pi foundation, because the &amp;quot;original&amp;quot; one doesn&#039;t have the Pico support built in yet.&lt;br /&gt;
&lt;br /&gt;
Install it from source:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install automake autoconf build-essential texinfo libtool libftdi-dev libusb-1.0-0-dev pkg-config&lt;br /&gt;
git clone https://github.com/raspberrypi/openocd.git --recursive --branch rp2040 --depth=1&lt;br /&gt;
cd openocd&lt;br /&gt;
./bootstrap&lt;br /&gt;
./configure --enable-ftdi --enable-sysfsgpio --enable-bcm2835gpio&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You can test if it was a success by running:&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
ubuntu@ubuntu:~$ openocd -v&lt;br /&gt;
Open On-Chip Debugger 0.11.0-g610f137-dirty (2022-06-07-00:39)&lt;br /&gt;
Licensed under GNU GPL v2&lt;br /&gt;
For bug reports, read&lt;br /&gt;
	http://openocd.org/doc/doxygen/bugs.html&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing ROS and OpenMower ==&lt;br /&gt;
We&#039;re using ROS Noetic for the OpenMower project. In this step we will install it, get the OpenMower sources, build the sources and create a basic configuration file for your mower.&lt;br /&gt;
&lt;br /&gt;
=== Install ROS Noetic ===&lt;br /&gt;
Since we&#039;re running Ubuntu 20.04 installing ROS is as easy as running the following commands:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Get the ROS apt repository&lt;br /&gt;
sudo sh -c &#039;echo &amp;quot;deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main&amp;quot; &amp;gt; /etc/apt/sources.list.d/ros-latest.list&#039;&lt;br /&gt;
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -&lt;br /&gt;
&lt;br /&gt;
# Install the ROS base system&lt;br /&gt;
sudo apt update&lt;br /&gt;
sudo apt install ros-noetic-ros-base&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;We only need to register the ROS installation in your &amp;lt;code&amp;gt;.bashrc&amp;lt;/code&amp;gt; file. This will enable you to call ROS specific commands from your terminal:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.bash&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing OpenMower Software ===&lt;br /&gt;
Now we&#039;re finally able to install the OpenMower software. First, we&#039;re checking out the current version of the sources, then we&#039;re getting the dependencies and finally we&#039;re building the sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Clone the GitHub Repository:&lt;br /&gt;
git clone --recursive https://github.com/ClemensElflein/open_mower_ros.git&lt;br /&gt;
&lt;br /&gt;
# Get rosdep, only needed once&lt;br /&gt;
sudo apt install python3-rosdep&lt;br /&gt;
sudo rosdep init&lt;br /&gt;
rosdep update&lt;br /&gt;
&lt;br /&gt;
# Get the dependencies using rosdep&lt;br /&gt;
cd open_mower_ros/&lt;br /&gt;
rosdep install --from-paths src --ignore-src --default-yes&lt;br /&gt;
&lt;br /&gt;
# Finally, build the sources (do -j$(nproc) only on 8GB Raspberry Pis). This will take a while!&lt;br /&gt;
catkin_make -j1&lt;br /&gt;
&lt;br /&gt;
# Copy the default configuration file to your home directory&lt;br /&gt;
cp open_mower_ros/src/open_mower/config/mower_config.sh.example ~/mower_config.sh&lt;br /&gt;
&lt;br /&gt;
# The next step is to also source the OpenMower ROS install&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;At this point the OpenMower software is successfully installed! You will need to configure the OpenMower software and then you&#039;re finally ready to mow.&lt;br /&gt;
&lt;br /&gt;
== Some Additional Issues ==&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m using an external WiFi dongle for better coverage, but sometimes it doesn&#039;t work ===&lt;br /&gt;
It seems that the Ubuntu sometimes puts external WiFi dongles to sleep. To prevent this, we create a service which disables powersave:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Enter this to create the service&lt;br /&gt;
sudo systemctl --full --force edit wifi_powersave@.service&lt;br /&gt;
&lt;br /&gt;
# Paste the following:&lt;br /&gt;
[Unit]&lt;br /&gt;
Description=Set WiFi power save %i&lt;br /&gt;
After=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
Type=oneshot&lt;br /&gt;
RemainAfterExit=yes&lt;br /&gt;
ExecStart=/sbin/iw dev wlan1 set power_save %i&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
# Save and exit, then activate using:&lt;br /&gt;
sudo systemctl disable wifi_powersave@on.service&lt;br /&gt;
sudo systemctl enable wifi_powersave@off.service&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>
	</entry>
	<entry>
		<id>https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=276</id>
		<title>OLD Bare Metal System Image</title>
		<link rel="alternate" type="text/html" href="https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=276"/>
		<updated>2022-08-09T22:37:16Z</updated>

		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page will guide you through the steps to install a basic system image.&lt;br /&gt;
&lt;br /&gt;
On this image you will have the ROS base system, the OpenMower installation, local configuration for your mower and some tools to help you work with the mower.&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
In order to follow this guide, you will need the following:&lt;br /&gt;
&lt;br /&gt;
#A Raspberry Pi 4 (4GB or more recommended, [[System Image#Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM)|2GB works with swap, see here]])&lt;br /&gt;
#An SD card&lt;br /&gt;
#A soldered OpenMower mainboard&lt;br /&gt;
&lt;br /&gt;
==Installing the Base System==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;&#039;&#039;&#039;There is also a YouTube video explaining the steps in this section:&#039;&#039;&#039; https://youtu.be/_bImqD-pQSA?t=562&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Flashing Ubuntu to SD Card ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first step is to install the base system. We&#039;re using Ubuntu 20.04 Server for the Raspberry Pi. This is, because this image gives us best support ROS Noetic.&lt;br /&gt;
&lt;br /&gt;
Installing the base image is easy:&lt;br /&gt;
&lt;br /&gt;
#[https://www.raspberrypi.com/software/ Get the Raspberry Pi Imager software]&lt;br /&gt;
#Select the correct operating system:  &#039;&#039;Other-general-purpose OS &amp;gt; Ubuntu &amp;gt; Ubuntu Server 20.04.4 LTS (RPI 3/4/400) 64-bit&#039;&#039;&lt;br /&gt;
#Insert your SD card into your PC and select it in the &#039;&#039;Storage&#039;&#039; part of the software&lt;br /&gt;
#Click &#039;&#039;write&#039;&#039; and wait for the process to finish&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have successfully flashed your image, remove the SD for your PC &#039;&#039;&#039;and reinsert it again.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Then replace the &amp;lt;code&amp;gt;/boot/config.txt&amp;lt;/code&amp;gt; file with the one provided here: [https://github.com/ClemensElflein/OpenMower/blob/main/configs/RaspberryPiConfig/config.txt]&lt;br /&gt;
&lt;br /&gt;
This will enable all hardware serial ports on the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can theoretically configure networking in this step as well, but I&#039;m not recommending it. This is, because the networking information file gets only copied once and if you have an error it won&#039;t work.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;We need an interactive terminal in the next step anyways.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have done this step, you can eject the SD card and plug it into your Raspberry Pi 4.&lt;br /&gt;
&lt;br /&gt;
=== Opening a Serial Terminal ===&lt;br /&gt;
[[File:SerialRedirect.png|thumb|Serial Terminal: minicom -D /dev/ttyACM0]]&lt;br /&gt;
This step is needed for the following sections. The goal is to have a serial terminal to do basic config (networking etc) easily.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The easiest way of doing so is:&lt;br /&gt;
# Flash the SerialRedirect firmware into your Pico. Get it here: https://github.com/ClemensElflein/OpenMower/tree/main/Firmware/SerialRedirect/bin&lt;br /&gt;
# Provide your mainboard with power&lt;br /&gt;
# Plug your Pico into a computer. A virtual COM port should appear&lt;br /&gt;
# Connect to the COM port (I&#039;m using minicom, see image on the right), then press enter to start the Raspberry Pi.&lt;br /&gt;
#The Pi boots and a serial terminal will appear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you can login with the default credentials:&lt;br /&gt;
&lt;br /&gt;
username: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
password: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that you will need to change the password immediately.&lt;br /&gt;
&lt;br /&gt;
=== Disable Boot Interrupt ===&lt;br /&gt;
[[File:Image.png|thumb|Commands needed to disable boot interrupt on serial input.]]&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi boot loader will interrupt the boot sequence if data is sent through the main serial port of the Raspberry Pi. Since we&#039;re connecting &amp;quot;nosiy&amp;quot; hardware to the port, this will always interrupt the boot sequence and we need to disable this feature. &lt;br /&gt;
&lt;br /&gt;
In order to do this, reboot the Pi (sudo reboot) and send anything during the count-down in the bootloader (check the YouTube video linked above, if you&#039;re not sure).&lt;br /&gt;
&lt;br /&gt;
Then enter the following commands into the bootloader prompt:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
setenv bootdelay -2&lt;br /&gt;
saveenv&lt;br /&gt;
reset&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The Pi should reboot and the count-down should be gone.&lt;br /&gt;
&lt;br /&gt;
=== Some Settings ===&lt;br /&gt;
Here are some miscellaneous settings I think are a good idea for an OpenMower install.&lt;br /&gt;
&lt;br /&gt;
[TODO]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- Disable unattended upgrades:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl stop --force unattended-upgrades &amp;amp;&amp;amp; sudo systemctl disable unattended-upgrades &amp;amp;&amp;amp; sudo systemctl mask unattended-upgrades&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- I like to add the following to &amp;lt;code&amp;gt;cmdline.txt&amp;lt;/code&amp;gt; in order to fsck on boot:  &amp;lt;code&amp;gt;fsck.mode=force fsck.repair=yes&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- I prefer to use a static IP&lt;br /&gt;
&lt;br /&gt;
=== Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM) ===&lt;br /&gt;
Compiling the OpenMower software will need more than 2GB of RAM. In order to still do this on a Pi with &amp;lt;= 2GB of RAM, we will add a 2GB swap file to the system by entering the following commands:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Create a new 2GB swap file&lt;br /&gt;
sudo fallocate -l 2G /swapfile&lt;br /&gt;
# Change permissions, so that only root can read and write&lt;br /&gt;
sudo chmod 600 /swapfile&lt;br /&gt;
# Create swap space in the file&lt;br /&gt;
sudo mkswap /swapfile&lt;br /&gt;
# Add it to the fstab&lt;br /&gt;
echo &#039;/swapfile swap swap defaults 0 0&#039; | sudo tee -a /etc/fstab /swapfile swap swap defaults 0 0&lt;br /&gt;
# Reboot to activate&lt;br /&gt;
sudo reboot&lt;br /&gt;
&lt;br /&gt;
# Check if it&#039;s activated&lt;br /&gt;
sudo swapon --show&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing a WiFi Hot-Spot (optional, but recommended) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Since we will be configuring the WiFi interface, make sure that you have connected Etherent to your Raspberry Pi for this step.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As soon as you have closed your mower&#039;s enclosure, you won&#039;t have physical access to your Raspberry Pi anymore. If for some reason it&#039;s unable to connect to your WiFi (e.g. you have changed your password), you would need to open the case to get access to the SD card or Ethernet port on the Pi to regain access.&lt;br /&gt;
&lt;br /&gt;
To prevent this, we&#039;re going to install a hot-spot software which helps you to connect to WiFi by opening a hot-spot each time the Pi cannot connect to a known WiFi connection.&lt;br /&gt;
&lt;br /&gt;
Now is the best time to do this, because we have a serial terminal anyways and can mess with the network interfaces without shutting us out of the system!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Just use the following commands for this:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# If dpkg throws an error like&lt;br /&gt;
#   dpkg: error processing package ... (--install):&lt;br /&gt;
#   dependency problems - leaving unconfigured&lt;br /&gt;
# you need some dependencies, correct them by running:&lt;br /&gt;
sudo apt install -f&lt;br /&gt;
# and then try it again&lt;br /&gt;
&lt;br /&gt;
# We need to get a patched version of the network manager for this&lt;br /&gt;
wget https://davesteele.github.io/comitup/deb/python3-networkmanager_2.2-1dss02_all.deb&lt;br /&gt;
sudo dpkg -i python3-networkmanager_2.2-1dss02_all.deb&lt;br /&gt;
rm python3-networkmanager_2.2-1dss02_all.deb&lt;br /&gt;
# We also need some python dependencies&lt;br /&gt;
sudo apt install python3-cachetools python3-cairo libcairo2&lt;br /&gt;
# Install comitup using latest version from the website&lt;br /&gt;
wget https://davesteele.github.io/comitup/deb/comitup_1.38-1_all.deb&lt;br /&gt;
sudo dpkg -i comitup_1.38-1_all.deb&lt;br /&gt;
rm comitup_1.38-1_all.deb&lt;br /&gt;
# Disable resolved&lt;br /&gt;
sudo systemctl mask systemd-resolved.service&lt;br /&gt;
# Remove resolv.conf for some reason&lt;br /&gt;
sudo rm /etc/resolv.conf&lt;br /&gt;
# Edit comitup.conf to change the wifi name (set ap-name to whatever. I used open-mower-&amp;lt;nn&amp;gt;)&lt;br /&gt;
sudo nano /etc/comitup.conf&lt;br /&gt;
# Reboot the Pi, the WiFi should be working&lt;br /&gt;
sudo reboot&lt;br /&gt;
# Log into your pi again and check if DNS is working (e.g. ping google.com). If it&#039;s not working edit the following:&lt;br /&gt;
sudo nano /etc/NetworkManager/NetworkManager.conf&lt;br /&gt;
# and add the following line to the [main] section: dns=8.8.8.8&lt;br /&gt;
# reboot again, it should work&lt;br /&gt;
sudo reboot&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable Serial Console ===&lt;br /&gt;
Now that we have setup the network and can access the Pi even if our WiFi is not in range, we need to disable that serial console so that we can use the serial port for hardware.&lt;br /&gt;
&lt;br /&gt;
To do this, enter: &amp;lt;code&amp;gt;sudo nano /boot/firmware/cmdline.txt&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and remove the &amp;lt;code&amp;gt;console=serial0,115200&amp;lt;/code&amp;gt; part of the line.&lt;br /&gt;
&lt;br /&gt;
Save the file and reboot. You should still see the bootloader output, but no serial output after that.&lt;br /&gt;
&lt;br /&gt;
== Installing Tools ==&lt;br /&gt;
If you&#039;re happy with your basic Ubuntu setup, it&#039;s time to install some tools required for the OpenMower&lt;br /&gt;
&lt;br /&gt;
=== General Dependencies ===&lt;br /&gt;
Just install them with apt:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install build-essential git&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STR2STR (optional, recommended; only needed if you&#039;re using NTRIP, so probably most of you) ===&lt;br /&gt;
We need a newer version than the one available in apt, so install it from source:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install gfortran&lt;br /&gt;
git clone https://github.com/rtklibexplorer/RTKLIB&lt;br /&gt;
cd RTKLIB&lt;br /&gt;
git checkout tags/b34c&lt;br /&gt;
cd app/consapp/&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You should now be able to run str2str from anywhere.&lt;br /&gt;
&lt;br /&gt;
=== OpenOCD (optional, recommended; only needed if you want to flash Pico from Raspberry Pi) ===&lt;br /&gt;
We need to get the OpenOCD version from the Raspberry Pi foundation, because the &amp;quot;original&amp;quot; one doesn&#039;t have the Pico support built in yet.&lt;br /&gt;
&lt;br /&gt;
Install it from source:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install automake autoconf build-essential texinfo libtool libftdi-dev libusb-1.0-0-dev pkg-config&lt;br /&gt;
git clone https://github.com/raspberrypi/openocd.git --recursive --branch rp2040 --depth=1&lt;br /&gt;
cd openocd&lt;br /&gt;
./bootstrap&lt;br /&gt;
./configure --enable-ftdi --enable-sysfsgpio --enable-bcm2835gpio&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You can test if it was a success by running:&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
ubuntu@ubuntu:~$ openocd -v&lt;br /&gt;
Open On-Chip Debugger 0.11.0-g610f137-dirty (2022-06-07-00:39)&lt;br /&gt;
Licensed under GNU GPL v2&lt;br /&gt;
For bug reports, read&lt;br /&gt;
	http://openocd.org/doc/doxygen/bugs.html&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing ROS and OpenMower ==&lt;br /&gt;
We&#039;re using ROS Noetic for the OpenMower project. In this step we will install it, get the OpenMower sources, build the sources and create a basic configuration file for your mower.&lt;br /&gt;
&lt;br /&gt;
=== Install ROS Noetic ===&lt;br /&gt;
Since we&#039;re running Ubuntu 20.04 installing ROS is as easy as running the following commands:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Get the ROS apt repository&lt;br /&gt;
sudo sh -c &#039;echo &amp;quot;deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main&amp;quot; &amp;gt; /etc/apt/sources.list.d/ros-latest.list&#039;&lt;br /&gt;
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -&lt;br /&gt;
&lt;br /&gt;
# Install the ROS base system&lt;br /&gt;
sudo apt update&lt;br /&gt;
sudo apt install ros-noetic-ros-base&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;We only need to register the ROS installation in your .bashrc file. This will enable you to call ROS specific commands from your terminal:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.bash&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing OpenMower Software ===&lt;br /&gt;
Now we&#039;re finally able to install the OpenMower software. First, we&#039;re checking out the current version of the sources, then we&#039;re getting the dependencies and finally we&#039;re building the sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Clone the GitHub Repository:&lt;br /&gt;
git clone --recursive https://github.com/ClemensElflein/open_mower_ros.git&lt;br /&gt;
&lt;br /&gt;
# Get rosdep, only needed once&lt;br /&gt;
sudo apt install python3-rosdep&lt;br /&gt;
sudo rosdep init&lt;br /&gt;
rosdep update&lt;br /&gt;
&lt;br /&gt;
# Get the dependencies using rosdep&lt;br /&gt;
cd open_mower_ros/&lt;br /&gt;
rosdep install --from-paths src --ignore-src --default-yes&lt;br /&gt;
&lt;br /&gt;
# Finally, build the sources (do -j$(nproc) only on 8GB Raspberry Pis). This will take a while!&lt;br /&gt;
catkin_make -j1&lt;br /&gt;
&lt;br /&gt;
# Copy the default configuration file to your home directory&lt;br /&gt;
cp open_mower_ros/src/open_mower/config/mower_config.sh.example ~/mower_config.sh&lt;br /&gt;
&lt;br /&gt;
# The next step is to also source the OpenMower ROS install&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;At this point the OpenMower software is successfully installed! You will need to configure the OpenMower software and then you&#039;re finally ready to mow.&lt;br /&gt;
&lt;br /&gt;
== Some Additional Issues ==&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m using an external WiFi dongle for better coverage, but sometimes it doesn&#039;t work ===&lt;br /&gt;
It seems that the Ubuntu sometimes puts external WiFi dongles to sleep. To prevent this, we create a service which disables powersave:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Enter this to create the service&lt;br /&gt;
sudo systemctl --full --force edit wifi_powersave@.service&lt;br /&gt;
&lt;br /&gt;
# Paste the following:&lt;br /&gt;
[Unit]&lt;br /&gt;
Description=Set WiFi power save %i&lt;br /&gt;
After=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
Type=oneshot&lt;br /&gt;
RemainAfterExit=yes&lt;br /&gt;
ExecStart=/sbin/iw dev wlan1 set power_save %i&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
# Save and exit, then activate using:&lt;br /&gt;
sudo systemctl disable wifi_powersave@on.service&lt;br /&gt;
sudo systemctl enable wifi_powersave@off.service&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>
	</entry>
	<entry>
		<id>https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=275</id>
		<title>OLD Bare Metal System Image</title>
		<link rel="alternate" type="text/html" href="https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=275"/>
		<updated>2022-08-09T22:35:51Z</updated>

		<summary type="html">&lt;p&gt;Potter-91: /* Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page will guide you through the steps to install a basic system image.&lt;br /&gt;
&lt;br /&gt;
On this image you will have the ROS base system, the OpenMower installation, local configuration for your mower and some tools to help you work with the mower.&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
In order to follow this guide, you will need the following:&lt;br /&gt;
&lt;br /&gt;
#A Raspberry Pi 4 (4GB or more recommended, [[System Image#Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM)|2GB works with swap, see here]])&lt;br /&gt;
#An SD card&lt;br /&gt;
#A soldered OpenMower mainboard&lt;br /&gt;
&lt;br /&gt;
==Installing the Base System==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;&#039;&#039;&#039;There is also a YouTube video explaining the steps in this section:&#039;&#039;&#039; https://youtu.be/_bImqD-pQSA?t=562&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Flashing Ubuntu to SD Card ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first step is to install the base system. We&#039;re using Ubuntu 20.04 Server for the Raspberry Pi. This is, because this image gives us best support ROS Noetic.&lt;br /&gt;
&lt;br /&gt;
Installing the base image is easy:&lt;br /&gt;
&lt;br /&gt;
#[https://www.raspberrypi.com/software/ Get the Raspberry Pi Imager software]&lt;br /&gt;
#Select the correct operating system:  &#039;&#039;Other-general-purpose OS &amp;gt; Ubuntu &amp;gt; Ubuntu Server 20.04.4 LTS (RPI 3/4/400) 64-bit&#039;&#039;&lt;br /&gt;
#Insert your SD card into your PC and select it in the &#039;&#039;Storage&#039;&#039; part of the software&lt;br /&gt;
#Click &#039;&#039;write&#039;&#039; and wait for the process to finish&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have successfully flashed your image, remove the SD for your PC &#039;&#039;&#039;and reinsert it again.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Then replace the &amp;lt;code&amp;gt;/boot/config.txt&amp;lt;/code&amp;gt; file with the one provided here: [https://github.com/ClemensElflein/OpenMower/blob/main/configs/RaspberryPiConfig/config.txt]&lt;br /&gt;
&lt;br /&gt;
This will enable all hardware serial ports on the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can theoretically configure networking in this step as well, but I&#039;m not recommending it. This is, because the networking information file gets only copied once and if you have an error it won&#039;t work.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;We need an interactive terminal in the next step anyways.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have done this step, you can eject the SD card and plug it into your Raspberry Pi 4.&lt;br /&gt;
&lt;br /&gt;
=== Opening a Serial Terminal ===&lt;br /&gt;
[[File:SerialRedirect.png|thumb|Serial Terminal: minicom -D /dev/ttyACM0]]&lt;br /&gt;
This step is needed for the following sections. The goal is to have a serial terminal to do basic config (networking etc) easily.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The easiest way of doing so is:&lt;br /&gt;
# Flash the SerialRedirect firmware into your Pico. Get it here: https://github.com/ClemensElflein/OpenMower/tree/main/Firmware/SerialRedirect/bin&lt;br /&gt;
# Provide your mainboard with power&lt;br /&gt;
# Plug your Pico into a computer. A virtual COM port should appear&lt;br /&gt;
# Connect to the COM port (I&#039;m using minicom, see image on the right), then press enter to start the Raspberry Pi.&lt;br /&gt;
#The Pi boots and a serial terminal will appear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you can login with the default credentials:&lt;br /&gt;
&lt;br /&gt;
username: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
password: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that you will need to change the password immediately.&lt;br /&gt;
&lt;br /&gt;
=== Disable Boot Interrupt ===&lt;br /&gt;
[[File:Image.png|thumb|Commands needed to disable boot interrupt on serial input.]]&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi boot loader will interrupt the boot sequence if data is sent through the main serial port of the Raspberry Pi. Since we&#039;re connecting &amp;quot;nosiy&amp;quot; hardware to the port, this will always interrupt the boot sequence and we need to disable this feature. &lt;br /&gt;
&lt;br /&gt;
In order to do this, reboot the Pi (sudo reboot) and send anything during the count-down in the bootloader (check the YouTube video linked above, if you&#039;re not sure).&lt;br /&gt;
&lt;br /&gt;
Then enter the following commands into the bootloader prompt:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
setenv bootdelay -2&lt;br /&gt;
saveenv&lt;br /&gt;
reset&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The Pi should reboot and the count-down should be gone.&lt;br /&gt;
&lt;br /&gt;
=== Some Settings ===&lt;br /&gt;
Here are some miscellaneous settings I think are a good idea for an OpenMower install.&lt;br /&gt;
&lt;br /&gt;
[TODO]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- Disable unattended upgrades:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl stop --force unattended-upgrades &amp;amp;&amp;amp; sudo systemctl disable unattended-upgrades &amp;amp;&amp;amp; sudo systemctl mask unattended-upgrades&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- I like to add the following to &amp;lt;code&amp;gt;cmdline.txt&amp;lt;/code&amp;gt; in order to fsck on boot:  &amp;lt;code&amp;gt;fsck.mode=force fsck.repair=yes&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- I prefer to use a static IP&lt;br /&gt;
&lt;br /&gt;
=== Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM) ===&lt;br /&gt;
Compiling the OpenMower software will need more than 2GB of RAM. In order to still do this on a Pi with &amp;lt;= 2GB of RAM, we will add a 2GB swap file to the system by entering the following commands:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Create a new 2GB swap file&lt;br /&gt;
sudo fallocate -l 2G /swapfile&lt;br /&gt;
# Change permissions, so that only root can read and write&lt;br /&gt;
sudo chmod 600 /swapfile&lt;br /&gt;
# Create swap space in the file&lt;br /&gt;
sudo mkswap /swapfile&lt;br /&gt;
# Add it to the fstab&lt;br /&gt;
echo &#039;/swapfile swap swap defaults 0 0&#039; | sudo tee -a /etc/fstab /swapfile swap swap defaults 0 0&lt;br /&gt;
# Reboot to activate&lt;br /&gt;
sudo reboot&lt;br /&gt;
&lt;br /&gt;
# Check if it&#039;s activated&lt;br /&gt;
sudo swapon --show&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing a WiFi Hot-Spot (optional, but recommended) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Since we will be configuring the WiFi interface, make sure that you have connected Etherent to your Raspberry Pi for this step.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As soon as you have closed your mower&#039;s enclosure, you won&#039;t have physical access to your Raspberry Pi anymore. If for some reason it&#039;s unable to connect to your WiFi (e.g. you have changed your password), you would need to open the case to get access to the SD card or Ethernet port on the Pi to regain access.&lt;br /&gt;
&lt;br /&gt;
To prevent this, we&#039;re going to install a hot-spot software which helps you to connect to WiFi by opening a hot-spot each time the Pi cannot connect to a known WiFi connection.&lt;br /&gt;
&lt;br /&gt;
Now is the best time to do this, because we have a serial terminal anyways and can mess with the network interfaces without shutting us out of the system!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Just use the following commands for this:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# If dpkg throws an error like&lt;br /&gt;
#   dpkg: error processing package ... (--install):&lt;br /&gt;
#   dependency problems - leaving unconfigured&lt;br /&gt;
# you need some dependencies, correct them by running:&lt;br /&gt;
sudo apt install -f&lt;br /&gt;
# and then try it again&lt;br /&gt;
&lt;br /&gt;
# We need to get a patched version of the network manager for this&lt;br /&gt;
wget https://davesteele.github.io/comitup/deb/python3-networkmanager_2.2-1dss02_all.deb&lt;br /&gt;
sudo dpkg -i python3-networkmanager_2.2-1dss02_all.deb&lt;br /&gt;
rm python3-networkmanager_2.2-1dss02_all.deb&lt;br /&gt;
# We also need some python dependencies&lt;br /&gt;
sudo apt install python3-cachetools python3-cairo libcairo2&lt;br /&gt;
# Install comitup using latest version from the website&lt;br /&gt;
wget https://davesteele.github.io/comitup/deb/comitup_1.38-1_all.deb&lt;br /&gt;
sudo dpkg -i comitup_1.38-1_all.deb&lt;br /&gt;
rm comitup_1.38-1_all.deb&lt;br /&gt;
# Disable resolved&lt;br /&gt;
sudo systemctl mask systemd-resolved.service&lt;br /&gt;
# Remove resolv.conf for some reason&lt;br /&gt;
sudo rm /etc/resolv.conf&lt;br /&gt;
# Edit comitup.conf to change the wifi name (set ap-name to whatever. I used open-mower-&amp;lt;nn&amp;gt;)&lt;br /&gt;
sudo nano /etc/comitup.conf&lt;br /&gt;
# Reboot the Pi, the WiFi should be working&lt;br /&gt;
sudo reboot&lt;br /&gt;
# Log into your pi again and check if DNS is working (e.g. ping google.com). If it&#039;s not working edit the following:&lt;br /&gt;
sudo nano /etc/NetworkManager/NetworkManager.conf&lt;br /&gt;
# and add the following line to the [main] section: dns=8.8.8.8&lt;br /&gt;
# reboot again, it should work&lt;br /&gt;
sudo reboot&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable Serial Console ===&lt;br /&gt;
Now that we have setup the network and can access the Pi even if our WiFi is not in range, we need to disable that serial console so that we can use the serial port for hardware.&lt;br /&gt;
&lt;br /&gt;
To do this, enter: &amp;lt;code&amp;gt;sudo nano /boot/firmware/cmdline.txt&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and remove the &amp;lt;code&amp;gt;console=serial0,115200&amp;lt;/code&amp;gt; part of the line.&lt;br /&gt;
&lt;br /&gt;
Save the file and reboot. You should still see the bootloader output, but no serial output after that.&lt;br /&gt;
&lt;br /&gt;
== Installing Tools ==&lt;br /&gt;
If you&#039;re happy with your basic Ubuntu setup, it&#039;s time to install some tools required for the OpenMower&lt;br /&gt;
&lt;br /&gt;
=== General Dependencies ===&lt;br /&gt;
Just install them with apt:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install build-essential git&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STR2STR (optional, recommended; only needed if you&#039;re using NTRIP, so probably most of you) ===&lt;br /&gt;
We need a newer version than the one available in apt, so install it from source:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install gfortran&lt;br /&gt;
git clone https://github.com/rtklibexplorer/RTKLIB&lt;br /&gt;
cd RTKLIB&lt;br /&gt;
git checkout tags/b34c&lt;br /&gt;
cd app/consapp/&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You should now be able to run str2str from anywhere.&lt;br /&gt;
&lt;br /&gt;
=== OpenOCD (optional, recommended; only needed if you want to flash Pico from Raspberry Pi) ===&lt;br /&gt;
We need to get the OpenOCD version from the Raspberry Pi foundation, because the &amp;quot;original&amp;quot; one doesn&#039;t have the Pico support built in yet.&lt;br /&gt;
&lt;br /&gt;
Install it from source:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install automake autoconf build-essential texinfo libtool libftdi-dev libusb-1.0-0-dev pkg-config&lt;br /&gt;
git clone https://github.com/raspberrypi/openocd.git --recursive --branch rp2040 --depth=1&lt;br /&gt;
cd openocd&lt;br /&gt;
./bootstrap&lt;br /&gt;
./configure --enable-ftdi --enable-sysfsgpio --enable-bcm2835gpio&lt;br /&gt;
make -j$(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You can test if it was a success by running:&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
ubuntu@ubuntu:~$ openocd -v&lt;br /&gt;
Open On-Chip Debugger 0.11.0-g610f137-dirty (2022-06-07-00:39)&lt;br /&gt;
Licensed under GNU GPL v2&lt;br /&gt;
For bug reports, read&lt;br /&gt;
	http://openocd.org/doc/doxygen/bugs.html&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing ROS and OpenMower ==&lt;br /&gt;
We&#039;re using ROS Noetic for the OpenMower project. In this step we will install it, get the OpenMower sources, build the sources and create a basic configuration file for your mower.&lt;br /&gt;
&lt;br /&gt;
=== Install ROS Noetic ===&lt;br /&gt;
Since we&#039;re running Ubuntu 20.04 installing ROS is as easy as running the following commands:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
# Get the ROS apt repository&lt;br /&gt;
sudo sh -c &#039;echo &amp;quot;deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main&amp;quot; &amp;gt; /etc/apt/sources.list.d/ros-latest.list&#039;&lt;br /&gt;
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -&lt;br /&gt;
&lt;br /&gt;
# Install the ROS base system&lt;br /&gt;
sudo apt update&lt;br /&gt;
sudo apt install ros-noetic-ros-base&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;We only need to register the ROS installation in your .bashrc file. This will enable you to call ROS specific commands from your terminal:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.bash&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing OpenMower Software ===&lt;br /&gt;
Now we&#039;re finally able to install the OpenMower software. First, we&#039;re checking out the current version of the sources, then we&#039;re getting the dependencies and finally we&#039;re building the sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
# Clone the GitHub Repository:&lt;br /&gt;
git clone --recursive https://github.com/ClemensElflein/open_mower_ros.git&lt;br /&gt;
&lt;br /&gt;
# Get rosdep, only needed once&lt;br /&gt;
sudo apt install python3-rosdep&lt;br /&gt;
sudo rosdep init&lt;br /&gt;
rosdep update&lt;br /&gt;
&lt;br /&gt;
# Get the dependencies using rosdep&lt;br /&gt;
cd open_mower_ros/&lt;br /&gt;
rosdep install --from-paths src --ignore-src --default-yes&lt;br /&gt;
&lt;br /&gt;
# Finally, build the sources (do -j$(nproc) only on 8GB Raspberry Pis). This will take a while!&lt;br /&gt;
catkin_make -j1&lt;br /&gt;
&lt;br /&gt;
# Copy the default configuration file to your home directory&lt;br /&gt;
cp open_mower_ros/src/open_mower/config/mower_config.sh.example ~/mower_config.sh&lt;br /&gt;
&lt;br /&gt;
# The next step is to also source the OpenMower ROS install&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;At this point the OpenMower software is successfully installed! You will need to configure the OpenMower software and then you&#039;re finally ready to mow.&lt;br /&gt;
&lt;br /&gt;
== Some Additional Issues ==&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m using an external WiFi dongle for better coverage, but sometimes it doesn&#039;t work ===&lt;br /&gt;
It seems that the Ubuntu sometimes puts external WiFi dongles to sleep. To prevent this, we create a service which disables powersave:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Enter this to create the service&lt;br /&gt;
sudo systemctl --full --force edit wifi_powersave@.service&lt;br /&gt;
&lt;br /&gt;
# Paste the following:&lt;br /&gt;
[Unit]&lt;br /&gt;
Description=Set WiFi power save %i&lt;br /&gt;
After=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
Type=oneshot&lt;br /&gt;
RemainAfterExit=yes&lt;br /&gt;
ExecStart=/sbin/iw dev wlan1 set power_save %i&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
# Save and exit, then activate using:&lt;br /&gt;
sudo systemctl disable wifi_powersave@on.service&lt;br /&gt;
sudo systemctl enable wifi_powersave@off.service&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>
	</entry>
	<entry>
		<id>https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=274</id>
		<title>OLD Bare Metal System Image</title>
		<link rel="alternate" type="text/html" href="https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=274"/>
		<updated>2022-08-09T22:30:01Z</updated>

		<summary type="html">&lt;p&gt;Potter-91: /* Some Settings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page will guide you through the steps to install a basic system image.&lt;br /&gt;
&lt;br /&gt;
On this image you will have the ROS base system, the OpenMower installation, local configuration for your mower and some tools to help you work with the mower.&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
In order to follow this guide, you will need the following:&lt;br /&gt;
&lt;br /&gt;
#A Raspberry Pi 4 (4GB or more recommended, [[System Image#Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM)|2GB works with swap, see here]])&lt;br /&gt;
#An SD card&lt;br /&gt;
#A soldered OpenMower mainboard&lt;br /&gt;
&lt;br /&gt;
==Installing the Base System==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;&#039;&#039;&#039;There is also a YouTube video explaining the steps in this section:&#039;&#039;&#039; https://youtu.be/_bImqD-pQSA?t=562&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Flashing Ubuntu to SD Card ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first step is to install the base system. We&#039;re using Ubuntu 20.04 Server for the Raspberry Pi. This is, because this image gives us best support ROS Noetic.&lt;br /&gt;
&lt;br /&gt;
Installing the base image is easy:&lt;br /&gt;
&lt;br /&gt;
#[https://www.raspberrypi.com/software/ Get the Raspberry Pi Imager software]&lt;br /&gt;
#Select the correct operating system:  &#039;&#039;Other-general-purpose OS &amp;gt; Ubuntu &amp;gt; Ubuntu Server 20.04.4 LTS (RPI 3/4/400) 64-bit&#039;&#039;&lt;br /&gt;
#Insert your SD card into your PC and select it in the &#039;&#039;Storage&#039;&#039; part of the software&lt;br /&gt;
#Click &#039;&#039;write&#039;&#039; and wait for the process to finish&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have successfully flashed your image, remove the SD for your PC &#039;&#039;&#039;and reinsert it again.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Then replace the &amp;lt;code&amp;gt;/boot/config.txt&amp;lt;/code&amp;gt; file with the one provided here: [https://github.com/ClemensElflein/OpenMower/blob/main/configs/RaspberryPiConfig/config.txt]&lt;br /&gt;
&lt;br /&gt;
This will enable all hardware serial ports on the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can theoretically configure networking in this step as well, but I&#039;m not recommending it. This is, because the networking information file gets only copied once and if you have an error it won&#039;t work.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;We need an interactive terminal in the next step anyways.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have done this step, you can eject the SD card and plug it into your Raspberry Pi 4.&lt;br /&gt;
&lt;br /&gt;
=== Opening a Serial Terminal ===&lt;br /&gt;
[[File:SerialRedirect.png|thumb|Serial Terminal: minicom -D /dev/ttyACM0]]&lt;br /&gt;
This step is needed for the following sections. The goal is to have a serial terminal to do basic config (networking etc) easily.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The easiest way of doing so is:&lt;br /&gt;
# Flash the SerialRedirect firmware into your Pico. Get it here: https://github.com/ClemensElflein/OpenMower/tree/main/Firmware/SerialRedirect/bin&lt;br /&gt;
# Provide your mainboard with power&lt;br /&gt;
# Plug your Pico into a computer. A virtual COM port should appear&lt;br /&gt;
# Connect to the COM port (I&#039;m using minicom, see image on the right), then press enter to start the Raspberry Pi.&lt;br /&gt;
#The Pi boots and a serial terminal will appear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you can login with the default credentials:&lt;br /&gt;
&lt;br /&gt;
username: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
password: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that you will need to change the password immediately.&lt;br /&gt;
&lt;br /&gt;
=== Disable Boot Interrupt ===&lt;br /&gt;
[[File:Image.png|thumb|Commands needed to disable boot interrupt on serial input.]]&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi boot loader will interrupt the boot sequence if data is sent through the main serial port of the Raspberry Pi. Since we&#039;re connecting &amp;quot;nosiy&amp;quot; hardware to the port, this will always interrupt the boot sequence and we need to disable this feature. &lt;br /&gt;
&lt;br /&gt;
In order to do this, reboot the Pi (sudo reboot) and send anything during the count-down in the bootloader (check the YouTube video linked above, if you&#039;re not sure).&lt;br /&gt;
&lt;br /&gt;
Then enter the following commands into the bootloader prompt:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
setenv bootdelay -2&lt;br /&gt;
saveenv&lt;br /&gt;
reset&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The Pi should reboot and the count-down should be gone.&lt;br /&gt;
&lt;br /&gt;
=== Some Settings ===&lt;br /&gt;
Here are some miscellaneous settings I think are a good idea for an OpenMower install.&lt;br /&gt;
&lt;br /&gt;
[TODO]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- Disable unattended upgrades:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl stop --force unattended-upgrades &amp;amp;&amp;amp; sudo systemctl disable unattended-upgrades &amp;amp;&amp;amp; sudo systemctl mask unattended-upgrades&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- I like to add the following to &amp;lt;code&amp;gt;cmdline.txt&amp;lt;/code&amp;gt; in order to fsck on boot:  &amp;lt;code&amp;gt;fsck.mode=force fsck.repair=yes&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- I prefer to use a static IP&lt;br /&gt;
&lt;br /&gt;
=== Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM) ===&lt;br /&gt;
Compiling the OpenMower software will need more than 2GB of RAM. In order to still do this on a Pi with &amp;lt;= 2GB of RAM, we will add a 2GB swap file to the system by entering the following commands:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
# Create a new 2GB swap file&lt;br /&gt;
sudo fallocate -l 2G /swapfile&lt;br /&gt;
# Change permissions, so that only root can read and write&lt;br /&gt;
sudo chmod 600 /swapfile&lt;br /&gt;
# Create swap space in the file&lt;br /&gt;
sudo mkswap /swapfile&lt;br /&gt;
# Add it to the fstab&lt;br /&gt;
echo &#039;/swapfile swap swap defaults 0 0&#039; | sudo tee -a /etc/fstab /swapfile swap swap defaults 0 0&lt;br /&gt;
# Reboot to activate&lt;br /&gt;
sudo reboot&lt;br /&gt;
&lt;br /&gt;
# Check if it&#039;s activated&lt;br /&gt;
sudo swapon --show&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing a WiFi Hot-Spot (optional, but recommended) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Since we will be configuring the WiFi interface, make sure that you have connected Etherent to your Raspberry Pi for this step.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As soon as you have closed your mower&#039;s enclosure, you won&#039;t have physical access to your Raspberry Pi anymore. If for some reason it&#039;s unable to connect to your WiFi (e.g. you have changed your password), you would need to open the case to get access to the SD card or Ethernet port on the Pi to regain access.&lt;br /&gt;
&lt;br /&gt;
To prevent this, we&#039;re going to install a hot-spot software which helps you to connect to WiFi by opening a hot-spot each time the Pi cannot connect to a known WiFi connection.&lt;br /&gt;
&lt;br /&gt;
Now is the best time to do this, because we have a serial terminal anyways and can mess with the network interfaces without shutting us out of the system!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Just use the following commands for this:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# If dpkg throws an error like&lt;br /&gt;
#   dpkg: error processing package ... (--install):&lt;br /&gt;
#   dependency problems - leaving unconfigured&lt;br /&gt;
# you need some dependencies, correct them by running:&lt;br /&gt;
sudo apt install -f&lt;br /&gt;
# and then try it again&lt;br /&gt;
&lt;br /&gt;
# We need to get a patched version of the network manager for this&lt;br /&gt;
wget https://davesteele.github.io/comitup/deb/python3-networkmanager_2.2-1dss02_all.deb&lt;br /&gt;
sudo dpkg -i python3-networkmanager_2.2-1dss02_all.deb&lt;br /&gt;
rm python3-networkmanager_2.2-1dss02_all.deb&lt;br /&gt;
# We also need some python dependencies&lt;br /&gt;
sudo apt install python3-cachetools python3-cairo libcairo2&lt;br /&gt;
# Install comitup using latest version from the website&lt;br /&gt;
wget https://davesteele.github.io/comitup/deb/comitup_1.38-1_all.deb&lt;br /&gt;
sudo dpkg -i comitup_1.38-1_all.deb&lt;br /&gt;
rm comitup_1.38-1_all.deb&lt;br /&gt;
# Disable resolved&lt;br /&gt;
sudo systemctl mask systemd-resolved.service&lt;br /&gt;
# Remove resolv.conf for some reason&lt;br /&gt;
sudo rm /etc/resolv.conf&lt;br /&gt;
# Edit comitup.conf to change the wifi name (set ap-name to whatever. I used open-mower-&amp;lt;nn&amp;gt;)&lt;br /&gt;
sudo nano /etc/comitup.conf&lt;br /&gt;
# Reboot the Pi, the WiFi should be working&lt;br /&gt;
sudo reboot&lt;br /&gt;
# Log into your pi again and check if DNS is working (e.g. ping google.com). If it&#039;s not working edit the following:&lt;br /&gt;
sudo nano /etc/NetworkManager/NetworkManager.conf&lt;br /&gt;
# and add the following line to the [main] section: dns=8.8.8.8&lt;br /&gt;
# reboot again, it should work&lt;br /&gt;
sudo reboot&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable Serial Console ===&lt;br /&gt;
Now that we have setup the network and can access the Pi even if our WiFi is not in range, we need to disable that serial console so that we can use the serial port for hardware.&lt;br /&gt;
&lt;br /&gt;
To do this, enter: &amp;lt;code&amp;gt;sudo nano /boot/firmware/cmdline.txt&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and remove the &amp;lt;code&amp;gt;console=serial0,115200&amp;lt;/code&amp;gt; part of the line.&lt;br /&gt;
&lt;br /&gt;
Save the file and reboot. You should still see the bootloader output, but no serial output after that.&lt;br /&gt;
&lt;br /&gt;
== Installing Tools ==&lt;br /&gt;
If you&#039;re happy with your basic Ubuntu setup, it&#039;s time to install some tools required for the OpenMower&lt;br /&gt;
&lt;br /&gt;
=== General Dependencies ===&lt;br /&gt;
Just install them with apt:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install build-essential git&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STR2STR (optional, recommended; only needed if you&#039;re using NTRIP, so probably most of you) ===&lt;br /&gt;
We need a newer version than the one available in apt, so install it from source:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install gfortran&lt;br /&gt;
git clone https://github.com/rtklibexplorer/RTKLIB&lt;br /&gt;
cd RTKLIB&lt;br /&gt;
git checkout tags/b34c&lt;br /&gt;
cd app/consapp/&lt;br /&gt;
make -j4&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You should now be able to run str2str from anywhere.&lt;br /&gt;
&lt;br /&gt;
=== OpenOCD (optional, recommended; only needed if you want to flash Pico from Raspberry Pi) ===&lt;br /&gt;
We need to get the OpenOCD version from the Raspberry Pi foundation, because the &amp;quot;original&amp;quot; one doesn&#039;t have the Pico support built in yet.&lt;br /&gt;
&lt;br /&gt;
Install it from source:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install automake autoconf build-essential texinfo libtool libftdi-dev libusb-1.0-0-dev pkg-config&lt;br /&gt;
git clone https://github.com/raspberrypi/openocd.git --recursive --branch rp2040 --depth=1&lt;br /&gt;
cd openocd&lt;br /&gt;
./bootstrap&lt;br /&gt;
./configure --enable-ftdi --enable-sysfsgpio --enable-bcm2835gpio&lt;br /&gt;
make -j4&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You can test if it was a success by running:&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
ubuntu@ubuntu:~$ openocd -v&lt;br /&gt;
Open On-Chip Debugger 0.11.0-g610f137-dirty (2022-06-07-00:39)&lt;br /&gt;
Licensed under GNU GPL v2&lt;br /&gt;
For bug reports, read&lt;br /&gt;
	http://openocd.org/doc/doxygen/bugs.html&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing ROS and OpenMower ==&lt;br /&gt;
We&#039;re using ROS Noetic for the OpenMower project. In this step we will install it, get the OpenMower sources, build the sources and create a basic configuration file for your mower.&lt;br /&gt;
&lt;br /&gt;
=== Install ROS Noetic ===&lt;br /&gt;
Since we&#039;re running Ubuntu 20.04 installing ROS is as easy as running the following commands:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
# Get the ROS apt repository&lt;br /&gt;
sudo sh -c &#039;echo &amp;quot;deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main&amp;quot; &amp;gt; /etc/apt/sources.list.d/ros-latest.list&#039;&lt;br /&gt;
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -&lt;br /&gt;
&lt;br /&gt;
# Install the ROS base system&lt;br /&gt;
sudo apt update&lt;br /&gt;
sudo apt install ros-noetic-ros-base&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;We only need to register the ROS installation in your .bashrc file. This will enable you to call ROS specific commands from your terminal:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.bash&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing OpenMower Software ===&lt;br /&gt;
Now we&#039;re finally able to install the OpenMower software. First, we&#039;re checking out the current version of the sources, then we&#039;re getting the dependencies and finally we&#039;re building the sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
# Clone the GitHub Repository:&lt;br /&gt;
git clone --recursive https://github.com/ClemensElflein/open_mower_ros.git&lt;br /&gt;
&lt;br /&gt;
# Get rosdep, only needed once&lt;br /&gt;
sudo apt install python3-rosdep&lt;br /&gt;
sudo rosdep init&lt;br /&gt;
rosdep update&lt;br /&gt;
&lt;br /&gt;
# Get the dependencies using rosdep&lt;br /&gt;
cd open_mower_ros/&lt;br /&gt;
rosdep install --from-paths src --ignore-src --default-yes&lt;br /&gt;
&lt;br /&gt;
# Finally, build the sources (do -j4 only on 8GB Raspberry Pis). This will take a while!&lt;br /&gt;
catkin_make -j1&lt;br /&gt;
&lt;br /&gt;
# Copy the default configuration file to your home directory&lt;br /&gt;
cp open_mower_ros/src/open_mower/config/mower_config.sh.example ~/mower_config.sh&lt;br /&gt;
&lt;br /&gt;
# The next step is to also source the OpenMower ROS install&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;At this point the OpenMower software is successfully installed! You will need to configure the OpenMower software and then you&#039;re finally ready to mow.&lt;br /&gt;
&lt;br /&gt;
== Some Additional Issues ==&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m using an external WiFi dongle for better coverage, but sometimes it doesn&#039;t work ===&lt;br /&gt;
It seems that the Ubuntu sometimes puts external WiFi dongles to sleep. To prevent this, we create a service which disables powersave:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
# Enter this to create the service&lt;br /&gt;
sudo systemctl --full --force edit wifi_powersave@.service&lt;br /&gt;
&lt;br /&gt;
# Paste the following:&lt;br /&gt;
[Unit]&lt;br /&gt;
Description=Set WiFi power save %i&lt;br /&gt;
After=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
Type=oneshot&lt;br /&gt;
RemainAfterExit=yes&lt;br /&gt;
ExecStart=/sbin/iw dev wlan1 set power_save %i&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
# Save and exit, then activate using:&lt;br /&gt;
sudo systemctl disable wifi_powersave@on.service&lt;br /&gt;
sudo systemctl enable wifi_powersave@off.service&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>
	</entry>
	<entry>
		<id>https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=273</id>
		<title>OLD Bare Metal System Image</title>
		<link rel="alternate" type="text/html" href="https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=273"/>
		<updated>2022-08-09T21:49:42Z</updated>

		<summary type="html">&lt;p&gt;Potter-91: /* Opening a Serial Terminal */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page will guide you through the steps to install a basic system image.&lt;br /&gt;
&lt;br /&gt;
On this image you will have the ROS base system, the OpenMower installation, local configuration for your mower and some tools to help you work with the mower.&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
In order to follow this guide, you will need the following:&lt;br /&gt;
&lt;br /&gt;
#A Raspberry Pi 4 (4GB or more recommended, [[System Image#Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM)|2GB works with swap, see here]])&lt;br /&gt;
#An SD card&lt;br /&gt;
#A soldered OpenMower mainboard&lt;br /&gt;
&lt;br /&gt;
==Installing the Base System==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;&#039;&#039;&#039;There is also a YouTube video explaining the steps in this section:&#039;&#039;&#039; https://youtu.be/_bImqD-pQSA?t=562&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Flashing Ubuntu to SD Card ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first step is to install the base system. We&#039;re using Ubuntu 20.04 Server for the Raspberry Pi. This is, because this image gives us best support ROS Noetic.&lt;br /&gt;
&lt;br /&gt;
Installing the base image is easy:&lt;br /&gt;
&lt;br /&gt;
#[https://www.raspberrypi.com/software/ Get the Raspberry Pi Imager software]&lt;br /&gt;
#Select the correct operating system:  &#039;&#039;Other-general-purpose OS &amp;gt; Ubuntu &amp;gt; Ubuntu Server 20.04.4 LTS (RPI 3/4/400) 64-bit&#039;&#039;&lt;br /&gt;
#Insert your SD card into your PC and select it in the &#039;&#039;Storage&#039;&#039; part of the software&lt;br /&gt;
#Click &#039;&#039;write&#039;&#039; and wait for the process to finish&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have successfully flashed your image, remove the SD for your PC &#039;&#039;&#039;and reinsert it again.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Then replace the &amp;lt;code&amp;gt;/boot/config.txt&amp;lt;/code&amp;gt; file with the one provided here: [https://github.com/ClemensElflein/OpenMower/blob/main/configs/RaspberryPiConfig/config.txt]&lt;br /&gt;
&lt;br /&gt;
This will enable all hardware serial ports on the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can theoretically configure networking in this step as well, but I&#039;m not recommending it. This is, because the networking information file gets only copied once and if you have an error it won&#039;t work.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;We need an interactive terminal in the next step anyways.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have done this step, you can eject the SD card and plug it into your Raspberry Pi 4.&lt;br /&gt;
&lt;br /&gt;
=== Opening a Serial Terminal ===&lt;br /&gt;
[[File:SerialRedirect.png|thumb|Serial Terminal: minicom -D /dev/ttyACM0]]&lt;br /&gt;
This step is needed for the following sections. The goal is to have a serial terminal to do basic config (networking etc) easily.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The easiest way of doing so is:&lt;br /&gt;
# Flash the SerialRedirect firmware into your Pico. Get it here: https://github.com/ClemensElflein/OpenMower/tree/main/Firmware/SerialRedirect/bin&lt;br /&gt;
# Provide your mainboard with power&lt;br /&gt;
# Plug your Pico into a computer. A virtual COM port should appear&lt;br /&gt;
# Connect to the COM port (I&#039;m using minicom, see image on the right), then press enter to start the Raspberry Pi.&lt;br /&gt;
#The Pi boots and a serial terminal will appear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you can login with the default credentials:&lt;br /&gt;
&lt;br /&gt;
username: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
password: &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that you will need to change the password immediately.&lt;br /&gt;
&lt;br /&gt;
=== Disable Boot Interrupt ===&lt;br /&gt;
[[File:Image.png|thumb|Commands needed to disable boot interrupt on serial input.]]&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi boot loader will interrupt the boot sequence if data is sent through the main serial port of the Raspberry Pi. Since we&#039;re connecting &amp;quot;nosiy&amp;quot; hardware to the port, this will always interrupt the boot sequence and we need to disable this feature. &lt;br /&gt;
&lt;br /&gt;
In order to do this, reboot the Pi (sudo reboot) and send anything during the count-down in the bootloader (check the YouTube video linked above, if you&#039;re not sure).&lt;br /&gt;
&lt;br /&gt;
Then enter the following commands into the bootloader prompt:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
setenv bootdelay -2&lt;br /&gt;
saveenv&lt;br /&gt;
reset&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The Pi should reboot and the count-down should be gone.&lt;br /&gt;
&lt;br /&gt;
=== Some Settings ===&lt;br /&gt;
Here are some miscellaneous settings I think are a good idea for an OpenMower install.&lt;br /&gt;
&lt;br /&gt;
[TODO]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- Disable unattended upgrades: &amp;lt;code&amp;gt;sudo apt remove unattended-upgrades&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- I like to add the following to &amp;lt;code&amp;gt;cmdline.txt&amp;lt;/code&amp;gt; in order to fsck on boot:  &amp;lt;code&amp;gt;fsck.mode=force fsck.repair=yes&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- I prefer to use a static IP&lt;br /&gt;
&lt;br /&gt;
=== Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM) ===&lt;br /&gt;
Compiling the OpenMower software will need more than 2GB of RAM. In order to still do this on a Pi with &amp;lt;= 2GB of RAM, we will add a 2GB swap file to the system by entering the following commands:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
# Create a new 2GB swap file&lt;br /&gt;
sudo fallocate -l 2G /swapfile&lt;br /&gt;
# Change permissions, so that only root can read and write&lt;br /&gt;
sudo chmod 600 /swapfile&lt;br /&gt;
# Create swap space in the file&lt;br /&gt;
sudo mkswap /swapfile&lt;br /&gt;
# Add it to the fstab&lt;br /&gt;
echo &#039;/swapfile swap swap defaults 0 0&#039; | sudo tee -a /etc/fstab /swapfile swap swap defaults 0 0&lt;br /&gt;
# Reboot to activate&lt;br /&gt;
sudo reboot&lt;br /&gt;
&lt;br /&gt;
# Check if it&#039;s activated&lt;br /&gt;
sudo swapon --show&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing a WiFi Hot-Spot (optional, but recommended) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Since we will be configuring the WiFi interface, make sure that you have connected Etherent to your Raspberry Pi for this step.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As soon as you have closed your mower&#039;s enclosure, you won&#039;t have physical access to your Raspberry Pi anymore. If for some reason it&#039;s unable to connect to your WiFi (e.g. you have changed your password), you would need to open the case to get access to the SD card or Ethernet port on the Pi to regain access.&lt;br /&gt;
&lt;br /&gt;
To prevent this, we&#039;re going to install a hot-spot software which helps you to connect to WiFi by opening a hot-spot each time the Pi cannot connect to a known WiFi connection.&lt;br /&gt;
&lt;br /&gt;
Now is the best time to do this, because we have a serial terminal anyways and can mess with the network interfaces without shutting us out of the system!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Just use the following commands for this:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# If dpkg throws an error like&lt;br /&gt;
#   dpkg: error processing package ... (--install):&lt;br /&gt;
#   dependency problems - leaving unconfigured&lt;br /&gt;
# you need some dependencies, correct them by running:&lt;br /&gt;
sudo apt install -f&lt;br /&gt;
# and then try it again&lt;br /&gt;
&lt;br /&gt;
# We need to get a patched version of the network manager for this&lt;br /&gt;
wget https://davesteele.github.io/comitup/deb/python3-networkmanager_2.2-1dss02_all.deb&lt;br /&gt;
sudo dpkg -i python3-networkmanager_2.2-1dss02_all.deb&lt;br /&gt;
rm python3-networkmanager_2.2-1dss02_all.deb&lt;br /&gt;
# We also need some python dependencies&lt;br /&gt;
sudo apt install python3-cachetools python3-cairo libcairo2&lt;br /&gt;
# Install comitup using latest version from the website&lt;br /&gt;
wget https://davesteele.github.io/comitup/deb/comitup_1.38-1_all.deb&lt;br /&gt;
sudo dpkg -i comitup_1.38-1_all.deb&lt;br /&gt;
rm comitup_1.38-1_all.deb&lt;br /&gt;
# Disable resolved&lt;br /&gt;
sudo systemctl mask systemd-resolved.service&lt;br /&gt;
# Remove resolv.conf for some reason&lt;br /&gt;
sudo rm /etc/resolv.conf&lt;br /&gt;
# Edit comitup.conf to change the wifi name (set ap-name to whatever. I used open-mower-&amp;lt;nn&amp;gt;)&lt;br /&gt;
sudo nano /etc/comitup.conf&lt;br /&gt;
# Reboot the Pi, the WiFi should be working&lt;br /&gt;
sudo reboot&lt;br /&gt;
# Log into your pi again and check if DNS is working (e.g. ping google.com). If it&#039;s not working edit the following:&lt;br /&gt;
sudo nano /etc/NetworkManager/NetworkManager.conf&lt;br /&gt;
# and add the following line to the [main] section: dns=8.8.8.8&lt;br /&gt;
# reboot again, it should work&lt;br /&gt;
sudo reboot&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable Serial Console ===&lt;br /&gt;
Now that we have setup the network and can access the Pi even if our WiFi is not in range, we need to disable that serial console so that we can use the serial port for hardware.&lt;br /&gt;
&lt;br /&gt;
To do this, enter: &amp;lt;code&amp;gt;sudo nano /boot/firmware/cmdline.txt&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and remove the &amp;lt;code&amp;gt;console=serial0,115200&amp;lt;/code&amp;gt; part of the line.&lt;br /&gt;
&lt;br /&gt;
Save the file and reboot. You should still see the bootloader output, but no serial output after that.&lt;br /&gt;
&lt;br /&gt;
== Installing Tools ==&lt;br /&gt;
If you&#039;re happy with your basic Ubuntu setup, it&#039;s time to install some tools required for the OpenMower&lt;br /&gt;
&lt;br /&gt;
=== General Dependencies ===&lt;br /&gt;
Just install them with apt:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install build-essential git&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STR2STR (optional, recommended; only needed if you&#039;re using NTRIP, so probably most of you) ===&lt;br /&gt;
We need a newer version than the one available in apt, so install it from source:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install gfortran&lt;br /&gt;
git clone https://github.com/rtklibexplorer/RTKLIB&lt;br /&gt;
cd RTKLIB&lt;br /&gt;
git checkout tags/b34c&lt;br /&gt;
cd app/consapp/&lt;br /&gt;
make -j4&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You should now be able to run str2str from anywhere.&lt;br /&gt;
&lt;br /&gt;
=== OpenOCD (optional, recommended; only needed if you want to flash Pico from Raspberry Pi) ===&lt;br /&gt;
We need to get the OpenOCD version from the Raspberry Pi foundation, because the &amp;quot;original&amp;quot; one doesn&#039;t have the Pico support built in yet.&lt;br /&gt;
&lt;br /&gt;
Install it from source:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install automake autoconf build-essential texinfo libtool libftdi-dev libusb-1.0-0-dev pkg-config&lt;br /&gt;
git clone https://github.com/raspberrypi/openocd.git --recursive --branch rp2040 --depth=1&lt;br /&gt;
cd openocd&lt;br /&gt;
./bootstrap&lt;br /&gt;
./configure --enable-ftdi --enable-sysfsgpio --enable-bcm2835gpio&lt;br /&gt;
make -j4&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You can test if it was a success by running:&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
ubuntu@ubuntu:~$ openocd -v&lt;br /&gt;
Open On-Chip Debugger 0.11.0-g610f137-dirty (2022-06-07-00:39)&lt;br /&gt;
Licensed under GNU GPL v2&lt;br /&gt;
For bug reports, read&lt;br /&gt;
	http://openocd.org/doc/doxygen/bugs.html&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing ROS and OpenMower ==&lt;br /&gt;
We&#039;re using ROS Noetic for the OpenMower project. In this step we will install it, get the OpenMower sources, build the sources and create a basic configuration file for your mower.&lt;br /&gt;
&lt;br /&gt;
=== Install ROS Noetic ===&lt;br /&gt;
Since we&#039;re running Ubuntu 20.04 installing ROS is as easy as running the following commands:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
# Get the ROS apt repository&lt;br /&gt;
sudo sh -c &#039;echo &amp;quot;deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main&amp;quot; &amp;gt; /etc/apt/sources.list.d/ros-latest.list&#039;&lt;br /&gt;
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -&lt;br /&gt;
&lt;br /&gt;
# Install the ROS base system&lt;br /&gt;
sudo apt update&lt;br /&gt;
sudo apt install ros-noetic-ros-base&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;We only need to register the ROS installation in your .bashrc file. This will enable you to call ROS specific commands from your terminal:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.bash&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing OpenMower Software ===&lt;br /&gt;
Now we&#039;re finally able to install the OpenMower software. First, we&#039;re checking out the current version of the sources, then we&#039;re getting the dependencies and finally we&#039;re building the sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
# Clone the GitHub Repository:&lt;br /&gt;
git clone --recursive https://github.com/ClemensElflein/open_mower_ros.git&lt;br /&gt;
&lt;br /&gt;
# Get rosdep, only needed once&lt;br /&gt;
sudo apt install python3-rosdep&lt;br /&gt;
sudo rosdep init&lt;br /&gt;
rosdep update&lt;br /&gt;
&lt;br /&gt;
# Get the dependencies using rosdep&lt;br /&gt;
cd open_mower_ros/&lt;br /&gt;
rosdep install --from-paths src --ignore-src --default-yes&lt;br /&gt;
&lt;br /&gt;
# Finally, build the sources (do -j4 only on 8GB Raspberry Pis). This will take a while!&lt;br /&gt;
catkin_make -j1&lt;br /&gt;
&lt;br /&gt;
# Copy the default configuration file to your home directory&lt;br /&gt;
cp open_mower_ros/src/open_mower/config/mower_config.sh.example ~/mower_config.sh&lt;br /&gt;
&lt;br /&gt;
# The next step is to also source the OpenMower ROS install&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;At this point the OpenMower software is successfully installed! You will need to configure the OpenMower software and then you&#039;re finally ready to mow.&lt;br /&gt;
&lt;br /&gt;
== Some Additional Issues ==&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m using an external WiFi dongle for better coverage, but sometimes it doesn&#039;t work ===&lt;br /&gt;
It seems that the Ubuntu sometimes puts external WiFi dongles to sleep. To prevent this, we create a service which disables powersave:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
# Enter this to create the service&lt;br /&gt;
sudo systemctl --full --force edit wifi_powersave@.service&lt;br /&gt;
&lt;br /&gt;
# Paste the following:&lt;br /&gt;
[Unit]&lt;br /&gt;
Description=Set WiFi power save %i&lt;br /&gt;
After=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
Type=oneshot&lt;br /&gt;
RemainAfterExit=yes&lt;br /&gt;
ExecStart=/sbin/iw dev wlan1 set power_save %i&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
# Save and exit, then activate using:&lt;br /&gt;
sudo systemctl disable wifi_powersave@on.service&lt;br /&gt;
sudo systemctl enable wifi_powersave@off.service&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>
	</entry>
	<entry>
		<id>https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=272</id>
		<title>OLD Bare Metal System Image</title>
		<link rel="alternate" type="text/html" href="https://wiki.openmower.de/index.php?title=OLD_Bare_Metal_System_Image&amp;diff=272"/>
		<updated>2022-08-09T21:48:01Z</updated>

		<summary type="html">&lt;p&gt;Potter-91: /* Flashing Ubuntu to SD Card */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page will guide you through the steps to install a basic system image.&lt;br /&gt;
&lt;br /&gt;
On this image you will have the ROS base system, the OpenMower installation, local configuration for your mower and some tools to help you work with the mower.&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
In order to follow this guide, you will need the following:&lt;br /&gt;
&lt;br /&gt;
#A Raspberry Pi 4 (4GB or more recommended, [[System Image#Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM)|2GB works with swap, see here]])&lt;br /&gt;
#An SD card&lt;br /&gt;
#A soldered OpenMower mainboard&lt;br /&gt;
&lt;br /&gt;
==Installing the Base System==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;&#039;&#039;&#039;There is also a YouTube video explaining the steps in this section:&#039;&#039;&#039; https://youtu.be/_bImqD-pQSA?t=562&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Flashing Ubuntu to SD Card ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first step is to install the base system. We&#039;re using Ubuntu 20.04 Server for the Raspberry Pi. This is, because this image gives us best support ROS Noetic.&lt;br /&gt;
&lt;br /&gt;
Installing the base image is easy:&lt;br /&gt;
&lt;br /&gt;
#[https://www.raspberrypi.com/software/ Get the Raspberry Pi Imager software]&lt;br /&gt;
#Select the correct operating system:  &#039;&#039;Other-general-purpose OS &amp;gt; Ubuntu &amp;gt; Ubuntu Server 20.04.4 LTS (RPI 3/4/400) 64-bit&#039;&#039;&lt;br /&gt;
#Insert your SD card into your PC and select it in the &#039;&#039;Storage&#039;&#039; part of the software&lt;br /&gt;
#Click &#039;&#039;write&#039;&#039; and wait for the process to finish&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have successfully flashed your image, remove the SD for your PC &#039;&#039;&#039;and reinsert it again.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Then replace the &amp;lt;code&amp;gt;/boot/config.txt&amp;lt;/code&amp;gt; file with the one provided here: [https://github.com/ClemensElflein/OpenMower/blob/main/configs/RaspberryPiConfig/config.txt]&lt;br /&gt;
&lt;br /&gt;
This will enable all hardware serial ports on the Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can theoretically configure networking in this step as well, but I&#039;m not recommending it. This is, because the networking information file gets only copied once and if you have an error it won&#039;t work.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;We need an interactive terminal in the next step anyways.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have done this step, you can eject the SD card and plug it into your Raspberry Pi 4.&lt;br /&gt;
&lt;br /&gt;
=== Opening a Serial Terminal ===&lt;br /&gt;
[[File:SerialRedirect.png|thumb|Serial Terminal: minicom -D /dev/ttyACM0]]&lt;br /&gt;
This step is needed for the following sections. The goal is to have a serial terminal to do basic config (networking etc) easily.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The easiest way of doing so is:&lt;br /&gt;
# Flash the SerialRedirect firmware into your Pico. Get it here: https://github.com/ClemensElflein/OpenMower/tree/main/Firmware/SerialRedirect/bin&lt;br /&gt;
# Provide your mainboard with power&lt;br /&gt;
# Plug your Pico into a computer. A virtual COM port should appear&lt;br /&gt;
# Connect to the COM port (I&#039;m using minicom, see image on the right), then press enter to start the Raspberry Pi.&lt;br /&gt;
#The Pi boots and a serial terminal will appear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you can login with the default credentials:&lt;br /&gt;
&lt;br /&gt;
username: ubuntu&lt;br /&gt;
&lt;br /&gt;
password: ubuntu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that you will need to change the password immediately.&lt;br /&gt;
&lt;br /&gt;
=== Disable Boot Interrupt ===&lt;br /&gt;
[[File:Image.png|thumb|Commands needed to disable boot interrupt on serial input.]]&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi boot loader will interrupt the boot sequence if data is sent through the main serial port of the Raspberry Pi. Since we&#039;re connecting &amp;quot;nosiy&amp;quot; hardware to the port, this will always interrupt the boot sequence and we need to disable this feature. &lt;br /&gt;
&lt;br /&gt;
In order to do this, reboot the Pi (sudo reboot) and send anything during the count-down in the bootloader (check the YouTube video linked above, if you&#039;re not sure).&lt;br /&gt;
&lt;br /&gt;
Then enter the following commands into the bootloader prompt:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
setenv bootdelay -2&lt;br /&gt;
saveenv&lt;br /&gt;
reset&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The Pi should reboot and the count-down should be gone.&lt;br /&gt;
&lt;br /&gt;
=== Some Settings ===&lt;br /&gt;
Here are some miscellaneous settings I think are a good idea for an OpenMower install.&lt;br /&gt;
&lt;br /&gt;
[TODO]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- Disable unattended upgrades: &amp;lt;code&amp;gt;sudo apt remove unattended-upgrades&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- I like to add the following to &amp;lt;code&amp;gt;cmdline.txt&amp;lt;/code&amp;gt; in order to fsck on boot:  &amp;lt;code&amp;gt;fsck.mode=force fsck.repair=yes&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- I prefer to use a static IP&lt;br /&gt;
&lt;br /&gt;
=== Enable Swap (optional, needed for Pi with &amp;lt;= 2GB RAM) ===&lt;br /&gt;
Compiling the OpenMower software will need more than 2GB of RAM. In order to still do this on a Pi with &amp;lt;= 2GB of RAM, we will add a 2GB swap file to the system by entering the following commands:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
# Create a new 2GB swap file&lt;br /&gt;
sudo fallocate -l 2G /swapfile&lt;br /&gt;
# Change permissions, so that only root can read and write&lt;br /&gt;
sudo chmod 600 /swapfile&lt;br /&gt;
# Create swap space in the file&lt;br /&gt;
sudo mkswap /swapfile&lt;br /&gt;
# Add it to the fstab&lt;br /&gt;
echo &#039;/swapfile swap swap defaults 0 0&#039; | sudo tee -a /etc/fstab /swapfile swap swap defaults 0 0&lt;br /&gt;
# Reboot to activate&lt;br /&gt;
sudo reboot&lt;br /&gt;
&lt;br /&gt;
# Check if it&#039;s activated&lt;br /&gt;
sudo swapon --show&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing a WiFi Hot-Spot (optional, but recommended) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Since we will be configuring the WiFi interface, make sure that you have connected Etherent to your Raspberry Pi for this step.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As soon as you have closed your mower&#039;s enclosure, you won&#039;t have physical access to your Raspberry Pi anymore. If for some reason it&#039;s unable to connect to your WiFi (e.g. you have changed your password), you would need to open the case to get access to the SD card or Ethernet port on the Pi to regain access.&lt;br /&gt;
&lt;br /&gt;
To prevent this, we&#039;re going to install a hot-spot software which helps you to connect to WiFi by opening a hot-spot each time the Pi cannot connect to a known WiFi connection.&lt;br /&gt;
&lt;br /&gt;
Now is the best time to do this, because we have a serial terminal anyways and can mess with the network interfaces without shutting us out of the system!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Just use the following commands for this:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# If dpkg throws an error like&lt;br /&gt;
#   dpkg: error processing package ... (--install):&lt;br /&gt;
#   dependency problems - leaving unconfigured&lt;br /&gt;
# you need some dependencies, correct them by running:&lt;br /&gt;
sudo apt install -f&lt;br /&gt;
# and then try it again&lt;br /&gt;
&lt;br /&gt;
# We need to get a patched version of the network manager for this&lt;br /&gt;
wget https://davesteele.github.io/comitup/deb/python3-networkmanager_2.2-1dss02_all.deb&lt;br /&gt;
sudo dpkg -i python3-networkmanager_2.2-1dss02_all.deb&lt;br /&gt;
rm python3-networkmanager_2.2-1dss02_all.deb&lt;br /&gt;
# We also need some python dependencies&lt;br /&gt;
sudo apt install python3-cachetools python3-cairo libcairo2&lt;br /&gt;
# Install comitup using latest version from the website&lt;br /&gt;
wget https://davesteele.github.io/comitup/deb/comitup_1.38-1_all.deb&lt;br /&gt;
sudo dpkg -i comitup_1.38-1_all.deb&lt;br /&gt;
rm comitup_1.38-1_all.deb&lt;br /&gt;
# Disable resolved&lt;br /&gt;
sudo systemctl mask systemd-resolved.service&lt;br /&gt;
# Remove resolv.conf for some reason&lt;br /&gt;
sudo rm /etc/resolv.conf&lt;br /&gt;
# Edit comitup.conf to change the wifi name (set ap-name to whatever. I used open-mower-&amp;lt;nn&amp;gt;)&lt;br /&gt;
sudo nano /etc/comitup.conf&lt;br /&gt;
# Reboot the Pi, the WiFi should be working&lt;br /&gt;
sudo reboot&lt;br /&gt;
# Log into your pi again and check if DNS is working (e.g. ping google.com). If it&#039;s not working edit the following:&lt;br /&gt;
sudo nano /etc/NetworkManager/NetworkManager.conf&lt;br /&gt;
# and add the following line to the [main] section: dns=8.8.8.8&lt;br /&gt;
# reboot again, it should work&lt;br /&gt;
sudo reboot&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable Serial Console ===&lt;br /&gt;
Now that we have setup the network and can access the Pi even if our WiFi is not in range, we need to disable that serial console so that we can use the serial port for hardware.&lt;br /&gt;
&lt;br /&gt;
To do this, enter: &amp;lt;code&amp;gt;sudo nano /boot/firmware/cmdline.txt&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and remove the &amp;lt;code&amp;gt;console=serial0,115200&amp;lt;/code&amp;gt; part of the line.&lt;br /&gt;
&lt;br /&gt;
Save the file and reboot. You should still see the bootloader output, but no serial output after that.&lt;br /&gt;
&lt;br /&gt;
== Installing Tools ==&lt;br /&gt;
If you&#039;re happy with your basic Ubuntu setup, it&#039;s time to install some tools required for the OpenMower&lt;br /&gt;
&lt;br /&gt;
=== General Dependencies ===&lt;br /&gt;
Just install them with apt:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install build-essential git&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STR2STR (optional, recommended; only needed if you&#039;re using NTRIP, so probably most of you) ===&lt;br /&gt;
We need a newer version than the one available in apt, so install it from source:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install gfortran&lt;br /&gt;
git clone https://github.com/rtklibexplorer/RTKLIB&lt;br /&gt;
cd RTKLIB&lt;br /&gt;
git checkout tags/b34c&lt;br /&gt;
cd app/consapp/&lt;br /&gt;
make -j4&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You should now be able to run str2str from anywhere.&lt;br /&gt;
&lt;br /&gt;
=== OpenOCD (optional, recommended; only needed if you want to flash Pico from Raspberry Pi) ===&lt;br /&gt;
We need to get the OpenOCD version from the Raspberry Pi foundation, because the &amp;quot;original&amp;quot; one doesn&#039;t have the Pico support built in yet.&lt;br /&gt;
&lt;br /&gt;
Install it from source:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install automake autoconf build-essential texinfo libtool libftdi-dev libusb-1.0-0-dev pkg-config&lt;br /&gt;
git clone https://github.com/raspberrypi/openocd.git --recursive --branch rp2040 --depth=1&lt;br /&gt;
cd openocd&lt;br /&gt;
./bootstrap&lt;br /&gt;
./configure --enable-ftdi --enable-sysfsgpio --enable-bcm2835gpio&lt;br /&gt;
make -j4&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You can test if it was a success by running:&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
ubuntu@ubuntu:~$ openocd -v&lt;br /&gt;
Open On-Chip Debugger 0.11.0-g610f137-dirty (2022-06-07-00:39)&lt;br /&gt;
Licensed under GNU GPL v2&lt;br /&gt;
For bug reports, read&lt;br /&gt;
	http://openocd.org/doc/doxygen/bugs.html&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing ROS and OpenMower ==&lt;br /&gt;
We&#039;re using ROS Noetic for the OpenMower project. In this step we will install it, get the OpenMower sources, build the sources and create a basic configuration file for your mower.&lt;br /&gt;
&lt;br /&gt;
=== Install ROS Noetic ===&lt;br /&gt;
Since we&#039;re running Ubuntu 20.04 installing ROS is as easy as running the following commands:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
# Get the ROS apt repository&lt;br /&gt;
sudo sh -c &#039;echo &amp;quot;deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main&amp;quot; &amp;gt; /etc/apt/sources.list.d/ros-latest.list&#039;&lt;br /&gt;
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -&lt;br /&gt;
&lt;br /&gt;
# Install the ROS base system&lt;br /&gt;
sudo apt update&lt;br /&gt;
sudo apt install ros-noetic-ros-base&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;We only need to register the ROS installation in your .bashrc file. This will enable you to call ROS specific commands from your terminal:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.bash&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /opt/ros/noetic/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing OpenMower Software ===&lt;br /&gt;
Now we&#039;re finally able to install the OpenMower software. First, we&#039;re checking out the current version of the sources, then we&#039;re getting the dependencies and finally we&#039;re building the sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
# Clone the GitHub Repository:&lt;br /&gt;
git clone --recursive https://github.com/ClemensElflein/open_mower_ros.git&lt;br /&gt;
&lt;br /&gt;
# Get rosdep, only needed once&lt;br /&gt;
sudo apt install python3-rosdep&lt;br /&gt;
sudo rosdep init&lt;br /&gt;
rosdep update&lt;br /&gt;
&lt;br /&gt;
# Get the dependencies using rosdep&lt;br /&gt;
cd open_mower_ros/&lt;br /&gt;
rosdep install --from-paths src --ignore-src --default-yes&lt;br /&gt;
&lt;br /&gt;
# Finally, build the sources (do -j4 only on 8GB Raspberry Pis). This will take a while!&lt;br /&gt;
catkin_make -j1&lt;br /&gt;
&lt;br /&gt;
# Copy the default configuration file to your home directory&lt;br /&gt;
cp open_mower_ros/src/open_mower/config/mower_config.sh.example ~/mower_config.sh&lt;br /&gt;
&lt;br /&gt;
# The next step is to also source the OpenMower ROS install&lt;br /&gt;
# If you&#039;re using bash (default on Ubuntu):&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
# Else if you&#039;re using zsh&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/open_mower_ros/devel/setup.zsh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
echo &amp;quot;source /home/ubuntu/mower_config.sh&amp;quot; &amp;gt;&amp;gt; ~/.zshrc&lt;br /&gt;
source ~/.zshrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;At this point the OpenMower software is successfully installed! You will need to configure the OpenMower software and then you&#039;re finally ready to mow.&lt;br /&gt;
&lt;br /&gt;
== Some Additional Issues ==&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m using an external WiFi dongle for better coverage, but sometimes it doesn&#039;t work ===&lt;br /&gt;
It seems that the Ubuntu sometimes puts external WiFi dongles to sleep. To prevent this, we create a service which disables powersave:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
# Enter this to create the service&lt;br /&gt;
sudo systemctl --full --force edit wifi_powersave@.service&lt;br /&gt;
&lt;br /&gt;
# Paste the following:&lt;br /&gt;
[Unit]&lt;br /&gt;
Description=Set WiFi power save %i&lt;br /&gt;
After=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
Type=oneshot&lt;br /&gt;
RemainAfterExit=yes&lt;br /&gt;
ExecStart=/sbin/iw dev wlan1 set power_save %i&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=sys-subsystem-net-devices-wlan1.device&lt;br /&gt;
&lt;br /&gt;
# Save and exit, then activate using:&lt;br /&gt;
sudo systemctl disable wifi_powersave@on.service&lt;br /&gt;
sudo systemctl enable wifi_powersave@off.service&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>
	</entry>
</feed>