Click here to Skip to main content
15,905,782 members
Home / Discussions / Mobile
   

Mobile

 
GeneralPointer to severals Dialogs Pin
illidan999-Dec-04 1:25
illidan999-Dec-04 1:25 
GeneralRe: Pointer to severals Dialogs Pin
João Paulo Figueira9-Dec-04 6:46
professionalJoão Paulo Figueira9-Dec-04 6:46 
QuestionCE remote display / VNC? Pin
Slow30008-Dec-04 6:22
Slow30008-Dec-04 6:22 
QuestionHow to convert BD_ADDR to BT_ADDR? Pin
eli150219798-Dec-04 1:23
eli150219798-Dec-04 1:23 
AnswerRe: How to convert BD_ADDR to BT_ADDR? Pin
illidan999-Dec-04 1:17
illidan999-Dec-04 1:17 
GeneralRe: How to convert BD_ADDR to BT_ADDR? Pin
eli150219799-Dec-04 1:33
eli150219799-Dec-04 1:33 
GeneralRe: How to convert BD_ADDR to BT_ADDR? Pin
illidan999-Dec-04 1:54
illidan999-Dec-04 1:54 
GeneralRe: How to convert BD_ADDR to BT_ADDR? Pin
eli1502197926-Dec-04 2:50
eli1502197926-Dec-04 2:50 
Hi Javier,
I tried to open COM8,but when i open this port,and choose the remote device,
it automaticly create ActiveSync SerialPort connection(instead of generic serial connection).
Here is my code:
//============================================================================
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; // Current 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))
{
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;
}
//============================================================================
Can you give me a sample of your code,plz?????
it is driving me crazy.....

Best Regards,
Eli
GeneralRe: How to convert BD_ADDR to BT_ADDR? Pin
AKSIVAKUMAR18-Jan-05 20:34
AKSIVAKUMAR18-Jan-05 20:34 
Generalputting Main Menu on top of aplication - Help please! Pin
marcelohao7-Dec-04 9:15
marcelohao7-Dec-04 9:15 
Generalpocket pc problem Pin
Ali Usman7-Dec-04 2:10
Ali Usman7-Dec-04 2:10 
QuestionMaking VB6 (Server) send strings of text to C#(client) any sugggestion? Pin
Member 15546336-Dec-04 13:24
Member 15546336-Dec-04 13:24 
GeneralHook ExtTextOut API - Please Help Pin
Anonymous6-Dec-04 10:24
Anonymous6-Dec-04 10:24 
GeneralHook ExtTextOut API - Please Help Pin
Anonymous6-Dec-04 10:24
Anonymous6-Dec-04 10:24 
GeneralRe: Mobile PhotoCamera control Pin
seanwright6-Dec-04 6:01
seanwright6-Dec-04 6:01 
GeneralInterface between a Debugger and Simulator Pin
philadelphia3-Dec-04 13:11
philadelphia3-Dec-04 13:11 
Generalyour opinion matters Pin
AdamGG3-Dec-04 11:40
AdamGG3-Dec-04 11:40 
GeneralRe: your opinion matters Pin
Anonymous5-Dec-04 22:37
Anonymous5-Dec-04 22:37 
GeneralThreads... Pin
illidan993-Dec-04 6:10
illidan993-Dec-04 6:10 
GeneralRe: Threads... Pin
GDavy6-Dec-04 1:30
GDavy6-Dec-04 1:30 
GeneralRe: Threads... Pin
illidan997-Dec-04 23:30
illidan997-Dec-04 23:30 
GeneralMobile PhotoCamera control Pin
Archigal2-Dec-04 10:41
Archigal2-Dec-04 10:41 
GeneralRe: Mobile PhotoCamera control Pin
seanwright3-Dec-04 10:11
seanwright3-Dec-04 10:11 
GeneralRe: Mobile PhotoCamera control Pin
Archigal4-Dec-04 1:09
Archigal4-Dec-04 1:09 
GeneralRe: Mobile PhotoCamera control Pin
James Duy Trinh (VietDoor)27-Dec-04 21:07
James Duy Trinh (VietDoor)27-Dec-04 21:07 

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.