Using the com port on the iMX53

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Using the com port on the iMX53

ソリューションへジャンプ
13,117件の閲覧回数
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);

ラベル(1)
タグ(3)
0 件の賞賛
返信
1 解決策
12,499件の閲覧回数
weidong_sun
NXP TechSupport
NXP TechSupport

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

#sudo bash

Then input lucid .

weidong

元の投稿で解決策を見る

0 件の賞賛
返信
26 返答(返信)
1,933件の閲覧回数
leonardfairclot
Contributor II

So I should be using "ttymxc1"?

0 件の賞賛
返信
1,933件の閲覧回数
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 件の賞賛
返信
1,933件の閲覧回数
leonardfairclot
Contributor II

Yuri

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

Thanks

Leonard

0 件の賞賛
返信
1,933件の閲覧回数
Yuri
NXP Employee
NXP Employee

Please use O_NOCTTY instead of O_NOCITY 

0 件の賞賛
返信
1,933件の閲覧回数
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 件の賞賛
返信
1,932件の閲覧回数
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 件の賞賛
返信