Arduino Yun hangs on reboot if bridge is used

Hi, all,

I just purchased an Arduino Yun from Amazon. I can provision the board to my home AP and reset Wi-Fi when bridge is not used in my Arduino project. If I run something like:

#include <Bridge.h>

void setup(void) {
  pinMode(13, OUTPUT);
  digitalWrite(13, LOW);
  Bridge.begin();
  digitalWrite(13, HIGH);
}

void loop(void) {
  Bridge.put("sensors", "Bad");
  delay(1000);
}

When I pressed the Wi-Fi reset button for 10 sec and released, the Wi-Fi was down good. The Arduino Yun AP showed up only after I power cycled the board. Similarly, after I provided my AP info on the Arduino configuration page and triggered a restart, the Yun module also hanged and required a power cycle.

If I removed anything related to the Bridge, then the Wi-Fi reset and the provisioning work just fine. I am very puzzled what causes the above issues with using the bridge.

Can anyone kindly give me some help? Thanks a lot!

Jingzhao

I am not sure whether I should update the Linino firmware and see if the issue is resolved there. I am a bit surprised that I am the only one encountering this problem.

Just by including <Bridge.h> and calling Bridge.begin() is enough to reproduce the hanging problem reported above.

Due to the tight time limit with my current project, I am going to implement the serial protocol myself through pyserial. If someone helps to resolve the bridge hanging issue later, I will use the bridge back again.

Thanks a lot!

See dont trust received rxlen, use buffer max by arve0 · Pull Request #2352 · arduino/Arduino · GitHub