Re: Bluetooth connection problem
- From: "Peter Foot [MVP]" <feedback@xxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 11 Oct 2005 08:49:30 +0100
You don't use two COM ports for reading/writing. One port will be for a
client connection to another device, the other will be for an inbound server
connection. Once you have opened a client connection to a remote device you
use the same port for both reading and writing.
Peter
--
Peter Foot
Windows Embedded MVP
http://www.inthehand.com | http://www.peterfoot.net
"Tutankamon" <Tutankamon@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:5C63A4FD-468C-4CFE-B4BD-D2D448471B01@xxxxxxxxxxxxxxxx
> Hi
>
> I am working on a program for a windows mobile 2003 based pocket pc, and i
> am having problems with the bluetooth communication.
>
> From what i understand, writing and reading from the bluetooth device of
> the
> Pocket PC is just a reading and writng to a Comm Port, one for writing and
> the other one for reading (in this case 7 and 8).
>
> I do this using the library corell.dll as follows:
>
> Four functions are imported form the library corell.dll,
> the functions are:
> - CreateFile()-Opens a connection to a COM port.
> - ReadFile()-Reads data from a COM port.
> - WriteFile()-Writes data to a COM port.
> - CloseHandle()-Closes a COM port.
>
> Now, when send data thru the port i receive it on the other bluetooth
> device
> (a bluetooth to serial converter), but when I include the routine to read
> the
> data the program locks up and i have to reset the Pocket PC.
>
> I can't see the mistake, or i don't know if i am going in the wrong
> direction,
>
> Thatnks in advance.
>
> Tutankamon
.
- Prev by Date: Re: Problem only in release version!
- Next by Date: LSP on the top of Autobind_lsp (WM 5.0)
- Previous by thread: Re: Bluetooth connection problem
- Next by thread: RE: Retrieving an Image from a DLL
- Index(es):
Relevant Pages
|