Go Down

Topic: Arduino hangs on Bridge.begin() (Read 9589 times) previous topic - next topic


Hello all,

Recently bought my first Arduino Yún, and worked fine until now.
I want to implement some functions wich require bridge, but can't get them to work. (also standard examples do not work)
Now I made a very basic code (see belown) to look where it goes wrong, and found out it goes wrong when Bridge.bigin() is called.
After connection the serial monitor, text "Starting bridge" is displayed and leds goes on. But then nothing happens and the led stays on.

So something goes wrong in Bridge.begin();
Does somebody has a solution to solve this issue?


Futher information:
I removed all connections shield and SD card, so only bare arduino Yun connected to laptop.
Via wifi I can logon to arduino web interface, also programming via wifi works.

Code: [Select]

#include <Bridge.h>

int LED = 13; // Red led

void setup() {
  pinMode(LED, OUTPUT);
  Serial.println("Starting bridge");
  Serial.println("Bridge has started succesfully");



I'm really stuck, can somebody give some suggestions?

I upgraded the linino image via webinterface, but still the same issue.

Also tried YunSerialTerminal, but it doesn't work. I don't see anything booting after I press the reset button.

Should I send the Yun back to the store?


Hi Pimmernl,

I'm having Bridge problems as well. I'm running Arduino 1.5.6-rc2, are you?

I've updated the linino image as well.


Hello Radagan

Yes I'm running also on 1.5.6-rc2.
I'm really a newby to arduino, but it seems like the yun has still some issues.

Gr. Pim


Me, too! I have one of the first Yun's shipped from Italy. Timecheck just hangs.

Best regards,



Hi Pimmernl,
I too have similar problems. I feel the problem is there during start-up (Linino takes about 60 secs to start and Arduino takes few seconds) where-in the hand-shaking between the Arduino and Linono fails.

I put a delay of 60 seconds (60000 msec) at the first statement in setup() and things started working again.
Code: [Select]

Also restarting the Arduino (pressing and releasing the top left button next to ethernet port after Linino is up) also solved my problem.

You can give a try if that works for you.



Hello Manoj,

Thanks for the response, tried it, but unfortunately it doesn't work  for me  =(

Gr. Pim


I have this issue too, and the delay in setup hasn't helped


Hi Everyone,
Sorry for getting back late. I had completely lost track of this post. My apologies...

Please try performing soft reset / manual reset of Arduino after Linux side of processor is up (after the White light glows).

- Soft reset can be done by issuing following command on SSH:
Code: [Select]
- Manual reset can be done by pressing the reset button (top left corner) on the board itself.

I use Console to log messages. I believe you have connected PC to the micro USB connection of Yun. May be good idea to wait for Serial (see code below) to come up before you start printing...
Code: [Select]
while (!Serial); // wait for a serial connection

Manoj Rathod.


I seem to be having the same problem.  I uploaded the Bridge example and the Red LED comes on and stays on, so I presume it's not starting properly.

I have not upgraded to the new image yet, could that be the issue?



I have the same problem.

The problem is caused by this line in Bridge.cpp :

Code: [Select]
uint16_t l = transfer(cmd, 5, res, 4);

Always returning "TRANSFER TIMEOUT". The program stays here :

Code: [Select]
     // Bridge didn't start...
     // Maybe the board is starting-up?
     // Wait and retry

But I have found no solution for this problem.


See this issue for details and solutions to transfer hanging when CPU/ar9331 is booting: https://github.com/arduino/Arduino/issues/2351


I was having the same issue, and by specifying the baud rate I was able to get it working again:




This is my solution.

Create a new file int '/etc/rc.d/' named 'K49stop-mcu' (Scripts that run at shutdown)

#nano K49stop-mcu

Add this content:

   echo 18 > /sys/class/gpio/export
   echo "high" > /sys/class/gpio/gpio18/direction
   echo 1 > /sys/class/gpio/gpio18/value
   echo 18 > /sys/class/gpio/unexport

Save, exit and change permissions:
    chmod 7777 K49stop-mcu

It is done.
MCU stops before restarting and so the bridge does not fail booting Linino.



This is my solution.

Create a new file int '/etc/rc.d/' named 'K49stop-mcu' (Scripts that run at shutdown)


MCU stops before restarting and so the bridge does not fail booting Linino.
nice work. I'll be adding it to my list of solutions.

Here is my documentation on the Yun. Updates and additions schedule for the first months summer.

Your solution will be added there.


Go Up