I’ve posted an updated build of the Bluetooth library here. It adds full support for the desktop, improved class-of-device and other properties.


The sample app is now supplied in Pocket Pc, Smartphone and Desktop versions which all talk to each other.

Peter Foot Avatar

Published by

Categories: ,

8 responses to “Bluetooth Build 50115”

  1. Tristan Avatar
    Tristan

    Your (Desktop)Release throws a ‘System.NotImplementedException’ when I try to discover devices. Using the dll in my own application shows, that the reason for the exception can be found in the BluetoothEndPoint Class.

  2. Peter Foot Avatar

    Your system is running the Microsoft Bluetooth stack? and you have Windows XP SP2?

    Peter

  3. Peter Foot Avatar

    For some reason a vital piece of code was cut from the build packaged with the desktop example. This was causing the BluetoothEndPoint.Create method to fail. I’ve placed an updated version of the zip file online to correct this.

    Peter

  4. Tristan Avatar
    Tristan

    german xp sp2 and the ms bluetooth stack.

  5. Peter Foot Avatar

    The ObexFileTransfer service only initiates a connection to the required service on the receiving device, there isn’t a wrapper to do all the Obex communication (yet at least). Note you should use ObexObjectPush for an outgoing file push.
    This article describes implementing the OBEX protocol over IrDA so the same applies when using Bluetooth:-
    http://www.pocketpcdn.com/articles/obex.html

    Peter

  6. Tristan Avatar
    Tristan

    thx for the fix 🙂

    did you’ve every tried to send a file, using the ObexFileTransfer protocol? My mobile phone doesn’t react on such an attempt with your class. Perhaps I’ve forgotten to set a header?

  7. Tristan Avatar
    Tristan

    thank you for the link. I’ve tried to translate the connect part into c#, but it doesn’t work.

    I’ve used the following byte array for the obex connect
    byte[] tSendByte = new byte[MAX_SEND_BUFF_LEN];
    tSendByte[0] = OBEX_CONNECT;
    tSendByte[1] = 0x00;
    tSendByte[2] = 0x07;
    tSendByte[3] = OBEX_VERSION;
    tSendByte[4] = OBEX_CONNECT_FLAGS;
    tSendByte[5] = 0x08;
    tSendByte[6] = 0x00;

    and send it in this way
    Stream stream = client.GetStream();
    stream.Write(tSendByte,0,tSendByte.Length – 1);

    The only response I get is 0xC0(192) = Bad Request. (of course the response is 3 bytes long 192 0 3)
    I don’t see any mistake in my connect-array, is it possible that the bluetooth implementation has an error?

  8. Peter Foot Avatar

    I haven’t tried this myself but I think it should be:-

    byte[] tSendByte = new byte[MAX_SEND_BUFF_LEN];
    tSendByte[0] = OBEX_CONNECT;
    tSendByte[1] = 0x07;
    tSendByte[2] = 0x00;
    tSendByte[3] = OBEX_VERSION;
    tSendByte[4] = OBEX_CONNECT_FLAGS;
    tSendByte[5] = 0x00;
    tSendByte[6] = 0x08;