Groups > Palm OS > Bluetooth Forum > How to send pass-key with serial link under Bluetooth




How to send pass-key with serial link under Bluetooth

How to send pass-key with serial link under Bluetooth
Fri, 25 May 2007 10:18:02 -000
I open a serial link under Bluetooth with a Garmin GPS 10. I can establish the
connection, but I never receive any data, likely because I don't send the
"1234" pass-key it expects.

1- How can I send this pass-key programatically?
2- Is there a way to have a OS dialog to prompt the user for that?

Here's my code. I store the previous or newly-found device address in
gAurigaInfo.

SrmOpenConfigType   config;
BtVdOpenParams      btParams;

MemSet( &config, sizeof( config ), 0 );
config.drvrDataP = ( MemPtr ) &btParams;       
config.drvrDataSize = sizeof( BtVdOpenParams );

MemSet( &btParams, sizeof( btParams ), 0 );
btParams.role = btVdClient;                    

btParams.u.client.method = btVdUseUuidList;    
btParams.u.client.u.uuidList.len = 1;

MemMove( &btParams.u.client.remoteDevAddr.address,
	 &gAurigaInfo.btDeviceRawAddress,
	 sizeof( gAurigaInfo.btDeviceRawAddress ) );

gError = SrmExtOpen( sysFileCVirtRfComm,
                     &config,           
                     sizeof( config ),  
                     &gDataPort );      


Luc Le Blanc
Post Reply
about | contact