Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

Hi everyone,

I have a device in which a BREW application exists that communicates with other device like PC through SERIAL PORT (COM1).

Now the device is connected to PC via COM1. I wrote a small C application that allows user to give input to the module and read the data that comming from the device.

Now i am able to communicate with the device if the Baudrate is less than or equal to 9600 bps. But i want the Baudrate to be 115200 bps....

As this Baudrate was not defined in BIOS.H i am not able to use it in my C app and i tryed using 0x200 for 115200bps but failed, so can any one tell me what value will set the COM1 to 115200bps in C so that i can read/write data from the device.

I am using the following settings in my C app:

#define _COM_115200 0x200 // As _COM115200 was not defined in BIOS.H
#define SETTINGS (_COM_115200 | _COM_CHR8 | _COM_STOP1 | _COM_NOPARITY )

//C function that Initialize the COM1 port

_bios_serialcom(_COM_INIT, COM1, SETTINGS);

I don't have any problem in setting the Baudrate of the brew application that resides in the device

for BREW app i am using the following settngs....

SioCfg.dwBaudRate = 115200; // I want this at 115200bps.
SioCfg.nDataBits = AEESIO_DATABITS_8;
SioCfg.nStopBits = AEESIO_STOPBITS_1;
SioCfg.fFlowControl = AEESIO_FLOW_NONE;
SioCfg.fParity = AEESIO_PARITY_NONE;

:cool: Have a nice day to all.

the hardware 0x3f8 wants 1 for 115,200 where 2 is 57k, 3 is 38k etc, not sure how that translates , is it borland c?

the hardware 0x3f8 wants 1 for 115,200 where 2 is 57k, 3 is 38k etc, not sure how that translates , is it borland c?

Thanks charliex for the reply :)
I am using borland turbo cpp 3.0
:cool: Have a nice day.

Thanks charliex for the reply :)
I am using borland turbo cpp 3.0
:cool: Have a nice day.