WIFI does not work when there is serial write

Dear There,

I have a Yun which functions fine when there is no serial write. e.g. When running the Blink sample, wifi can be turned on (the white light turns one) and works fine.
But when I need to write some data to serial (using Serial1 class as documented), the wifi can not be turned one (the wlan light doesn't on, and a computer can not connect to Yun). Here is the sample code that can reproduce the issue:

void setup() {
  Serial1.begin(115200);
}
 
void loop() {
   delay(1000);
   Serial1.println("hahhaha");
}

When uploading the sketch to Arduino Yun and turn off then on the power, the wlan light keeps off.

Does anyone has the same experience or know how to fix this?

Thanks a lot.
Dong

Not sure what you are trying to do, or your code.

Serial1.begin(115200); // Talks to Wifi CPU (Linux)
Serial.begin(115200); // Talks to the serial port via USB.

Is that what you wanted to do?
Or do you want to turn on the WLAN LED?

Your message is not clear.

Jesse

Hi Jesse,

I think I do not understand it correctly.

I have a Servo controller which is controlled by Serial port(rx/tx). I am trying to use the rx/tx pin to connect to and talk to the Servo controller (like Arduino Uno). Is it still possible for Yun?

Or shall I use a USB cable to talk to Serial devices instead?

Thanks,
Dong

Hmm, I just find the "SoftSerial" class, I think this is what I need to communicate with other devices via Serial.

Dong

Okay.
This could help too.

Image of Uno with labels, you point - me talk.

Okay.
Jesse

contryboy:
Hmm, I just find the "SoftSerial" class, I think this is what I need to communicate with other devices via Serial.

This is likely your solution.

On the Yun, pins 0 and 1 (Serial1) go to the Linux processor. Your sketch is frequently sending a lot of data through that port. When the Yun is booting, there are a few places where you can type a key to stop the boot process. Your sketch is sending data, which is read by the boot process, so it stops and looks for a command.

The gist of it is that you can't really use pins 0 and 1 on the Yun, they are reserved for Linux communications.

ShapeShifter is right, and if you want to fix this problem you can update Uboot.

The last version of Uboot needs the string "ard" to stop the boot process. So if your sketch sends data over the Serial while the Linux side is booting it won't stop the boot.