ts-7000
[Top] [All Lists]

[ts-7000] Re: xuartctl utility

To:
Subject: [ts-7000] Re: xuartctl utility
From: "naturalwatt" <>
Date: Mon, 04 Jan 2010 16:06:44 -0000
I am just getting started with the TS7500 (but will be using the T7550 for 
production).

--- In  "jongsoo_k" <> wrote:
>
> I am reading the example of xuartctl in software guide for TS 7550.
> 
> It uses two RS232 port, console and xurt0.
> 
> From console, the following command is issued so than console program is 
> connected to xurt 0. 
> # xuartctl --port 0 --server
> # xuartctl --port 0 --server --speed 115200
>         ttyname=/dev/pts/0
> 

I don't think this is right.  The console and xuart0 are not the same.  The 
first command and second commands are the same apart from the specification of 
the speed.  Because --port and --server are both used, a pseudotty is 
allocated.  If you do this early in the boot or application startup, it will 
consistently get /dev/pts/0.

> I have a few questions.
> 1) I understand since the command " xuartctl --port 0 --server" is issued 
> from the console, xuart 0 is connected with console. If a program ( not 
> console) issues this command, then xuart 0 port will be connected with the 
> program ( whatever it is). Am i correct?

Again, not right.  It will connect /dev/pts/0 to xuart0.
> 
> 2)In software guide, i read below 
> [The xuartctl utility will always choose the first free device node. So, 
> there may be instances where specifying "--port 0" will result in /dev/pts/1. 
> This makes it difficult when programming for /dev/pts/0 specifically. One 
> suggestion to overcome this is to create symlinks:
>  ln -s /dev/pts/1 /dev/pts/0 ]
> 
> This makes me concerned because i need to statically assign about 5-6 xuart 
> device nodes statically to physical device ports not like choosing the first 
> free node. I am not sure if the "ln" command can do the job.  I appreciate 
> any advice.

If you want to use several XUART, it might be easier to run xuartctl --server 
at boot time.  This will then create TCP ports at 7350 up to 7357.  You could 
simply open() and read() write() these ports instead of using pseudo ttys. 
There is some subtlety in setting the buad rate, as the ioctl to set them 
doesn't work on sockets. You can either run system("xuartctl 
--speed=SOMETHING") or there is another way.

If you use popen, you can create a pipe you can read and write.  
popen("xuartctl --port=0", "r+") for example.

Sorry I can't give exact details at the moment.  I have found Technologic 
Support helpful on matters regarding the xaurts, probably because the supplied 
documentation is a little hard to understand.

Martin
> 
> Thanks
> 
> Jongsoo
>




------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU