Intel® Makers
Intel® Edison, Intel® Joule™, Intel® Curie™, Intel® Galileo
Announcements
Welcome - This is a Peer-to-Peer Forum only. Intel has discontinued these products but you may find support from other customers on this Forum
9881 Discussions

Edison UART: not receiving first 1-3 bytes

EM4
New Contributor I
1,430 Views

Does anyone have a problem with UART (specifically using ttyMFD2) when data is sent from terminal, the first 1-3 bytes never show up on Edison side (in the buffer)? I'm using copy-paste into terminal, or using terminal function to send data. It happens regardless of data size (tried from a few bytes to 1024).

Both ports are set the same (115200, 8 data bits, no parity, no flow control, 1 stop bit). I tried lowering baud rate, but did not help.

Writes work fine.

Using C.

OS and mraa are up to date.

Thank you.

4 Replies
Carlos_M_Intel
Employee
157 Views

Hi inteliot,

How are you testing this?

What are you connecting to the board?

Did you enable the UART on ttyMFD2 by using this thread: ?

Are you using a code or you are just sending data through the port?

Is there a relation between the number of bytes lost and the size of the package?

Regards,

Charlie

EM4
New Contributor I
157 Views

hi CMata_Intel,

I was just reading that thread...when I do systemctl stop serial-getty@ttyMFD2.service I'm actually getting full data trough on multiple tries. Let me implement this properly, and see if that' solves it in full.

Using arduino breakout board, connected to pc.

sending data through port using putty or coolterm by copy/past. Coolterm also has an option to send data.

no relation. sometimes 1, sometimes 2, and sometimes 3 bytes lost. Always the first bytes.

also, when I first connect through terminal, i never get the prompt, i always have to press any key, and then get the prompt comes up for login.

I'm guessing it's the same issue.

EM4
New Contributor I
157 Views

what is the best way to do this at startup?

I saw in another thread that someone put these commands (systemctl stop serial-getty@ttyMFD2.service"; dmesg -n 1") in a script and then called it from systemd, but I cannot find that thread now. Is this the "best" way to do it?

thanks.

 

EM4
New Contributor I
157 Views
Reply