people, what shuld I do?
Thanks!!

----- Original Message ----- From: "Leonardo_BR" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[email protected]>
Sent: Wednesday, March 09, 2005 1:36 PM
Subject: How to set a connection at port IR?



Hi friends,

I'm triyng to create a connection IR to Phone and I've done it. I defined the following constant kCncParamPort with the constante serPortIrPort. However, I'm not getting to set it. I've got to create the connection, but not to set the port with IR. When I go to access the profiles contained in the connection panel, I can see the name created and the baud too, but "Via" ever displays Cradle/Cable.

Do you know what is the problem in my code?


void AddMyProfile() { char *myProfileName = NULL; Err err; UInt32 baud = 0; UInt32 port = 0; UInt16 deviceKind = 0; CncProfileID profileId;

// Open the Connection Manager profile database;
err = CncProfileOpenDB();

// obtain new profile ID.
err = CncProfileCreate(&profileId);

if (!err)
{
// Create a name for the profile.

myProfileName = MemPtrNew(cncProfileNameSize);
StrCopy(myProfileName, CONNECTIONNAME );

err = CncProfileSettingSet(profileId, kCncParamName,
myProfileName, StrLen(myProfileName)+1);


// seta o tipo de dispositivo ao qual o palm ira se conectar, no caso o modem
deviceKind = kCncDeviceKindModem;
err = CncProfileSettingSet(profileId, kCncParamDeviceKind,
&deviceKind, kCncParamDeviceKindSize);


// IT DOSENÂT WORK AS IS EXPECTED port = serPortIrPort;
err = CncProfileSettingSet(profileId, kCncParamPort,
&port, kCncParamPortSize);

// seta a velocidade da conexÃo
baud = 38400;
err = CncProfileSettingSet(profileId, kCncParamBaud,
&baud, kCncParamBaudSize);

}
// libera a memÃria alocada
MemPtrFree(myProfileName);

err=CncProfileSetCurrent(profileId);
// fecha o banco de dados do  profile.
err = CncProfileCloseDB();

}

Please, help me.
Thank you vety much!

Leonardo.
--
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/

Reply via email to