Instructional Material: Deploying Code over WiFi or Bluetooth

So far we have been deploying code to the EV3 over a USB cable connecting the EV3 to the development PC. This works fine but is tedious, time consuming and may mean moving the robot closer to the PC. A much better way to do development is to connect the EV3 and PC over WiFi (wireless network) or Bluetooth (wireless peer-to-peer).

Using WiFi assumes you have a WiFi router or access point available that your PC connects to. If so, you can purchase a USB based WiFi card for the EV3. The WiFi card to use is the Edimax EW-7811UN. You insert the card into the USB slot on the side of the EV3 next to the SD card slot.

Insert the card and turn on the EV3. When the EV3 menu appears, scroll right until the WiFi menu is in the center and press enter.  A list of WiFi access points should appear. Select your access point and press enter. A simulated keyboard will appear on the EV3 screen and you use it to enter the WiFi password for your access point. The letters U l x D appear at the bottom of the keyboard. They select U = upper case, l = lower case, x = delete and D = done. When you have entered the password select D for done. The network connection will be restarted and if the EV3 successfully connects to the network, when you return to the menu you will see two IP addresses below the EV3's name (EV3 by default). The second IP address is the WiFi address assigned by your access point. You should also assign the EV3 a unique name with the change name function on the System menu.

Note: that you can also use the EV3 Control Center (connected with USB cable) to configure the WiFi connection and assign the EV3 name (Tools tab, change friendly name). This is easier than using the EV3 LCD.

When done with these steps, go into Eclipse, Windows, Preferences, leJOS EV3. Select Connect to Named Brick and enter the name you assigned to the EV3. If this fails to connect, try using the lower IP address displayed on the brick as the brick name.

Now when you deploy code in Eclipse, Eclipse will automatically connect to your EV3 over the network and download your program.

Note: If you have the USB WiFi card inserted in the EV3, deployment over a USB cable will likely not work. If the USB WiFi card is in contact with an access point and has been assigned an IP address by that access point, deployments will use the that access point address, not the 10.0.1.1 address used by USB even if your PC is disconnected from the access point. To return to using the USB cable, you must shutdown your EV3 and remove the WiFi card. Restart the EV3 and USB deployment will work. To return to using WiFi, shutdown the EV3 and reinsert the WiFi card and power up.

Bluetooth communication is built into the EV3. Here is a how-to to get connected (paired) to an EV3. Once you have paired with an EV3, when you deploy code in Eclipse, Eclipse will automatically connect to your EV3 over the network and download your program.

 

 

Material Type: 
Lecture/Presentation
Education Level: 
Middle School
High School
Focus Subject: 
Computing / Computer Science
Robotics Software
HW Platform: 
EV3
SW Platform: 
Java
Interactivity Style: 
Mixed
Audience: 
Learner