No internet when i change to NDIS Mobile broadband type RRS feed

  • Question

  • Hi ,

    We are developing a VPN application which binds all the active interfaces and connect the VPN along that interface . It is binding and working fine when i use Ethernet , Wifi . Now i want to connect with Usb dongle . In uSB dongle , there are 2 connection type is available .

    1 . Modem type  

    1 . NDIS type  

    modem type connection is binding and working with my VPN application . But in case of NDIS type connection , i can't bind that adapter . After lot of research using Microsoft Doc , i changed some implementation .   

    We are using NDIS 6.2 Filter driver and virtual Mini port driver . So for binding with NDIS broadband , we change Filter file INF like :

    Filter file INF :

    HKR, Ndi\Interfaces, FilterMediaTypes, , "ethernet, wan, ppip"

    and also in Filter file i add new type medium NdisMediumWirelessWan

    filter file :

    (AttachParameters->MiniportMediaType != NdisMediumWirelessWan)

    Now after that this NDIS type adapter is binding with my VPN application . But the document also saying about the 

    Netbuffer packet flow through the mobile broadband . see this doc :

    As per the document they saying like : ********************************************************************** Changes in the mobile broadband driver stack can affect applications that use the WFP, NDIS LWF, and NDIS 6.x IM MUX drivers in the following ways:

    1) Binding to the mobile broadband device. NDIS LWF or NDIS6.x IM MUX drivers require changes to their INF files so that they can bind to mobile broadband devices. The LowerRange and MediaType that are specified in the network miniport drivers INF file are important changes for an NDIS LWF driver.

    To bind to a Windows 7 mobile broadband driver, the filter driver must add ?ppip? in the FilterMediaTypes section of the filter driver?s INF file. The filter driver should also accept miniport drivers that specify NdisMediumWirelessWan in the FilterAttach function.

    For NDIS 6.x IM MUX drivers, the protocol edge of the driver must specify ?flpp4? or ?flpp6? in the LowerRange in the driver?s INF file to bind to the mobile broadband driver. WFP-based solutions do not require these changes because they do not bind to a specific network medium.

    2) Parsing network packets. Applications that are based on NDIS6.x IM MUX, NDIS LWF, or WFP might require changes to parsing functions. If the application parses network frames that are passed between NDIS and the miniport driver, the parsing function must expect raw IP frames instead of Ethernet frames for mobile broadband adapters.

    3) Creating or copying network buffer lists (NBLs). If the filter driver or IM MUX driver creates a new NBL or copies an NBL, it must also set or copy the NBL flags that pertain to Raw IP frames

    a ) Windows 7 defines a new media type: NdisMediumWirelessWan. For this media type, NDIS sends raw IP frames directly to the miniport driver and expects the miniport driver to return raw IP frames. Raw IP frames are the same as Ethernet 802.3 frames except that the raw IP frame omits the Ethernet header and starts with the IP header.

    b ) When NDIS sends a RAW IP frame to the mobile broadband miniport driver, it sets additional flags in the NET_BUFFER_LIST structure, as listed in Table . The miniport driver must set the same flags when it notifies NDIS that the network received the frame. these are the flags ::


    2 : NetBufferListInfo [NetBufferListFrameType] For IPV4 : Out-of-band (OOB) must be set to 0x0800 (Ethertype IPv4) in network byte order.

    For IPV6 : OOB must be set to 0x86dd (Ethertype IPv6) in network byte order. ***********************************************************************

    I added the changes in mini port return function :

    Miniport : 

    NdisSetNblFlag(pNbl, NDIS_NBL_FLAGS_IS_IPV4);
    PVOID Value = (PVOID)RtlUshortByteSwap(0x0800);
    NET_BUFFER_LIST_INFO(NetBufferLists, NetBufferListFrameType) = Value;

    But why there in no internet ? They also mentioned about WWAN OID's . I am only binding and connecting . Is that OID required for VPN application ?

    Is this code is correct ? or ant other requirements ?

    • Edited by vkp123 Thursday, May 5, 2016 8:14 AM new
    Thursday, May 5, 2016 8:09 AM

All replies

  • Do you have this problem with only this specific dongle? Have you tried other modern (up to 2 years old) models?

    -- pa

    • Edited by Pavel A Friday, May 6, 2016 10:30 PM
    Friday, May 6, 2016 10:29 PM
  • Thank you for your suggestions Pavel A

    yeah . But in case of some dongle it is working fine . But some dongle not . Any particular reason ? or related to NDIS version ? 

    I checked with Vodafone K42031 . In this Dongle it has 2 interface Modem & NDIS . Modem is working fine with our Application but NDIS is not working . So that's why i went behind the document .


    • Edited by vkp123 Monday, May 9, 2016 9:25 AM language
    Monday, May 9, 2016 9:11 AM
  • Does this dongle function also as a wi-fi router? (if it is indeed a Huawei K4203, it should be).

    Then its internal router may conflict with your VPN. Also note  that it has internal dhcp server. (see here)

    -- pa

    • Edited by Pavel A Monday, May 9, 2016 6:12 PM
    Monday, May 9, 2016 6:11 PM
  • Thanks Again 

    This vodafone  Huawei K4203 dongle connect with router , i can get as Wifi  . But i don't think so this is a Wifi- router .  Now i connect manually with my system . So what i do with this dongle for working with my VPN ? should i change any DHCP functionalities ? any idea 

    • Edited by vkp123 Tuesday, May 10, 2016 6:51 AM edit
    Tuesday, May 10, 2016 6:17 AM
  • Check with the vendor if there are any firmware updates. We used similar devices (not from Huawei) and updates were necessary to get it working.

    - pa

    Tuesday, May 10, 2016 1:50 PM