32feet.NET Documentation
repository·main·Indexed 21 days ago
https://github.com/inthehand/32feetA .NET library providing access to Personal Area Networking (PAN) technologies, including Bluetooth Classic (InTheHand.Net.Bluetooth), Bluetooth Low Energy (InTheHand.BluetoothLE), NFC (InTheHand.Nfc), IrDA (InTheHand.Net.IrDA), and Obex (InTheHand.Net.Obex). It supports desktop, mobile, and embedded platforms across Windows, Android, iOS, and macOS, with specialized permission handling for .NET MAUI 7.0 and Xamarin.Forms.
What's inside 32feet.NET
- InTheHand.BluetoothLE is a Bluetooth Low Energy (BLE) API for .NET designed to support GATT (Generic Attribute Profile) Bluetooth connections. The library uses a provider-based architecture to support multiple platforms. To ensure the correct implementation is deployed, you should use an explicit target platform when configuring your project.
Overview of 32feet.NET capabilities
main32feet.NET is an open-source library designed to provide access to Personal Area Networking (PAN) technologies from .NET code. It supports desktop, mobile, and embedded systems.
The library is modular and consists of several specialized packages for different protocols and platforms:
- Bluetooth Classic: Via
InTheHand.Net.Bluetooth - Bluetooth LE (Low Energy): Via
InTheHand.BluetoothLE - Bluetooth Permissions: For .NET MAUI 7.0 and Xamarin.Forms via
InTheHand.Bluetooth.Permissions - IrDA (Infrared): Via
InTheHand.Net.IrDA - Object Exchange (Obex): Via
InTheHand.Net.Obex - NFC: Via
InTheHand.Nfc - macOS Bindings:
InTheHand.IOBluetoothandInTheHand.IOBluetoothUIfor Xamarin Mac.
- Bluetooth Classic: Via
Overview of InTheHand.Net.IrDA
mainInTheHand.Net.IrDA provides client and server IrDA (Infrared Data Association) connectivity for Windows applications. The library uses an object model based on Microsoft's IrDA implementation for Windows CE / .NET Compact Framework. If you are familiar with the standard .NETTcpClientandTcpListenerclasses, the API patterns in this library will be very similar.Overview of 32feet.NET Bluetooth Classic API
main32feet.NET provides a Bluetooth Classic API for .NET, specifically designed for Personal Area Networking. It usesClientandListenerclasses to facilitate RFCOMM Bluetooth connections. The library is cross-platform; for genericnet6.0andnet7.0targets, the DLL includes both Win32 and Linux providers to maximize compatibility. To ensure the correct implementation is deployed, it is recommended to use an explicit target platform.Available 32feet.NET API namespaces
main32feet.NET provides several specialized libraries for Personal Area Networking (PAN) in .NET. Depending on your hardware and protocol requirements, you should use one of the following namespaces:
InTheHand.BluetoothLE: For Bluetooth Low Energy (BLE) communication.InTheHand.Bluetooth.Permissions: For managing Bluetooth permissions within .NET MAUI applications.InTheHand.Net.Bluetooth: For Bluetooth Classic communication.InTheHand.Net.IrDA: For Infrared Data Association (IrDA) communication.InTheHand.Net.Obex: For Object Exchange (OBEX) protocol support.
Platform support and target selection for InTheHand.BluetoothLE
mainThe library provides multiple providers to support various platforms.
- Generic Targets: For
net6.0andnet7.0targets, the DLL includes Linux and WebAssembly providers to ensure the widest compatibility. - Explicit Targeting: For optimal results and to ensure the correct implementation is deployed, it is recommended to use an explicit target platform in your project configuration.
- Generic Targets: For
Access 32feet.NET documentation and tutorials
mainFor implementation guidance and detailed technical specifications, use the following resources:
- User Guide & Tutorials: The Wiki contains general information on library features, choosing the correct Bluetooth connection type, and feature-specific usage instructions.
- API Reference: Detailed API documentation is available at https://inthehand.github.io/.
Use InTheHand.Nfc to read NFC tags
mainInTheHand.Nfc is a cross-platform NFC tag reader for .NET 8.0+ supporting Android, iOS, and Mac Catalyst. The API follows the WebNFC model and is currently limited to reading NDEF messages.
To use the library:
- Instantiate an
NdefReader. - Subscribe to the
Readingevent to handle incoming NDEF messages. - Call
ScanAsync(CancellationToken)to start the scanning session.
When a tag is read, the
NdefReadingEventArgsprovides anNdefMessagecontaining one or moreNdefRecordobjects. You can inspect theRecordType(e.g.,NdefRecordType.Mime) and access the payload via theDataproperty.var reader = new NdefReader(); reader.Reading += Reader_Reading; // Start scanning await reader.ScanAsync(cancellationToken);- Instantiate an
Install 32feet.NET packages via NuGet
main32feet.NET is distributed via NuGet. Choose the package that matches your required protocol and platform:
Feature NuGet Package Bluetooth Classic (v4.x) InTheHand.Net.BluetoothBluetooth Low Energy (v4.x) InTheHand.BluetoothLE.NET MAUI / Xamarin.Forms Permissions InTheHand.Bluetooth.PermissionsIrDA (v4.x) InTheHand.Net.IrDAObject Exchange (Obex) (v4.x) InTheHand.Net.ObexNFC InTheHand.NfcXamarin Mac (IOBluetooth) InTheHand.IOBluetoothXamarin Mac (IOBluetoothUI) InTheHand.IOBluetoothUILegacy (v3.x) 32feet.NETCheck and request Bluetooth permissions in .NET MAUI 7.0 or Xamarin.Forms
mainUse the
InTheHand.Bluetooth.Permissionslibrary to manage Bluetooth permissions in .NET MAUI 7.0 and Xamarin.Forms applications. This library provides a permission instance that integrates with the standardPermissionsAPI.Note: If you are using .NET MAUI 8.0 or later, use the built-in MAUI permission equivalents instead, as they are designed to match this library's behavior.
// Check the current permission status PermissionStatus status = await Permissions.CheckStatusAsync<InTheHand.Bluetooth.Permissions.Bluetooth>(); // Request the permission from the user PermissionStatus status = await Permissions.RequestAsync<InTheHand.Bluetooth.Permissions.Bluetooth>();Supported Platforms for InTheHand.Net.IrDA
mainAlthough the library is released as a .NET Standard DLL, it is only compatible with Windows operating systems.
Supported versions include:
- Windows XP
- Windows Vista
- Windows 7
- Windows 8
- Windows 10
- Windows 11
Requirement: You must have a compatible IrDA dongle and a working driver installed on the Windows machine to use this library.
Overview of 32feet.NET
main32feet.NET is a .NET networking API designed for devices and desktop computers. It provides support for several networking stacks and protocols, including:
- Bluetooth Stacks: Microsoft, Broadcom/Widcomm, BlueSoleil, and StoneStreetOne Bluetopia.
- IrDA: Microsoft Windows supported Infrared Data Association devices.
- OBEX: Object Exchange services for both Bluetooth and IrDA mediums.
The library's object model is designed to maintain consistency across Bluetooth, IrDA, and traditional TCP/IP networking, making it easier to work with different communication mediums using a unified approach.