Lesson: Deploying Code over WiFi

Instructions on deploying code to the robot controller over WiFi instead of USB cable.

Understand how to deploy code over WiFi.


As you have no doubt learned, deploying code with a USB cable is time consuming and means taking the controller phone off the robot. When you are developing actual robot code, you will be doing this a lot. There is a better way.

You can deploy your code over a WiFi network instead of using a cable. This is much quicker and leaves the controller phone on the robot. Here are the instructions on how to do it.

Assuming you have a local area network created by a WiFi router, you connect your development PC to that network and also the robot controller phone. On the phone, go to Settings, WiFi, and select you local network and connect to it. You should mark it to automatically connect. After connecting, on the lower right of the available WiFi networks display is a three dot menu. Open it and go to Advanced. Scroll to the bottom looking for the IP Address. This is the address assigned to the phone by the router. This IP address needs to be that same value every time the phone connects. If you see this not happening, you will need to configure the router's DHCP component to assign a fixed IP address to the phone's hardware (MAC) address (shown above the IP address).

When this is done, upload the attached text file to a location on your development PC. Edit the file to reflect your phone's IP address. Save the file and then rename to change the extension from .txt to .bat. This will make it an executable command file. You should also create a shortcut to this file on your desktop as you will be running this command file often.

With all this done, you attach the phone to the PC with the USB cable. When the PC has recognized the phone, run the command file. This will enable communication with the phone over the WiFi network using the phone's IP address. When the command file has completed, disconnect the phone and place on the robot. Now, when you compile in AS, the networked controller phone will be available as a deployment target. Compiled code will be sent to the phone over the network connection.


Attached Resource: