Why i can't connect Mobile broadband NDIS ?

I created miniport network driver . So i need to support all ethernet,wifi,mobile broadband adpers also . So using with the microdot documents . i got informations like

Windows???*7? ?operating system supports a new driver model for mobile broadband devices.
?The Windows*Vista?? ?operating system and earlier versions of Windows had no specific medium type for mobile broadband networks.? ?On these systems,? ?mobile broadband miniport drivers exposed their medium as Ethernet? ?802.3? ?or integrated with Windows as a modem.?

?INF File Changes for Mobile Broadband Miniport Drivers in Windows 7 :

NDIS 6.2 is using ;

so my INF file contains :

[INSTALL]

CopyFiles = mydriver.CopyFiles.sys
CopyInf = mydriver.inf
*IfType = 243; IF_TYPE_WWANPP
*MediaType = 9; NdisMediumWirelessWan
*PhysicalMediaType = 8; NdisPhysicalMediumWirelessWan
EnableDhcp = 0; Disable DHCP

[INSTALL.NDI]

HKR, Ndi, FilterClass, , custom
HKR, Ndi, FilterType, 0x00010001, 0x00000002
HKR, Ndi\Interfaces, UpperRange,0, “flpp4”
HKR, Ndi\Interfaces, LowerRange,0, “ppip”
HKR, Ndi\Interfaces, FilterMediaTypes, , “ethernet, wan, ppip”
HKR, Ndi, FilterRunType, 0x00010001, 1

and in filter.cpp ,i have

NDIS_STATUS status = NDIS_STATUS_SUCCESS;

if (
(AttachParameters->MiniportMediaType != NdisMedium802_3)
&& (AttachParameters->MiniportMediaType != NdisMediumWan)
&& (AttachParameters->MiniportMediaType != NdisMediumNative802_11)
&& (AttachParameters->MiniportMediaType != NdisMediumWirelessWan)

) {
status = NDIS_STATUS_INVALID_PARAMETER;
goto cExit;
}

and also

NET_BUFFER_LIST_POOL_PARAMETERS netBufferListPoolParameters;
NdisZeroMemory(&netBufferListPoolParameters, sizeof(NET_BUFFER_LIST_POOL_PARAMETERS));
netBufferListPoolParameters.Header.Type = NDIS_OBJECT_TYPE_DEFAULT;
netBufferListPoolParameters.Header.Size = NDIS_SIZEOF_NET_BUFFER_LIST_POOL_PARAMETERS_REVISION_1;
netBufferListPoolParameters.Header.Revision = NET_BUFFER_LIST_POOL_PARAMETERS_REVISION_1;
netBufferListPoolParameters.ProtocolId = NDIS_PROTOCOL_ID_DEFAULT;

but in " miniport.cpp " file i wrote like this :

NDIS_MINIPORT_ADAPTER_GENERAL_ATTRIBUTES ndisMiniportAdapterGeneralAttributes;

NdisZeroMemory(&ndisMiniportAdapterGeneralAttributes, sizeof(NDIS_MINIPORT_ADAPTER_GENERAL_ATTRIBUTES));

C_ASSERT(sizeof(NDIS_MINIPORT_ADAPTER_GENERAL_ATTRIBUTES) >= NDIS_SIZEOF_MINIPORT_ADAPTER_GENERAL_ATTRIBUTES_REVISION_2);

ndisMiniportAdapterGeneralAttributes.Header.Type = NDIS_OBJECT_TYPE_MINIPORT_ADAPTER_GENERAL_ATTRIBUTES;

ndisMiniportAdapterGeneralAttributes.Header.Size = NDIS_SIZEOF_MINIPORT_ADAPTER_GENERAL_ATTRIBUTES_REVISION_2;

ndisMiniportAdapterGeneralAttributes.Header.Revision = NDIS_MINIPORT_ADAPTER_GENERAL_ATTRIBUTES_REVISION_2;

ndisMiniportAdapterGeneralAttributes.MediaType = NdisMedium802_3;

ndisMiniportAdapterGeneralAttributes.PhysicalMediumType = NdisPhysicalMediumUnspecified; // NdisPhysicalMedium802_3

and

ndisMiniportAdapterGeneralAttributes.RecvScaleCapabilities = NULL;

ndisMiniportAdapterGeneralAttributes.AccessType = NET_IF_ACCESS_BROADCAST;

ndisMiniportAdapterGeneralAttributes.DirectionType = NET_IF_DIRECTION_SENDRECEIVE;

ndisMiniportAdapterGeneralAttributes.ConnectionType = NET_IF_CONNECTION_DEDICATED;

But i can’get mobile broadband using donle with NDIS . after changing the IP setting automatically & DHCP i can detect the modem and

i have

HUAWEI Mobile connect - 3g network card

and

HUAWEI Mobile connect - 3g modem

when i chnage to "RAS " i can connect with " HUAWEI Mobile connect - 3g modem " but when i change to " NDIS " . ican’t connect with "HUAWEI Mobile connect - 3g network card "

. Is it any problem on driver codes ? why i can’t conncet with NDIS conncetion ? any problem on RAW input data ?

> I created miniport network driver .

Are you writing a driver for a new Mobile Broadband device?

So i need to support all ethernet,wifi,mobile broadband adpers also .

What does that mean ‘support’? Your Miniport needs to support your device.
Other devices have their own drivers.

i have
HUAWEI Mobile connect - 3g network card
and
HUAWEI Mobile connect - 3g modem

Is the HUAWEI Mobile Connect device the one you are writing the driver for?

HKR, Ndi\Interfaces, FilterMediaTypes, , “ethernet, wan, ppip”
HKR, Ndi, FilterRunType, 0x00010001, 1

Maybe I am confused but why do you have entries for an LWF in your Miniport
(Net adapter) INF?

Does your miniport also contain an LWF?

It would be helpful to get a more clear understanding of what you are trying
to accomplish and then dive into the what does not work part.

Good Luck,
Dave Cattley

yeah . Actually I have a application which has a interface list with available Network adapters .
When I use Ethernet , Wifi , usb dongle I can see the available adapters on this list and it active when the adapter is ready .

But when I connect with USB dongle , I can see HUAWEI Mobile connect - 3g network card
and HUAWEI Mobile connect - 3g modem adapters on this list . But nothing is active . But when I change the setting of dongle adapter to " get IP automatically and " get DHCP automatically " it is active . But i can connect with " HUAWEI Mobile connect - 3g modem " adpter when I change to " RAS " mode from " NDIS " mode in dongle .

The problem is I want to connect with " HUAWEI Mobile connect - 3g network card " as " NDIS " mode .

I am using Filter.cpp function to implement the filters . already posted the codes in my first post above .

Yes . I am using LWF

The actual problems is

* When dongle is connected through RAS(Modem) on Windows 7 and Windows 10 is able to detect the interface ,establish connection and it is working.

* When dongle is connected through NDIS, Windows 7,8 and 10 is able to detect the interface but it is not shown as alive .

after studying i got informations

* Existing IM and LWF drivers cannot bind to mobile broadband network adapters because mobile broadband drivers use new values for UpperRange, LowerRange, and MediaType in the INF file.

* Existing IM and LWF drivers cannot parse mobile broadband packets because the Windows 7 mobile broadband drivers use a new packet format that is different from the Ethernet/Wi-Fi packet format that existing drivers expect.

and i changed the made 1 but still problems . This is due to 2nd point ? How can i solve this ?