This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

faxlib, fiu, how to set bitrate of transmit

hi, everybody

i'm using fiu, and i have some question about fiu.

how to set the bitrate of transmiting ?

after call fiuReceiveIn to send data to fm, how to know when the data will be all send? how many data in fiu internal buffer to be send ?

thanks!

  • Jack,

    The data rate is controlled via: iffaxRate_e  MaxFaxRate, this is part of fiuopenconifg_t.

    For the FIU internal buffer used,

     

    tint fiuGetSizes ( tint *  nbufs,
    const ecomemBuffer_t **  bufs,
    fiuSizeCfg_t SizeCfg  
    )

    This function obtains memory requirements for an instance of FIU.

    Parameters:
    [in]  SizeCfg  Pointer to a size configuration structure.
    [out]  nbufs  Number of memory buffers stored in this address.
    [out]  bufs  Address of buffer descriptors stored in this address.

    Regards, Eric

  • hi, Eric

    1. suppose fiu is opened with transmit bitrate 14400,  but the receiver respond with DIS which indicate it's receiving bitrate is 9600, how to change the transmit bitrate after fiu is opened ?

    2.  fiuGetSizes defines the internal buffers in fiu, suppose i call "fiuReceiveIn" write data into fiu internal buffer, when runnning how can i know the data in internal buffer is transmitted ? how many internal buffer is empty ?

    thanks!

  • Jack,

    1) The rate is MAX rate supported in FIU. If the negotiated rate is 9600bps or others, you DON't need to re-configure the rate in FIU.

    2) Do you use FIU and FM modules together in Faxlib? The fmReceiveIn() is latched to fiuReceiveOut(). You don't need to worry about how FIU and FM worked internally.

    Regards, Eric   

     

  • hi, Eric

    i'm using fiu with fm, if the data rate of fiu's fiuReceiveIn is larger than fm's fmReceiveOut, the internal buffer of fiu maybe overflow, how can i know the overflow will happen ? and how to avoid the overflow ?

    thanks!

  • There is a fax stat for the Network Rx buffer overflow: NetRxQOverFlow

    Also if the Fax debug level 2 is enabled, there is debug trace with message : TRC_FND_NETRXQ_OVERFLOW that is sent out.

    If you cannot control the rate of incoming packets, you will need to increase the number of NumInternalFIUBufs during fiuGetSizes() & fiuNew().