HeboTech.ATLib 0.0.1-alpha-2

An extensible async AT command library.

This is a prerelease version of HeboTech.ATLib.
Install-Package HeboTech.ATLib -Version 0.0.1-alpha-2
dotnet add package HeboTech.ATLib --version 0.0.1-alpha-2
<PackageReference Include="HeboTech.ATLib" Version="0.0.1-alpha-2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add HeboTech.ATLib --version 0.0.1-alpha-2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

ATLib Continuous Integration

ATLib is a C# AT command library that abstracts away the commands and makes it easy to communicate with modems.

Hayes command set (commonly known as AT commands) is a command set commonly used in modems. Read more about it at Wikipedia

ATLib is just in the beginning. Currently only a few commands are implemented, but more will come.

Usage

Install as NuGet package

dotnet add package HeboTech.ATLib

Using a serial port to communicate with a modem is easy:

// Create and connect to serial port
SerialPort serialPort = new SerialPort(); //Use an overload to pass in your settings
serialPort.Open();
// Pipe the serial port stream through a duplex pipe
IDuplexPipe duplexPipe = StreamConnection.GetDuplex(serialPort.BaseStream); // See note below
// Pass in the pipe to the communicator and start communicating!
ICommunicator<string> comm = new Communicator(duplexPipe);
// Send a ping to the modem
var initializeResult = await comm.InitializeAsync();
// Get battery status
var batteryStatus = await comm.GetBatteryStatusAsync();
Note:
IDuplexPipe is an interface in System.IO.Pipelines. Microsoft and ATLib doesn't come with an implementations for this, but Pipelines.Sockets.Unofficial has one that works great!

Install it with

dotnet add package Pipelines.Sockets.Unofficial

ATLib Continuous Integration

ATLib is a C# AT command library that abstracts away the commands and makes it easy to communicate with modems.

Hayes command set (commonly known as AT commands) is a command set commonly used in modems. Read more about it at Wikipedia

ATLib is just in the beginning. Currently only a few commands are implemented, but more will come.

Usage

Install as NuGet package

dotnet add package HeboTech.ATLib

Using a serial port to communicate with a modem is easy:

// Create and connect to serial port
SerialPort serialPort = new SerialPort(); //Use an overload to pass in your settings
serialPort.Open();
// Pipe the serial port stream through a duplex pipe
IDuplexPipe duplexPipe = StreamConnection.GetDuplex(serialPort.BaseStream); // See note below
// Pass in the pipe to the communicator and start communicating!
ICommunicator<string> comm = new Communicator(duplexPipe);
// Send a ping to the modem
var initializeResult = await comm.InitializeAsync();
// Get battery status
var batteryStatus = await comm.GetBatteryStatusAsync();
Note:
IDuplexPipe is an interface in System.IO.Pipelines. Microsoft and ATLib doesn't come with an implementations for this, but Pipelines.Sockets.Unofficial has one that works great!

Install it with

dotnet add package Pipelines.Sockets.Unofficial

Release Notes

See https://github.com/hbjorgo/ATLib/releases/tag/0.0.1-alpha-2

GitHub repositories (0)

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
0.0.1-alpha-2 73 5/16/2020