none
Bluetooth filter driver RRS feed

  • Question

  • Hi,

    Currently i am developing A2DP SINK bluetooth filter driver.

    The problem which i am facing is with COD(class of device). Only Android phones are able to detect my windows pc but iphone doesn't.

    i think we may need to change the COD(class of device).

    Major class of device should be AUDIO.

    To update the class of device i found IOCTL_BTH_SDP_SUBMIT_RECORD_WITH_INFO where i can add the service record with COD.

    But i am unable to change the major class of device (status = invalid parameter), i can only update service class.

    Can i change the COD with the below mentioned procedure or do i need to write a filter driver?

    BTH_SDP_RECORD *btrec;
        btrec = (BTH_SDP_RECORD *)ExAllocatePoolWithTag(NonPagedPool, (sizeof(BTH_SDP_RECORD)+SdpRecordLength - 1), 'sdpD');
        //btrec->fCodService = COD_SERVICE_AUDIO;
        SET_COD_MAJOR(btrec->fCodService, COD_MAJOR_AUDIO);
        SET_COD_MINOR(btrec->fCodService, COD_AUDIO_MINOR_LOUDSPEAKER);
        SET_COD_SERVICE(btrec->fCodService, COD_SERVICE_AUDIO);
        btrec->fOptions = SERVICE_OPTION_NO_PUBLIC_BROWSE;
        btrec->fSecurity = SERVICE_SECURITY_USE_DEFAULTS;    
        RtlCopyMemory(btrec->record, SdpRecord, SdpRecordLength);
        btrec->recordLength = SdpRecordLength;
     
       
     
        WDF_MEMORY_DESCRIPTOR_INIT_BUFFER(
            &inMemDesc,
            btrec,
            (sizeof(BTH_SDP_RECORD)+SdpRecordLength - 1)
            );
     
        RtlZeroMemory( &sdpRecordHandle, sizeof(HANDLE_SDP) );
         
        WDF_MEMORY_DESCRIPTOR_INIT_BUFFER(
            &outMemDesc,
            &sdpRecordHandle,
            sizeof(HANDLE_SDP)
            );
     
        status = WdfIoTargetSendIoctlSynchronously(
            DevCtx->Header.IoTarget,
            DevCtx->Header.Request,
            IOCTL_BTH_SDP_SUBMIT_RECORD_WITH_INFO,
            &inMemDesc,
            &outMemDesc,
            NULL,   //sendOptions
            NULL    //bytesReturned
            );
    
    








    Friday, November 14, 2014 6:43 AM

Answers

  • Hi,

    Windows does not have APIs that will allow applications or drivers to change the major/minor fields in the COD.  These are automatically filled from information read from the BIOS enclosure type.

    Thanks

    Monday, November 17, 2014 3:19 PM

All replies

  • Hi,

    Windows does not have APIs that will allow applications or drivers to change the major/minor fields in the COD.  These are automatically filled from information read from the BIOS enclosure type.

    Thanks

    Monday, November 17, 2014 3:19 PM
  • Hi Alain,

    Thanks for the reply.

    I have implemented Bluetooth profile driver for A2DP sink profile.

    But without changing the Major class of device iPhone doesn't list my Bluetooth device(laptop).

    Is there anyway to solve this issue?

    Thanks.

    Tuesday, November 18, 2014 10:32 AM