Hi, i am learning using OBEX in Series60 SDK to transfer an image from series60 devices to another devices via infrared. After i developed my application, it is able to transfer an image to another series60 devices and to pc, but it is unable to transfer the image to series40 devices (eq : nokia 6610,7250, etc);
Here is some of my code :
void CIrObexFileSender::ConnectL()
{
iIasDb.Close();
iHostResolver.Close();
iSocket.Close();
iSockSrv.Close();
User::LeaveIfError(iSockSrv.Connect());
// See number of protocols the socket server is currently aware of
TUint numOfProtocols;
User::LeaveIfError(iSockSrv.NumProtocols(numOfProtocols));
//DEVICE DISCOVERY - only one device is going to be discoverd, discovery level IrLAP
TInt ret;
ret=iHostResolver.Open(iSockSrv, tinyTpInfo.iAddrFamily, tinyTpInfo.iProtocol);
User::LeaveIfError(ret);
// Make the socket
ret=iSocket.Open(iSockSrv, tinyTpInfo.iAddrFamily, tinyTpInfo.iSockType, tinyTpInfo.iProtocol);
User::LeaveIfError(ret);
// Set number of device to discover
TPckgBuf<TUint> buf(1);
User::LeaveIfError(iSocket.SetOpt(KDiscoverySlotsOpt, KLevelIrlap, buf));
// Get host by name
TNameEntry log;
THostName name;
ret=iHostResolver.GetByName(name, log);
User::LeaveIfError(ret);
After i done some debugging, the problem is in the iObexClient->Connect. The runL methot never called, which makes some difficulty to know what the real problem is, because no error is generated. The program will still waiting, nothing happened.
I'm working with CSendAppUi (sendui.h) to transfer files from s60 via infrared. All works correctly, but appears an exception when the s40 is the destination device.
it seems s40 devices have a transfer protection to avoid free file copy.
I'm interested too about it, please keep me up to date. Thanks
I am newer for learing OBEX in Nokia s60 and impressive the code you post. I adapt it into one of the symbian SDK example and build in VC6 with symbian irda.lib add in project setting. Althought the compliing pass but link keep fail. One of it is