> On 9 Jun 2015, at 05:40, Carl Hoefs <[email protected]> wrote: > > >> On Jun 5, 2015, at 4:57 PM, Roland King <[email protected] >> <mailto:[email protected]>> wrote: >> >> a plugged-in USB serial device, I usually use the callout device >> /dev/cu.usbmodemxxxxx, the tty I think is the dial in device. Usually it’s >> the callout you want to open. > > That’s an interesting point. I have two different types of devices I’m > connecting: one is a data-outputting GPS device, and the other is a (mostly) > data-accepting controller board. Is the general usage to specify > kIODialinDeviceKey to obtain a /dev/tty for incoming traffic (data-outputting > devices), and kIOCalloutDeviceKey to obtain a /dev/cu for outgoing traffic > (data-accepting devices)? What are kIOTTYDeviceKey and kIOSerialBSDTypeKey > used for? I can’t find any documentation on these keys. (This sounds like it > harkens back to the days of RS232 flow control, which probably isn’t an issue > with USB/serial devices.) > > -Carl >
The difference between the tty device and the cu device is that ttys were traditionally used to connect a terminal to, so opening a tty should block until the device on the other end raises DTR (ie you turn it on). getty opens tty devices and blocks in this way. The cu devices were designed for callups where you needed to connect to say a modem first, then dial, and only when the connection was established does DTR go high; so open doesn’t block. If someone can explain the difference between kIOSerialBSDModemType and kIOSerialBSDRS232Type I’d love to know. I’ve assumed that a ‘modem’ has some slightly different control/signalling lines back in the 25(?)-pin connector days, possibly to do with Data Carrier Detect but I’ve never found a good answer. I’d never even come across a kIOSerialBSDRS232Type device until last week when someone sent me an FTDI-based dongle which wouldn’t work with my Nordic BTLE sniffer app .. it proved to register itself as a BSD232 instead of BSDModem so it wasn’t hard to fix when found and the two appear to work exactly the same after that, open the port and use a termios to access them.
_______________________________________________ Do not post admin requests to the list. They will be ignored. Usb mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/usb/archive%40mail-archive.com This email sent to [email protected]
