home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.comp.os.windows-xp      Actually wasn't too bad for a M$-OS      17,273 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 16,614 of 17,273   
   JJ to R.Wieser   
   Re: How to get all possible baudrates fo   
   07 Oct 23 15:12:58   
   
   From: jj4public@outlook.com   
      
   On Fri, 6 Oct 2023 15:05:32 +0200, R.Wieser wrote:   
   >   
   > :-) This time my question is Windows related, not DOS.   
      
   Hardware ports are platform independent.   
      
   > But if thats so, where does "GetCommProperties" get its permissable   
   > baudrates data from ?  Mind you, that "dwSettableBaud" bitmask returns   
   > different results for both ports (AFAIKS correctly so for the CP2102).   
   > Where does that bitmask come from ?.   
      
   Device drivers for standard serial port controllers brute force the clock   
   divisor configuration in order to detect the acceptable baud rates against   
   standard baud rates.   
      
   USB based serial port controllers don't use standard serial port   
   controllers. They use custom one made to work like serial port controller,   
   but with different pinouts, and thus different method of usage. Device   
   drivers for it are usually designed for specific chip model, and hardcode   
   the speed list instead of querying the chip. That saves time and money for   
   the device driver development.   
      
   > Besides, if it can't why does it exist to begin with ?   
      
   It's for backward compatibility with older peripheral devices. Some can't   
   handle more than 9600 or 19200 bauds. Some can only handle one specific   
   speed, because it's cheaper to make the chip or use cheaper chip.   
      
   > Also, the CP2102 isn't a UART, but a microcontroller acting as a bridge   
   > between an USB port and a few serial lines.  It also needs to have some   
   > device driver software installed to be able to use it.   IOW, /both/ could   
   > contain the list I'm looking for.   
      
   Yes, USB based serial port controllers could. But it won't be part of either   
   Windows API or the serial port standards. Everything will have to be   
   implemented as vendor-specific. e.g. custom IOCTLs. You'll have to find out   
   the exact chip model number/code, and hope that the manufacturer provides a   
   user manual for it. FYI, almost all don't.   
      
   > Don't get me wrong: I can imagine that there might be reasons why they never   
   > put such a shortlist in either the microcontroller or the device driver.   
   > But if the list exists I want to know how to get at it, or get an   
   > explanation to why its (still) not implemented (its existence sounds like a   
   > no-brainer to me...).  I mean, its not 1987 anymore (the date of the 16550   
   > UART). :-)   
      
   Serial port is part of the old ISA-era PC components. There's no Plug 'n   
   Play yet in that PC era. PnP is still too expensive to make. Most peripheral   
   devices and components aren't smart yet. Most of their functionalities are   
   hardwired in the chip's logic gates. Chips with built in memory were still   
   expensive to make.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca