RE: How to put the io_ti driver in RS485 mode?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks for your input. I tried the following:
I created the file /etc/modprobe.d/io_ti.conf with the contents of
options io_ti default_uart_mode=9

This successfully started the io_ti module with the default_uart_mode=9. 

I verified this by cat /sys/module/io_ti/parameters/default_uart_mode which showed that the
mode was now = 9, it had been set to 0. The 0=RS232 mode. The 9=RS485 full duplex, end unit, master.

This definitely had an effect on the io_ti module but unfortunately, our driver could no longer talk to our devices on the other end.

-----Original Message-----
From: Bjørn Mork [mailto:bjorn@xxxxxxx] 
Sent: Thursday, April 10, 2014 4:12 AM
To: Greg KH
Cc: Jim Bockerstette; linux-usb@xxxxxxxxxxxxxxx
Subject: Re: How to put the io_ti driver in RS485 mode?

Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> writes:
> On Wed, Apr 09, 2014 at 10:02:53PM +0000, Jim Bockerstette wrote:
>> I have been using the Edgeport 8s MEI to talk RS232 to my devices 
>> with good success. However, I cannot get it to talk RS485.
>
> Does that hardware even support 485?

It does, according to http://www.digi.com/products/model?mid=247 


>> 1. Does the io_ti driver support RS485?
>
> I do not think so.

Maybe...  Much of the infratructure seems to be in place.  You have a

        __u8 bUartMode;         /* Port type, 0: RS232, etc. */

field where I assume "etc" is shorthand for "x: RS422, y: RS485" :-)

This is populated from the "default_uart_mode" module parameter, which is described a "Default uart_mode, 0=RS232, ...".  And the bUartMode field is further propagated to the device in change_port_settings().

So you could try to load the driver with "default_uart_mode" set to 2 or
1 or something.  If this works, then it will change all ports on all devices handled by this driver to RS422 or RS485.  So if you need more fine tuned control then some new driver API needs to be added.

Please let us know how this works out.  We could at least improve the module parameter docs if it is as simple as I am guessing here.

>> 2. If yes, is there a procedure I can follow to put it in that mode?
>> 3. Thanks.
>> 
>> Here is my distro info:
>> CentOS release 6.5 (Final)
>> Linux version 2.6.32-431.5.1.el6.centos.plus.i686 (gcc version 4.4.6 
>> 20120305 (Red Hat 4.4.6-4) (GCC) )
>
> That's a _very_ old kernel release, based on a 2009 kernel release.
> That was some 260 thousand kernel changes ago :(
>
> There's not much of anything that the kernel developer community can 
> do about that release, sorry.

Yes, I am with you there...

But the io_ti features haven't changed much, so I assume the module parameter thing will work equally bad/well in both 2.6.32 and 3.14.


Bjørn
��.n��������+%������w��{.n�����{���)��jg��������ݢj����G�������j:+v���w�m������w�������h�����٥





[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux