Arduino Yun - Upload And Debug Yun Over Wifi

by Visual Micro 12. January 2014 17:40

ESP8266 - December 2016 - WiFi debug beta for the esp8266 has been released. Update of variables during debug session is not yet supported. Debug with the esp8266 is easier than with the Yun so please ignore this page and follow the standard visual micro serial debug guide inconjuntion with OTA/IpAddress upload. More docs to follow on the esp8266 page.

NEW USERS PLEASE NOTE: The Arduino Yun only has 4k of free memory when the Arduino networking library called Bridge is included in a sketch. If you are using the network capabilities of the Yun within your sketch then debug using network makes sense. If you are not using the network capabilities of the Yun within your sketch then debug over network is not a practical solution in which case you should use serial usb or SoftwareSerial etc. We recommend that new Arduino users should learn how to upload using serial usb before using the network features of the Yun

Download the first debugger release for Yun networking

This document is draft and will become a summary of tips to make wifi debugging with the Arduino Yun easier.

It is possible to upload and/or debug the Arduino Yun by selecting the hostname/ip address of the Yun from the ports list and clicking Debug>Start (little green arrow on the toolbar).

Tip: Visual Micro shows a combined list of Serial port and Arduino hosts in the post list. The upload port is set via the tool bar or Tools>Visual Micro menu.

Any port can be monitored in terminal by either viewing the upload port terninal using the icon/menu or by using the "tools>visual micro>other serial ports" menu item.

Network ports will only be discovered by Visual Micro if Apple Bonjour Service for Windows is installed on the computer.

Network upload is slow compared to normal serial (or programmer) upload. For this reason, where possible we recommend upload using usb, debugging can still be network which is fast (unlike upload)...

For debugging with the Yun you have the usual options of serial or softwareSerial etc. and also the option to use network/wifi

If uploading using network then the default debugger transport will automatically use the network. If upload using Serial/Usb then debugging will automatically use Serial/Usb. The defaults can be overridden in the project proeprties in the same way that SoftwareSerial can optionally be used for debugging (read on).

Network debugging uses the Arduino Console/Bridge library. For network debugging in the beta, the Arduino Bridge or Console libraries MUST have been imported into the current sketch otherwise debug compile will fail. We suggest new users start with the "Bridge" sketch found in the examples explorer (yellow ? on the toolbar)

To upload using Serial/Usb and debug using network, set the following project properties. (tip: project properties appear when selecting the project name in the solution explorer and clicking View>Properties window or when clicking the Yellow question mark icon on the tool bar)

  • LocalPort = Ip address of the Yun (see the ports list to find the address)
  • RemotePort = Console
  • RemoteTransport = Bridge

Notes

In our limited tests the debugger appears to work well over the network we will appreciate hearing feedback in the forum 

The www folder below the current sketch is automatically uploaded during a networked program upload. The www files can also be uploaded manually using the menu "Project>Publish sketch www files"