Dear Developers,
Greetings!!
As, I am working for wifi development for AM335x on Wince7 with NDIS6.1 support.
I have defined the following macros in the sources files to use the support of NDIS6.1:-
CDEFINES=$(CDEFINES) -DNDIS_MINIPORT_DRIVER=1 -DNDIS61=1
CDEFINES=$(CDEFINES) -DNDIS61_MINIPORT=1
CDEFINES=$(CDEFINES) -DNDIS_LEGACY_MINIPORT=1
CDEFINES=$(CDEFINES) -DNDIS_SUPPORT_NDIS61=1
And in my driver entry I am initializing the NDIS_MINIPORT_DRIVER_CHARACTERISTICS structure and after that I am printing the value of NDIS_MINIPORT_MAJOR_VERSION and NDIS_MINIPORT_MINOR_VERSION. and i got the output as 6 and 1 that means that NDIS6.1 support is working fine. When I register my driver with NDIS by using NdisMRegisterMiniportDriver function I got NDIS_STATUS_BAD_CHARACTERISTICS as an error that means that something is related to the major number. But upto so far I am unable to solve th issue. Any one can help to solve the issue will be appreciated…
xxxxx@gmail.com wrote:
As, I am working for wifi development for AM335x on Wince7 with NDIS6.1 support.
I have defined the following macros in the sources files to use the support of NDIS6.1:-
CDEFINES=$(CDEFINES) -DNDIS_MINIPORT_DRIVER=1 -DNDIS61=1
CDEFINES=$(CDEFINES) -DNDIS61_MINIPORT=1
CDEFINES=$(CDEFINES) -DNDIS_LEGACY_MINIPORT=1
CDEFINES=$(CDEFINES) -DNDIS_SUPPORT_NDIS61=1
And in my driver entry I am initializing the NDIS_MINIPORT_DRIVER_CHARACTERISTICS structure and after that I am printing the value of NDIS_MINIPORT_MAJOR_VERSION and NDIS_MINIPORT_MINOR_VERSION. and i got the output as 6 and 1 that means that NDIS6.1 support is working fine. When I register my driver with NDIS by using NdisMRegisterMiniportDriver function I got NDIS_STATUS_BAD_CHARACTERISTICS as an error that means that something is related to the major number. But upto so far I am unable to solve th issue.
None of us have crystal balls. We can’t divine your problems without
seeing your source code. You are making some mistake in setting up the
structure. The error is more than just “related to the major number”.
The error specifically says that Header.Revision, Header.Size, and
MajorNdisVersion values do not agree.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
Hi Tim Roberts,
Greetings!!
Sorry, for the sharing the source code from the error is being generated. Please have a look on the part of below source:-
PHYTEC_HANDLE hMiniportDriverContext = NULL;
PHYTEC_HANDLE hNdisMiniportDriverHandle = NULL;
NDIS_MINIPORT_DRIVER_CHARACTERISTICS PHYMiniChar;
PHY_DEBUGMSG(TRUE,(TEXT(“+phytec_miniport_characteristics.\r\n”)));
PHY_RTLMSG(TRUE,(TEXT(“+phytec_miniport_characteristics.\r\n”)));
NdisZeroMemory(&PHYMiniChar, sizeof(PHYMiniChar));
PHYMiniChar.Header.Type = NDIS_OBJECT_TYPE_MINIPORT_DRIVER_CHARACTERISTICS;
PHYMiniChar.Header.Revision = NDIS_MINIPORT_DRIVER_CHARACTERISTICS_REVISION_2;
PHYMiniChar.Header.Size = NDIS_SIZEOF_MINIPORT_DRIVER_CHARACTERISTICS_REVISION_2;
PHYMiniChar.MajorNdisVersion = PHY_NDIS_MAJOR_VERSION_6;
PHYMiniChar.MinorNdisVersion = PHY_NDIS_MINOR_VERSION_1;
PHYMiniChar.MajorDriverVersion = PHY_DRIVER_MAJOR_VERSION_1;
PHYMiniChar.MinorDriverVersion = PHY_DRIVER_MINOR_VERSION_0;
PHYMiniChar.Flags = NDIS_WDM_DRIVER;
PHY_RTLMSG(TRUE,(TEXT(“The major version is %d \r\n”),PHY_NDIS_MAJOR_VERSION_6));
PHY_RTLMSG(TRUE,(TEXT(“The minor version is %d \r\n”),PHY_NDIS_MINOR_VERSION_1));
status = NdisMRegisterMiniportDriver(DriverObject,
RegistryPath,
(PPHYTEC_HANDLE)hMiniportDriverContext,
&PHYMiniChar,
&hNdisMiniportDriverHandle);
Hi Friends,
I have added one more debug statement to check the address of registry path, as shown below:-
PHY_RTLMSG(TRUE,(TEXT(“+NDIS DriverEntry: Driver Object & RegistryPath is (0x%X, 0x%X)\r\n”),DriverObject,RegistryPath));
and I the logs what I am getting as shown below for the above printf:-
8185 PID:400002 TID:9e0006 +NDIS Driver Entry Point…
8186 PID:400002 TID:9e0006 +NDIS DriverEntry: Driver Object & RegistryPath is (0x9E432C50, 0x0)
8187 PID:400002 TID:9e0006 +phytec_miniport_characteristics.
8188 PID:400002 TID:9e0006 The major version is 6
8188 PID:400002 TID:9e0006 The minor version is 1
I don’t knw that the registry address is correct is not. If, it is not correct then what is the way to correct it.
xxxxx@gmail.com wrote:
PHYMiniChar.Header.Type = NDIS_OBJECT_TYPE_MINIPORT_DRIVER_CHARACTERISTICS;
PHYMiniChar.Header.Revision = NDIS_MINIPORT_DRIVER_CHARACTERISTICS_REVISION_2;
PHYMiniChar.Header.Size = NDIS_SIZEOF_MINIPORT_DRIVER_CHARACTERISTICS_REVISION_2;
PHYMiniChar.MajorNdisVersion = PHY_NDIS_MAJOR_VERSION_6;
PHYMiniChar.MinorNdisVersion = PHY_NDIS_MINOR_VERSION_1;
PHYMiniChar.MajorDriverVersion = PHY_DRIVER_MAJOR_VERSION_1;
PHYMiniChar.MinorDriverVersion = PHY_DRIVER_MINOR_VERSION_0;
PHYMiniChar.Flags = NDIS_WDM_DRIVER;
What are PHY_NDIS_MAJOR_VERSION and PHY_NDIS_MINOR_VERSION? Are those
your own definitions? You should be using NDIS_MINIPORT_MAJOR_VERSION
and NDIS_MINIPORT_MINOR_VERSION. The include file will generate the
correct value based on your settings.
If that’s all you defined, then the problem seems pretty clear. The
documentation clearly states that 12 of the callback entry points are
required, and you are not supplying them. (SetOptionsHandler,
InitializeHandlerEx, HaltHandlerEx, etc.).
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
Hi Tim
,greetings
Please share the link of the document that you mentioned.
On 14-Oct-2015 10:41 pm, “Tim Roberts” wrote:
> xxxxx@gmail.com wrote:
> > PHYMiniChar.Header.Type =
> NDIS_OBJECT_TYPE_MINIPORT_DRIVER_CHARACTERISTICS;
> > PHYMiniChar.Header.Revision =
> NDIS_MINIPORT_DRIVER_CHARACTERISTICS_REVISION_2;
> > PHYMiniChar.Header.Size =
> NDIS_SIZEOF_MINIPORT_DRIVER_CHARACTERISTICS_REVISION_2;
> > PHYMiniChar.MajorNdisVersion = PHY_NDIS_MAJOR_VERSION_6;
> > PHYMiniChar.MinorNdisVersion = PHY_NDIS_MINOR_VERSION_1;
> > PHYMiniChar.MajorDriverVersion =
> PHY_DRIVER_MAJOR_VERSION_1;
> > PHYMiniChar.MinorDriverVersion =
> PHY_DRIVER_MINOR_VERSION_0;
> > PHYMiniChar.Flags =
> NDIS_WDM_DRIVER;
>
> What are PHY_NDIS_MAJOR_VERSION and PHY_NDIS_MINOR_VERSION? Are those
> your own definitions? You should be using NDIS_MINIPORT_MAJOR_VERSION
> and NDIS_MINIPORT_MINOR_VERSION. The include file will generate the
> correct value based on your settings.
>
> If that’s all you defined, then the problem seems pretty clear. The
> documentation clearly states that 12 of the callback entry points are
> required, and you are not supplying them. (SetOptionsHandler,
> InitializeHandlerEx, HaltHandlerEx, etc.).
>
> –
> Tim Roberts, xxxxx@probo.com
> Providenza & Boekelheide, Inc.
>
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
>
> OSR is HIRING!! See http://www.osr.com/careers
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
Partap Salathia wrote:
Please share the link of the document that you mentioned.
Really? I Googled for NDIS_MINIPORT_DRIVER_CHARACTERISTICS. The first
hit takes me to the MSDN page. That page says, among other things:
*InitializeHandlerEx*
Required. The entry point for the /MiniportInitializeEx/
https: function.
HaltHandlerEx
Required. The entry point for the /MiniportHaltEx/
https: function.
UnloadHandler
Required. The entry point for the /MiniportDriverUnload/
https: function.
PauseHandler
Required. The entry point for the /MiniportPause/
https: function.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.</https:></https:></https:></https:>
On Windows CE, yes, the registry path address may be NULL.
– pa
On 14-Oct-2015 15:30, xxxxx@gmail.com wrote:
Hi Friends,
I have added one more debug statement to check the address of registry path, as shown below:-
PHY_RTLMSG(TRUE,(TEXT(“+NDIS DriverEntry: Driver Object & RegistryPath is (0x%X, 0x%X)\r\n”),DriverObject,RegistryPath));
and I the logs what I am getting as shown below for the above printf:-
8185 PID:400002 TID:9e0006 +NDIS Driver Entry Point…
8186 PID:400002 TID:9e0006 +NDIS DriverEntry: Driver Object & RegistryPath is (0x9E432C50, 0x0)
8187 PID:400002 TID:9e0006 +phytec_miniport_characteristics.
8188 PID:400002 TID:9e0006 The major version is 6
8188 PID:400002 TID:9e0006 The minor version is 1
I don’t knw that the registry address is correct is not. If, it is not correct then what is the way to correct it.
Dear Developers,
Greetings!!!
No, the macros
PHY_NDIS_MAJOR_VERSION and PHY_NDIS_MINOR_VERSION are defined as
#define PHY_NDIS_MAJOR_VERSION_6 NDIS_MINIPORT_MAJOR_VERSION
#define PHY_NDIS_MINOR_VERSION_1 NDIS_MINIPORT_MINOR_VERSION
and in debug logs the value is 6 and 1.
As, suggested by Tim Robert to fill the structure with all the entries and I have done this with 12 MinportDriver funcitons. as shown below: -
//Filling Ndis Characteristics Structure
PHYMiniChar.Header.Type = NDIS_OBJECT_TYPE_MINIPORT_DRIVER_CHARACTERISTICS;
PHYMiniChar.Header.Revision = NDIS_MINIPORT_DRIVER_CHARACTERISTICS_REVISION_2;
PHYMiniChar.Header.Size = NDIS_SIZEOF_MINIPORT_DRIVER_CHARACTERISTICS_REVISION_2;
PHYMiniChar.MajorNdisVersion = PHY_NDIS_MAJOR_VERSION_6;
PHYMiniChar.MinorNdisVersion = PHY_NDIS_MINOR_VERSION_1;
PHYMiniChar.MajorDriverVersion = PHY_DRIVER_MAJOR_VERSION_1;
PHYMiniChar.MinorDriverVersion = PHY_DRIVER_MINOR_VERSION_0;
PHYMiniChar.Flags = NDIS_WDM_DRIVER;
PHYMiniChar.CheckForHangHandlerEx = phytec_CheckForHang;
PHYMiniChar.DevicePnPEventNotifyHandler = phytec_DevicepPnP;
PHYMiniChar.UnloadHandler = phytec_Unload;
PHYMiniChar.HaltHandlerEx = phytec_Halt;
PHYMiniChar.InitializeHandlerEx = phytec_Initialize;
PHYMiniChar.DirectOidRequestHandler = phytec_DirectOidRequest;
PHYMiniChar.PauseHandler = phytec_Pause;
PHYMiniChar.ResetHandlerEx = phytec_Reset;
PHYMiniChar.RestartHandler = phytec_Restart;
PHYMiniChar.SetOptionsHandler = phytec_SetOptions;
PHYMiniChar.ShutdownHandlerEx = phytec_ShutDown;
and after filling this I am registering my miniport driver with NDIS library as shown below : -
status = NdisMRegisterMiniportDriver(DriverObject,
RegistryPath,
(PPHYTEC_HANDLE)ghMiniportDriverContext,
&PHYMiniChar,
&ghNdisMiniportDriverHandle);
But still, the output is same for me as : -
8517 PID:400002 TID:9e0006 +NDIS Driver Entry Point…
8517 PID:400002 TID:9e0006 +NDIS DriverEntry: Driver Object & RegistryPath is (0x9E432CA0, 0x1)
8518 PID:400002 TID:9e0006 +phytec_miniport_characteristics.
8519 PID:400002 TID:9e0006 The major version is 6
8520 PID:400002 TID:9e0006 The minor version is 1
8521 PID:400002 TID:9e0006 ==>NdisMRegisterMiniportDriver: DriverObject 9E432CA0
8521 PID:400002 TID:9e0006 <==NdisMRegisterMiniportDriver: MiniBlock 00000000
8522 PID:400002 TID:9e0006 STATUS: Bad Characteristics
8523 PID:400002 TID:9e0006 -phytec_miniport_characteristics.
8524 PID:400002 TID:9e0006 -NDIS Driver Exit Point…
Hi Tim Robert,
The link what you have shared is related to Windows… As, I have mentioned that I am using Wince7
xxxxx@gmail.com wrote:
No, the macros
PHY_NDIS_MAJOR_VERSION and PHY_NDIS_MINOR_VERSION are defined as
#define PHY_NDIS_MAJOR_VERSION_6 NDIS_MINIPORT_MAJOR_VERSION
#define PHY_NDIS_MINOR_VERSION_1 NDIS_MINIPORT_MINOR_VERSION
and in debug logs the value is 6 and 1.
That’s a dangerous practice. If you should happen to migrate to NDIS
6.20, suddenly your PHY_NDIS_MINOR_VERSION_1 symbol will have the value
20. You should just use the NDIS_MINIPORT_xxxx symbols.
The documentation for Windows Compact 2013 says that it only supports
NDIS 6.0, not 6.1. Does it work if you change the minor version to 0?
https://msdn.microsoft.com/en-us/library/gg156227.aspx
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
Dear Developers,
Greetings!!!
Hi Tom,
Please have a look on the below document for ndis support : -
https://en.wikipedia.org/wiki/Network_Driver_Interface_Specification
Yes, I tried with both major 6 and minor 0 & 1. But no success.
I have a small doubt on the macros that I am using in the Sources file. Please have a look on the first message of this thread…
Dear Developers,
Greetings!!!
Hi, Again I would like to intimate that when I am printing the driverobject & registrypath I am getting the below addresses: -
+NDIS DriverEntry: Driver Object & RegistryPath is (0x9E432CC8, 0x1)
xxxxx@gmail.com wrote:
Hi Tom,
Did you possibly mean “Tim”?
Please have a look on the below document for ndis support : -
https://en.wikipedia.org/wiki/Network_Driver_Interface_Specification
If you are willing to give more weight to a Wikipedia article than to
the MSDN reference documentation, then your engineering judgment may be
cloudy.
Yes, I tried with both major 6 and minor 0 & 1. But no success.
How did you do that, exactly? Have you debug-stepped into the function
to see what it complains about?
I have a small doubt on the macros that I am using in the Sources file. Please have a look on the first message of this thread…
For those of us on the mailing list, it’s not always trivial to go back
to the first message on a thread.
CDEFINES=$(CDEFINES) -DNDIS_MINIPORT_DRIVER=1 -DNDIS61=1
CDEFINES=$(CDEFINES) -DNDIS61_MINIPORT=1
CDEFINES=$(CDEFINES) -DNDIS_LEGACY_MINIPORT=1
CDEFINES=$(CDEFINES) -DNDIS_SUPPORT_NDIS61=1
You shouldn’t have to specify NDIS_LEGACY_MINIPORT or
NDIS_SUPPORT_NDIS61. Those are derived from the other values.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
Dear Developers,
Greetings!!!
Hi Tim,
Sorry, nby mistake I typed Tom…
-
Okay, Wiki is just a community and we should not trust on the community information. I will keep this thing in my mind.
-
About macros, I have removed the macros that you suggested in the above message, but still the output is same…
Hi There,
while debugging, when i put mouse hover on the following structure members : -
I got the below tooltip with values are as: -\
PHYMiniChar.Header.Type = 0x8a ‘S’
PHYMiniChar.Header.Revision = 0x02 ‘?’
PHYMiniChar.Header.Size = 0x0050
PHYMiniChar.MajorNdisVersion = 0x06 ‘?’
PHYMiniChar.MinorNdisVersion = 0x00 // It seems ok and that;s why there is not question mark
PHYMiniChar.MajorDriverVersion = 0x03 ‘?’
PHYMiniChar.MinorDriverVersion = 0x01 ‘?’
The question mark is there, it means that something is definitely wrong or the values are not assigned correctly…
???
Now my instructions to compiler are as -
TARGETNAME=phywl18xx
TARGETTYPE=DYNLINK
RELEASETYPE=LOCAL
DLLENTRY=DriverEntry
FILE_VIEW_ROOT_FOLDER= \
ReadMe.txt \
phywl18xx.def \
Sources \
FILE_VIEW_RESOURCE_FOLDER= \
FILE_VIEW_INCLUDES_FOLDER= \
…..\Header\phytec_ndis.h \
…..\Header\phytec_miniport.h \
…..\Header\phytec_precompiled.h \
…..\Header\phytec_common.h \
SOURCES= \
phywl18xx_main.cpp \
TARGETLIBS= \
$(SG_OUTPUT_ROOT)\sdk\lib$(_CPUINDPATH)\coredll.lib \
$(_PUBLICROOT)\COMMON\PHY_WL18xx\Source\Miniport\obj$(_TGTCPU)$(WINCEDEBUG)\phytec_miniport.lib \
$(_PUBLICROOT)\COMMON\exp\LIB$(_TGTCPU)$(WINCEDEBUG)\ndis.lib \
$(_PUBLICROOT)\COMMON\exp\LIB$(_TGTCPU)$(WINCEDEBUG)\ndis.lib \
INCLUDES= \
$(_WINCEROOT)\PUBLIC\COMMON\SDK\INC \
$(_WINCEROOT)\PUBLIC\COMMON\DDK\INC \
$(_WINCEROOT)\PUBLIC\COMMON\OAK\INC \
CDEFINES=$(CDEFINES) -DNDIS_SUPPORT_NDIS60=1
CDEFINES=$(CDEFINES) -DNDIS60_MINIPORT=1 -DNDIS_MINIPORT_DRIVER=1 -DWIN_CE -DUNDER_CE
> 1. Okay, Wiki is just a community and we should not trust on the community information.
Community information is always secondary to official specs from the vendor.
–
Maxim S. Shatskih
Microsoft MVP on File System And Storage
xxxxx@storagecraft.com
http://www.storagecraft.com
Dear Developers,
Greetings!!!
Hi, I have added the minimal entries for ndis chracteristics structure and compiled for ndis6.0 but still I am having NDIS_STATUS_BAD_CHARACTERISTICS status.
It’s totally irritating me that what I am missing or not added correctly.
Are you initializing the entire structure? How about dumping the structure contents and posting them.
Dave Cattley
Sent from my Windows Phone
-----Original Message-----
From: “xxxxx@gmail.com”
Sent: 10/20/2015 3:18 AM
To: “Windows System Software Devs Interest List”
Subject: RE:[ntdev] NDIS6.1 miniport driver development shows bad characteristics error??
Dear Developers,
Greetings!!!
Hi, I have added the minimal entries for ndis chracteristics structure and compiled for ndis6.0 but still I am having NDIS_STATUS_BAD_CHARACTERISTICS status.
It’s totally irritating me that what I am missing or not added correctly.
—
NTDEV is sponsored by OSR
Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
OSR is HIRING!! See http://www.osr.com/careers
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
xxxxx@gmail.com wrote:
Hi, I have added the minimal entries for ndis chracteristics structure and compiled for ndis6.0 but still I am having NDIS_STATUS_BAD_CHARACTERISTICS status.
It’s totally irritating me that what I am missing or not added correctly.
You may have to single-step through the code and figure out what it is
rejecting. If there’s just something in the structure it doesn’t like,
it’s likely to fail very early in the process during parameter validation.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.