0
votes

I cannot get serial communication working on Intel Galileo Gen 2. I'm using Serial1 on port /dev/ttyS0 assigned to pin 0 and 1. For testing purposes I created loopback on that serial port (connected RX and TX together). Unfortunately, it seems that nothing works. After few test it seems that my board can receive data, but cannot send any.

void setup() {
  Serial.begin(9600);
  Serial1.begin(19200);
  Serial.println("Ready");
}

void loop() {
  while(Serial1.available() > 0) {
    Serial.print(Serial1.read());
    Serial.print(' ');
  }

  uint8_t buf[3] = {0xC0, 0xFF, 0xEE};
  Serial1.write(buf, 3);
  delay(2000);
}

I run same sketch with same configuration on Arduino Yún and it worked well. Where the problem could be? Thanks.

1

1 Answers

0
votes

For this particular Galileo board, the baud rate for Serial object is always 115200 baud no matter the argument you give it. Since you connected Serial1 to Serial it could be just a synchronisation error due to different baud rate. Did you try to change this Serial1.begin(19200); to this Serial1.begin(115200); ?