Click here to Skip to main content
15,914,225 members
Home / Discussions / Mobile
   

Mobile

 
GeneralRe: ATL com objects for CE Pin
chris cells papoo30-Dec-04 16:10
susschris cells papoo30-Dec-04 16:10 
GeneralRe: ATL com objects for CE Pin
dcudev.lcr31-Dec-04 4:42
dcudev.lcr31-Dec-04 4:42 
GeneralCreating File with Emulator Pin
Logan from Singapore26-Dec-04 16:28
Logan from Singapore26-Dec-04 16:28 
GeneralRe: Creating File with Emulator Pin
dcudev.lcr27-Dec-04 8:42
dcudev.lcr27-Dec-04 8:42 
GeneralRe: Creating File with Emulator Pin
Logan from Singapore4-Jan-05 17:16
Logan from Singapore4-Jan-05 17:16 
GeneralRe: Creating File with Emulator Pin
dcudev.lcr5-Jan-05 8:34
dcudev.lcr5-Jan-05 8:34 
GeneralRe: Creating File with Emulator Pin
dcudev.lcr24-Jan-05 12:45
dcudev.lcr24-Jan-05 12:45 
GeneralBig Problemmmmm Pin
eli1502197926-Dec-04 4:09
eli1502197926-Dec-04 4:09 
Hi,
I'm trying to establish a serial port between my iPaq and a Bluetooth
device.
When i call to CreateFile() with COM8(this is the only port which let me to choose the remote device i want to connect to,with the Bluetooth manager),
the connection i get is ActiveSync connection and not generic serial connection.
How can i get a generic serial connection?
My code is:
//===========================================================================
bool PDA_BlueTooth::OutputPortOpening()
{
DWORD dwError;
DCB PortDCB;
COMMTIMEOUTS CommTimeouts;

// Open the serial port.
hOUTPUT = CreateFile(TEXT("COM8:"),GENERIC_READ |
GENERIC_WRITE,0,NULL,CREATE_ALWAYS,0,NULL);
// if it fails to open the port, return FALSE.
if ( hOUTPUT == INVALID_HANDLE_VALUE )
{
// Could not open the port.
AfxMessageBox (TEXT("Unable to open BlueTooth Output Port!!!"));
dwError = GetLastError ();
return false;
}
::SetupComm(hOUTPUT,4000, 2048);
PortDCB.DCBlength = sizeof (DCB);

// Get the default port setting information.
GetCommState (hOUTPUT, &PortDCB);

// Change the DCB structure settings.
PortDCB.BaudRate = 115200; // CANgine Baudrate
PortDCB.fBinary = TRUE; // Binary mode; no EOF check
PortDCB.fParity = FALSE; // Disable parity checking
PortDCB.fOutxCtsFlow = FALSE; // No CTS output flow control
PortDCB.fOutxDsrFlow = FALSE; // No DSR output flow control
PortDCB.fDtrControl = DTR_CONTROL_ENABLE;
// DTR flow control type
PortDCB.fDsrSensitivity = FALSE; // DSR sensitivity
PortDCB.fTXContinueOnXoff = TRUE; // XOFF continues Tx
PortDCB.fOutX = FALSE; // No XON/XOFF out flow control
PortDCB.fInX = FALSE; // No XON/XOFF in flow control
PortDCB.fErrorChar = FALSE; // Disable error replacement
PortDCB.fNull = FALSE; // Disable null stripping
PortDCB.fRtsControl = RTS_CONTROL_ENABLE;
// RTS flow control
PortDCB.fAbortOnError = FALSE; // Do not abort reads/writes on
// error
PortDCB.ByteSize = 8; // Number of bits/byte, 4-8
PortDCB.Parity = NOPARITY; // 0-4=no,odd,even,mark,space
PortDCB.StopBits = ONESTOPBIT; // 0,1,2 = 1, 1.5, 2

// Configure the port according to the specifications of the DCB
// structure.
if (!SetCommState (hOUTPUT, &PortDCB))
{
// Could not create the read thread.
AfxMessageBox (TEXT("Unable to configure BlueTooth Output Port"));
dwError = GetLastError ();
return false;
}

// Retrieve the time-out parameters for all read and write operations
// on the port.
GetCommTimeouts (hOUTPUT, &CommTimeouts);

// Change the COMMTIMEOUTS structure settings.
CommTimeouts.ReadIntervalTimeout = MAXDWORD;
CommTimeouts.ReadTotalTimeoutMultiplier = 0;
CommTimeouts.ReadTotalTimeoutConstant = 0;
CommTimeouts.WriteTotalTimeoutMultiplier = 10;
CommTimeouts.WriteTotalTimeoutConstant = 1000;

// Set the time-out parameters for all read and write operations
// on the port.
if (!SetCommTimeouts (hOUTPUT, &CommTimeouts))
{
// Could not create the read thread.
AfxMessageBox(TEXT("Unable to set the time-out parameters\n for
BlueTooth Output Port"));
dwError = GetLastError ();
return false;
}
AfxMessageBox(TEXT("Output Port is open"));
return true;
}
//===========================================================================
Please help me....Confused | :confused:
Best Regards,
Eli

GeneralSyncML and Windows CE Pin
AKSIVAKUMAR23-Dec-04 20:02
AKSIVAKUMAR23-Dec-04 20:02 
GeneralGathering Performance Data on Windows CE Pin
iown71423-Dec-04 5:51
iown71423-Dec-04 5:51 
GeneralRe: Gathering Performance Data on Windows CE Pin
patu singth patura30-Dec-04 16:13
susspatu singth patura30-Dec-04 16:13 
GeneralRe: Gathering Performance Data on Windows CE Pin
iown7143-Jan-05 7:48
iown7143-Jan-05 7:48 
GeneralRe: Gathering Performance Data on Windows CE Pin
patu singth patura3-Jan-05 16:12
susspatu singth patura3-Jan-05 16:12 
QuestionExtern message on my Dialog. What happens exactly? Pin
Lvca23-Dec-04 0:33
Lvca23-Dec-04 0:33 
GeneralRe: The difference between Win CE and Windows Mobile 2003 Pin
Lvca22-Dec-04 23:12
Lvca22-Dec-04 23:12 
GeneralHHP Dolphin9500 : Debug problems. Pin
Lvca22-Dec-04 22:57
Lvca22-Dec-04 22:57 
Questionhow to bluetooth in windows ce devices Pin
AKSIVAKUMAR22-Dec-04 20:01
AKSIVAKUMAR22-Dec-04 20:01 
AnswerRe: how to bluetooth in windows ce devices Pin
eli1502197925-Dec-04 22:30
eli1502197925-Dec-04 22:30 
GeneralRe: how to bluetooth in windows ce devices Pin
AKSIVAKUMAR26-Dec-04 22:44
AKSIVAKUMAR26-Dec-04 22:44 
GeneralRe: how to bluetooth in windows ce devices Pin
AKSIVAKUMAR26-Dec-04 23:06
AKSIVAKUMAR26-Dec-04 23:06 
GeneralRe: how to bluetooth in windows ce devices Pin
AKSIVAKUMAR18-Jan-05 20:06
AKSIVAKUMAR18-Jan-05 20:06 
GeneralEdit Box & Label Style Pin
Anonymous21-Dec-04 21:17
Anonymous21-Dec-04 21:17 
GeneralCOM Server on Emulator Pin
Member 1697720-Dec-04 1:32
Member 1697720-Dec-04 1:32 
Questioncould anybody please help me out with combo boxes? Pin
shankhas19-Dec-04 18:33
shankhas19-Dec-04 18:33 
GeneralHopper Pin
dcsy19-Dec-04 10:15
dcsy19-Dec-04 10:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.