hi-
has there been any development on a serial object for win2k in pd. i'm interested in using it an installation and am dissatisfied withe the results i get from the serial object in max.
thanks alex cook
Hello,
has there been any development on a serial object for win2k in pd. i'm interested in using it an installation and am dissatisfied withe the results i get from the serial object in max.
there is a external comport (windows and unix) which works under some W95/98, but was never finished stable for windows, since I didnt manage all the win$ -stuff, even if I used the examples of the msn-library ???
Maybe some Window guru can fix this simple... and send me the corrections:
see http://iem.kug.ac.at/pdwiki/index.php?ComPort
mfg winfried ritsch
On Thu, 25 Apr 2002, Winfried Ritsch wrote:
Hello,
has there been any development on a serial object for win2k in pd. i'm interested in using it an installation and am dissatisfied withe the results i get from the serial object in max.
there is a external comport (windows and unix) which works under some W95/98, but was never finished stable for windows, since I didnt manage all the win$ -stuff, even if I used the examples of the msn-library ???
Maybe some Window guru can fix this simple... and send me the corrections:
see http://iem.kug.ac.at/pdwiki/index.php?ComPort
mfg winfried ritsch
hi,
in mail http://iem.kug.ac.at/mailinglists/pd-list/2001-12/0159.html from mark newman seems to be a solution for the win2k comport object: ////////////////////////////////////////////////////////////// I grabbed Winfried Ritsch's comport object and code from http://iem.kug.ac.at/ritsch/programmier/pd_externals/
... as I assume you have already done, and I was able to get it to work on Win2K for reading data, though I had to make one minor adjustment. I changed the arguments to CreateFile inside the open_serial method so that it uses non-overlapped (i.e., blocking) reads. Here's the actual call, with my changes:
fd = CreateFile( sys_com_port[com_nr],
rw,
0,
0,
OPEN_EXISTING,
/* FILE_FLAG_OVERLAPPED */ 0, // changed to non-overlapped
--mwn 0);
... and now it works. I believe this is the correct way to open the port, since the code is in fact polling (every millisecond, by default) and not in fact using asynchronous reads. Changing the object to use overlapped/asynchronous reads would probably be an even better fix, but that'll have to be for another time. ///////////////////////////////////////////////////////////////
lg
erich
hello,
[...]
in mail http://iem.kug.ac.at/mailinglists/pd-list/2001-12/0159.html from mark newman seems to be a solution for the win2k comport object: ////////////////////////////////////////////////////////////// I grabbed Winfried Ritsch's comport object and code from http://iem.kug.ac.at/ritsch/programmier/pd_externals/
[...]
fd = CreateFile( sys_com_port[com_nr], rw, 0, 0, OPEN_EXISTING, /* FILE_FLAG_OVERLAPPED */ 0, // changed to non-overlapped
--mwn 0);
... and now it works. I believe this is the correct way to open the port, since the code is in fact polling (every millisecond, by default) and not in fact using asynchronous reads. Changing the object to use overlapped/asynchronous reads would probably be an even better fix, but that'll have to be for another time.
the problem I saw (read), that there is no garantuee that with this fix the serial will not block for a amount of time (like it does on W95 up to 10ms if I set this) since "no overlap" means in my opinion that it waits for a input until time out (at least a win scheduler tick), but maybe it is correct anyway...
can anyone confirm if "overlap" is not needed on Win platforms for i/o?
I have no w2k plattform to test, just want to release a working version.
thanks
mfg winfried