Setting a "unsupported" baudrate fails - Windows CE

This is a discussion on Setting a "unsupported" baudrate fails - Windows CE ; Hello group, I want to run a PC comport with a baudrate of 31250 (Yes, I know it is a crazy value, but I need to interface an old system running this). But when I plunk in 31250 for BaudRate ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: Setting a "unsupported" baudrate fails

  1. Setting a "unsupported" baudrate fails

    Hello group,

    I want to run a PC comport with a baudrate of 31250 (Yes, I know it is a
    crazy value, but I need to interface an old system running this). But when I
    plunk in 31250 for BaudRate member of the DCB my call to SetCommState fails
    with "Invalid Parameter" Errorcode 87. When I use a value of 19200
    everything is fine.

    The Platform SDK help says:
    "Baud rate at which the communications device operates. This member can be
    an actual baud rate value, or one of the following indexes: CBR_110 bla bla
    bla"

    I always thought that it would be possible to use any desired value, but
    sofar I have no luck. I have been googling and googling for help, but all to
    no avail.

    Any help on this topic is greatly appreciated. Thanking you all in advance.

    Henrik Nowak




  2. Re: Setting a "unsupported" baudrate fails

    Henrik Nowak wrote:
    > Hello group,
    >
    > I want to run a PC comport with a baudrate of 31250 (Yes, I know it is a
    > crazy value, but I need to interface an old system running this). But when I
    > plunk in 31250 for BaudRate member of the DCB my call to SetCommState fails
    > with "Invalid Parameter" Errorcode 87. When I use a value of 19200
    > everything is fine.
    >
    > The Platform SDK help says:
    > "Baud rate at which the communications device operates. This member can be
    > an actual baud rate value, or one of the following indexes: CBR_110 bla bla
    > bla"
    >
    > I always thought that it would be possible to use any desired value, but
    > sofar I have no luck. I have been googling and googling for help, but all to
    > no avail.
    >
    > Any help on this topic is greatly appreciated. Thanking you all in advance.
    >
    > Henrik Nowak


    Standard hardware probably can't do it. The baud rate is determined by
    dividing down a basic clock frequency, and only selected integer
    divisors are possible.

    --
    Scott McPhillips [VC++ MVP]


  3. Re: Setting a "unsupported" baudrate fails

    "Scott McPhillips [MVP]" wrote:

    >Henrik Nowak wrote:
    >> I want to run a PC comport with a baudrate of 31250 (Yes, I know it is a
    >> crazy value, but I need to interface an old system running this). But when I
    >> plunk in 31250 for BaudRate member of the DCB my call to SetCommState fails
    >> with "Invalid Parameter" Errorcode 87. When I use a value of 19200
    >> everything is fine.


    >> I always thought that it would be possible to use any desired value, but
    >> sofar I have no luck. I have been googling and googling for help, but all to
    >> no avail.


    >Standard hardware probably can't do it. The baud rate is determined by
    >dividing down a basic clock frequency, and only selected integer
    >divisors are possible.


    Maybe, GetCommProperties, especially the COMMPROP-struct, gives hints
    about the baud rates available? Anyway, you have to check the return
    of SetCommState.

    Andreas
    --
    "The superior pilot uses his superior judgement to avoid those
    situations that would otherwise require his superior skill".


  4. Re: Setting a "unsupported" baudrate fails

    "Henrik Nowak" wrote:

    >I want to run a PC comport with a baudrate of 31250


    For most serial ports, only baud rates that meet this equation
    are allowed:

    baud = 115200 / N (N is an integer >= 1)


  5. Re: Setting a "unsupported" baudrate fails

    MIDI.


    "Henrik Nowak" wrote in message
    news:42652521$0$188$edfadb0f@dread11.news.tele.dk. ..
    > Hello group,
    >
    > I want to run a PC comport with a baudrate of 31250 (Yes, I know it is a
    > crazy value, but I need to interface an old system running this). But when
    > I
    > plunk in 31250 for BaudRate member of the DCB my call to SetCommState
    > fails
    > with "Invalid Parameter" Errorcode 87. When I use a value of 19200
    > everything is fine.
    >
    > The Platform SDK help says:
    > "Baud rate at which the communications device operates. This member can be
    > an actual baud rate value, or one of the following indexes: CBR_110 bla
    > bla
    > bla"
    >
    > I always thought that it would be possible to use any desired value, but
    > sofar I have no luck. I have been googling and googling for help, but all
    > to
    > no avail.
    >
    > Any help on this topic is greatly appreciated. Thanking you all in
    > advance.
    >
    > Henrik Nowak
    >
    >
    >
    >




+ Reply to Thread