Search EggHeadCafe's Job Board
EggHeadCafe Silverlight WPF ASP.NET VB.NET C# Excel SQL Server SharePoint
search
Mobile Apps GroupsView
Pocketpc
Pocketpc Activesync
Pocketpc Developer
Pocketpc Phone_Edition
Windowsce App Development
Windowsce Embedded
Windowsce Platbuilder

Group SummariesView
.NET Framework
Access
BizTalk
Certifications
CRM
DDK
Exchange Server
FoxPro
French
French .NET
Games
German
German .NET
Graphic Design
IIS
Internet
ISA Server
Italian
Italian .NET
Maps
MCIS
Miscellaneous
Mobile Apps
Money
MSN
Networking
Office
Ops Mgr
Publisher
Security
SharePoint
Small Business
Spanish
Spanish .NET
SQL Server
Systems Management Server
Transaction Server
Virtual PC / Virtual Server
Visual Studio
Win32
Windows 2000
Windows 2003 Server
Windows 7
Windows Live
Windows Media
Windows Update
Windows Vista
Windows XP
 

View All Microsoft Pocketpc Developer Posts  Ask A New Question 

Problem with Virtual COM for Bluetooth

prn posted on Friday, April 18, 2008 10:07 PM

Hi,
I have develop my own server & client over bluetooth using normal
virtual com port for windows mobile 6.0 device .There is a
server already running one the device and client on other device,
Now,i need to transfer data from client to server.

step at server end as follow:

1: Register Device with
PORTEMUPortParams pp;
pp.channel = RFCOMM_CHANNEL_MULTIPLE;
pp.flocal = TRUE;
pp.uiportflags = 0;
2: after that,Open port using CreateFile.
3. used DeviceIoControl with IOCTL_BLUETOOTH_GET_RFCOMM_CHANNEL.
4.after that register service on server with particular GUID.
5.ConfigurePort with value
BaudRate=CBR_9600,
ByteSize = 8,,
fParity =  true ,
Parity = , EVENPARITY ;
StopBits =  ONESTOPBIT;
6.SetCommunicationTimeouts with value
ReadIntervalTimeout = MAXWORD,
ReadTotalTimeoutMultiplier =0,
ReadTotalTimeoutConstant=0,
WriteTotalTimeoutMultiplier=10,
WriteTotalTimeoutConstant =1000;

7:at create one thread for reading data..
ReadFile(hDevOpen,szBuffer, 999, &dwBytesRead,  NULL);


Step at Client is follow:
1: Register Device with
PORTEMUPortParams pp;
pp.channel = 0;
pp.flocal = FALSE;
pp.device = btaddr;;
pp.uuidService = GUID;
pp.uiportflags = 0;
2: after that,Open port using CreateFile.
3. used DeviceIoControl with IOCTL_BLUETOOTH_GET_PEER_DEVICE.
4.ConfigurePort with value
BaudRate=CBR_9600,
ByteSize = 8,,
fParity =  true ,
Parity = , EVENPARITY ;
StopBits =  ONESTOPBIT;
5.SetCommunicationTimeouts with value
ReadIntervalTimeout = MAXWORD,
ReadTotalTimeoutMultiplier =0,
ReadTotalTimeoutConstant=0,
WriteTotalTimeoutMultiplier=10,
WriteTotalTimeoutConstant =1000;

7:at create one thread for writing data..
WriteFile(hDevOpen, &cBuffer, dwSize, &dwWritten, NULL);


Now the problem is that, i got succes for WriteFile at client with
dwSize & dwWritten is same.
But at Server end i got succes for  ReadFile with any value means
dwBytesRead is equal to zero and no data in szBuffer.


What am i doing wrong?
Any help would be greatly appreciated..
Waiting for your replies..please help.
reply


Previous Microsoft Pocketpc Developer conversation.