NDIS Protocol Driver on Windows IoT Core - driver

I'm trying to write a Cisco CDP protocol driver for Windows IoT core running on Raspberry Pi. This will allow me to register the installed location of the device with an upstream server.
To do this, I attempted to use the sample NDISPROT example as part of the Windows DDK Samples. This failed because the project is seemingly inherently incompatible with Windows IoT (specifically ARM)
What I need to do is write a protocol handler that operates on raw Ethernet packets as CDP is built on 802.2 LLC which is very different than 802.3. To do this, on Windows, I would write an NDIS 6.x protocol driver, cache the latest CDP frame from each source, then use DeviceIOControl() to communicate with the device to download the latest CDP packets or upload formatted CDP packets.
Is there a boilerplate driver I could use to do the same on Windows IOT Core?

Unfortunately there's not a way to install NDIS protocol drivers onto Windows IoT Core right now. (The OS doesn't understand the INF dialect used by netcfg.)
This feature is on our backlog. You can help raise its priority by sending feedback directly to Microsoft (either via the feedback hub, forums, or by emailing the IoT team directly).

Related

Serial communication between stm32f103 and computer using USB to ttl pl2303

I would like to know is if is possible to send data from my stm32f103 board to my laptop using usb-ttl pl2303. I have tried but even after downloading the drivers the com port is not recognized by com terminal applications.
i think i found the solution, for others who might be in need, u have to backdate or roll back the driver .you do that by downloading old driver packages .

Working with PiCAN + raspberry pi 3 running windows IoT Core

I want to connect the PiCAN with my raspberry pi3 running windows IoT Core. I think I need a universal driver for the mcp2515 to work with the windows in Pi. I already tried using the instructions given in https://developer.microsoft.com/en-us/windows/iot/docs/driverdeployment to deploy the driver given in https://github.com/AustinWise/Mcp2515Can . But I got stuck in the instructions. I hope someone has already done this and maybe can help me with it? Did anyone successfully use this CAN board with Raspberry Pi (windows iot core)?
Thank you :)
Is a driver required in the first place?
Short answer is No.
Although a device driver is preferred, such work is not officially or community done yet.
The benefit you get from developing a device driver might include:
Native OS support for PiCAN board.
Create your create the custom IoT image, and deploy it to Microsoft store.
Possible performance improvements
others…
However, in order to develop an device driver, you need to follow the WDK framework. If you are comfortable with picking up new stuff, go ahead and try it out. You might need to refer to the linux source driver code for WDK driver developing.
If your purpose is to get the board working, you don’t need to get yourself into all these troubles.
In fact, you only need to get the SPI controller and GPIO controller, open the SPI device and initialize GPIO interrupt pin like Mcp2515Can does.
But, even after enabling the SPI, I couldn't receive anything on the
Raspberry Pi.
First, you can use Raspbian and turn on the CAN driver support to verify that you got all the wirings right. Here is the user guide you can reference.
If you can rule out the possibility of hardware failures, step into your C# code to troubleshoot the software.
Good luck.

How to use librte_pmd_pcap of dpdk in our own dpdk app for packet capturing?

I am new to DPDK, I'm trying to write my own app, which would capture packets at wire rate. Can I use the default kernel space libpcap long with dpdk ring and lcore. Or can I use the librte_pmd_pcap which is part of dpdk package.
Librte_pmd_pcap internally uses kernel space libpcap.
And I don't know how to use librte_pmd_pcap in my own dpdk app.
Can someone help me in using the librte_pmd_pcap in our own dpdk app to capture tcp packets.
*I have tested the testpmd app that comes with the dpdk package, testpmd is working fine. I need your help in writing my own dpdk app. Thanks in advance.
I was able to include the rte_eth_pcap.c to the application code and access the api. And this allowed me to use the -vdev EAL option to my app.
If by "the librte_pmd_pcap" you're referring to this source file, it uses libpcap, which is a user-mode library; it's not part of the kernel. It uses kernel-mode mechanisms on the operating systems (plural) that it supports; it uses BPF on *BSD, OS X, and Solaris 11; it uses PF_PACKET sockets on Linux (unless you're on an ancient Linux, in which case it uses SOCK_PACKET sockets); etc..
You can use libpcap directly, which will use the same kernel mechanism that any other code using libpcap does, including the code I linked to.

Does exist a standard protocol for network printers?

Does exist a standard protocol for network printers? Some network printers require the installation of drivers to be used... Is there some network printer that can be used without installing additional drivers? After all, when we connect the network cable from the laptop to the router, we do not need to install drivers (any operating system already includes the driver).
Are there any open source projects related to protocols for communication with a network printer?
The standard protocols are the LPD or IPP protocols.
If you need to talk to a printer over the network, you can either attach it to a device that translates packets into USB/LPT commands, or attach it to a linux/windows PC and print through an LPD service running on that OS.
IPP Everywhere tries to be what you are asking for.
A PWG standard that allows personal computers and mobile devices to find and print to networked and USB printers without using vendor-specific software.

Writing Device Drivers for a Microcontroller(any)

I am very enthusiastic in writing device drivers for a microcontroller(like PIC, Atmel etc).
Since I am a newbie in this controller-coding-area I just want to know whether writing device drivers for controller is same as we write for linux( or any other OS) ?
Also can anyone suggest some online device driver building tutorial for the same ..?
Thanks,
If you are thinking about developing the device drivers to interface your device with a host computer (probably using USB), then most of the microcontrollers nowadays implement default classes that rely on native drivers.
A concrete example:
If you use a PIC18F4555, you can use the regular HID (human interface device) windows driver to communicate with your microcontroller (given you implemented it correctly). No need to develop any driver.
Writing a device driver for an MCU is a pretty far cry from writing it for a OS. Most MCUs won't have an OS running on them at all. You'll generally end up writing some low level Interrupt Service Routines (ISRs) and filling up buffers, that your application software will end up emptying. You don't have to fit into any device driver paradigm that an O/S has defined. You basically have to read the datasheet for the device you are wanting to interface with and read and write to its memory over whatever interface it might use (e.g. SPI, I2C, UART, etc.). Ultimately the device driver ought to provide intuitive function calls to the application software.
If you are using AVR MCU like atmega then you can use vusb (https://www.obdev.at/products/vusb/index.html) for those MCU that don't have any HID and handles the interrupts by connecting D+ and D- pins of the USB to digital I/O ports of the MCU.
The atmegaU2 packages have their own USB communication ports and HID.

Resources