Lejos: configuring hidden wifi access manualy

I bought Lego EV3, and plan to use Lejos project.

I follow the very good Getting started with leJOS EV3 howto to create SD card, configure eclipse and so on.

But it’s very boring to turn off EV3, copy program to SD card, then restart EV3 to run it.

As explain in Creating a bootable SD card howto section, using a wifi dongle improve greatly those steps.

However, setup wifi connection using EV3 is really annoying, especially if you use a complex PSK, and impossible if you use hidden SSID.

I bought a EDIMAX EW-7811Un dongle as it’s known as supported, cheap and really tiny.

ev3_-_DongleWifi

I think dongle size is important to get my EV3 close to it’s standard size.

The simpliest way is to create wifi setup from your computer, before booting EV3 from SD card. This is done using a linux workstation, but may work from Mac OSX. From windows, you need to access LMS2012_EXT ext3 partition, maybe using something like this.

  • mount SD LMS2012_EXT ext3 partition
  • create file home/root/lejos/bin/utils/wpa_supplicant.conf:

ap_scan=2
ctrl_interface=/var/run/wpa_supplicant

network={
        mode=0
        scan_ssid=1
        proto=WPA2
        ssid="YOUR-SSID"
        key_mgmt=WPA-PSK
        psk="your PSK in plain text"
}

  • umount SD card
  • boot EV3 using SD card

As Lejos use wpa_supplicant, you can encrypt PSK using wpa_passphrase command:

$ wpa_passphrase "YOUR-SSID" "your PSK in plain text"
network={
	ssid="YOUR-SSID"
	#psk="your PSK in plain text"
	psk=235f40969b6c619074034a7504520b30b2c07be1ceb3b429cabd209251868fad
}

Then replace psk line from home/root/lejos/bin/utils/wpa_supplicant.conf by generated one.