With bluetooth connection, I use RFComm to communicate with bluetooth device as following :
MemSet( &btParams, sizeof(btParams), 0 ); // note this leaves the remote dev addr null btParams.role = btVdClient; // we are the client side btParams.authenticate = false; //No link authentication btParams.encrypt = false; //No link encryption btParams.u.client.remoteDevAddr.address[0] = 0xB3; // remote device addr byte 1 btParams.u.client.remoteDevAddr.address[1] = 0x88; // remote device addr byte 2 btParams.u.client.remoteDevAddr.address[2] = 0x1B; // remote device addr byte 3 btParams.u.client.remoteDevAddr.address[3] = 0x57; // remote device addr byte 4 btParams.u.client.remoteDevAddr.address[4] = 0x60; // remote device addr byte 5 btParams.u.client.remoteDevAddr.address[5] = 0x00; // remote device addr byte 6 btParams.u.client.method = btVdUseChannelId; btParams.u.client.u.channelId = 0x53; // Set up the SrmExtOpen param block to reference our bluetooth param block MemSet( &config, sizeof(config), 0 ); config.function = 0; // must be zero config.drvrDataP = (MemPtr)&btParams; // bluetooth-specific params go here config.drvrDataSize = sizeof(btParams); // size of bluetooth-specific params err = SrmExtOpen( sysFileCVirtRfComm, // type of port == bluetooth RfComm &config, // port configuration params sizeof(config), // size of port config params &btPortId // receives the id of this virtual port instance ); But I find that the timeout is take long times and the target bluetooth device will pop up a screen to allow the connection. Is there a way to find out the bt device within the range firstly ? Best Regards, raymond -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/