Author Topic: Low-level driver internal error  (Read 6407 times)

sempai

  • Guest
Low-level driver internal error
« on: May 04, 2009, 02:47:53 PM »
Hello,

In the AuthenticatorDemo I receive an "Low-level driver internal error" on line
Device.GetName(e.Radio, ref str); in wclBluetoothDiscovery_OnDiscoveryComplete.
(I replaced the line with: wcl.wclErrors.wclShowError(Device.GetName(e.Radio, ref str)); to get the error nr.)

Any idea why I receive this error?

I'm using WCL 6.5.6 and BlueSoleil 6.4.249.0.


Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3053
  • Karma: 1000
    • Soft Service Company
Re: Low-level driver internal error
« Reply #1 on: May 04, 2009, 02:57:11 PM »
Simple read the name once again. It happens with bluesoleil some time because the driver was not "restored" from discovery yet.

sempai

  • Guest
Re: Low-level driver internal error
« Reply #2 on: May 04, 2009, 03:32:53 PM »
I already tried it 10 times in a row :-)
Makes no difference :-(


BTW i'm using the .net developer library

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3053
  • Karma: 1000
    • Soft Service Company
Re: Low-level driver internal error
« Reply #3 on: May 04, 2009, 04:23:43 PM »
I will check but I afraid there is no solution except read the names out side he event because the error reported by the driver, not by wcl.

sempai

  • Guest
Re: Low-level driver internal error
« Reply #4 on: May 05, 2009, 11:33:11 AM »
Hello Mike,

Reading outside the event works.
Thanx! Why didn't i think of it  ???

Maybe you're able to fix this problem in a new release?


Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3053
  • Karma: 1000
    • Soft Service Company
Re: Low-level driver internal error
« Reply #5 on: May 05, 2009, 11:51:07 AM »
I am trying but I cann't understand why it happens.

Offline Nature

  • Software Developer
  • Newbie
  • *
  • Posts: 23
  • Karma: 0
wcl.wclBluetoothRadio.SetName() "Internal driver error" on Vista
« Reply #6 on: August 07, 2009, 05:44:48 PM »
Hi there,

Re: WCL (personal) 6.5.11.0 dotnet library

I am having a similar problem when calling the method wcl.wclBluetoothRadio.SetName(ref string). I am not calling this method within any WCL event handler, just a button click on a form.

This works correctly on Windows Professional XP SP2 but I get the error when trying it on Vista Home.

The instance of wcl.wclBluetoothRadio that I am using has API = wcl.wclBluetoothAPI.baMicrosoft

Many thanks
N

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3053
  • Karma: 1000
    • Soft Service Company
Re: Low-level driver internal error
« Reply #7 on: August 07, 2009, 09:20:09 PM »
Hi,

you application must run with Administrator priviligies on Vista machine to change radio name. Or you have to change manifest for your application like this one:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<dependency>
    <dependentAssembly>
        <assemblyIdentity
            type="win32"
            name="Microsoft.Windows.Common-Controls"
            version="6.0.0.0"
            processorArchitecture="X86"
            publicKeyToken="6595b64144ccf1df"
            language="*"
        />
    </dependentAssembly>
</dependency>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
    <security>
        <requestedPrivileges>
            <requestedExecutionLevel
                level="requireAdministrator"
                uiAccess="false"/>
        </requestedPrivileges>
    </security>
</trustInfo>
</assembly>

Offline Nature

  • Software Developer
  • Newbie
  • *
  • Posts: 23
  • Karma: 0
Re: Low-level driver internal error
« Reply #8 on: August 10, 2009, 11:17:35 AM »
Thanks Mike,

I have tried right clicking the executable and choosing "Run as administrator" but this made no difference.
I also tried copying the xml in your example to create a manifest file for my executable but this also failed. (I just copied it to a text file and named the file myApp.exe.manifest where my application is called myApp.exe)

I'll look into some other ways of elevating my application's privilages but any further advice would be appreciated.

Running the entire application under administrator privilages is not desirable for security reasons, perhaps there is a way to only elevate privilages when running this section of code?

Regards
Nature

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3053
  • Karma: 1000
    • Soft Service Company
Re: Low-level driver internal error
« Reply #9 on: August 10, 2009, 11:30:52 AM »
Hi,

By default MS does not provide any API for changing local radio name (on XP, Vista and Windows 7). WCL uses some "tricks" to do so. Unfortunatly it requires some drivers call with using "privileged" API calls. There is no other way to change the radio name on MS drivers except one used in WCL.

May be MS changed something in BT drivers. So I need full information about your system, such as:
- OS version (exactly version and name, 32bit or 64bit);
- Service packs and hot fixes installed;
- bt drivers version;
- is it native MS or MS with WidComm extension.

P.S. I have tested it on Vista Home Basic 32 bit with and without SP 1 installed, native MS driver. It changes the radio name without any errors.

Offline Nature

  • Software Developer
  • Newbie
  • *
  • Posts: 23
  • Karma: 0
Re: Low-level driver internal error
« Reply #10 on: August 10, 2009, 06:48:16 PM »
Hi Mike,

I also once tried to change the RadioName of the MS stack, I got as far as automatically finding and changing the name in the registry then programmatically deactivating the USB device, very messy and never worked for me, fortunately I found your WCL library and have never looked back since, much easier!

1) OS version (exactly version and name, 32bit or 64bit)?
Operating System = 32bit
Manufacturer = Microsoft Corporation
BuildNumber = 6000
Caption = Microsoft

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3053
  • Karma: 1000
    • Soft Service Company
Re: Low-level driver internal error
« Reply #11 on: August 10, 2009, 07:17:07 PM »
Thank you very much for the detailed information. It helps me a lot to solve the issue.

P.S. Yes, you have netive MS drivers.

P.P.S. I think it is Vista security issue, I am going to prepare PC with the same files (version) as yours and will simulate the issue.

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3053
  • Karma: 1000
    • Soft Service Company
Re: Low-level driver internal error
« Reply #12 on: August 11, 2009, 12:01:40 PM »
Hi,

I have reproduced the issue and got "Internal driver error". But when I run application with administrative privilegies ("Run as Administrator") it works without any problems. Also, I have added manifest into the app and it works too with standard privilegies.

Offline Nature

  • Software Developer
  • Newbie
  • *
  • Posts: 23
  • Karma: 0
Re: Low-level driver internal error
« Reply #13 on: August 13, 2009, 12:46:28 PM »
Hi Mike,

Thanks for looking in to this for me.

I have now updated to Service Pack 1 and it does work for me if I use a manifest. This is fine because I can detect if a user has Service Pack 1 and disable this option in my application if they have not updated yet. I think it is fair to require users to have to update before making this available to them.

Curiously I did originally try both "Run as administrator" and using the same manifest but it did not work for me before updating to Service Pack 1.

I found an interesting bug that is easy to code around but I thought I'd describe it for you for future reference:
If you set the name to the same name as the machine (eg "TEST01-PC") and then repeat it by setting the name again to the same name as the machine you can get the "Internal driver error". If you repeatedly set the name to any other name than the machine name you will not get the error. This doesn't matter because you can just call GetName first and not bother calling SetName if the name is already the name that you want.

Thanks again,
Nature

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3053
  • Karma: 1000
    • Soft Service Company
Re: Low-level driver internal error
« Reply #14 on: August 13, 2009, 01:20:25 PM »
Hi,

Great that it works now. I'll keep trying to find why it does not work without SP1.

Also, thanks for the info about the bug. I'll fix it.

 

Sitemap 1 2 3 4 5 6 7 8 9