OBEX DeviceListener sample

Topics: Bluetooth - Other, OBEX, Samples
Aug 29, 2012 at 11:13 AM

I'm testing the OBEX DeviceListener sample on my Windows CE 5.0 device.

When I run the sample, it starts successfully.

However, when I send an item from my Bluetooth mobile telephone to the device, I see a message box asking me to confirm whether I want to accept a file.

Obviously this is not the DeviceListener sample; the device seems to be performing default behaviour.  (Perhaps because the sample uses OBEX, and my telephone is using file transfer?)

How do I configure the device to allow the DeviceListener application to accept the incoming file?

Or, what do I need to do in code to receive the file from my telephone that may not be sending using OBEX?

Aug 29, 2012 at 2:13 PM

Hopefully that's answered at http://32feet.codeplex.com/wikipage?title=One%20Active%20Server

Aug 30, 2012 at 10:56 AM

Thanks, almost there!

The section "OBEX Server Options" in http://msdn.microsoft.com/en-us/library/aa916361.aspx was relevant.

I removed the "bth" option from the "protocols" entry.  However, I don't know which device to reference to perform IOCTL_SERVICE_REFRESH.

I tried "BTD0:", which refreshed successfully, but didn't solve my issue.  A device reboot did solve it.

I'd like to avoid the reboot - any idea what device I need to send IOCTL_SERVICE_REFRESH?

Sep 1, 2012 at 8:23 PM

The first link in my docs shows an MSDN page where the code sample uses CreateFile("OBX0:")  That'll be the one.


All donations to my Amazon Wishlist, or to my Paypal account are welcomed.

Sep 7, 2012 at 12:32 PM

I can CreateFile("OBX0:"), but DeviceIoControl(IOCTL_SERVICE_REFRESH) returns FALSE.

GetLastError() returns ERROR_SERVICE_NOT_ACTIVE.