WLAN Driver From Cold Boot

  • Hi,
    I have a PicoCOM4 with a USB WLAN connected and working, when I cold boot the device the WLAN is not recognised and asks for a driver. If I unplug the device and re-connect it the device driver is found and loaded.
    This is probably a sequence issue could some one point me in the correct direction??
    Here are the reg settings:-


    Cheers
    Rick

  • The USB driver module takes the following steps when loading drivers, stopping as soon as it finds a driver that accepts control of the device:-


    1. The USB driver module searches for a subkey with the name Default\Default\Default.
    If present, the module loads the driver listed within the Default\Default\Default\DriverName\DLL subkey. A driver registered in this way is loaded for all USB devices that are connected to the system.


    2. The USB driver module searches for a vendor-specific driver.
    Vendor-specific drivers are identified by searching for the most general Group1_ID subkey that matches the device descriptor information. The most general subkey is the one that has a matching Group1_ID subkey containing the simplest allowable form and Default for the Group2_ID and Group3_ID subkeys. If a matching subkey is found, the module loads the driver that is listed within the subkey's DriverName\DLL subkey.


    3. The USB driver module searches for a device class-specific driver.
    Class-specific drivers are identified by searching for the most general Group2_ID subkey. If a matching subkey is found, the module loads the driver listed within the subkey's DriverName\DLL subkey.


    The WLAN is setup as Default\Default\Default\ so no other drivers will take precedence over the RT2871 driver......



    Why does the driver fail to load on a cold boot??



    Rick

  • Sorry for not replying to this post yet. We have no according WLAN stick available to verify this behaviour.


    According to your descriptions this might be a timing issue. By default USB host driver is loaded very early in boot process (Order=1). Therefore please try to increase the Order, to make sure the USB host driver is able to handle time crtitical USB device detection.

    Code
    1. reg open \drivers\builtin\ohci
    2. reg set val Order dword 255
    3. reg save


    If this still is not working it should be a proper workaround to deactivate the host driver and activate it within your application using ActiveDevice(). TO disable USB host driver, please set the flags value to 4:

    Code
    1. reg open \drivers\builtin\ohci
    2. reg set val Flags dword 4
    3. reg save

    Software developer, F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • I have changed the registry and can now boot with the USB WLAN device attached and Win CE does not ask for a driver reference but the driver is still not loaded and no zero config manager can be seen in the task bar.


    Looking at the boot trace the driver is never loaded, I have tried to move the load order of the ohci driver and any networking drivers and still cnnot get the driver to load.


    If I use the ActivateDevice api call I get the following attemp to load the driver:-


    RT2870: DLL_PROCESS_ATTACH


    Build Date: Jul 9 2009 Time: 13:54:35
    Driver Version: 0x01040400 (REL)
    CPU=ARM
    PageSize=4096
    ProcessorLevel=4
    ProcessorRevision=0005
    RT2870:<== DllEntry


    RT2870:==> DllEntry
    RT2870: DLL_PROCESS_DETACH
    RT2870:<== DllEntry
    -A--S--L--A--S--



    If I unplug the device and re-attached I get this trace:-


    RT2870:==> DllEntry


    RT2870: DLL_PROCESS_ATTACH
    Build Date: Jul 9 2009 Time: 13:54:35
    Driver Version: 0x01040400 (REL)
    CPU=ARM
    PageSize=4096
    ProcessorLevel=4
    ProcessorRevision=0005
    RT2870:<== DllEntry



    and the WLAN device works correctly.


    Any other ideas would be selcome.


    Cheers
    Rick

  • We will verify this issue. I still think that this is cause by critical USB timing restriction that can not be meet during cold boot.

    Software developer, F&amp;S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Maybe it is sufficient to increase UBS driver priority via registry: USB Host Controller Driver Registry Settings.

    Code
    1. reg open \Drivers\BuiltIn\OHCI
    2. reg set val Priority dword 10
    3. reg save


    We will also try to verify this.

    Software developer, F&amp;S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Meanwhile we have analysed this issue in more detail. Power signal to enable USB MOSFET on starterkit is initialised corretly. Hence WLAN stick will be powered on not before USB driver is running.


    I have used the CAB installer that is included in the zip package above and installed the driver into \FFSDISK. Afterwords I have saved the registry to make sure that registry changes that have been made by cab installer are available permanently.


    After pluging in the WLAN adapter the driver is initialized correctly and RT28701 window pops up showing wireless networks into reach.


    But even when the device is already connected before powering on PicoCOM, WLAN stick is detected properly and the wireless network window pops up properly. It has been tested for more then 20 times without problems. Also using an additional USB Hub and connecting and USB keyboard an mouse doesn't cause any problems.


    Therefore there are some more question regarding your application:
    Are you running the PicoCOM on the starterkit? Or do you use a custom base board?
    We have tested it with an adapter that is based on Ralinks RT2770F (compatible to RT28701 software driver). Which module do you use exactly? Might it be possible to send us one stick for furtherr testings?
    Have you already tested the proposal from above?


    Here is the complete debug output:

    Software developer, F&amp;S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Another hint:
    When trying to active the device driver later please also set the Flags value back to 0 before calling ActivateDeviceEx(). If Flags is still set to 4 when calling this function, device manager will still not be able to load the driver.

    Software developer, F&amp;S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Thank you for all your help so far!
    It seems very strange that you can use the driver with your stick on a standard config from the driver cab file??
    I will forward one of our sticks to you for testing. The unit is the Edimax EW-7711USn.


    Cheers
    Rick

  • Meanwhile we could reproduce this issue and have fixed this problem in USB-Host driver. Using this driver, the WLAN adapter should be detected on cold boot properly. This updated version is already scheduled to be included in the next kernel release (-> bug: 0000779).

    Software developer, F&amp;S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.