MacSass
Posts: 58
Joined: Tue Feb 14, 2006 2:46 am
Location: Germany

Help on Object Push needed

Tue Feb 14, 2006 2:57 am

Hi,
I´m currently in the progress of trying to convert my program to BlueTools. I looked at the ObjectPush sample for VB.NET 200 but I´m really struggling with it (yes - I´m not too experienced with VB.net yet).

I think there a two things I´m struggling with:

- The example makes extensive use of the Async feature. While I get the concept, I wanted to use the non async transfer. Would anybody be able to provide a file push example for non async tranfer?

- The thing I don´t get is that I need to open a stream first. I´m unsure of the parameters required for this? Do a absolutely need to do a service discovery first or can I just try to push down a file to a device that I discovered before?

Any help would be highly appreciated - if you need more information from me please let me know.

Thanks in advance and best regards - MacSass

Jonas
Posts: 2319
Joined: Mon Jan 09, 2006 2:20 pm
Location: Sweden

RE: Help on Object Push needed

Tue Feb 14, 2006 12:26 pm

- Using the synchronous transfer commands are very easy. To push a file just use the PushFile command instead of the PushFileAsync. This means that the main user interface thread will take care of the file transfer though. This will result that there is no guarantee that the user interface (your VB form) will update properly since the repaint also take place in the same thread. But the transfer will take place anyway.

- You must have a Stream to the Object Push-service of your device. This stream does not have to be given from a service discovery though. If you know the address of the device you can connect directly to the device and its service. Look at ConnectDevice and ConnectService in the Bluetools reference manual.

Regards,
Jonas
Franson Support

MacSass
Posts: 58
Joined: Tue Feb 14, 2006 2:46 am
Location: Germany

RE: Help on Object Push needed

Wed Feb 15, 2006 10:44 pm

Hi,
thanks for the fast reply - I´m aware of the constraints of using push vs. pushasync.

Just I don´t really get this stream thing. I´ll take a look at the samples (hope them to be in VB) to figure it out.

I let you know in case I need more help - sorry for the newbe stuff.

Thanks again - MacSass

Return to “BlueTools”