[PD] comport port numbers :: bash trick

martin.peach at sympatico.ca martin.peach at sympatico.ca
Mon Sep 25 17:16:25 CEST 2006


> 
> De: IOhannes m zmoelnig <zmoelnig at iem.at>
> Date: 2006/09/25 lun. AM 10:43:34 GMT-04:00
> À: Martin Peach <martin.peach at sympatico.ca>
> Cc: PD list <pd-list at iem.at>
> Objet: Re: [PD] comport port numbers :: bash trick
> 
> Martin Peach wrote:
> > Hans-Christoph Steiner wrote:
> 
> >> filesystem, they exist.  I think its the same with Linux udev systems.
> > 
> > udev looks nice but I guess not every linux has it.
> 
> this is correct, but it is _the_ standard way of doing it 
> since..hmm...kernel-2.6.8 i think.
> and prior to this there was devfs, which provided the same functionality 
> (kind of).
> 
> i would really suggest to _not_ probe each device whether it is actually 
> valid, but instead to rely on a properly set up /dev-tree (either 
> manually or via udev or similar).
> 
> blind probing is likely to hang your system.

Yes but opening a serial port via the operating system isn't blind probing. Using assembly language to access hardIf the OS is any good at all it will return an error for nonexistent hardware. In /var/boot.msg the system logs its detection of the serial devices. On my system there are only two, but /dev/ has many more entries for serial devices.
On Windows comport tries to open COM1 through COM98. This doesn't hang my system. The OS returns "file doesn't exist".


> 
> getting the available devices (and making them accessible) is really a 
> task of the operating system and not of any application.

Yes I agree, but how does an application access that information for each platform?

Martin

> 
> 
> mfg.asdr
> IOhannes
> 





More information about the Pd-list mailing list