send FILE via BT -> ERROR

Login to reply to this topic.
Fri, 2005-06-24 09:47
Joined: 2005-05-12
Forum posts: 7
Hi
i'm tring to modifi the BTOBEX example to send a file instead a simple message.
I used the object CObexFileObject instead of BTNullObject:

   _LIT(currentFileName,"\\SYSTEM\\DATA\\MARIO.DAT");
   iCurrObject = CObexFileObject::NewL(TPtrC(NULL,0));
   iCurrObject->InitFromFileL((TDesC&)currentFileName);   

but when I try to connect to the selected device I get the error message : BTOBEX alredy in use!

Please help me.....
Thank you in advance

Fri, 2005-06-24 09:49
Joined: 2005-05-12
Forum posts: 7
Re: send FILE via BT -> ERROR
I would add the errore I get in the list:
CLIENT BUSY.

Can somebody help me?
Mon, 2005-06-27 13:59
Joined: 2004-09-24
Forum posts: 9
Re: send FILE via BT -> ERROR
Hello , if u have solved the problem , plz let me know even am stuck in the same .Cant transfer the file over BT
Tue, 2005-06-28 08:37
Joined: 2004-07-28
Forum posts: 1379
Re: send FILE via BT -> ERROR
Dear me....

First of all, whats this:

_LIT(currentFileName,"\\SYSTEM\\DATA\\MARIO.DAT");
   iCurrObject = CObexFileObject::NewL(TPtrC(NULL,0));
   iCurrObject->InitFromFileL((TDesC&)currentFileName);   

You are casting (EVIL!) a TLitinto a TDesC16&... Try this:

_LIT(currentFileName,"\\SYSTEM\\DATA\\MARIO.DAT");
iCurrObject = CObexFileObject::NewL(currentFileName);


didster

Fri, 2005-07-01 04:20
Joined: 2004-10-27
Forum posts: 6
Re: send FILE via BT -> ERROR
I've tried this way, but the program exited as soon as i run it, what's wrong with it?

Thanks a lot for your help!

Fri, 2005-07-01 08:19
Joined: 2004-07-28
Forum posts: 1379
Re: send FILE via BT -> ERROR
Try:

_LIT(KFileName," C:\\SYSTEM\\DATA\\MARIO.DAT");
iCurrObject = CObexFileObject::NewL(KFileName);

didster

Mon, 2005-07-04 11:21
Joined: 2005-06-21
Forum posts: 11
Re: send FILE via BT -> ERROR
This is the way to go:
Code:
iCurrObject = CObexFileObject::NewL();
_LIT(currentFileName,"\\SYSTEM\\DATA\\MARIO.DAT");
iCurrObject->InitFromFileL(currentFileName);
Wed, 2005-09-21 11:29
Joined: 2005-09-15
Forum posts: 20
Re: send FILE via BT -> ERROR
HI,

   I tried usign the code snippet you have told for transferring the file over bluetooth obex service:

    iCurrObject = CObexFileObject::NewL();
   _LIT(currentFileName,"\\SYSTEM\\DATA\\BA_MW_B.264");
     iCurrObject->InitFromFileL(currentFileName);

But when I am trying to build this, its giving me "undefined error InirFromFileL".Please let me know where else do I define it since i thought its already defined in CObexFileObject class, I need not define it again.

Please help me.

Thanx
Thu, 2005-10-06 22:16
Joined: 2005-10-05
Forum posts: 3
Re: send FILE via BT -> ERROR
Did you also modify the type in the header of the example?
Mon, 2005-10-10 11:31
Joined: 2005-10-10
Forum posts: 18
Re: send FILE via BT -> ERROR
Quote from: newsymbian
HI,

   I tried usign the code snippet you have told for transferring the file over bluetooth obex service:

    iCurrObject = CObexFileObject::NewL();
   _LIT(currentFileName,"\\SYSTEM\\DATA\\BA_MW_B.264");
     iCurrObject->InitFromFileL(currentFileName);

But when I am trying to build this, its giving me "undefined error InirFromFileL".Please let me know where else do I define it since i thought its already defined in CObexFileObject class, I need not define it again.

Please help me.

Thanx


HI,
Try this


_LIT(KFileName,"\\system\\apps\\example\\file.txt");
iCurrObject = CObexFileObject::NewL(KFileName);
 iCurrObject->SetNameL(_L("file.txt"));

  • Login to reply to this topic.