BlueToothport problem when PDA is suspended...

  • Thread starter Thread starter Peter B
  • Start date Start date
P

Peter B

Hi!

I have a PocketPC 2003 device with bluetooth. On the other end I have a
Socket BT GPS. I have no problem setting up the connection and I receive
data in a good manner.

The problem is that when I set the PDA in suspend mode and start it again,
the serial connection seems lost. The bluetooth connection is re-established
to the PDA but I stop receiving through the serial port I set up before the
suspend.

1. Do I need to change the way the serial API (OpenNETCF) works or should
the handle to the serial port be re-established just like the bluetooth
connection is? I have tried this with another Serial API (a compact version
coming with PocketGPS sample), and it shows the same behaviour.

2. Could this be the result of a bad driver from the PDA manufacturer in
which the file handle (port handle) is not the same through the suspend
operation? I have tried this on 2 different devices and both show the same
behaviour (no data streaming through the port after suspend).

3. On one of the PDAs, I can't close the port and re-open it after the
suspend (which solves the issue on the other PDA). I don't get an exception
but Marshal.GetLastWin32Error returns 6 (INVALID_HANDLE), which indicates
that something happend to the file handle while the PDA was in suspend mode.
If this is the case, it means I don't know the file handle of the port, is
there any way of closing the port without closing the app or resetting the
PDA?? The BlueTooth port is blocked by this...

3. From what I have learned, the application developer shouldn't have to
handle the PowerOff and PowerOn events which I see as a potential solution
(close the GPS connection on PowerOFF and try to re-open it on PowerOn). Any
thoughts there?

I hate these suspend problems, they are so hard to debug :(

If you have a BT PDA and a BT GPS, download PocketGPS to see the problem
yourself.

thanks in advance,

Peter
 
What type of PDA do you have? There was a Bluetooth issue along the lines
you mention with the iPAQ 1940 that has a patch now.

Andrew
 
I'm using a HHP Dolphin 9500 and an Intermec 740C. The Dolphin is the one I
can't close the port after suspend..
 
Back
Top