ok. after spending WAY too much time on the net. using the "programming windows ce.net" 3rd edition, and WIDCOMM Bluetooth for Windows CE SDK programers guide as a resource. I have trying to send AT commands from an application on a Fujitsu Loox T830 to a Motorola Razr V3x. The loox uses the WIDCOMM BT stack. Here is a copy of the email I have sent Widcomm but I haven't heard from them yet. It's has been really hard to finally find a forum were people might understand what I'm trying to to. All and any insight is highly appreciated. As a side note I have been able to succesfully send and receive AT commands via the BT-SPP profile.

To Widcomm SDK Technical Support:


I have a problem trying to use the
guid_SERVCLASS_DIALUP_NETWORKING class. And I'm hoping that Widcomm support might be able to provide some insight to my problem.

I am a developer using Windows CE 5.0 on a Fujitsu Loox Platform. We are trying to establish a DUN connection to a Motorola Razr V3x. Which does advertise a DUN over Bluetooth. I have been able to establish a DUN Client connection from the Fujitsu Loox T830 (Client) to the Motorola Razr V3x (Server).

After a succesfull connection I find out from the CDunClient::nClientStateChange that the widcomm port returned is: 11 I have used the algorithm where COM11 should be mapped to BTC1. and have assigned targetComName to "BTC1". My next step has been to create a handle to the virtual COM, to handle the communication using the following line of code:


this
->hComPort= ::CreateFile(targetComName, GENERIC_READ | GENERIC_WRITE,

0, NULL, OPEN_ALWAYS, 0, 0);


This call to fails to create the handle when targetComName is "BTC1", also has failed for "COM11" (which I know should not be). While trying to understand my problem I found out through the registry under the folder ExtModems that there are only two BTC ports (BTC2 and BTC4).

BTC2 resides in the registry folder "BtNullModem" and has the "FriendlyName" of "Bluetooth Null Modem", meanwhile and BTC4 resides in the registry folder "\BlueToothActiveSync" and is also assigned the name "FriendlyName" of "Bluetooth Null Modem" Also I have hard coded to BTC2 and succesfully generated the COM handle hComPort, as a test I have used the following piece of code

To send a simple "AT" command to the RAZR, using:


lstrcat (szText, TEXT(
"AT\r\n"));

rc = WriteFile (hComPort, szText,

lstrlen(szText)*sizeof(TCHAR), &cBytes, 0);


I have a read thread in a separate independent thread waiting to read from the COM using the following line


ReadFile(hComPort, pPtr, 1, &cBytes, 0))


But nothing is ever read. However this works perfectly when I use the Serial Port Profile protocol. And I receive "AT OK".


As a side note I have hardcoded BTC4 into the
::CreateFile function call. As expected the Loox tries to communicate with the

PC with which I'm developing, which also has a BT dongle. I believe it's trying to establish the active sync connection.


I would like to thank you in advance, and hope to hear from you with any possible information.


if you get here, and I haven't bored u to death yet... I still appreciate the fact you took the time to read this. Again thanx.