Ralph Hempel is no stranger to MINDSTORMS and he’s been quietly working on something very special: a port of Debian Wheezy on the EV3. The folks of the Debian organisation wouldn’t let him use the Debian name (for copyright reasons), so this project is called ev3dev.
What is ev3dev?
It’s a complete Linux distribution for the EV3. What do I mean by complete? Well, it has a Linux 3.3.0 kernel, a proper file system, a package management system (apt, dpkg, etc.). You can easily keep it up to date with online repositories for Embedded Debian. You can run (almost) anything on the EV3 you can imagine. You could even install Apache, PHP and Postgresql and host your blog on there. I doubt you’ll get any kind of performance, but it’ll install at least. You could, if you were the patient kind, put a compiler on there and compile programs for the EV3 on the EV3 in an editor running on it as well. How would you like a fully automated network sniffer in the shape of a robot that waves its arms about excitedly whenever it has cracked a WEP or WPA password?
Starting up
ev3dev runs from SD card. I would recommend you create it on a class 10 card. I am using a 4GB class 4 right now and it’s very slow. Instructions on how to install it can be found here: [LINK]. I hooked up a serial console cable doodad, like the on here: [LINK]. When you power on the brick, you’ll be presented with a bunch of kernel output, followed by the init process and finally a login prompt like the one above.
A very cool touch was the teeny tiny login screen on the actual LCD. It’s barely readable but it’s fun to see.
You can login with either root (pass: r00tme) or ev3dev (pass: 3v3d3v). I would advise you to change it as soon as you login.
When you’re in, you can explore the system. Currently, all driver are compiled into the kernel, so there are no modules. I am sure as time progresses, we’ll see many improvements and enhancements made to ev3dev, including loadable modules. This will also make it much easier to add your own additional drivers, without recompiling all of the kernel.
I made some small modification to the WPA2 setup. Rather than putting all the configuration info in /etc/network/interfaces, I put it all in /etc/wpa_supplicant.conf. That seemed “cleaner” to me.
root@ev3dev:~# cat /etc/network/interfaces auto lo iface lo inet loopback auto wlan0 iface wlan0 inet dhcp wpa-conf /etc/wpa_supplicant.conf root@ev3dev:~# cat /etc/wpa_supplicant.conf ctrl_interface=/var/run/wpa_supplicant network={ ssid="Your SSID Here" scan_ssid=1 proto=WPA RSN key_mgmt=WPA-PSK pairwise=CCMP TKIP group=CCMP TKIP psk="Your text key here" }
This also makes it easier to add a second WiFI network.
I have a Sitecom Wi-Fi USB Adapter N150 (WLA-1100), which doesn’t seem to work out of the box, even when the right drivers are compiled in. This is probably because the USB IDs were not know at the time the driver was written. No worries, though, Linux has a mechanism for adding additional USB ids to drivers. To have these added when the dongle is plugged in, you need create a udev rule file:
root@ev3dev:~# cat /etc/udev/rules.d/95-sitecom.rules SUBSYSTEM=="usb", ATTRS{idVendor}=="0df6", ATTRS{idProduct}=="006b", RUN="/etc/udev/scripts/sitecom.sh"
This instructs udev to start a script called sitecom.sh whenever a device with that that specific USB ID is inserted. The script does the following:
root@ev3dev:~# cat /etc/udev/scripts/sitecom.sh #!/bin/sh /bin/echo "0df6 006b" > /sys/bus/usb/drivers/r8712u/new_id
Pretty simple, right? I rebooted and the dongle was detected and configured without a problem. Note, you may experience weird connectivity issues with your dongle when the voltage in your battery starts getting low, at least that was my experience. It would be super cool if you could add the current battery voltage in your bash prompt. Maybe even have it change colour from green to orange to red, depending on the levels.
The future of ev3dev (and how you can help)
Ralph is busy working on the kernel drivers that will make it possible to interface with the various hardware in there. I believe he has motor control and various other bits and pieces working already and will be uploading those shortly. If you’re keen to contribute, why not take a peek at the four Git repos that he’s made:
ev3dev – Assorted scripts to build the kernel and rootfs, format a microSD card, install the distribution on the card and customize the rootfs. Download this repository regardless of which operating system you have.
ev3dev-rootfs – A copy of all the files you’ll need to install on the microSD card. Download this repository regardless of which operating system you have.
ev3dev-kernel – The source for the kernel. You don’t need to download this unless you are going to actually build the kernel. It’s a lot easier to just get the kernel image from the ev3dev repo.
ev3dev-modules – The source for the LEGO MINDSTORMS EV3 drivers. You don’t need to download this unless you are going to build the modules, or you want to know a bit more about how the drivers work. The pre-compiled modules are already in the ev3-rootfs repository.
I’ll write more about ev3dev when I’ve had a little more time to play with it. This is pretty awesome stuff, great job Ralph!
You can find all of Ralph’s ev3dev related posts here: [LINK].
Xander, you now have the distiction of having the first website ever browsed from an EV3!
https://www.dropbox.com/s/78cyxv58879oeot/IMG_20131114_142308_464.jpg
That is crazy! Is this what they would call Inc3ption?
Dammit David, slow down and let me catch up! 🙂
Awesome! I’ve been trying to get this to run today. And I successfully installed it and booted it, but I’m having troubles connecting to it using the EV3 Console by MindSensors (I reach the login screen and some times I can enter the user name, but I have never been able to enter the password). Do you guys know any forums or discussion boards to share experiences about this?
You could submit a ticket here: https://github.com/mindboards/ev3dev/issues 🙂
Great! thanks I’ll do that tonight. I’m just not sure if the problem is with the ev3dev project, or if it’s just my console cable having problems. But I’d definitively do that. Thanks a lot for the quick response! 🙂
I face the same problem as santiontanon above. I soldered a serial cable myself which I use together with the arduino serial/usb-friend. I can follow the usual debian boot up and reach the login prompt after less than 2 minutes. Whatever I enter as username, valid or not – I never saw a reaction on the console (except the local echo from putty).
One observation:
I can verify that characters are getting sent as the TX led is flashing whenever I type something in the console.
Ground needs to be connected to pin 3, not 2. I still need to fix the guide, sorry 🙁
Double checked it, my black wire is definitly on GND of my Arduino USB2Serial Light.
ok, would have been easier, if I had read the closed github earlier. The black wire (despite all documentation) NOT gnd, red is the color to go and now it’s working !