ISSUE IN SENDING DATA BUFFER USING DEVICEIOCONTROL IN WIN10 IOT

Hi All,

I am working on NDIS driver for Win10 IOT, where i want to send data to driver using NDIS query OID.My APP is able to communicate with WIN10 IOT Driver by making query request(NdisRequestQueryStatistics) and able to get data from driver by making the following call to driver from APP

–DeviceIoControl(hDevice,IOCTL_NDIS_QUERY_GLOBAL_STATS,&oid,sizeof(oid),buf,sizeof(buf),&written,NULL)

But when i send some data in buf ,that is not reflected in driver, content of InformationBuffer is set to zero by NDIS.

Please let me know the reason and if further information is needed !??

If the data bandwidth is low, you could just make a WMI interface to the driver. You can also make custom OIDS. The IOCTL code determines if it’s read or write, and small read requests typically are based on the OS copying the read data, so the buffer you pass is never directly accessible to the driver.

Jan

-----Original Message-----
From: xxxxx@lists.osr.com On Behalf Of xxxxx@gmail.com
Sent: Thursday, August 16, 2018 10:06 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] ISSUE IN SENDING DATA BUFFER USING DEVICEIOCONTROL IN WIN10 IOT

Hi All,

I am working on NDIS driver for Win10 IOT, where i want to send data to driver using NDIS query OID.My APP is able to communicate with WIN10 IOT Driver by making query request(NdisRequestQueryStatistics) and able to get data from driver by making the following call to driver from APP

–DeviceIoControl(hDevice,IOCTL_NDIS_QUERY_GLOBAL_STATS,&oid,sizeof(oid),buf,sizeof(buf),&written,NULL)

But when i send some data in buf ,that is not reflected in driver, content of InformationBuffer is set to zero by NDIS.

Please let me know the reason and if further information is needed !??


NTDEV is sponsored by OSR

Visit the list online at: http:

MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
Details at http:

To unsubscribe, visit the List Server section of OSR Online at http:</http:></http:></http:>

hi Jan Bottorff
thanks for the quick reply

Here are my findings:
#define IOCTL_NDIS_QUERY_GLOBAL_STATS CTL_CODE(FILE_DEVICE_PHYSICAL_NETCARD,0, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)

-Checked by changing different values for METHOD_OUT_DIRECT and FILE_ANY_ACCESS,
but with other values OID request itself not sent to Driver

  • Same DeviceIoControl request with same parameters is working fine on WIN10 OS ,buf is treated as both input and output buffer and able to read and write from buf. But on Win10 IOT platform, this buffer is being reset to zero and send to the NDIS driver.

Unfortunately, there is no documented NDIS ioctl to SEND an OID to driver. As its name suggests, QUERY is a query, not set. Its method is OUT_DIRECT. Using the buffer mapped in this mode for passing data in the opposite direction is “undefined behavior”.

– pa

There is no WMI on IoT

Bent from my phone


From: 30561717000n behalf of
Sent: Friday, August 17, 2018 12:36 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] ISSUE IN SENDING DATA BUFFER USING DEVICEIOCONTROL IN WIN10 IOT

If the data bandwidth is low, you could just make a WMI interface to the driver. You can also make custom OIDS. The IOCTL code determines if it’s read or write, and small read requests typically are based on the OS copying the read data, so the buffer you pass is never directly accessible to the driver.

Jan

-----Original Message-----
From: xxxxx@lists.osr.com On Behalf Of xxxxx@gmail.com
Sent: Thursday, August 16, 2018 10:06 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] ISSUE IN SENDING DATA BUFFER USING DEVICEIOCONTROL IN WIN10 IOT

Hi All,

I am working on NDIS driver for Win10 IOT, where i want to send data to driver using NDIS query OID.My APP is able to communicate with WIN10 IOT Driver by making query request(NdisRequestQueryStatistics) and able to get data from driver by making the following call to driver from APP

–DeviceIoControl(hDevice,IOCTL_NDIS_QUERY_GLOBAL_STATS,&oid,sizeof(oid),buf,sizeof(buf),&written,NULL)

But when i send some data in buf ,that is not reflected in driver, content of InformationBuffer is set to zero by NDIS.

Please let me know the reason and if further information is needed !??


NTDEV is sponsored by OSR

Visit the list online at: https:

MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
Details at https:

To unsubscribe, visit the List Server section of OSR Online at https:


NTDEV is sponsored by OSR

Visit the list online at: https:

MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
Details at https:

To unsubscribe, visit the List Server section of OSR Online at https:</https:></https:></https:></https:></https:></https:>

Hi All,

I am facing similar issues on Win10 Iot platform. We use custom OIDS for
configuring the 80211 driver using the DeviceIoControl API. Currently we
are not able to pass the buffer with data using Query instructions. Our
driver is native Ndis 80211 based which runs in backward compatibiltiy mode
on Win10 IOT.

Thanks

On Sat, 18 Aug 2018 at 1:52 AM, xxxxx@microsoft.com <
xxxxx@lists.osr.com> wrote:

There is no WMI on IoT

Bent from my phone


*From:* 30561717000n behalf of
*Sent:* Friday, August 17, 2018 12:36 AM
*To:* Windows System Software Devs Interest List
*Subject:* RE: [ntdev] ISSUE IN SENDING DATA BUFFER USING DEVICEIOCONTROL
IN WIN10 IOT

If the data bandwidth is low, you could just make a WMI interface to the
driver. You can also make custom OIDS. The IOCTL code determines if it’s
read or write, and small read requests typically are based on the OS
copying the read data, so the buffer you pass is never directly accessible
to the driver.

Jan

-----Original Message-----
From: xxxxx@lists.osr.com <
xxxxx@lists.osr.com> On Behalf Of xxxxx@gmail.com
Sent: Thursday, August 16, 2018 10:06 PM
To: Windows System Software Devs Interest List
> Subject: [ntdev] ISSUE IN SENDING DATA BUFFER USING DEVICEIOCONTROL IN
> WIN10 IOT
>
> Hi All,
>
> I am working on NDIS driver for Win10 IOT, where i want to send data to
> driver using NDIS query OID.My APP is able to communicate with WIN10 IOT
> Driver by making query request(NdisRequestQueryStatistics) and able to get
> data from driver by making the following call to driver from APP
>
> --DeviceIoControl(hDevice,IOCTL_NDIS_QUERY_GLOBAL_STATS,&oid,sizeof(oid),buf,sizeof(buf),&written,NULL)
>
>
> But when i send some data in buf ,that is not reflected in driver, content
> of InformationBuffer is set to zero by NDIS.
>
> Please let me know the reason and if further information is needed !??
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list online at: <
> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osronline.com%2Fshowlists.cfm%3Flist%3Dntdev&amp;data=02|01|Doron.Holan%40microsoft.com|0a2bd05904c04ad3750808d6041413bc|72f988bf86f141af91ab2d7cd011db47|1|0|636700881624956997&amp;sdata=KFCrVmk6iTGQO1jRkpQ4uuC3iCFYO7bXWRP30NU1AMQ%3D&amp;reserved=0&gt;
>
>
> MONTHLY seminars on crash dump analysis, WDF, Windows internals and
> software drivers!
> Details at <
> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osr.com%2Fseminars&amp;data=02|01|Doron.Holan%40microsoft.com|0a2bd05904c04ad3750808d6041413bc|72f988bf86f141af91ab2d7cd011db47|1|0|636700881624956997&amp;sdata=vLICOOLIymhUPJawjt6JwFn0o%2Fx8qUkVi2EFwCbyUf0%3D&amp;reserved=0&gt;
>
>
> To unsubscribe, visit the List Server section of OSR Online at <
> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osronline.com%2Fpage.cfm%3Fname%3DListServer&amp;data=02|01|Doron.Holan%40microsoft.com|0a2bd05904c04ad3750808d6041413bc|72f988bf86f141af91ab2d7cd011db47|1|0|636700881624956997&amp;sdata=i6DuFxcet47y0TghMHHP5ReE0iG4vyg%2Fkeg2RDDOngk%3D&amp;reserved=0&gt;
>
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list online at: <
> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osronline.com%2Fshowlists.cfm%3Flist%3Dntdev&amp;data=02|01|Doron.Holan%40microsoft.com|0a2bd05904c04ad3750808d6041413bc|72f988bf86f141af91ab2d7cd011db47|1|0|636700881624956997&amp;sdata=KFCrVmk6iTGQO1jRkpQ4uuC3iCFYO7bXWRP30NU1AMQ%3D&amp;reserved=0&gt;
>
>
> MONTHLY seminars on crash dump analysis, WDF, Windows internals and
> software drivers!
> Details at <
> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osr.com%2Fseminars&amp;data=02|01|Doron.Holan%40microsoft.com|0a2bd05904c04ad3750808d6041413bc|72f988bf86f141af91ab2d7cd011db47|1|0|636700881624956997&amp;sdata=vLICOOLIymhUPJawjt6JwFn0o%2Fx8qUkVi2EFwCbyUf0%3D&amp;reserved=0&gt;
>
>
> To unsubscribe, visit the List Server section of OSR Online at <
> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osronline.com%2Fpage.cfm%3Fname%3DListServer&amp;data=02|01|Doron.Holan%40microsoft.com|0a2bd05904c04ad3750808d6041413bc|72f988bf86f141af91ab2d7cd011db47|1|0|636700881624956997&amp;sdata=i6DuFxcet47y0TghMHHP5ReE0iG4vyg%2Fkeg2RDDOngk%3D&amp;reserved=0&gt;
>
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list online at: <
> http://www.osronline.com/showlists.cfm?list=ntdev&gt;
>
> MONTHLY seminars on crash dump analysis, WDF, Windows internals and
> software drivers!
> Details at http:
>
> To unsubscribe, visit the List Server section of OSR Online at <
> http://www.osronline.com/page.cfm?name=ListServer&gt;
></http:>

Hmm. If no WMI, then what? Back to ndisuio ?

– pa

Yes Pavel. But it works fine on Windows 10 x86/x64 OS. Currently I am
testing it on Win10 IOT arm based platform. Basic WiFi functionality we
could evaluate and trying to control proprietary extentions using custom
OIDs.

On Sat, 18 Aug 2018 at 7:50 PM, xxxxx@fastmail.fm
wrote:

> Hmm. If no WMI, then what? Back to ndisuio ?
>
> – pa
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list online at: <
> http://www.osronline.com/showlists.cfm?list=ntdev&gt;
>
> MONTHLY seminars on crash dump analysis, WDF, Windows internals and
> software drivers!
> Details at http:
>
> To unsubscribe, visit the List Server section of OSR Online at <
> http://www.osronline.com/page.cfm?name=ListServer&gt;
></http:>