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 ?