{"id":479,"date":"2020-02-14T13:23:47","date_gmt":"2020-02-14T12:23:47","guid":{"rendered":"https:\/\/bierkai.nl\/?page_id=479"},"modified":"2026-09-02T16:30:30","modified_gmt":"2026-09-02T15:30:30","slug":"getting-started-on-windows","status":"publish","type":"page","link":"https:\/\/bierkai.nl\/?page_id=479","title":{"rendered":"Getting started"},"content":{"rendered":"\n\n\n\n<p class=\"wp-block-paragraph\">The authoritative <a href=\"https:\/\/www.ev3dev.org\/docs\/getting-started\/\">official documentation<\/a> should be followed to get started with ev3dev. This page provides some additional pointers that may help people set things up for a Windows-based development rig. <strong>Use these instructions at your own peril<\/strong>: they may be inappropriate for your situation, they may fail to produce the desired results, or they may even damage your system.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Initializing the MicroSD card<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Make sure you get a MicroSD card that satisfies the <a href=\"https:\/\/www.ev3dev.org\/docs\/getting-started\/\">documented requirements<\/a> of having a capacity between 2 and 32 Gb, and supporting the MicroSD and\/or MicroSDHC formats rather than the MicroSDXC format. My <a href=\"https:\/\/www.philips.nl\/c-p\/FM08MD35B_10\/micro-sd-kaarten\">8Gb Philips card<\/a> had the correct buzzwords on the packaging and seems to work well enough. Plus it came with an adapter that fits the card reader on my Windows machine.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The official instructions tell you to use <a href=\"https:\/\/www.balena.io\/etcher\/\">Etcher<\/a> to flash the <a href=\"https:\/\/www.ev3dev.org\/downloads\/\">ev3dev image file<\/a> onto the MicroSD card. My attempts to do so kept failing until I ran Etcher as an administrator. With administrative privileges, Etcher flashed the card successfully on the first attempt.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Running ev3dev<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Turn off your EV3 brick and insert the MicroSD card into the slot (with the connector pins facing toward the bottom of the brick). Note that you&#8217;ll need some pretty small fingers and\/or long fingernails to extract it again, because the EV3 brick does not provide a spring-powered ejection mechanism. I usually have to resort to using tweezers or even <a href=\"https:\/\/www.youtube.com\/watch?v=_I7yau5j77E\">pliers<\/a>, risking damage to the card. Adding a homebrew <a href=\"https:\/\/dashcamtalk.com\/forum\/threads\/sd-card-is-really-hard-to-get-out-so-i-came-up-my-own-solution.21898\/#post-287991\">pull tab<\/a> makes extraction much easier, but make sure that it doesn&#8217;t make the card too thick for its slot, and that the tape tail doesn&#8217;t get in the way of the rest of your build.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When you turn on the brick with the MicroSD card inserted, the system will boot the ev3dev environment, culminating in the display of a menu driven application on the LCD. This GUI is called Brickman, and it allows you to interact with ev3dev when the system is disconnected from a PC. You&#8217;ll probably use it mostly (or even exclusively) to launch programs from the <code>File Browser<\/code> menu.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">USB connectivity<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The official <a href=\"https:\/\/www.ev3dev.org\/docs\/networking\/\">instructions for establishing a network connection<\/a> differentiate between connecting to the Internet or just tethering the EV3 brick to your PC. Since an Internet connection makes it easier to add optional packages to the brick&#8217;s Linux environment later, <a href=\"https:\/\/www.ev3dev.org\/docs\/tutorials\/connecting-to-the-internet-via-usb\/\">choose that option<\/a> unless you&#8217;re sure the vanilla ev3dev distribution will suffice.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In Windows 10, the <code>Bluetooth &amp; other devices<\/code> window will list your <code>Remote NDIS Compatible Device<\/code> but won&#8217;t allow you to configure its network settings. The same is true for Windows 11&#8217;s <code>Bluetooth &amp; devices &gt; Devices<\/code> window. Instead scroll to the <code>Related settings<\/code> section toward the bottom of the window and use the link to open the <code>Devices and printers<\/code> control panel applet.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Both the Settings and Control Panel windows may contain a device named <code>EV3<\/code>, which represents a (Bluetooth) connection you may have established earlier from the Lego EV3 desktop software. As <a href=\"https:\/\/www.ev3dev.org\/docs\/tutorials\/connecting-to-the-internet-via-usb\/\">documented<\/a>, the (USB) connection to the ev3dev environment is listed as a <code>Remote NDIS Compatible Device<\/code>, so you&#8217;ll configure that one.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">SSH connectivity<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The ev3dev environment comes with a prefab account named <code>robot<\/code>, whose password is initially set to <code>maker<\/code>. Security buffs will want to change the password, and perhaps take a look at some other stuff that comes pre-configured. Mere mortals may wish to create a <a href=\"https:\/\/www.putty.org\/\">PuTTY<\/a> shortcut on their PC that automatically passes the credentials when connecting to the brick:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\"C:\\Program Files\\PuTTY\\putty.exe\" robot@ev3dev -pw maker<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Omit the <code>-pw &lt;your-password&gt;<\/code> clause to enter the password manually when you connect.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Package repositories<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If you&#8217;ve <a href=\"https:\/\/www.ev3dev.org\/docs\/tutorials\/connecting-to-the-internet-via-usb\/\">set up Internet connectivity<\/a>, you&#8217;ll probably want to (be able to) install additional packages onto the system, or update existing ones. But ev3dev is based on such an old version of Debian Linux that the package repositories aren&#8217;t available anymore in their original locations. As a consequence, you&#8217;ll get errors when trying to (use <code>apt<\/code> or <code>dpkg<\/code> to) access them. <a href=\"https:\/\/gist.github.com\/labeneator\/e8118a09e28c5f048520c861ba902268\">Fix this<\/a> by updating ev3dev&#8217;s <code>\/etc\/apt\/sources.list<\/code> file so that it contains (only) the following entries:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>deb http:\/\/archive.debian.org\/debian\/ stretch main\ndeb http:\/\/archive.debian.org\/debian-archive\/debian-security stretch\/updates main<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Changing the file requires that you <code>sudo<\/code> or <code>su<\/code> to root privileges. You may find the pre-installed <code>nano<\/code> editor useful, or <code>vi<\/code> if you&#8217;re so inclined.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">File system connectivity<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">You&#8217;ll probably develop applications on your PC, using ev3dev&#8217;s command line or on-screen File Browser to run the finished programs. Since SSH connectivity comes preconfigured with ev3dev, file transfer based on <a href=\"https:\/\/en.wikipedia.org\/wiki\/Secure_copy_protocol\">SCP<\/a> should be supported out of the box. But for development a persistent file system connection is more convenient:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>either mounting a PC directory onto ev3dev&#8217;s file system (e.g. using NFS),<\/li>\n\n\n\n<li>or exposing an ev3dev directory as a network share to the PC (e.g. using Samba).<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Exposing a PC directory to the brick is preferable, since your PC&#8217;s file system is likely to be faster than ev3dev&#8217;s. Either way, the idea is that when the PC updates a file, the updated version is available immediately on the brick, without needing to copy it as a separate step.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">While this sounds great and I got the NFS option to work as described below, I found the connection to be too unstable for practical use. YMMV, but in the end I still resorted to using <a href=\"https:\/\/winscp.net\/eng\/index.php\">WinSCP<\/a> to manually copy files to the brick when they need updating.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">NFS sharing from Windows<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">You can share your Windows development directory (or any other directory) over NFS, so that the files can be accessed directly from the brick. The <a href=\"https:\/\/www.ev3dev.org\/docs\/tutorials\/setting-up-an-nfs-file-share\/#how-to-do-it---windows\">official documentation on setting this up<\/a> was perhaps based on the <a href=\"https:\/\/sourceforge.net\/projects\/winnfsd\/files\/WinNFSd\/\">SourceForce project<\/a> for WinNFSd, which looks like it isn&#8217;t being maintained anymore. I opted to use the newer version (2.4.0 at the time of writing) found in <a href=\"https:\/\/github.com\/winnfsd\/winnfsd\/releases\">a github repository<\/a>. The download here consists of only the executable, so you won&#8217;t need to extract a ZIP file. Just put the .exe anywhere on your system.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The documented command line starts WinNFSd without opening a window, which I found inconvenient since it hides logging from view. Additionally, it wasn&#8217;t clear to me how the shared Windows path (<code>C:\\Source\\ev3dev<\/code> in my case) should be transcribed as a *nix path into the <a href=\"https:\/\/www.ev3dev.org\/docs\/tutorials\/setting-up-an-nfs-file-share\/#how-to-do-it---ev3\">systemd mount file<\/a> on the EV3 brick. So I had WinNFSd explicitly expose the directory as <code>\/ev3dev<\/code> to the EV3 brick:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">WinNFSd.exe C:\\Source\\ev3dev \/ev3dev<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">When starting WinNFSd for the first time, Windows Defender will want to know whether the server should be exposed through the firewall. Allow this for &#8220;Public networks&#8221;, which the USB connection apparently qualifies as. But note that the directory may then be accessible to anyone attempting to connect to your PC over any &#8220;Public network&#8221;.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">NFS mounting on ev3dev<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Follow the official documentation to create a <a href=\"https:\/\/www.ev3dev.org\/docs\/tutorials\/setting-up-an-nfs-file-share\/#how-to-do-it---ev3\">systemd mount file<\/a> on the EV3 brick. Find out your PC&#8217;s IP address by inspecting the IPv4 Properties for the network adapter named <code>Remote NDIS Compatible Device<\/code>. Since mine was  <code>192.168.137.1<\/code>, I&#8217;ve included that value in the sample mount file below.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">WinNFSd sadly does not support NFS version 4, so you&#8217;ll need to connect to the PC using protocol version 3 or lower. Since the correct version wasn&#8217;t <a href=\"https:\/\/linux.die.net\/man\/5\/nfs\">automatically negotiated<\/a> for me and I couldn&#8217;t find the <a href=\"https:\/\/manpages.debian.org\/stretch\/nfs-common\/nfsmount.conf.5.en.html\"><code>\/etc\/nfsmount.conf<\/code> file<\/a> to <a href=\"https:\/\/blog.sombex.com\/2019\/11\/setup-nfs-server-on-non-server-windows.html\">configure this<\/a> on a system-wide basis, I added an <code>nfsvers<\/code> option to the systemd mount file at <code>\/etc\/systemd\/system\/home-robot-nfsshare.mount<\/code> to make things work:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[Unit]\nDescription=Windows nfs share\nAfter=network.target\n\n[Mount]\nWhat=192.168.137.1:\/ev3dev\nWhere=\/home\/robot\/nfsshare\nType=nfs\nOptions=nfsvers=3\n\n[Install]\nWantedBy=multi-user.target<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Note that you&#8217;ll need to <code>sudo<\/code> or <code>su<\/code> to root privileges when editing the systemd mount file.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Application deployment and execution<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">While ev3dev comes with all of Linux&#8217;s usual trappings, it provides no prefab robot-controlling programs. You&#8217;ll have to write these yourself (after all it&#8217;s ev3<strong>dev<\/strong>) and make them available on the EV3 filesystem. Application files will also need to have their <a href=\"https:\/\/en.wikipedia.org\/wiki\/File-system_permissions#Permissions\">execute bit<\/a> set before they can be run. Depending on a multitude of factors, the bit may or may not be set automatically when files arrive on the ev3dev file system. If it&#8217;s not set, add it manually by running e.g.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">chmod a+x MyRobot.py<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Running from Brickman<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If you drop an application file under the <code>\/home\/robot<\/code> directory, it will be accessible from Brickman&#8217;s File Browser. Use the arrow buttons to find the executable, which will be marked with an asterisk <code>*<\/code> if its execute bit is properly set. The program can then be run by pressing the central (&#8220;confirm&#8221;) button on the EV3 brick. You&#8217;ll return to the Brickman UI after the program terminates.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Data written to <code>stdout<\/code> will be displayed on the brick&#8217;s LCD, but you&#8217;ll need better eyes (or settings) than mine to read it! Output written to <code>stderr<\/code> will be saved to a file named <code>&lt;your-executable&gt;.err.log<\/code>. The contents of this file are overwritten for every run.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Running from a shell<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Executables can also be invoked from a shell: simply SSH into your brick and type the executable&#8217;s (path and) name to run it. Since this is no different from running anything on any (other) Linux environment, the application will behave accordingly. For example, <code>stdout<\/code> and <code>stderr<\/code> output will be written to your console by default, but you can use piping and redirection to make it go elsewhere.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Since Brickman will be unaware that you launched an application, it will keep running and trying to display itself in the LCD. If your application also uses the LCD, Brickman will engage it in a resource war and (periodically) overwrite your program&#8217;s UI by its own. While there are probably more elegant ways to resolve this, I found the following script convenient:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#!\/usr\/bin\/env bash<br><br>pid=$(pidof brickman)<br>if [[ \"$EUID\" -ne 0 ]]; then<br>  sudo=sudo<br>fi<br><br>function brickman {<br>  [[ -n \"$pid\" ]] &amp;&amp; $sudo kill -$1 $pid<br>}<br><br>brickman STOP<br><br>\"$@\"<br>result=$?<br><br>brickman CONT<br><br>exit $result<br><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Save the script on the brick (e.g. in a file named <code>suspend-brickman-during.sh<\/code>) and mark it executable. You can then prevent Brickman from using the LCD (or doing anything else) by launching your program as <code>.\/suspend-brickman-during.sh \/path\/to\/program args<\/code> . If you do so from a non-root account, the <code>sudo<\/code> invocation will prompt for your password.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The authoritative official documentation should be followed to get started with ev3dev. This page provides some additional pointers that may&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":378,"menu_order":1,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-479","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/bierkai.nl\/index.php?rest_route=\/wp\/v2\/pages\/479","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bierkai.nl\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/bierkai.nl\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/bierkai.nl\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bierkai.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=479"}],"version-history":[{"count":39,"href":"https:\/\/bierkai.nl\/index.php?rest_route=\/wp\/v2\/pages\/479\/revisions"}],"predecessor-version":[{"id":554,"href":"https:\/\/bierkai.nl\/index.php?rest_route=\/wp\/v2\/pages\/479\/revisions\/554"}],"up":[{"embeddable":true,"href":"https:\/\/bierkai.nl\/index.php?rest_route=\/wp\/v2\/pages\/378"}],"wp:attachment":[{"href":"https:\/\/bierkai.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=479"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}