nanoFramework.System.Device.UsbStream 1.0.43

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package nanoFramework.System.Device.UsbStream --version 1.0.43
                    
NuGet\Install-Package nanoFramework.System.Device.UsbStream -Version 1.0.43
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="nanoFramework.System.Device.UsbStream" Version="1.0.43" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="nanoFramework.System.Device.UsbStream" Version="1.0.43" />
                    
Directory.Packages.props
<PackageReference Include="nanoFramework.System.Device.UsbStream" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add nanoFramework.System.Device.UsbStream --version 1.0.43
                    
#r "nuget: nanoFramework.System.Device.UsbStream, 1.0.43"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package nanoFramework.System.Device.UsbStream@1.0.43
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=nanoFramework.System.Device.UsbStream&version=1.0.43
                    
Install as a Cake Addin
#tool nuget:?package=nanoFramework.System.Device.UsbStream&version=1.0.43
                    
Install as a Cake Tool

Quality Gate Status Reliability Rating NuGet #yourfirstpr Discord

nanoFramework logo


Welcome to the .NET nanoFramework USB Client repository

Build status

Component Build Status NuGet Package
System.Device.UsbStream Build Status NuGet

Usage

USB Stream

UsbStream class provides a seamless interface to a stream that can read from and write to an USB Device that's enumerated as a WinUSB device. This allows shipping your .NET nanoFramework device as an USB device without the need for any INF file or specific driver instalation.

Creating an UsbStream

Creating an UsbStream requries 2 parameters: a Guid that will be used as the Device Interface ID and a string which will be used as the device description for the USB device.

private static Guid deviceInterfaceId = new Guid("9e48651c-fa68-4b39-8731-1ee84659aac5");
private static string deviceDescription = "nanoDevice";

// create USB Stream
var usbStream = UsbClient.CreateUsbStream(deviceInterfaceId, deviceDescription);
Writing to the UsbStream

To write to the UsbStream just call the Write() method just like any other .NET stream. Like this:

// buffer with dummy data 
var bufer = new byte[] { 1, 2, 3 };

usbStream.Write(bufer, 0, bufer.Length);

Feedback and documentation

For documentation, providing feedback, issues and finding out how to contribute please refer to the Home repo.

Join our Discord community here.

Credits

The list of contributors to this project can be found at CONTRIBUTORS.

License

The nanoFramework Class Libraries are licensed under the MIT license.

Code of Conduct

This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behaviour in our community. For more information see the .NET Foundation Code of Conduct.

.NET Foundation

This project is supported by the .NET Foundation.

Product Compatible and additional computed target framework versions.
.NET Framework net is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on nanoFramework.System.Device.UsbStream:

Repository Stars
nanoframework/Samples
🍬 Code samples from the nanoFramework team used in testing, proof of concepts and other explorational endeavours
Version Downloads Last Updated
1.0.84 247 4/24/2025
1.0.83 204 4/2/2025
1.0.82 217 3/10/2025
1.0.81 231 3/3/2025
1.0.78 159 2/25/2025
1.0.77 118 2/25/2025
1.0.75 153 2/4/2025
1.0.74 107 2/4/2025
1.0.73 126 1/31/2025
1.0.68 173 1/7/2025
1.0.62 376 5/31/2024
1.0.59 501 11/9/2023
1.0.56 158 11/9/2023
1.0.46 511 12/28/2022
1.0.43 366 12/27/2022
1.0.40 545 11/10/2022
1.0.38 402 11/10/2022
1.0.36 414 11/8/2022
1.0.34 406 11/7/2022
1.0.32 463 10/27/2022
1.0.30 500 10/26/2022
1.0.28 460 10/25/2022
1.0.26 496 10/24/2022
1.0.24 488 10/23/2022
1.0.22 462 10/14/2022
1.0.20 492 10/14/2022
1.0.18 491 10/12/2022
1.0.16 483 10/11/2022
1.0.14 493 10/11/2022
1.0.12 483 10/11/2022
1.0.7 482 10/4/2022
1.0.5 478 10/4/2022