Go Down

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

Pimmernl

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?

Thanks

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() {
  Serial.begin(19200);
  pinMode(LED, OUTPUT);
  digitalWrite(LED,HIGH);
  delay(10000);
  digitalWrite(LED,LOW);
  Serial.println("Starting bridge");
  delay(5000);
  digitalWrite(LED,HIGH);
  Bridge.begin();
  digitalWrite(LED,LOW);
  Serial.println("Bridge has started succesfully");
}

Pimmernl

Hello,

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

I upgraded the linino image via webinterface, but still the same issue.
http://arduino.cc/en/Tutorial/YunSysupgrade#.UxecvflciSo

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?

Radagan

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.


Pimmernl

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

rcjm10

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

Best regards,

Mike

rathodmanoj

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]
delay(60000);

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.

Thanks,
Manoj.

Pimmernl

Hello Manoj,

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

Gr. Pim

bitrunner

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

rathodmanoj

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]
/usr/bin/reset-mcu
- 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

Regards,
Manoj Rathod.

Farmboy

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?

Dean

FreshClean

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]
 if (l == TRANSFER_TIMEOUT) {
     analogWrite(5,50);
     // Bridge didn't start...
     // Maybe the board is starting-up?
     // Wait and retry
     delay(1000);
     analogWrite(5,0);
     continue;
   }


But I have found no solution for this problem.

abuster

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

pristinesource

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

Bridge.begin(115200);

alexafa

Hello!

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:

   #!/bin/sh
   
   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.

jessemonroy650

Hello!

This is my solution.

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

::::SNIP::::

MCU stops before restarting and so the bridge does not fail booting Linino.
@alexafa,
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.

Jesse

Go Up