32feet.NET Documentation

repository·main·Indexed 21 days ago

https://github.com/inthehand/32feet

A .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.

Tokens
6.9K
Snippets
5
Records
52
Agent score
76%

What's inside 32feet.NET

  1. Overview of InTheHand.BluetoothLE

    main
    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.
  2. Overview of 32feet.NET capabilities

    main

    32feet.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.IOBluetooth and InTheHand.IOBluetoothUI for Xamarin Mac.
  3. Overview of InTheHand.Net.IrDA

    main
    InTheHand.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 .NET TcpClient and TcpListener classes, the API patterns in this library will be very similar.
  4. Overview of 32feet.NET Bluetooth Classic API

    main
    32feet.NET provides a Bluetooth Classic API for .NET, specifically designed for Personal Area Networking. It uses Client and Listener classes to facilitate RFCOMM Bluetooth connections. The library is cross-platform; for generic net6.0 and net7.0 targets, 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.
  5. Available 32feet.NET API namespaces

    main

    32feet.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.
  6. Platform support and target selection for InTheHand.BluetoothLE

    main

    The library provides multiple providers to support various platforms.

    • Generic Targets: For net6.0 and net7.0 targets, 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.
  7. Access 32feet.NET documentation and tutorials

    main

    For 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/.
  8. Use InTheHand.Nfc to read NFC tags

    main

    InTheHand.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:

    1. Instantiate an NdefReader.
    2. Subscribe to the Reading event to handle incoming NDEF messages.
    3. Call ScanAsync(CancellationToken) to start the scanning session.

    When a tag is read, the NdefReadingEventArgs provides an NdefMessage containing one or more NdefRecord objects. You can inspect the RecordType (e.g., NdefRecordType.Mime) and access the payload via the Data property.

    var reader = new NdefReader();
    reader.Reading += Reader_Reading;
    
    // Start scanning
    await reader.ScanAsync(cancellationToken);
  9. Install 32feet.NET packages via NuGet

    main

    32feet.NET is distributed via NuGet. Choose the package that matches your required protocol and platform:

    FeatureNuGet Package
    Bluetooth Classic (v4.x)InTheHand.Net.Bluetooth
    Bluetooth Low Energy (v4.x)InTheHand.BluetoothLE
    .NET MAUI / Xamarin.Forms PermissionsInTheHand.Bluetooth.Permissions
    IrDA (v4.x)InTheHand.Net.IrDA
    Object Exchange (Obex) (v4.x)InTheHand.Net.Obex
    NFCInTheHand.Nfc
    Xamarin Mac (IOBluetooth)InTheHand.IOBluetooth
    Xamarin Mac (IOBluetoothUI)InTheHand.IOBluetoothUI
    Legacy (v3.x)32feet.NET
  10. Check and request Bluetooth permissions in .NET MAUI 7.0 or Xamarin.Forms

    main

    Use the InTheHand.Bluetooth.Permissions library to manage Bluetooth permissions in .NET MAUI 7.0 and Xamarin.Forms applications. This library provides a permission instance that integrates with the standard Permissions API.

    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>();
  11. Supported Platforms for InTheHand.Net.IrDA

    main

    Although 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.

  12. Overview of 32feet.NET

    main

    32feet.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.