Disconnected Yun after changing REST API from password to Open

I was trying to test out the bridge option(s) for the arduino yun. I tried to go to http://arduino.local/arduino/digital/13/1 to try and get the LED 13 to blink. That gave me this error:

Could not connect to YunServer 146 Connection refused

So after searching it was recommended to change the REST API from Password to Open. When I did this, I was no longer able to get to the yun via the network. I ended up having to factory reset the board. I did this twice so far. Any ideas of how i can get REST API set to Open but still able to have network access (both wifi and eth)?

[update] - I was able to successfully get the Open option set and can now connect via wifi/eth. However, I am still getting the error: Could not connect to YunServer 146 Connection refused

Has anyone run into this?

Have you uploaded the Bridge example? (examples, bridge, bridge)

I was just finally able to try what you suggested, uploaded the Bridge example. And it gave me this output: Pin D13 set to 1

Can you tell me what was wrong with the code I was using or what I was doing wrong?

You should upload your code. :slight_smile:

Oh yeah, I guess that would be helpful huh? :slight_smile:

And again, just fyi, it was taken from this site tut: http://android.serverbox.ch/?p=1039

#include <Bridge.h>
#include <YunServer.h>
#include <YunClient.h>

#define PORT 6666

YunServer server(PORT);

void setup() {

void loop() {
  YunClient client = server.accept();

    Serial.println("CLIENT CONNECTED!");

    String string = "";

        char received = client.read();
        if(received != '\n' && received != 4){
          string += received;
        if(received == '\n'){
          int val = atoi(&string[0]);
          analogWrite(13, val);
          analogWrite(6, val);
          string = "";
        if(received == 4){

  else {
    Serial.println("no client connected, retrying");