I was going to suggest the same — or just a bare UNIX domain socket pair.

TCP would have the advantage of remote access if you wanted.

On Jul 25, 2016, at 12:40 PM, David Grayson <[email protected]> wrote:

Peter, I think I found your simulator:

http://www.fracturedsoftware.com/

It looks like you already have a nice GUI.  If you want to add ways
for other programs to control the simulator, it would make more sense
to use a TCP socket.

I would like standard serial communication software to be able to talk to my app.

There are standard programs for talking to TCP sockets (e.g. telnet).
The advantage of TCP over serial is that there are a lot of
standardized, cross-platform APIs for using TCP sockets (e.g. the
POSIX system calls like bind and listen), it's a much more common way
for processes to communicate, and you could easily connect to
simulators running on a different computer.

--David

On Mon, Jul 25, 2016 at 4:40 AM, Peter Zegelin
<[email protected]> wrote:
Thanks for that! I was wondering the best way for my app to talk to the driver and a socket/etc. would probably work fine.

A quick update - I have managed create and load/unload a kext that is recognised as a serial port by my serial comms apps. Unfortunately when I tried to connect to the port, the computer instantly rebooted - probably because all my required methods except start() just return 0.

I am also looking at the AppleRS232Serial code.

Still, its a start.



Peter


On 25 Jul 2016, at 6:19 PM, Kustaa Nyholm <[email protected]> wrote:

I hope this is doable but I am a bit lost on how to get there.



I would start from the Apple serial port driver, the sources
(for at least some version) are, I believe, somewhere in the
darwin source code which is open source.

First create a dummy serial port that just sends some hello
world or echo when talked to.

Then see if you can open it from two applications at the same
time. If possible, then you could implement some custom
IOCtls that your simulator would use to talk to the driver.

Failing that I suppose a driver can open a socket or use
some other interprocess communication method.

Just my 2 snt.

br Kusti


_______________________________________________
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/davidegrayson%40gmail.com

This email sent to [email protected]

_______________________________________________
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/sgs%40codewell.com

This email sent to [email protected]

 _______________________________________________
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]

Reply via email to