Bluetooth Object Push?

Login to reply to this topic.
Wed, 2003-12-10 07:23
Joined: 2003-06-12
Forum posts: 104
When a .jpg file is sent through bluetooth, the phone will display "1 message received" dialog ryt?, and the file goes directly to the inbox folder of the phone ryt?.. is there any way that i can bypass this? i will make my own picture viewer program and then program will receive the file directly?

how do i do it?

"its all right, the gun isn't loaded."


Wed, 2003-12-10 09:44
Joined: 2003-10-29
Forum posts: 6
Use your own server
I'm doing that way, you just need to use your own server with your own channel and you will receive the file. If you are using OBEX, you will receive the file into a CObexBufObject.

Have a look to BTObjectExchange example.

Cheers.
Mon, 2003-12-15 14:39
Joined: 2003-10-08
Forum posts: 29
Bluetooth Object Push?
Hi Guys!

I am trying to use the OBEX example, which comes with SDK serie 60, at the P800 (UIQ). I have experienced that after sending a file from my mobile phone to my computer, this file is corrupted. I have solved that doing a temporary copy of the file. The problem is that I want to send MP3 files and I would like to send it without doing any temporary copy. Have you experienced that problem?

The source code that I have used is below.

**********************************
void BTSendAPI::ConnectToServerL()
{
   TObexBluetoothProtocolInfo protocolInfo;

   protocolInfo.iTransport.Copy(KServerTransportName);
   protocolInfo.iAddr.SetBTAddr(iServiceSearcher->BTDevAddr());
   protocolInfo.iAddr.SetPort(iServiceSearcher->Port());

   if (iClient)
   {
       delete iClient;
       iClient = NULL;
   }
   iClient = CObexClient::NewL(protocolInfo);

   iClient->Connect(iStatus);
   SetActive();
}

void BTSendAPI::SendFile(const TDesC& aFileName)
   {
    iCurrObject->Reset();
    iCurrObject->SetNameL(_L("Test"));
    iCurrObject->InitFromFileL(aFileName);
    SendMessageL();
   }

**//**************************
Best regards,

Fernando Soler
Tue, 2003-12-16 03:26
Joined: 2003-06-12
Forum posts: 104
Bluetooth Object Push?
what is the Class of iCurrObject? is it CObexNullObject?

Try using CObexFileObject...    

iCurrObject = CObexFileObject::NewL(KFile);


and then inside your sendFile() function you just need one line..

call the ObexClient::Put() function...

"its all right, the gun isn't loaded."

Tue, 2003-12-16 09:18
Joined: 2003-10-08
Forum posts: 29
Bluetooth Object Push?
Hi Maverik!

I apologize that I didn't defined the meaning of my variables. I had already done what you mentioned. But as I have told in my first message, after sending it the file is corrupted. I mean the file is received perfectly but the file is removed at the mobile phone is removed. This problem didn't happen at the serie 60, only at the P800.

 /*! @var iClient manages the obex client connection */
 CObexClient* iClient;

 /*! @var iCurrObject the obex object to transfer */
CObexFileObject* iCurrObject;

I have used two triks for solving that problem. First I made a copy of the file. But this solution was not feasible if I wanted to send MP3. The second solution was to modify the attributes of the file to set up it as read-only. In that way the file was not deleted.



Best regards,

Fernando
Tue, 2003-12-30 23:52
pmiranda_pt (not verified)
Forum posts: 2043
have the same problem
Hi there,

I seem to have the same problem as maverick.
I'm developing an application on to mobile that needs to catch an Obex Object push from my desktop computer, I'm trying to use the ObexExchange example but I'm unable to catch the object on my application before the OS so I get it as an message.

Can anyone please help me on this one?

Thanks
Wed, 2003-12-31 10:26
Joined: 2003-10-29
Forum posts: 6
Change the service ID
I had the same problem some weeks ago and I solved it by changing the service identifier. I think the problem is that there is already an OBEX server in Symbian (I mean a native one) and it has priority over other OBEX server (I'm developing for Nokia Series60). So when you advertise a new service in a new channel you can catch the file (object) you receive.

It's working for me and even, after all this stuff, you don't need to develop a new picture viewer, you can use the symbian one.

I hope it helps,

Cheers
Wed, 2005-01-05 10:38
Anonymous (not verified)
Forum posts: 2043
Making ObjectExchangeClient a non active object ??
hi all,
 
This looks like a good place to put my question. I am also using the client code of ObexExample, I need some kind of blocking access to bluetooth sendL  i mean I wanted to stop the program when sending starts untill it gets finished, rather than using that Active Objects stuff, so I changed the code to use. User::WaitForRequest everywhere where setActive was being used. Now I am getting the error "App Closed", when I call the connectL(), could some one tell me where the error could come I have posted a more detailed question on this url
http://forum.newlc.com/viewtopic.php?t=4584
Tue, 2005-07-26 13:54
Joined: 2005-07-26
Forum posts: 12
Re: Bluetooth Object Push?
Hi

I am a newbie on Symbian development - the post by ajsanchez - I am facing the same problem i.e. I am unable to receive the file from the PC in my application which runs an obex server, it goes into the INBOX Sad

Could you please explain what exactly you mean by changing the service identifier in a bit of detail . (Also when you advertise a new service on a new channel, what code should be written on the PC side? I mean right now I am using Windows XP with service Pack 2 to send a file manually without any code on the PC side)

Basically, I want to receive files from the PC in my application running on the phone and not into the inbox - How do I acheive this?

Thanks in advance,

Archit
Wed, 2005-07-27 03:09
Joined: 2003-06-12
Forum posts: 104
Re: Bluetooth Object Push?
Hi archigupta,

I forgot about this already, don't have the codes anymore.. but did you try to look at the ObexExchange Examlpe? what did it do?

I modified the ObexExchange example like this:

Quote from: maverick
what is the Class of iCurrObject? is it CObexNullObject?

Try using CObexFileObject...

iCurrObject = CObexFileObject::NewL(KFile);


and then inside your sendFile() function you just need one line..

call the ObexClient::Put() function...

"its all right, the gun isn't loaded."

  • Login to reply to this topic.