ts-7000
[Top] [All Lists]

Re: [ts-7000] RS486 and linux-2.6.21-ts

To:
Subject: Re: [ts-7000] RS486 and linux-2.6.21-ts
From: Christian Gagneraud <>
Date: Thu, 07 May 2009 16:26:55 +0100
Matthew Harrell wrote:
> I have one of the 7260 boards and use my own build from the linux-2.6.21-ts
> source tree.  I have the RS-485 option on my board which, according to the
> docs, should put it on ttyAM1.  According to the manuals (ts-7260-manual
> section 5.5 and arm-linux-ts72xx section 6.3) it looks like I need to do
> something like
> 
>   #include <asm/ioctls.h>
>   #include <sys/ioctl.h>
> 
>   #define TIOC_SBCC485 _IOW('T',0x70,int) /*TS RTS/485 mode Clear*/
>   #define TIOC_SBCS485 _IOW('T',0x71, int) /*TS RTS/485 mode Set */

                                         ^^^
                            You have to pass an int, not a char
> 
>   // open socket above here
> 
>   char mcr = 5;

int mcr = 5;

Regards,
Chris

> 
>   if ( -1 == ioctl ( _sock, TIOC_SBCS485, &mcr ) )
>     cerr << "ioctl: " << strerror ( errno ) << " (" << errno << ")" << endl;
> 
> to get a half-duplex RS485 at 19200 baud.  When I try this, though, I get
> the error
> 
>   ioctl: Invalid argument (22)
> 
> What am I doing wrong here?
> 
> 
> ------------------------------------
> 
> Yahoo! Groups Links
> 
> 
> 



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

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