Using the com port on the iMX53

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using the com port on the iMX53

Jump to solution
13,393 Views
leonardfairclot
Contributor II

Has anyone created an application that opens the com port and listens to incoming messages and sends a response?

I'm writing in C and I believe that the "stdio.h" should have everything I need.  When I try to open the port I get error messages.  It doesn't seem to like the parameters:

int portnum

portnum = open("dev/ttys0", O_RDWR | O_NOCITY | O_NDELAY);

Labels (1)
Tags (3)
0 Kudos
Reply
1 Solution
12,775 Views
weidong_sun
NXP TechSupport
NXP TechSupport

If you are using ubuntu, you can use root account like this :

#sudo bash

Then input lucid .

weidong

View solution in original post

0 Kudos
Reply
26 Replies
1,976 Views
leonardfairclot
Contributor II

So I should be using "ttymxc1"?

0 Kudos
Reply
1,976 Views
Yuri
NXP Employee
NXP Employee

At first - for development / debugging - the "ttymxc0" may be used (in order to avoid problems how
to implement hardware connection with "ttymxc1" on the QSB) 

0 Kudos
Reply
1,976 Views
leonardfairclot
Contributor II

Yuri

I'll try again on Sunday night, Mondya morning your time.

Thanks

Leonard

0 Kudos
Reply
1,976 Views
Yuri
NXP Employee
NXP Employee

Please use O_NOCTTY instead of O_NOCITY 

0 Kudos
Reply
1,976 Views
leonardfairclot
Contributor II

Hi Yuri

I have it compiling with a comport trying to open. I asked Sun and I'll

ask you as well, what port should I be trying to open? I'm trying to

open "/dev/ttymxc0" is this

correct? I also tried "/dev/ttymxc1".

Thanks

Leonard

0 Kudos
Reply
1,975 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello,Leonard,

     I have programed UART on i.mx51, I paster source code and Makefile here. you can refer to them.

Regards,

Weidong

0 Kudos
Reply