Connectivity questions

after playing and learning the basics with the arduino UNO I bought last week the YUN.

I found a little bit confusing or even annoying the way it connects to my network,so I don’t know if it is because I did something wrong during the installation.

I followed the guide from:

-I installed bonjour services, opened ports 5353udp and 8080 tcp( I read this in one of the topics of the forum)
-I configured WIFI and I can connect to my arduino site.

Now the strange behaviour and questions.
-General questions:
When I am using the arduino IDE to upload using port by com or ip, does it really matters? Because somes sketches only work when I use one of them. I don’t know if it is because when I try to check serial monitor it has some kind of interference in the communication.
-Do I need to reconfigure the WIFI each time I connect the arduino yun board to my usb? Because it doesn’t connect automatically and after restarting the WIFI it shows again in my network its own and I need to enter, configure reset so it has connectivy. In other case I can just connect to its network but without internet.
-Does the arduino yun board have a timeout for wifi? It disconnects after some minutes of inactivity

-I am testing some basic sketches like:
.This sketch only works if I connect to the arduino board using port > ip address.
.If I use com serial, I think it doesn’'t work because it tries to use console for input and they collapse. Am I wrong?

#include <Console.h>

const int ledPin = 13; // the pin that the LED is attached to
int incomingByte;      // a variable to read incoming serial data into

void setup() {
  // initialize serial communication:

  while (!Console){
    ; // wait for Console port to connect.
  Console.println("You're connected to the Console!!!!");
  // initialize the LED pin as an output:
  pinMode(ledPin, OUTPUT);

void loop() {
  // see if there's incoming serial data:
  if (Console.available() > 0) {
    // read the oldest byte in the serial buffer:
    incomingByte =;
    // if it's a capital H (ASCII 72), turn on the LED:
    if (incomingByte == 'H') {
      digitalWrite(ledPin, HIGH);
    // if it's an L (ASCII 76) turn off the LED:
    if (incomingByte == 'L') {
      digitalWrite(ledPin, LOW);

-This works if I connect the arduino through Serial.

#include <Process.h>

void setup() {
  // Initialize Bridge

  // Initialize Serial

  // Wait until a Serial Monitor is connected.
  while (!Serial);

  // run various example processes

void loop() {
  // Do nothing here.

void runCurl() {
  // Launch "curl" command and get Arduino ascii art logo from the network
  // curl is command line program for transferring data using different internet protocols
  Process p;        // Create a process and call it "p"
  p.begin("curl");  // Process that launch the "curl" command
  p.addParameter(""); // Add the URL parameter to "curl";      // Run the process and wait for its termination

  // Print arduino logo over the Serial
  // A process output can be read with the stream methods
  while (p.available()>0) {
    char c =;
  // Ensure the last bit of data is sent.

Thank you and sorry if the questions are trivial, but I cannot find a reason for this small issues.

After updating the OpenWrt version the network problems seems to be solved.