You need to create a bootable SD card for the Lego EV3. This card can then be used to run Java/leJOS programs on the device. The SD card image is based on the standard Lego firmware but has been enhanced to provide the following:
1. The Lego device access Kernel modules are loaded without having the Lego VM running.
2. The WiFi stack is loaded to allow connection to the EV3 via a supported USB WiFi adaptor. This allows you to connect to the EV3 via Telnet, SSH and NFS and makes program development very simple.
3. Driver modules for Atheros ATH9K and Realtex 8192cu based devices are included and will be loaded automatically based on the detected WiFi chipset. The EV3 has been tested using the NetGear WNA1100 and EDIMAX EW-7811Un adaptors, but others may work if they use the same chipsets.
4. Installs the Oracle Java SE Embedded JVM, JNA and leJOS classes so you are ready to run Java programs on the EV3.
5. Includes shutdown scripts to power off the device when Linux is shutdown.
So what do you need?
1. A micro SD card 1Gb or more in size.
2. Optionally, a WiFi dongle that is supported by the EV3. At the moment the only devices used are the NetGear WNA1100 and EDIMAX EW-7811Un. But hopefully this list will be expanded.
3. A PC running Linux or Microsoft Windows, or any operating system that can run Eclipse and a full Java JDK.
4. Optionally, a WiFi Network and details of the SSID and PSK etc. needed to connect to it.
5. A download of the Oracle Java SE Embedded JVM.
6. Optionally, A Telnet or ssh program to connect to the EV3
7. Optionally, an NFS server to allow you to easily run programs developed on your PC.
8. On Microsoft Windows, you will need a utility to write an image to an SD card, such as https://sourceforge.net/projects/win32diskimager/.
1. Download the zipped image file (file sd.zip) from:
https://sourceforge.net/projects/lejos/files/lejos-EV3/ and unzip it, to get the single sd.img file.
2. Download the Oracle Java SE Embedded JVM from the Oracle download site:
3. If you are on Micrsoft Windows, download https://sourceforge.net/projects/win32diskimager/ or another similar utility.
OK, now we are ready to create the image.
If you are on Microsoft Windows, you can use Win32DiskImager to write the image to the SD card. Put the card in your micro SD card reader and note its drive letter. Start Win3DiskImager and in the GUI window, select the sd.img file from where you unzipped it, and select the drive letter for your micro SD card. Make sure you select the correct one. Then press "Write". A popup will tell you when the write is complete.
On Linux to get the drive identifer do df -h before inserting the SD card, and then insert the sd card and the do df -h again. You will see the identifier of the new drive. It will be something like /dev/sdb. You will need to unmount any file systems currently on that drive, e.g. by sudo umount /dev/sdb1.
To write the image to the drive, do:
sudo dd bs=4M if=sd.img of=/dev/sdb
Change sdb to the identifier of your sd drive, which might be sdc, sdd etc. Make very sure you use the correct one, or you will wipe all data from another drive!
On MAC OSX, you can use "diskutil list" to find the name of the SD drive. Identify the disk number N, making very sure you get the correct one. Use "diskutil unmountDisk /dev/diskN" to unmount the disk.
Use "sudo dd if=sd.img of=/dev/diskN bs=1m" to write the image to the disk. When finished, do "diskutil eject /dev/diskN".
Once the image has been written to the sd file, remove the drive safely and reinsert it. On Windows, you should see the LMS2012 drive. On Linux or MAC OSX, you will see LMS2012 and LMS2012_EXT file systems. Copy the Oracle .gz file you downloaded earlier to LMS2012 and safely remove the drive.
You are now ready to use the SD card in the EV3.
Log in to post a comment.