-
Notifications
You must be signed in to change notification settings - Fork 11
-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reading from Serial Ports #1
Comments
I would suspect the same, unless serial ports need some sort of special handling that I don't know about. Do serial port file descriptors work correctly with select or kqueue? |
I haven't tried with kqueue but they do work with select. I'm using a Thanks for your reply On Fri, Mar 18, 2011 at 02:57, mikeash
|
It would be interesting to test it with kqueue as well, as that's what GCD uses internally to implement dispatch sources. If it works with kqueue but not GCD, then it would have to either be a bug in MAAsyncIO (entirely possible) or in GCD (I'm doubtful, but you never know). |
I can't seem to get it to work with kqueues, though it is not showing Daniel. On Fri, Mar 18, 2011 at 08:45, mikeash
|
I think this is a problem in GCD on 10.6, at least my dispatch source I created on a file descriptor to a serial port does not fire except the first time there's data. on 10.7 it works just fine, no changes to code. I'm not using MAAsyncIO but sounds like same problem and probably not MAAsyncIO's fault. |
Thanks Jeremy, I haven't tried my code on Lion yet but I'm very hopeful that what you have found is correct. It did really feel like a bug so I was hopeful that it would be fixed up in an update. Thanks for checking it out and letting me know. Daniel Pink. On 2011-11-07, at 8:57 AM, Jeremy Knope wrote:
|
Hi,
I'm trying to use MAAsyncIO to read from a serial port. I can get a file descriptor for the port using the open() function and then use an instance of MAAsyncReader to run code whenever there is data to be read.
Unfortunately the callback is only fired once when the first lot of data arrives to the serial port. The callback is not fired again even if more data arrives to the serial port.
I suspect this is a problem with the way the serial ports are handled within the operating system.
Kind Regards
Daniel Pink.
The text was updated successfully, but these errors were encountered: