Re: WinCE virtual bluetooth port (RFCOMM)
- From: Heinz-Peter Heinzle <hp30@xxxxxxxxxxxx>
- Date: Fri, 08 Apr 2005 18:23:14 +0200
Thanks for your help!
I could solve some of the problems with virtual-bluetooth-ports, the whole cycle RegisterDevice(), CreateFile(), ..., CloseHandle(), DeregisterDevice() works fine, even WaitCommEvent() could be used to detect connection loss and initiate re-connect, BUT connecting and re-connecting seems to be very unstable, making virtual-COM-ports for bluetooth-RFCOMM de facto unusable.
I now tried sockets-based bluetooth-RFCOMM and that solutions seems to be more stable (always can re-connect after a few attempts). Can anyone confirm that this is the better solution?
BUT with sockets-based-RFCOMM there remains a problem: How to detect loss of connection, since WaitCommEvent() is only for COM-ports?
I believed this to be a common problem, since automatic re-connecting is a famous, most-wanted feature in consumer products, but has anyone solved this before?
Regards, Heinz-Peter
Fernando Gonzalez [MS] schrieb:
Actually, I don't see error code "37" anywhere in the CE header files. Does RegisterDevice() succeed (return is != 0 )? Can you post your code here?
Sample: I see that you're using a Pocket PC SDK, but "sca" is a Platform Builder sample. I think that you can download an evaluation version of Platform Builder from Microsoft's site.
___________________________________________________________________________ This posting is provided "AS IS" with no warranties, and confers no rights. ___________________________________________________________________________ --------------------
Date: Tue, 29 Mar 2005 13:35:28 +0200
From: Heinz-Peter Heinzle <hp30@xxxxxxxxxxxx>
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
X-Accept-Language: de-DE, de, en-us, en
MIME-Version: 1.0
Subject: Re: WinCE virtual bluetooth port (RFCOMM)
References: <#5QvuhjLFHA.1884@xxxxxxxxxxxxxxxxxxxx>
<xfZoidoLFHA.2644@xxxxxxxxxxxxxxxxxxxxx>
In-Reply-To: <xfZoidoLFHA.2644@xxxxxxxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
Message-ID: <#uHvpNFNFHA.3988@xxxxxxxxxxxxxxxxxxxx>
Newsgroups: microsoft.public.windowsce.platbuilder
NNTP-Posting-Host: global.leica-geosystems.com 193.8.40.126
Lines: 1 Path: TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
Xref: TK2MSFTNGXA03.phx.gbl microsoft.public.windowsce.platbuilder:64017
X-Tomcat-NG: microsoft.public.windowsce.platbuilder
Hello Fernando!
Thanks for your help.
- CreateFile(): I get the error code "37", which has no associated
description?
- I have a directory
e:\Programme\Gemeinsame Dateien\Microsoft Shared\Windows CE
Tools\Platman\sdk\samples
with no samples of this kind, and a sample-program in
e:\Programme\Windows CE Tools\wce420\POCKET PC
2003\Samples\Win32\Bluetooth\btsearch
showing only the search for bluetooth-devices in the neighborhood.
Regards, Heinz-Peter
Fernando Gonzalez [MS] schrieb:
> - CreateFile(): what does GetLastError() return after this call fails?
Can
> you turn on some debugging on the bluetooth stack (need a debug
btd.dll)?
> - For an example on how read/write and get events from a bluetooth COM
> port, check the sample in
> %_WINCEROOT%\public\COMMON\sdk\samples\bluetooth\sca
>
> fernando
>
>
___________________________________________________________________________
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
___________________________________________________________________________
> --------------------
>
>>Date: Mon, 21 Mar 2005 18:07:12 +0100
>>From: Heinz-Peter Heinzle <hp30@xxxxxxxxxxxx>
>>User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
>>X-Accept-Language: de-DE, de, en-us, en
>>MIME-Version: 1.0
>>Subject: WinCE virtual bluetooth port (RFCOMM)
>>Content-Type: text/plain; charset=ISO-8859-15; format=flowed
>>Content-Transfer-Encoding: 7bit
>>Message-ID: <#5QvuhjLFHA.1884@xxxxxxxxxxxxxxxxxxxx>
>>Newsgroups: microsoft.public.windowsce.platbuilder
>>NNTP-Posting-Host: global.leica-geosystems.com 193.8.40.126
>>Lines: 1
>>Path:
>
>
TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP1
> 5.phx.gbl
>
>>Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.windowsce.platbuilder:63636
>>X-Tomcat-NG: microsoft.public.windowsce.platbuilder
>>
>>
>>Hi Group!
>>
>>We are using (want to use) WindowCE 5.0 and the virtual com ports
>
> (RFCOMM) for Bluetooth
>
>>connections.
>>
>>- Firstly, it is possible to do the RegisterDevice() as described in
>>
>
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcecomm5/ht
> ml/wce50conCOMPortEmulationFacility.asp, > >>but the call to CreateFile() afterwards fails. >> >>- Our second problem is that we do not know how we get the information > > about a loss of > >>connection. We can observe the general baseband connectivity but this > > does not help if we > >>want to know which connection within a multipoint network was lost. >>Is there any solution feasible for our problem ? >> >>thanks >>regards >> >>Heinz-Peter >> >> > >
.
- Follow-Ups:
- Re: WinCE virtual bluetooth port (RFCOMM)
- From: "Fernando Gonzalez [MS]"
- Re: WinCE virtual bluetooth port (RFCOMM)
- Prev by Date: Re: Standard SDK for Windows CE
- Next by Date: RegQueryValueEx fails in XXX_Init
- Previous by thread: How can I access SD Card via USB
- Next by thread: Re: WinCE virtual bluetooth port (RFCOMM)
- Index(es):
Relevant Pages
|