Community
cancel
Showing results for 
Search instead for 
Did you mean: 
EM4
New Contributor I
1,336 Views

Edison UART: not receiving first 1-3 bytes

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
63 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
63 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
63 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
63 Views

i found a simple way to do it at http://stackoverflow.com/questions/21596384/cannot-disable-systemd-serial-getty-service http://stackoverflow.com/questions/21596384/cannot-disable-systemd-serial-getty-service

so it seems that all steps are:

 

systemctl stop serial-getty@ttyMFD2.service

systemctl mask serial-getty@ttyMFD2

this works for me so far.

 

Reply