Sample program to hangup on serial communication

Discussion in 'UDOO NEO' started by Maurice, Apr 15, 2016.

  1. Maurice

    Maurice Active Member

    Joined:
    Oct 13, 2015
    Messages:
    394
    Likes Received:
    87
    Log in to your Neo and monitor /dev/ttyMCC:
    cat /dev/ttyMCC

    Run this program on the Arduino:
    Code:
    void setup() {
      Serial.begin(115200);
      pinMode(13, OUTPUT);
    }
    
    void loop() {
      digitalWrite(13, HIGH);
      Serial.print("High\n");
      delay(50);
      digitalWrite(13, LOW);
      Serial.print("Low\n");
      delay(50);
    }
    
    Watch the output. After a series of High and Lows, and flashing of the onboard led you'll see that the led stops flashing and no additional output will be written to the serial.
     
    Last edited by a moderator: Apr 15, 2016
  2. ektor5

    ektor5 Administrator Staff Member

    Joined:
    Jul 1, 2013
    Messages:
    97
    Likes Received:
    48
    Did you tried
    Code:
    minicom -D /dev/ttyMCC
    or the Arduino IDE Serial Monitor?
    cat /dev/ttyMCC is known to be problematic with MCC.
    ek5
     
  3. Maurice

    Maurice Active Member

    Joined:
    Oct 13, 2015
    Messages:
    394
    Likes Received:
    87
    No, I didn't. The reason I tried this is because I encountered problems with serial communication before. In my program I used to read /dev/ttyMCC and indeed I had problems with that. Now I use the RXXT Java library, but still I link /dev/ttyMCC to /dev/S0 in order to read from it.

    Isn't that the right way?
     
  4. Maurice

    Maurice Active Member

    Joined:
    Oct 13, 2015
    Messages:
    394
    Likes Received:
    87
  5. Maurice

    Maurice Active Member

    Joined:
    Oct 13, 2015
    Messages:
    394
    Likes Received:
    87
  6. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
    It could be, if I follow the rules in my issue I have no issues but I did not test it for more than 8 hours. I also use python to read and not bash cat.

    If you use minicom or Arduino IDE serial monitor do you experience the same failure?

    With python there is also an issue that you have to use the proper serial library (python-serial, now preinstalled on rc2). Perhaps a similar library issue is on Java?
     
    ektor5 likes this.

Share This Page