3 Replies Latest reply on Jun 15, 2015 4:00 AM by juanB

    UART tx problem (mraa)


      Hi, I'm using mraa library to connect intel edison mini breakout board to arduino uno.

      I open serial(0) and the stream from arduino(tx) to edison(rx) is OK.

      The problem comes with the stream from edison(uart1-tx --> J19-pin8) to arduino(rx).

      My program captures de istream from c++ and sends it with dev->write(stream,int) but I don't know why the edison is continously sending thrash from uart1-tx.

      The thing is, even whithout my program running on edison the tx pin is sending a lot of thrash by the J19-pin8 so I think it's something not related with my code.


      Can anyone help with this?

      Thank you in advance.

        • 1. Re: UART tx problem (mraa)

          Hi juanB,


          What are you seeing when connecting a logic analyzer or an oscilloscope to the Edison’s Tx? Could you specify which mraa version you are using? You mention it is sending thrash even when the code is not running, make sure the process is not running with the ps or top command. Also make sure you are using the same baud rate and the same parameters on both devices.



          • 2. Re: UART tx problem (mraa)

            Hi JPMontero!


            I've already checked with ps and top, I'm pretty sure that my process was not running. It was one of the first things I suspected about

            The baud rate is the same (38400) for both sides (edison and arduino).

            If I send from arduino and receive in edison, the message is readed perfectly.  The problem is when I try to send from edison to arduino.

            Most of the times the arduino is receiving a lot of traffic, spaces, tabs or something blank and occasionally some weird characters like.


            In fact, one of the hundred of times I tried it, it worked. I coded a loop sending "hello" inifinite times and arduino printed it correctly in the console, but it was only once.


            My mraa version is 0.7.1.

            I think it is correctly updated in the edison, but I had to do it manually.

            The typical commmand apt-get ... etc. didn't worked, I coded it in eclipse but edison couldn't deploy the serial functions because didn't found them so I substituted manually the mraa files for the new ones and automatically edison detected them and let me run my program so I think they may be correctly updated.



            Thank you for your help.

            • 3. Re: UART tx problem (mraa)

              Well, I've tried for thousandth time a couple of minutes ago and it seems that the problem could be the connector.

              If I press it with the finger in a certain way, it works fine. If I release it, it doesn't work and sends a lot of thrash. 

              The connector must be loose and touch sporadically the board sending that thrash.


              Thank you for your help anyway!