Hi,
This is what I use to open the USB port:
if((type == SERUSB))
{
MemSet (&config, sizeof (config), 0);
config.baud = 115200;
config.function = 'aaaa';
err = SrmExtOpen (serPortCradleUSBPort,&config, sizeof
(config),&gPortID);
if (err != 0)
return SEROPENERROR;
}
I hope this helps,
Marty
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of
rguevara
Sent: Friday, October 08, 2004 1:11 PM
To: Palm Developer Forum
Subject: USB open port
Hi, I am trying to open the USB port with the SrmExtOpen() function but i
not that to put in the parameter
drvrDataP in the SrmOpenConfigType struct; i work with a Zire 31.
I found examples with Bluetooth but not work with the USB:
Err err;
SrmOpenConfigType config;
BtVdOpenParams btParams;
BtLibSdpUuidType sppUuid;
// Set up a SerialPort service class UUID
MemSet( &sppUuid, sizeof(sppUuid), 0 );
sppUuid.size = btLibUuidSize16;
sppUuid.UUID[0] = 0x11;//corresponds to serial port
sppUuid.UUID[1] = 0x01;//corresponds to serial port
// // Set up a Bluetooth parameter block:
//play client role, use null remote device address, and use sdp to search
for the serial port profile service
class uuid.
MemSet( &btParams, sizeof(btParams), 0 )
// note this leaves the remote dev addr null
btParams.role = btVdClient;
// we are the client side
btParams.u.client.method = btVdUseUuidList;
// use SDP to look for service class uuids
btParams.u.client.u.uuidList.tab = &sppUuid;
// the list of service uuids to search for
btParams.u.client.u.uuidList.len = 1;
// the number of uuids in the list
// 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; <------- I need other driver ?
// Bluetooth-specific params go here
config.drvrDataSize = sizeof(btParams);
// size of Bluetooth-specific params
// Call SrmExtOpen with the parameters we just set up.
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
);
Thanks for you help
--
Open WebMail Project (http://openwebmail.org)
--
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/