Re: Moxa UPort 1150 and RS-422/485… what's the "proper" way to switch modes

From
Oliver Neukum <hidden>
Date
2017-06-28 09:19:09
Am Mittwoch, den 28.06.2017, 08:07 +1000 schrieb Stuart Longland:

Hi,
quoted
quoted
and to select 4-wire ("full duplex") RS-485, one does:
# echo rs485fd > /sys/class/tty/ttyUSB0/standard 
This looks like something that people will put into udev.
So the switch will be done via udev, but the user not necessarily
started via udev. Looks like a race to me.
It is a race, but unless a daemon is watching for the very moment that a
particular serial interface appears, it's one that init scripts are very
likely to win.
That is precisely what a demon might do.
Short of having a flag that blocks reads/writes until a given sysfs file
is written to say "I'm ready, go ahead"… there aren't that many options
I can think of.
1) module option
2) ioctl

	Regards
		Oliver

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Thread (1 message) 1 message, 1 author, last reply 2017-06-28
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help